// JavaScript Document
var RedirNoJQ = true;
var IsIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;
var IsWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;
var IsOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
var IsChrome=(navigator.userAgent.toLowerCase().indexOf("chrome")>-1)?true:false;
var Obj=document;
try{
	Obj=window.parent
}catch(e){
	try{
		Obj=window
	}catch(e){
		Obj=document
	}
}
function findPos(B){
	try{
		var C=curtop=0;
		if(B){
			if(B.offsetParent){
				C=B.offsetLeft;
				curtop=B.offsetTop;
				while(B=B.offsetParent){
					C+=B.offsetLeft;curtop+=B.offsetTop
				}
			}
			return[C,curtop]
		}else{
			return[0,0]
		}
	}catch(A){
		return[0,0]
	}
}

function WriteBanner(A){
	return""
}

function HideDiv(A){
	try{
		document.getElementById(A).style.display="none";
		document.getElementById(A).style.visibility="hidden"
	}catch(B){}
}
function ReadCookie(A){
	A=A+"=";
	return GetCookieValue(document.cookie,A,";")
}
function GetCookieValue(F,D,B){
	var C;
	var E;
	var A;
	if(F==null){
		return null
	}
	if(F.length>0){
		E=F.indexOf(D);
		if(E!=-1){
			E+=D.length;
			A=F.indexOf(B,E);
			if(A==-1){
				A=F.length
			}
			return unescape(F.substring(E,A))
		}
	}
	return null
}

function WriteCookie(A,C,D){
	var E="/";
	var B=A+"="+escape(C);
	myPath=E;
	B+=";path="+myPath;
	if(D){
		if(D!=""&&D!=null){
			B+=";expires="+D
		}
	}
	document.cookie=B
}
function SkinSetWidthHeight(){
	var A=0;
	if(GetWidth()>950){
		A=(GetWidth()-950)/2
	}
	var D=GetHeight();
	var B=document.getElementById("skinadvdx");
	var C=document.getElementById("skinadvsx");
	B.style.width=A+"px";
	B.style.height=D+"px";
	C.style.width=A+"px";
	C.style.height=D+"px";
	B=document.getElementById("skinadvdx");
	C=document.getElementById("skinadvsx");
	B.style.width=A+"px";
	B.style.height=D+"px";
	C.style.width=(A-5)+"px";
	C.style.height=D+"px"
}
function GetWidth(){
	var A=0;
	if(self.innerHeight){
		A=self.innerWidth
	}else{
		if(document.documentElement&&document.documentElement.clientHeight){
			A=document.documentElement.clientWidth
		}else{
			if(document.body){
				A=document.body.clientWidth
			}
		}
	}
	return A
}

function GetHeight(){
	var A=0;
	if(self.innerHeight){
		A=self.innerHeight
	}else{
		if(document.documentElement&&document.documentElement.clientHeight){
			A=document.documentElement.clientHeight
		}else{
			if(document.body){
				A=document.body.clientHeight
			}
		}
	}
	return A
}
var EventUtil={addHandler:function(A,C,B){
	if(A.addEventListener){
		A.addEventListener(C,B,false)
	}else{
		if(A.attachEvent){
			A.attachEvent("on"+C,B)
		}else{
			A["on"+C]=B
		}
	}
},removeHandler:function(A,C,B){
	if(A.removeEventListener){
		A.removeEventListener(C,B,false)
	}else{
		if(A.detachEvent){
			A.detachEvent("on"+C,B)
		}else{
			A["on"+C]=null
		}
	}
},getEvent:function(A){
	return A?A:window.event
	
},getTarget:function(A){
	return A.target||A.srcElement
},preventDefault:function(A){
	if(A.preventDefault){
		A.preventDefault()
	}else{
		A.returnValue=false
	}
},stopPropagation:function(A){
	if(A.stopPropagation){
		A.stopPropagation()
	}else{
		A.cancelBubble=true
	}
}};

function getBrowserWidth(){
if (window.innerWidth){	return window.innerWidth;}	
else if (document.documentElement && document.documentElement.clientWidth != 0)
{return document.documentElement.clientWidth;	}
else if (document.body){return document.body.clientWidth;}	
return 0;}

function getBrowserHeight(){
if (window.innerHeight){return window.innerHeight;}	
else if (document.documentElement && document.documentElement.clientHeight != 0)
{return document.documentElement.clientHeight;}
else if (document.body){return document.body.clientHeight;}
return 0;}
function WriteBanner(position) {
	var BCode='';

	try {
		var larg_table = 950;
		var larg_1x1 = ((getBrowserWidth()-larg_table)/2);
		var left2 = larg_table+larg_1x1; // posizionamento in px colonna dx
		var total_altezza = getBrowserHeight();
		//var LinkUrl = "http://www.radioglobo.it";
		//document.write('<div id="adv_leatherb"></div>');
		document.write('<div id="skinadvsx"><a href="'+LinkUrl+'"><img src="img/spacer_10x10.gif" width="'+larg_1x1+'" height="'+total_altezza+'" border="0" /></a></div>');
		document.write('<div id="skinadvdx"><a href="'+LinkUrl+'"><img src="img/spacer_10x10.gif" width="'+larg_1x1+'" height="'+total_altezza+'" border="0" /></a></div>');
		EventUtil.addHandler(window,'resize',SkinSetWidthHeight);
		EventUtil.addHandler(window,'load',SkinSetWidthHeight);
	
	}catch(e){}

 	return BCode;
}