var win = null;
function newWindow(mypage,myname,w,h,features) {
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win = window.open(mypage,myname,settings);
win.window.focus();
}

var Type = 'Z';
function StartFloat() {
if(document.all) {
	document.all.AdFloater.style.pixelTop = document.body.scrollTop + 100;
	document.all.AdFloater.style.pixelLeft = document.body.clientWidth - 200;
	document.all.AdFloater.style.visibility = 'visible';
	Type = 'A';
	}
else if(document.layers) {
	document.AdFloater.left = window.innerWidth - document.AdFloater.clip.width - 16;
	document.AdFloater.visibility = 'show';
	Type = 'B';
	}
else if(document.getElementById) {
	document.getElementById('AdFloater').style.top = (100 + document.body.scrollTop)  + 'px';
	document.getElementById('AdFloater').style.left = (window.innerWidth - 200) + 'px';
	document.getElementById('AdFloater').style.visibility = 'visible';
	Type = 'C';
	}
if (document.all) { window.onscroll = Float;  window.onresize = Float; }
else { setInterval('Float()', 100); }
}
function Float() {
if (Type == 'A') { document.all.AdFloater.style.pixelTop = document.body.scrollTop + 100;
				   document.all.AdFloater.style.pixelLeft = document.body.clientWidth - 200;}
else if (Type == 'B') { document.AdFloater.top = window.pageYOffset + 100; }
else if (Type == 'C') { document.getElementById('AdFloater').style.top = (100 + document.body.scrollTop)  + 'px';
					    document.getElementById('AdFloater').style.left = (window.innerWidth - 200) + 'px'; }
}
