var zz_float_pix	= 5;
var zz_float_url	= 'float/loading.html?h='+zz_float_host+'&i='+zz_float_param;
var zz_float_code	= '<a href="'+zz_float_url+'" target="_blank"><img src="float/'+zz_float_imgstr+'.gif" border="0"></a>';
function useIframe(divName){
	document.write('<iframe id="'+divName+'" scrolling="no" frameborder="0"></iframe>');
	var tmpObj = document.getElementById(divName);
	window.frames[divName].document.write('<html><body style="margin:0px">'+zz_float_code+'</body></html>');
	tmpObj.style.width = zz_float_width;
	tmpObj.style.height = zz_float_height;
	tmpObj.style.position="absolute";
	tmpObj.style.zIndex=10000;
}

if(zz_float_type != 7){
	document.write('<DIV id=crown_img1 style="Z-INDEX: 10000; width:'+zz_float_width+'px;height:'+zz_float_height+'px;POSITION: absolute; TOP: 43px; visibility: visible;">'+zz_float_code+'</DIV>')
	var zz_float_obj = document.getElementById('crown_img1');
	if(zz_float_obj == null){
		useIframe('crown_img1');
		zz_float_obj = document.getElementById('crown_img1');
	}
}
if(zz_float_type == 2){
var xPos = 300;
var yPos = 200; 
var step = 1;
var delay = 30; 
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
zz_float_obj.style.top = yPos;
function changePos() 
{
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = zz_float_obj.offsetHeight;
Woffset = zz_float_obj.offsetWidth;
zz_float_obj.style.left = xPos + document.body.scrollLeft;
zz_float_obj.style.top = yPos + document.body.scrollTop;
if (yon) 
{yPos = yPos + step;}
else 
{yPos = yPos - step;}
if (yPos < 0) 
{yon = 1;yPos = 0;}
if (yPos >= (height - Hoffset)) 
{yon = 0;yPos = (height - Hoffset);}
if (xon) 
{xPos = xPos + step;}
else 
{xPos = xPos - step;}
if (xPos < 0) 
{xon = 1;xPos = 0;}
if (xPos >= (width - Woffset)) 
{xon = 0;xPos = (width - Woffset);   }
}

function start()
{
zz_float_obj.visibility = "visible";
interval = setInterval('changePos()', delay);
}
function pause_resume() 
{
if(pause) 
{
clearInterval(interval);
pause = false;}
else 
{
interval = setInterval('changePos()',delay);
pause = true; 
}
}
start();	
}
else if(zz_float_type == 3||zz_float_type == 4||zz_float_type == 5||zz_float_type == 6){
	function floatF(){
		var wh=document.documentElement.offsetHeight;
 		var wst=document.body.scrollTop;
		if(zz_float_type == 5 || zz_float_type == 6)
			zz_float_obj.style.right= zz_float_pix;
		else {
			zz_float_obj.style.left= zz_float_pix;
		}
		if(zz_float_type == 3 || zz_float_type == 5)
			zz_float_obj.style.pixelTop= wst+zz_float_pix;
		else {
			zz_float_obj.style.pixelTop= wst+wh - zz_float_height;
		}
	}
	if(cu_st){clearInterval(cu_st);
	 var cu_st=window.setInterval("floatF()",100);
	}else var cu_st=window.setInterval("floatF()",100);
}
else if(zz_float_type == 7){
	var openwinDocument="<html><body style='margin:0px'>";
	openwinDocument+=zz_float_code;
	openwinDocument+="</body></html>"; 
	var zz_float_NWin=window.open("about:blank",'',"status=no,scrollbars=no,resizable=no,width="+zz_float_width+",height="+zz_float_height);
	zz_float_NWin.document.open();
	zz_float_NWin.document.write(openwinDocument);
	zz_float_NWin.document.close();
}
else if(zz_float_type == 8){
	document.write('<DIV id=crown_img2 style="Z-INDEX: 10000; width:'+zz_float_width+'px;height:'+zz_float_height+'px;POSITION: absolute; TOP: 43px; visibility: visible;">'+zz_float_code+'</DIV>')
	var zz_float_obj2 = document.getElementById('crown_img2');
	if(zz_float_obj2 == null){
		useIframe('crown_img2');
		zz_float_obj2 = document.getElementById('crown_img2');
	}
	
	function floatT(){
		var wh=document.documentElement.offsetHeight;
 		var wst=document.body.scrollTop;
		zz_float_obj2.style.right= zz_float_pix;
		zz_float_obj.style.left= zz_float_pix;
		zz_float_obj.style.pixelTop= wst+zz_float_pix+120;
		zz_float_obj2.style.pixelTop= wst+zz_float_pix+120;
	}
	if(cu_st){clearInterval(cu_st);
	 var cu_st=window.setInterval("floatT()",100);
	}else var cu_st=window.setInterval("floatT()",100);
}