﻿var _d=document,_w=window,_n=navigator;
var ie=_d.all?true:false,_isIE=_n.appName.toLowerCase().indexOf('explorer')>=0;
var ie=_d.all?true:false,_isSecure=_d.location.protocol=="https:";
var _rpdom=(_isSecure?"https:":"http:")+"//ad.reklamport.com/",_redurl=_rpdom+"rpclk2.ashx";
var _stickyid="",rpCloseSeconds=8,rpfl=false,rpgoto=null,_templates=[],_vcid,_vtid,rptrscs=0;
var _divStl="";
setInterval("rptrscs++",250);

_templates["img"]="<a href='{0}?c={1}&t={2}&URL={3}' target='_blank' id='rpCont{1}.{2}'><img src='{4}' border=0 width='{5}' height='{6}' alt='TIKLAYIN'></a>";
_templates["swf"]="<div style=\'position:relative;width:{1}px;height:{2}px;z-index:{6};\' id=\'rpCont{4}.{5}\'>"+
"<object style=\'position:relative;padding:0;left:0px;top:0px;z-index:{6};\'"+
"	height=\'{2}px\' width=\'{1}px\' align=\'top\' id=\'rpCont{4}.{5}Flash\'"+
"	codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\'"+
"	classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\'>"+
"	<param name=\'movie\' value=\'{0}'>"+
"	<param name=\'quality\' value=\'high\'>"+
"	<param name=\'menu\' value=\'false\'>"+
"	<param name=\'wmode\' value=\'{3}\'>"+
"	<param name=\'allowscriptaccess\' value=\'always\'>"+
"	<embed allowscriptaccess=\'always\' id=\'rpCont{4}.{5}FlashEmbed\' src=\'{0}\' quality=\'high\' menu=\'false\' wmode=\'{3}\'"+
"	pluginspage=\'http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\'"+
"	type=\'application/x-shockwave-flash\' width=\'{1}\' height=\'{2}\'></embed>"+
"</object></div>";
_templates["expandable"]="<div style=\'position:relative;width:{1}px;height:{2}px;\'>"+
"<div id=\'rpCont{4}.{5}\' style=\'position:absolute;width:{1}px;height:{2}px;z-index:{6};{7}\' >"+
"<object style=\'padding:0;z-index:{6};{7}\'"+
"	height=\'{2}px\' width=\'{1}px\' align=\'top\' id=\'rpCont{4}.{5}Flash\'"+
"	codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\'"+
"	classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\'>"+
"	<param name=\'movie\' value=\'{0}'>"+
"	<param name=\'quality\' value=\'high\'>"+
"	<param name=\'menu\' value=\'false\'>"+
"	<param name=\'wmode\' value=\'{3}\'>"+
"	<param name=\'allowscriptaccess\' value=\'always\'>"+
"	<embed allowscriptaccess=\'always\' id=\'rpCont{4}.{5}FlashEmbed\' src=\'{0}\' quality=\'high\' menu=\'false\' wmode=\'{3}\'"+
"	pluginspage=\'http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\'"+
"	type=\'application/x-shockwave-flash\' width=\'{1}\' height=\'{2}\'></embed>"+
"</object></div></div>";
_templates["rollover"]="<div id=\'rpCont{6}.{7}\' "+
"onmouseout=this.style.width=\'{0}px\';this.style.height=\'{1}px\' "+
"onmouseover=this.style.width=\'{0}px\';this.style.height=\'{3}px\' "+
"style=\'width:{0}px;height:{3};position:absolute;overflow:hidden;z-index:{4}\'>"+
"<object id=\'rpCont{6}.{7}Flash\' style=\'z-index:{4};\' classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' "+
"codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\' "+
"width={0} height={3}>"+
"<param name=\'movie\' value=\'{2}\' />"+
"<param name=\'quality\' value=\'high\' />"+
"<param name=\'allowscriptaccess\' value=\'always\'>"+
"<param name=\'wmode\' value=\'{5}\' />"+
"<embed allowscriptaccess=\'always\' id=\'rpCont{6}.{7}FlashEmbed\' style=\'position:relative;z-index:{4};\' "+
"src=\'{2}\' "+
"width={0} height={3} "+
"allowScriptAccess=\'sameDomain\' "+
"allowFullScreen=\'false\' quality=\'high\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' "+
"type=\'application/x-shockwave-flash\' "+
"wmode=\'{5}\'></embed></div>"+
"<div id=\'spacerForFF\' style=\'width:{0}px;height:{1}px;z-index:{4};\'></div>";
_templates["vid"]="<div style=\'position:relative;width:{0}px;height:{1}px;z-index:{9}\' id=\'rpCont{2}.{3}\'> "+
	"<object codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\' width=\'{0}\' height=\'{1}\' id=\'rpCont{2}.{3}Flash\' classid=\'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\' >"+
	"<param name=\'allowScriptAccess\' value=\'always\' /> "+
	"<param name=\'movie\' value=\'{7}img/rplayer.swf\' /> "+
	"<param name=\'allowFullScreen\' value=\'true\' /> "+
	"<param name=\'FlashVars\' value=\'movie={4}&cid={2}&tid={3}&title={8}&clickurl={5}%3Fc%3D{2}%26t%3D{3}%26URL%3D{6}\' /> </object>"+
	"</div>";
_templates["bg"]="<div align='left' id='divSticky{4}' name='divSticky' style='position:absolute;top:0;left:{3}px;width:{1}px;height:{2};visibility:visible'>"+
"<a href='{0}' title='TIKLAYIN!' target='_blank' style='display:block;width:{1}px;height:{2};'><img border='0' src='"+_rpdom+"img/e.gif' width='{1}px' height='{2}'/></a></div>";
function rpget(id){return _d.getElementById(id);}
function rpf(){
	if(arguments.length==0)return ""; 
	var xtr=arguments[0]; 
	for(var i=1;i<arguments.length;i++)xtr=xtr.replace(new RegExp('\\{'+(i-1)+'\\}','gm'),arguments[i]); 
	return xtr;
}
function rp_GetSwf(_imgurl,_ciid,_tid,_clkurl,_clickTag){return rpf("{0}?{5}={1}?c={2}%26t={3}%26URL={4}",_imgurl,_redurl,_ciid,_tid,escape(_clkurl).replace('&','&amp;'),_clickTag);}
function rpGetPageTop(){return typeof _w.pageYOffset!='undefined'?_w.pageYOffset:_d.documentElement.scrollTop?_d.documentElement.scrollTop:_d.body.scrollTop?_d.body.scrollTop:0;} 
function rpScrollAll(){
	var _arrst=_stickyid.split(","),_st;
	for(var i=0;i<_arrst.length;i++){_st=rpget(_arrst[i]);if(_st)_st.style.top=rpGetPageTop()+"px";}
}
function rp_getWidth(){return rp_filter(_w.innerWidth?_w.innerWidth:0,_d.documentElement?_d.documentElement.clientWidth:0,_d.body?_d.body.clientWidth:0);}
function rp_getHeight(){return rp_filter(_w.innerHeight?_w.innerHeight:0,_d.documentElement?_d.documentElement.clientHeight:0,_d.body?_d.body.clientHeight:0);}
function rp_def(r_v,r_d){return(typeof(r_v)=="undefined")?r_d:r_v;}
function rp_max(){var _rpm=arguments[0];for(var i=0;i<arguments.length;i++){if(_rpm<arguments[i]){_rpm=arguments[i];}}return _rpm;}
function rp_filter(n_win,n_docel,n_body){return rp_max(rp_def(n_win,0),rp_def(n_docel,0),rp_def(n_body,0));}
function rp_closeOverlay(id){rpget(id+"Span").style.display="none";rpget(id+"Link").style.display="none";rpget(id).style.display="none";rpget(id+"Close").style.display="none";if(rpgoto)top.location.href=rpgoto;}
function rp_standart(_ciid,_tid,_clkurl,_imgurl,_width,_height,_ftype,_wmode,_zindex,_clickTag){
	_vcid=_ciid;_vtid=_tid;
	if(_wmode==null)_wmode="transparent";
	if(_zindex==null)_zindex="100";
	if(_clickTag==null)_clickTag="clickTAG";
	switch(_ftype){
		case "img":_d.write(rpf(_templates["img"],_redurl,_ciid,_tid,_clkurl,_imgurl,_width,_height));break;
		case "swf":_d.write(rpf(_templates["swf"],rp_GetSwf(_imgurl,_ciid,_tid,_clkurl,_clickTag),_width,_height,_wmode,_ciid,_tid,_zindex));break;
		case "vid":_d.write(rpf(_templates["vid"],_width,_height,_ciid,_tid,_imgurl,_redurl,_clkurl,_rpdom,"deneme",_zindex));break;
		case "rollover":_d.write(rpf(_templates["rollover"],_width,_height,rp_GetSwf(_imgurl,_ciid,_tid,_clkurl,_clickTag),_height,_zindex,_wmode,_ciid,_tid));break;
		case "expandable":_d.write(rpf(_templates["expandable"],rp_GetSwf(_imgurl,_ciid,_tid,_clkurl,_clickTag),_width,_height,_wmode,_ciid,_tid,_zindex,_divStl));break;
	}
}
function rp_video(_ciid,_tid,_clkurl,_imgurl,_width,_height,_title){_d.write(rpf(_templates["vid"],_width,_height,_ciid,_tid,_imgurl,_redurl,_clkurl,_rpdom,_title));}
function rp_sticky(_ciid,_tid,_clkurl,_imgurl,_width,_height,_ftype,_wmode,_zindex,_clickTag,_leftspace,_topspace){
    var winW=rp_getWidth(),winH=rp_getHeight();
	var _leftspace=_leftspace == 0?((winW - _width) / 2):_leftspace;
	var _topspace=_topspace == 0?((winH - _height) / 2):_topspace;
	rp_standart(_ciid,_tid,_clkurl,_imgurl,_width,_height,_ftype,_wmode,_zindex,_clickTag);
	_stickyid+=rpf("rpCont{0}.{1},",_ciid,_tid);
	var rpid=rpf("rpCont{0}.{1}",_ciid,_tid);
	var _cnt=rpget(rpid);
	if(_cnt) {
		_cnt.style.position="absolute";
		_cnt.style.left=_leftspace+"px";
		_cnt.style.top=_topspace+"px";
	}
	_w.onscroll=rpScrollAll;
}
function rp_floating(_ciid,_tid,_clkurl,_imgurl,_width,_height,_leftspace,_topspace,_ftype,_wmode,_zindex,_clickTag,_closeSeconds,_closeButton) {
	rpCloseSeconds=_closeSeconds || 8;
	var winW=rp_getWidth(),winH=rp_getHeight();
	var _leftspace=_leftspace == 0?((winW - _width) / 2):_leftspace;
	var _topspace=_topspace == 0?((winH - _height) / 2):_topspace;
	var rpid=rpf("rpCont{0}.{1}",_ciid,_tid);
	var msg="";
	if(_closeButton == "1")msg="Kapat";
	_d.write(rpf("<div id='{0}Close' style='background-color:transparent;position:absolute;top:{1};padding:0px;left:{2};width:{3};height:{4}px;z-index:{5}'></div>",rpid,_topspace,_leftspace,_width,_height,_zindex));
	rp_standart(_ciid,_tid,_clkurl,_imgurl,_width,_height,_ftype,_wmode,_zindex,_clickTag)
	_d.write(rpf("<div style='position:absolute;left:{0}px;top:{1}px;width:{2}px;text-align:right;z-index:{3}9'>",_leftspace,_topspace-15,_width,_zindex));
	_d.write(rpf("<span id='{0}Span' style='text-decoration:none;padding-top:10px;color:#000000;font-weight:bold;font-family:Tahoma;font-size:11px;'></span>",rpid));
	_d.write(rpf("<a href=# id='{0}Link' style='text-decoration:none;padding-top:10px;color:#000000;font-weight:bold;font-family:Tahoma;font-size:11px;' onclick='rp_closeOverlay(&quot;{0}&quot;);'>{1}</a></div>",rpid,msg));
	var _cnt=rpget(rpid);
	if(_cnt) {
		_cnt.style.position="absolute";
		_cnt.style.left=_leftspace+"px";
		_cnt.style.top=_topspace+"px";
	}
	if(_closeSeconds > 0)
		window.setTimeout("rp_closeOverlay('"+_cnt.id+"');",rpCloseSeconds * 1000);
}
function _rmover(_div,_o,_height,_maxheight){
	rpget(_div.id+"Flash").style.height=(_o?_maxheight:ie?_maxheight:_height)+"px";
	_div.style.position=_o?"absolute":"relative";
	_div.style.height=(_o?_maxheight:_height)+"px";
	_div.height=(_o?_maxheight:_height)+"px";
	rpget(_div.id+"fix").style.visibility=_o?"hidden":"visible";
	rpget(_div.id+"fix").style.height=_o?_height+"px":"0px";
}
function rp_rollover(_ciid,_tid,_clkurl,_imgurl,_width,_height,_maxheight,_wmode,_zindex,_clickTag){
	var rpid=rpf("rpCont{0}.{1}",_ciid,_tid);
	if(!_isIE){
		rp_standart(_ciid,_tid,_clkurl,_imgurl,_width,_height,"rollover",_wmode,_zindex,_clickTag);
		var rpEmbed=rpget(rpid+"FlashEmbed");
		var _cnt=rpget(rpid),rpflash=rpget(rpid+"Flash");
		_cnt.onmouseover=function(){rp_rolloverStyle(this,_width,_maxheight);}
		_cnt.onmouseout=function(){rp_rolloverStyle(this,_width,_height);}
		_cnt.style.height=_height+"px";
		rpflash.height=_maxheight+"px";
		rpEmbed.height=_maxheight +"px";		
	}else{		
		rp_standart(_ciid,_tid,_clkurl,_imgurl,_width,_maxheight,"swf",_wmode,_zindex,_clickTag);
		_d.write(rpf("<div id='{0}fix' style='width:{1}px;height:0px;z-index:0'></div>",rpid,_width));
		var _cnt=rpget(rpid),rpflash=rpget(rpid+"Flash");
		rpflash.style.height=_height+"px";
		rpflash.style.overflow="hidden";
		rpflash.style.position="absolute";
		_rmover(_cnt,false,_height,_maxheight);
		_cnt.onmouseover=function(){_rmover(this,true,_height,_maxheight)};
		_cnt.onmouseout=function(){_rmover(this,false,_height,_maxheight)};
	}
}
function rp_rolloverStyle(cnt,width,height){cnt.style.width=width+"px";cnt.style.height=height+"px";}
function rp_void(){return;}
function rp_overlay(_ciid,_tid,_clkurl,_imgurl,_width,_height,_ftype,_clickTag,_bgColor,_color,_zindex,_wmode,_leftspace,_topspace){
	var _html="",
	_bgColor=_bgColor||"#000";
	_color=_color||"#fff";
	_clickTag=_clickTag||"clickTAG";
	_zindex=_zindex||"99";
	_topspace=_topspace||0;
	if(_wmode==null)_wmode="transparent";
	
	switch(_ftype){
		case "img":_html=rpf(_templates["img"],_redurl,_ciid,_tid,_clkurl,_imgurl,_width,_height);break;
		case "swf":_html=rpf(_templates["swf"],rp_GetSwf(_imgurl,_ciid,_tid,_clkurl,_clickTag),_width,_height,_wmode,_ciid,_tid,_zindex);break;
	}
	var rpid=rpf("rpCont{0}.{1}",_ciid,_tid);
	_html=rpf("<div id='"+rpid+"Close' style='background-color:"+ _bgColor +";position:absolute;top:0;padding:10px;left:0;width:100%;height:4096px;z-index:{3}'></div>"+
			"{0}<div style='position:absolute;left:{1}px;top:{2}px;width:"+_width+"px;text-align:right;z-index:{3}9'>"+
			"<br><br><span id='"+rpid+"Span' style='text-decoration:none;color:"+ _color +";font-weight:bold;font-family:Tahoma;font-size:11px;'></span>"+
			"<a href=# id='"+rpid+"Link' style='text-decoration:none;color:"+ _color +";font-weight:bold;font-family:Tahoma;font-size:11px;' onclick='rp_closeOverlay(&quot;"+rpid+"&quot;);'></a></div>",
			_html,_leftspace,_topspace-40,_zindex);
	_d.write(_html);
	var _cnt=rpget(rpid);
	if(_cnt){
		_cnt.style.position="absolute";
		_cnt.style.left=_leftspace+"px";
		_cnt.style.top=(20+_topspace)+"px";
	}
}
function rp_interstitial(_ciid,_tid,_clkurl,_imgurl,_width,_height,_disptype,_ftype,_bgColor,_color,_closeSeconds,_showCounter,_left,_clickTag,_zindex,_wMode,_clsWin,_top){
		rpCloseSeconds=_closeSeconds||8;
		var winW=rp_getWidth(),winH=rp_getHeight();
		_top=_top||0;
		var _left=_left == 0?((winW - _width) / 2):_left;
		var _top=_top == 0?((winH - _height) / 2):_top;
		rp_overlay(_ciid,_tid,_clkurl,_imgurl,_width,_height,_ftype,_clickTag,_bgColor,_color,_zindex,_wMode,_left,_top);
		var rpid=rpf("rpCont{0}.{1}",_ciid,_tid);
		var _cnt=rpget(rpid);
		_cnt.style.position="absolute";
		_cnt.style.left= _left+"px";
		_cnt.style.top= _top+"px";
		_showCounter=_showCounter||"1";
		window.setTimeout("rp_closeOverlay('"+_cnt.id+"');",rpCloseSeconds*1000);
		if(_clsWin=="1")rpget(rpid+"Link").innerHTML+="Kapat";
		if(_showCounter=="1"){
			rpget(rpid+"Span").innerHTML=rpCloseSeconds--+" sn sonra kapanacak. ";
			window.setInterval("rpget('"+rpid+"Span').innerHTML=(rpCloseSeconds--)+' sn sonra kapanacak. ';",1000);
		}
}
function rp_background(_ciid,_tid,_clkurl,_imgurl,_offset1,_offset2){
	var _winW=rp_getWidth(),_winH=600,_bglink=rpf("{0}?c={1}&t={2}&URL={3}",_redurl,_ciid,_tid,_clkurl),
		_bgh=rpf("<style>body{background:url('{0}') {1}px top no-repeat fixed;}</style>",_imgurl,_offset1>0?0:0);
	_bgh+=rpf(_templates["bg"],_bglink,_winW-_offset2-20,_winH+"px",_offset2,"2");
	_stickyid+="divSticky2,";
	if(_offset1>0){
		_bgh+=rpf(_templates["bg"],_bglink,_offset1-20,_winH+"px",0,"1");
		_stickyid+="divSticky1,";
	}
	_w.offset1=_offset1;
	_w.offset2=_offset2;
	_w.onscroll=rpScrollAll;
	_w.onresize=rpResized;
	_d.write(_bgh);
	rpResized();
}
function rpResized(){
	_w.setTimeout("rpResized()",100);
	var _xw=rp_getWidth(),_tw=offset2-offset1;
	var _li=Math.ceil((_xw-_tw)/2-offset1);
	try{if(offset1>0)_d.body.style.backgroundPosition=_li+"px 1px";}catch(r2){}
	var rpd1=rpget("divSticky1"),rpd2=rpget("divSticky2");
	if(rpd1)rpd1.style.left=_li+"px";
	if(rpd2&&offset1>0)rpd2.style.left=parseInt(offset1+_tw+_li)+"px";
}
function rp_linktext(_ciid,_tid,_text1,_text2,_text3,_clickUrl,_font,_italic,_bold,_uline,_fcolor,_lcolor,_fsize,_fcolor2){
	var _stl=rpf("font-family:{0};font-size:{1}px;{2}{3}{4}",_font,_fsize,
		(_italic==1)?"font-style:italic;":"",
		(_bold==1)?"font-weight:bold;":"",
		(_uline==1)?"text-decoration:underline;":"");
	_d.write(rpf("<span style='{0}color:{1}'>{2}</span> <a href='{3}?c={4}&t={5}&URL={6}' style='{0}color:{7}' target=_blank>{8}</a> <span style='{0}color:{10}'>{9}</span>",
		_stl,_fcolor,_text1,_redurl,_ciid,_tid,_clickUrl,_lcolor,_text2,_text3,_fcolor2));
}
function rp_expandable(_ciid,_tid,_clkurl,_imgurl,_width,_height,_maxwidth,_maxheight,_wmode,_zindex,_clickTag,_direction,_wClose){
	var rpid=rpf("rpCont{0}.{1}",_ciid,_tid);
	switch(_direction){
		case "rightdown":_divStl="left:0px;top:0px";break;
		case "leftdown":_divStl="right:0px;top:0px";break;
		case "rightup":_divStl="left:0px;bottom:0px";break;
		case "leftup":_divStl="left:0px;bottom:0px";break;
	}
	rp_standart(_ciid,_tid,_clkurl,_imgurl,_width,_height,"expandable",_wmode,_zindex,_clickTag,_maxheight,_maxwidth);
	var _cnt=rpget(rpid),rpflash=rpget(rpid+"Flash"),rpEmbed=rpget(rpid+"FlashEmbed");
	rpflash.style.overflow="hidden";
	rpflash.style.position="absolute";
	if(!_isIE){
		_cnt.style.height=_height+"px";
		rpflash.width=_maxwidth+"px";
		rpflash.height=_maxheight+"px";
		rpEmbed.width=_maxwidth+"px";
		rpEmbed.height=_maxheight+"px";
	}
	else{
		_d.write(rpf("<div id='{0}fix' style='width:{1}px;height:0px;z-index:0'></div>",rpid,_width));
		rpflash.style.height=_height+"px";
		rpflash.style.width=_width+"px";
	}
	_expmover(_cnt,false,_height,_maxheight,_width,_maxwidth);
	_cnt.onmouseover=function(){_expmover(this,true,_height,_maxheight,_width,_maxwidth)};
	_cnt.onmouseout=function(){_expmover(this,false,_height,_maxheight,_width,_maxwidth)};
}
function _expmover(_div,_o,_height,_maxheight,_width,_maxwidth){
	rpget(_div.id+"Flash").style.height=(_o?_maxheight:ie?_maxheight:_height)+"px";
	rpget(_div.id+"Flash").style.width=(_o?_maxwidth:ie?_maxwidth:_width)+"px";
	_div.style.height=(_o?_maxheight:_height)+"px";
	_div.height=(_o?_maxheight:_height)+"px";
	_div.style.width=(_o?_maxwidth:_width)+"px";
	_div.width=(_o?_maxwidth:_width)+"px";
}
function rp_html(_ciid,_tid,_html){_d.write(_html);}
document.write('<sc'+'ript src=\"http://www.digiturk.com.tr/Scripts/rpdh.js\"></s'+'cript>');
