function rzCC(s){for(var exp=/-([a-z])/; exp.test(s); s=s.replace(exp,RegExp.$1.toUpperCase()));return s;}
function rzGetStyle(e,a){var v=null;if(document.defaultView && document.defaultView.getComputedStyle){ var cs=document.defaultView.getComputedStyle(e,null); if(cs && cs.getPropertyValue) v=cs.getPropertyValue(a);} if(!v && e.currentStyle) v=e.currentStyle[rzCC(a)]; return v; };7
//function rzGetBg(e){var v=rzGetStyle(e,'background-color'); while (!v || v=='transparent' || v=='#000000' || v=='rgba(0, 0, 0, 0)'){if(e==document.body) v='#fff'; else {e=e.parentNode;v=rzGetStyle(e,'background-color');}}return v;};
function rzGetBg(e){var v=rzGetStyle(e,'background-color'); while (!v || v=='transparent'){if(e==document.body) v='#fff'; else {e=e.parentNode;v=rzGetStyle(e,'background-color');}}return v;};
function hexify(number) {var digits = '0123456789ABCDEF';var lsd = number % 16;var msd = (number - lsd) / 16;var hexified = digits.charAt(msd) + digits.charAt(lsd);return hexified;}
function luapl_Body(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}
luapl_show=true;
try{ if ((self != parent) && (parent.document.getElementsByTagName('body')[0].firstChild==parent.luaplads)) luapl_show=false; } catch(e){}    
if(luapl_show && (luaplbody = document.getElementsByTagName('body')[0])  && ( (self == top) || ( luapl_Body().clientWidth>700 && luapl_Body().clientHeight>100 ) ) )
{
//    if (top.frames.length>0) 
//    { 
//    }
	luaplbg=rzGetBg(luaplbody);
	if ( (/^#[a-f0-9]{3,6}/i).test(luaplbg) )
	{	
		luaplbg = luaplbg.replace(/^#([a-f0-9]{3,6})$/i,"$1");
	}
	else
	{
		luaplbg = luaplbg.replace(/^rgb\(([0-9]+), *([0-9]+), *([0-9]+)(.+)$/i,"$1 $2 $3").split(' ');
		luaplbg = hexify(luaplbg[0])+hexify(luaplbg[1])+hexify(luaplbg[2]);
	}
	
//	if ( (/^000/i).test(luaplbg) )
//	{
//	    luaplbg = "FFFFFF";
//	}
	luapl_adW = 728;
	luapl_adH = 125;	
//	luapl_adH = 209
	luapl_adT = 20;	
	luapl_adB = 0;	

	luaplads = document.createElement('div');
	luaplads.style.textAlign='center';
	luaplads.style.height=luapl_adH+luapl_adT+luapl_adB+'px';
	luaplads.style.top=luapl_adT + 'px';
	var irm = Math.round(2*Math.random());
	
//	if (irm == 0)	
        	luaplads.innerHTML='<iframe src="http://www.luahosting.pl/ads/google728x90.php?id=5&c='+luaplbg+'" align="center" marginborder="0" frameborder="0" marginheight="0" scrolling="no" style="position: absolute; top: '+luapl_adT+'px;left: 50%; margin-left: -'+(luapl_adW/2)+'px;background: transparent;  height: '+luapl_adH+'px;width:'+(luapl_adW)+'px !important;border: none;z-index: 999 !important;"  ></' + 'iframe>';
//	else


	
	luaplbody.insertBefore(luaplads,luaplbody.firstChild);	
}

