/*--

	300*250 image

============================================================================== */
if(navigator.platform.indexOf("Win") < 0 && navigator.appName.indexOf("Internet") >= 0){//Mac IE
}else{
	var _La_param = {
		srcpath:"mads/fix/08_img",
		sid:600802,
		width:300,
		height:250,
		adsid:5,
		ref:encodeURIComponent(document.URL),
		comLength:2
	}
	var isSMT = (navigator.userAgent.indexOf("Android") >= 0 || navigator.userAgent.indexOf("iPhone") >= 0 || navigator.userAgent.indexOf("iPad") >= 0 || navigator.userAgent.indexOf("iPod") >= 0);
	if (isSMT) {
		_La_param.srcpath = "mads/smt/optimization/01_img";
		if(navigator.userAgent.indexOf("Android") >= 0){//android
			_La_param.sid = 601602;
		}else{
			_La_param.sid = 601402;
		}
		_La_param.width = encodeURIComponent("100%");
		_La_param.height = "50";
		_La_param.comLength = "1";
	}	

	var _Liveads_Src = 'http://www2.liveads.jp/widgets/' + _La_param.srcpath + '/src.php?';
	_La_param.srcpath = encodeURIComponent(_La_param.srcpath);
	
	
	for(var i in _LiveAds_Mads_Data){
		_Liveads_Src += i + '=' + _LiveAds_Mads_Data[i] + '&';
	}
	
	for(var i in _La_param){
		_Liveads_Src += i + '=' + _La_param[i] + '&';
	}
	
	var _LA_Cookie = { //cookie
		read:function(CookieName){
			if(document.cookie){
				var cookie_Data = document.cookie;
				var Name =cookie_Data.indexOf(CookieName + "=",0);
				if(Name >= 0){
					var Data = cookie_Data.indexOf(";",Name + CookieName.length + 1);
					Data >= 0? Data = cookie_Data.substring(Name + CookieName.length + 1,Data): Data = cookie_Data.substring(Name + CookieName.length + 1,cookie_Data.length);
					return(Data);
				}
			}
			return(false);
		},
		set:function(CookieName,Value){
			var time =new Date();
			time.setTime(time.getTime() + (1000*60*60*12));
			var exptime =";expires=" + time.toGMTString();
			document.cookie = CookieName + "=" + Value + exptime + "; path=/";
		}
	};
	if(_LA_Cookie.read("unqCheckCookieimp")){
		_Liveads_Src +='ccheck=nonunique';
	}else{
	//j[N
		_Liveads_Src +='ccheck=unique';
		_LA_Cookie.set("unqCheckCookieimp","true");	
	}
	
	
	
	if(!_LiveAds_Mads_Count){
		var _LiveAds_Mads_Count = 0;
	}
	
	
	if (isSMT) {
		//smt
		var _LiveAds_Iframe ='<iframe allowtransparency="true" id="_LiveAds_Mads_smt_Count_'+ _LiveAds_Mads_Count + '" width="100%" src="'+_Liveads_Src+'" height="' + _La_param.height + '" scrolling="no" marginheight="0" frameborder="0" hspace="0" vspace="0" style="margin:0px; width:100%;"></iframe>';
	}else {
		var _LiveAds_Iframe ='<iframe allowtransparency="true" id="_LiveAds_Mads_Count_'+ _LiveAds_Mads_Count + '" width="' + _La_param.width + '" src="'+_Liveads_Src+'" height="' + _La_param.height + '" scrolling="no" marginheight="0" frameborder="0" hspace="0" vspace="0" style="margin:0px; width:' + _La_param.width + 'px;"></iframe>';
	}
	document.write(_LiveAds_Iframe);
	
	
	_LiveAds_Mads_Count++;
	
	delete _La_param,_LiveAds_Iframe,_LiveAds_Iframe;
}

