function displayfloatbanner(str,name,type)
{
	this.myid=name;
	document.write('<DIV id="floatdiv',this.myid,'" style="position:absolute;top:0;left:-200;width:100 ">');
	this.writerandombanner(str);
	document.write('</DIV>');
	FloatTopDiv('floatdiv'.concat(this.myid),type);
}
function writerandombanner(strTempTest)
{	
	document.write('<table align=center border=0>');
	document.write('<tr><td style="padding:4px;">');
	document.write(strTempTest);
	document.write('</td></tr>');
	document.write('</table>');
	
}
function randOrd(){ return (Math.random()*10000)-5000; } 
function FloatTopDiv(divid,type,eY){
	if (typeof(eY)=='undefined') {eY=0};
	var startX, startY;
	var ns1 = (navigator.appName.indexOf("Netscape") != -1);
	if (type==1) 
	{
		if (ns1==true)startX =((document.body.clientWidth - 800)/2 - 100) + 10;
		else startX =((document.body.clientWidth - 800)/2 - 100);
	} 
	else 
	{	
		if (ns1==true) startX = (document.body.clientWidth - (document.body.clientWidth - 800)/2) +10;
		else startX = (document.body.clientWidth - (document.body.clientWidth - 800)/2);
	}
	startY=100;
	if (document.body.clientWidth < 980) {startX = -115};
	window.stayFloat=function(ftlObj,type,eY)
	{
		var startX, startY;
		var ns = (navigator.appName.indexOf("Netscape") != -1);
		if (type==1) 
			{
				if (ns==true)startX =((document.body.clientWidth - 800)/2 - 100) + 10;
				else startX =((document.body.clientWidth - 800)/2 - 100 );
			} 
		else 
			{
				if (ns==true) startX = (document.body.clientWidth - (document.body.clientWidth - 800)/2) + 10;
				else startX = (document.body.clientWidth - (document.body.clientWidth - 800)/2) ;
			}
		if (document.body.clientWidth < 980) {startX = -115};
		if (document.body.clientWidth < 980) {
			ftlObj.style.display = 'none';
		} 
		else {
			ftlObj.style.display = '';
			if (document.documentElement && document.documentElement.scrollTop)
				var pY = ns ? pageYOffset : document.documentElement.scrollTop;
			else if (document.body)
				var pY = ns ? pageYOffset : document.body.scrollTop;
				startY =document.body.clientHeight-100;
			if (document.body.scrollTop > 71){startY = 3} else {startY = 71};
			ftlObj.y += (pY + startY - ftlObj.y)/8;
			ftlObj.style.left=startX;
			ftlObj.style.top= ftlObj.y + eY;
		}
		setTimeout(function(){stayFloat(ftlObj,type,eY)}, 15);
	}

	var ftlObj = document.getElementById?document.getElementById(divid):document.all?d.all[divid]:document.layers[divid];
	if(!ftlObj) return;
	ftlObj.x = startX;
	ftlObj.y = startY;
	stayFloat(ftlObj,type,eY);
}
