var ___script=null;
var UArr = new Array(); var DArr = new Array();var GArr = new Array(); var _frObj,SrvCode=null,mnet_=null,mnet__=null;
var isORq = true;var rnd__=String(Math.random()).substr(2,15);var d_=document;var _TargetCampaign = "";
var BUrl = "http://ad.e-kolay.net";var PageTag;
function MNSR(url_) 
{
    rnd__=String(Math.random()).substr(2,15);
    this.url_ = url_;     
    if(url_.indexOf("?")>0)
		this.cache = "&rnd=" + rnd__
	else
		this.cache = "?rnd=" + rnd__;
    this.bodyLoc = d_.body;
    this.scriptId = 'scriptId' + MNSR.sC++;
}

function fqobj(init)
{
	if(init!="" && typeof(init) != undefined && init != null )
	{	this.ciid = init.split("|")[0];this.fqtype = init.split("|")[1];this.fqvalue = init.split("|")[2];this.fqmaxvalue = init.split("|")[3]; this.fqdate =	init.split("|")[4];}
	else
	{	this.ciid = 0;this.fqtype = 0;this.fqvalue = 0;this.fqmaxvalue = 0;this.fqdate=null	}
}

fqobj.prototype.toString = function()
{	return this.ciid + "|" + this.fqtype + "|" + this.fqvalue + "|" + this.fqmaxvalue + "|" + this.fqdate;}

MNSR.prototype.UpdateFqList = function(f__)
{
	var fqarr = new Array();
	var isc = false;
	var cname = f__.fqtype == 1 ? "fqsession": "fqcookie";
	var fqcookie = new String(getCookie(cname));
	var fqarr__ = fqcookie.split(",");
	for(_i=0;fqcookie!="" && _i<fqarr__.length;_i++)
	{		
		var o__ = new fqobj(fqarr__[_i]);
		if(o__.ciid == f__.ciid)
		{o__.fqvalue++;o__.fqmaxvalue=f__.fqmaxvalue; fqarr.push(o__.toString());isc=true;}
		else
			fqarr.push(o__.toString());
	}
	
	if(!isc)
		fqarr.push(f__.toString());
	setCookie(cname,fqarr);	
}
MNSR.prototype.GetFqList = function ()
{
	var returnstr="";
	if(getCookie("fqsession")!=null)
	{		
		var fqcookie = new String(getCookie("fqsession"));
		var fqarr = fqcookie.split(",");
		for(i=0;i<fqarr.length;i++)
		{
			var o__ = new fqobj(fqarr[i]);
			if(o__.ciid !=0 && o__.fqtype==1 && (parseInt(o__.fqvalue)>=parseInt(o__.fqmaxvalue)-1))
				returnstr += returnstr != ""? "," + o__.ciid:o__.ciid ;
		}
	}
	return returnstr;
}

MNSR.sC = 1;
MNSR.prototype.BST = function () 
{
    this.sObj = d_.createElement("iframe");
    this.sObj.frameBorder = 0;this.sObj.left = -100;this.sObj.top=-100;this.sObj.width=1;this.sObj.height=1;
    this.sObj.setAttribute("name", this.scriptId);
    this.fqlist = this.GetFqList();
    var stru__ = "javascript:document.write('<script src="+BUrl+"/orfad.a2?target=" + this.url_ +"&fqlist="+this.fqlist+"&rnd="+ rnd__ + "><\/script>');"
    this.sObj.setAttribute("src", stru__);
    this.sObj.setAttribute("id", this.scriptId);
}
MNSR.prototype.RST = function(){this.bodyLoc.removeChild(this.sObj);}
MNSR.prototype.AST = function(){_frObj=this.bodyLoc.appendChild(this.sObj);}

function MNetCallBackFunction(returnstring){if(returnstring != null && returnstring != ""){SrvCode=returnstring;mnet_.sObj.src='#'; mnet_.RST();}}
function ApplyGeo(divname__, returnstring__){mnet__ = new MNSR(Url);mnet__.BST();mnet__.AST();}
function ApplyFunction(dn__, rs__){d_.getElementById(dn__).innerHTML = eval(rs__);}
function ApplyHtml(dn__, rs__){d_.getElementById(dn__).innerHTML=rs__;}

function ApplyScript(dn__, rs__)
{    
    var s__ = d_.createElement("script");
    s__.setAttribute('type','text/javascript');
    s__.text= "document.write('finaltext')";
    
    var div__= d_.createElement("div");
    div__.setAttribute('id','hede');
    div__.innerHTML = "bu div";
    
    var old_div = d_.getElementById(dn__);
    var parent = old_div.parentNode;
    
    parent.insertBefore(div__, old_div);
    div__.appendChild(s__);
}

function MNetBanner(div,gparam,isAgain)
{
    if(gparam != null && gparam != "undefined" && isORq) // geo
    {
        var s__ = d_.createElement("script");
        s__.setAttribute('type','text/javascript'); 
        var rs__ = 'document.write(\'<scr\'+\'ipt language=JavaScript src="'+BUrl + '/getad.a2?target='+div+'&'+gparam+'&DOL_chache=' + rnd__+ '"><\/scri\' + \'pt>\');';
        s__.text=rs__;
        
        isORq = false ;
        d_.getElementById(div).appendChild(s__);
        isORq = true ; 
        
        GArr[GArr.length] = gparam;
    }
    else
    {
        if(!isORq)
	        d_.write('<scr'+'ipt language=JavaScript src='+BUrl+'/getad.a2?target='+div+'&DOL_chache=' + rnd__+ '><\/scri' + 'pt>');
        else
        {
	        if(SrvCode!=null)
	        {
		        var bancodes = new Array();bancodes = SrvCode.split("£");
		        for(i=0;i<bancodes.length;i++)
		        {
			        var bancode = new Array(); bancode = bancodes[i].split("|",10);
			        if(bancode[3]==div)
			        {
				        if(d_.getElementById(div) != null)
				        {
					        var contenttype = new Array();contenttype = bancode[0].split("###",2);
					        var tmp__ = _TargetCampaign != "" ? "," + bancode[2] + ";" + bancode[4] : bancode[2] + ";" + bancode[4];//BT
					        _TargetCampaign = _TargetCampaign + tmp__;//BT
					        switch(contenttype[1])
					        {				            
						        case "function" : ApplyFunction(div, contenttype[0]); break;
						        case "geo" : ApplyGeo(div, contenttype[0]); break;
						        case "html" : ApplyHtml(div, contenttype[0]); break;
						        case "script" : ApplyScript(div, contenttype[0]); break;
					        }}
                    //fq
					var j_ = new fqobj(); j_.tid = bancode[4]; j_.ciid = bancode[2];
					j_.fqtype = bancode[7]; j_.fqmaxvalue = bancode[8];j_.fqdate = new Date(bancode[9]);
					if( bancode[7] == 1 )
						mnet_.UpdateFqList(j_);
                    }
                }
			    if(isAgain!="Again")
			    {
			        DArr[DArr.length] = div ;GArr[GArr.length] = gparam;
			    }
	        }
	        else
		        {
		        setTimeout("MNetBanner('"+div+"','"+gparam+"','"+isAgain+"')",250);}       
        }
    }
}
function MNetReq(Url){if(isORq){PageTag = Url;GetBannerHtmlCode(Url);}}
function MNetBannerShow(){return;}
function GetBannerHtmlCode(Url){mnet_ = new MNSR(Url);	mnet_.BST();mnet_.AST();}

function GetBannersAgain()
{
    SrvCode = null;
    MNetReq(PageTag);
    for(i=0;i<DArr.length;i++)
    {
        eval("MNetBanner('"+DArr[i]+"','"+GArr[i]+"','Again')");
    }
}
// *********************************************************************
// *********************************************************************
//Ad.Js

var blnIsNS = (navigator.appName.indexOf('Netscape') >= 0 && parseFloat(navigator.appVersion) >= 4) ? true : false;
var blnIsIE = (d_.all) ? true : false;
var blnIsMac= (navigator.appVersion.indexOf('Mac')!=-1) ? true : false;
var id_counter = 0;
function DOLAD_popup(strUrl, intWidth, intHeight, intLeft, intTop) {DOLLcl_popWindow(strUrl, intWidth, intHeight, intLeft, intTop, true);return "";}
function DOLAD_popunder(strUrl, intWidth, intHeight, intLeft, intTop) {	DOLLcl_popWindow(strUrl, intWidth, intHeight, intLeft, intTop, false); return "";}
function DOLLcl_popWindow(strUrl, intWidth, intHeight, intLeft, intTop, blnFocus) {
	var lclIntLeft=(intLeft==null || intLeft==0)?(screen.width-intWidth)/2:intLeft;
	var lclIntTop=(intTop==null || intTop==0)?(screen.height-intHeight)/2:intTop;
	var lclObjWin = window.open(strUrl,'ekolay','toolbar=0,status=0,menubar=0,resizable=0,scrollbars=0,width='+intWidth+'px,height='+intHeight+'px,left=' + lclIntLeft + ',top=' +lclIntTop);
	if(!blnFocus) {
		lclObjWin.blur();
		self.focus();
	}
	return "";
}
function DOLAD_flash(strUrl, intWidth, intHeight, intTop, intLeft, strMode) 
{

	var lclStrMode=(strMode == null)?"transparent":strMode;
	var tmp = '';
	tmp += ('<div style="position:relative;width:'+intWidth+'px;height:'+intHeight+'px;z-index:9999"><OBJECT style="position:absolute;left:0px;top:0px;z-index:9999;" border="0" height="'+intHeight+'" width="'+intWidth+'" align="top" id="Flash_'+strUrl+'"'+ 
		' codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"'+
		' height="'+intHeight+'" width="'+intWidth+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >'+
		'<PARAM NAME="movie" VALUE="'+strUrl+'">'+
		'<PARAM NAME="quality" VALUE="high">'+
		'<PARAM NAME="wmode" VALUE="'+lclStrMode+'">'+
		'<embed ID="embedFlash_'+strUrl+'" '+
		' src="'+strUrl+'"'+
		' quality="high" wmode="'+lclStrMode+'"'+
		' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"'+
		' type="application/x-shockwave-flash" width="'+intWidth+'" height="'+intHeight+'"></embed>'+
		'</OBJECT></div>');
		if(intTop!=null) {
			tmp = '';
		}
		
if(isORq)
	return tmp;
else
	d_.write(tmp);
}
function DOLAD_rollover(strUrl, intWidth, intHeight, clickUrl, rawClickUrl, strMode) {
	if (window.navigator.appName.toLowerCase().indexOf('explorer') < 0)
	{
		if (intWidth==468){
			var tmp='<iframe ALIGN="center" SCROLLING="no" SRC="http://www.e-kolay.net/images/mozilla.asp?hedef='+escape(strUrl)+'&genlik='+intWidth+'&boy='+intHeight+'&link='+escape(clickUrl)+'" FRAMEBORDER="0" WIDTH="'+intWidth+'" HEIGHT="60"></iframe>'
			if(isORq)
				return tmp;
			else
				d_.write(tmp);
		}
	}
	else{
	var lclStrMode=(strMode==null)?"transparent":strMode;
	var tempStrUrl=(rawClickUrl!="http://")?strUrl+clickUrl:strUrl;
	strUrl=tempStrUrl;
	//var lclStrBnrId = "Bnr_"+(id_counter++)
 	//d_.write("<div id='"+lclStrBnrId+"'></div>");
 	//var lyr = d_.getElementById(lclStrBnrId);
 	var position = (blnIsIE) ? '' : 'left:' + lyr.PageX + ';top:' + lyr.PageY;
	var tmp;
	tmp = ''+
	'<div style="position:relative;width:'+intWidth+'px;z-index:999999"><OBJECT onmouseover="try{DOLBNR_hide();} catch(e) {}" onmouseout="try{DOLBNR_show();} catch(e) {}"'+
	' style="position:absolute;left:0px;top:0px;z-index:9999;"' +
	' codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"'+
	' width="'+intWidth+'" height="'+intHeight+'"'+
	' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
	'>'+
	'<PARAM NAME="movie" VALUE="'+strUrl+'">'+
	'<PARAM NAME="quality" VALUE="high">'+	
	'<PARAM NAME="wmode" VALUE="'+lclStrMode+'">'+
	'<embed'+
	' src="'+strUrl+'"'+
	' quality="high"'+
	' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"'+
	' type="application/x-shockwave-flash"'+
	' style="position:absolute; z-index:9999; '+ position + '"' + 
	' wmode="'+lclStrMode+'"'+
	' width="'+intWidth+'" height="'+intHeight+'"'+
	'></embed>'+
	'</OBJECT></div>';
	if(isORq)
		return tmp;
	else
		d_.write(tmp);
	}
}
function DOLAD_img(strHTML){if(isORq){return strHTML;}else{d_.write(strHTML);}}
function DOLAD_HTML(strHTML){if(isORq){return strHTML;}else{d_.write(strHTML);}}

function DOLAD_floating(strURL, clickURL, intWidth, intHeight, intLeft, intTop, isCenter)
{
if (window.navigator.appName.toLowerCase().indexOf('explorer') > 0)
	{
	var lclIntX=(intLeft==null)?0:intLeft;
	var lclIntY=(intTop==null)?0:intTop;
	var rnd=Math.ceil(Math.random()*99999999);
	var clientWidth=document.body.offsetWidth;
	var clientHeight=document.body.offsetHeight;
	if (clientWidth<770) clientWidth=792;
	var positionLeft=(lclIntX==0)?(clientWidth/2)-(intWidth/2):lclIntX;
	var positionTop=(lclIntY==0)?(clientHeight/2)-(intHeight/2):lclIntY;
	var tmp= ''+
	'<div id="floatingDiv'+rnd+'" '+
	' align="center" style="position: absolute; width:'+intWidth+'px; height:'+intHeight+'px; z-index:99999;left:'+positionLeft+'px;top:'+positionTop+'px;"> '+
	' <object id="flashobj'+rnd+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+
	' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '+
	' width="'+intWidth+'" height="'+intHeight+'" align="middle"> '+
	'    <param name=movie value="'+strURL+clickURL+'"> '+
	'    <param name=quality value=high> '+
	'    <param name="BGCOLOR" value=""> '+
	'    <param name=scale value=noborder> '+
	'    <param name=wmode value=transparent> '+
	'    <embed id="floatingEmbed'+rnd+'" src="'+strURL+clickURL+'" quality=high wmode=transparent  scale=noborder pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" '+
	' width="'+intWidth+'" height="'+intHeight+'" align="absmiddle"> '+
	'    </embed> </div> '+
	'  </object> ';
	if(isORq)
		return tmp;
	else
		d_.write(tmp);
	}
}

function DOLAD_RePos(){}
function getCookie(strName) 
{
	var arrCookie = d_.cookie.split(";");
	for (var i=0; i < arrCookie.length; i++) {
		var cookie = arrCookie[i].split("=");
		while(cookie[0].indexOf(" ")==0) cookie[0]=cookie[0].substr(1);
		if (strName == cookie[0]) return unescape(cookie[1]);
	}
	return "";
}
function createCookie(name,value,days)
{
    if (days)
    {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
        d_.cookie = name+"="+value+expires+";";
} 
function setCookie(strName, strValue){d_.cookie = strName + "=" + escape(strValue);}

function flashCookie(cookiename)
{
	var getCookieObj = document.getElementById(cookiename)
	var cookieValue=getCookie(cookiename);
	if(getCookieObj == null)
		setTimeout("flashCookie('"+ cookiename + "');",200);
	else
		getCookieObj.SetVariable('_root.cookieValue',cookieValue);
}

document.write('<sc'+'ript src=\"http://ad.e-kolay.net/BT__.js\"></s'+'cript>');