document.write('<div id="epop" style="Z-INDEX:99999;left:0px;visibility:hidden; POSITION:absolute; TOP:0px;"> ');
document.write('<table border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td valign="top" bgcolor="#dc0000"><table width="100%"  border="0" cellspacing="1" cellpadding="0">');
document.write('<tr>');
document.write('<td height="26" background="http://www.chinaname.cn/images/pop-bg.gif" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td style="font-size:12px;padding-left:6px; color:#FFFFFF;">中华取名网提示</td>');
document.write('<td width="15"><img src="http://www.chinaname.cn/images/pop-small.gif" width="15" height="15" onclick="changeDiv();"  id="ctrl" style="cursor:pointer;"></td>');
document.write('<td width="15" style="padding-right:6px;"><img src="http://www.chinaname.cn/images/pop-close.gif" width="15" height="15" onclick="closeDiv();" style="cursor:pointer;"></td>');
document.write('</tr>');
document.write('</table></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td valign="top" bgcolor="#FFFFFF" style="padding:9px;" id="popad">');
document.write('<iframe marginheight="0" marginwidth="0" frameborder="0" width="157" height="131" scrolling="no" src="http://www.chinaname.cn/pop.htm"></iframe>');
document.write('</td>');
document.write('</tr>');
document.write('</table></td>');
document.write('</tr>');
document.write('</table></div>');
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
	try{
	divTop = parseInt(document.getElementById("epop").style.top,10);
	divLeft = parseInt(document.getElementById("epop").style.left,10);
	divHeight = parseInt(document.getElementById("epop").offsetHeight,10);
	divWidth = parseInt(document.getElementById("epop").offsetWidth,10);
	docWidth = document.body.clientWidth;
	docHeight = document.body.clientHeight;
	document.getElementById("epop").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;//  divHeight
	document.getElementById("epop").style.left = parseInt(document.body.scrollLeft,10)+2;
	document.getElementById("epop").style.visibility="visible"
	objTimer = window.setInterval("moveDiv()",10)
	}
	catch(e){}
}

function resizeDiv()
	{
	try{
	divHeight = parseInt(document.getElementById("epop").offsetHeight,10)
	divWidth = parseInt(document.getElementById("epop").offsetWidth,10)
	docWidth = document.body.clientWidth;
	docHeight = document.body.clientHeight;
	document.getElementById("epop").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
	document.getElementById("epop").style.left = parseInt(document.body.scrollLeft,10)+2
	}
	catch(e){}
}

function moveDiv()
{
	try
	{
	if(parseInt(document.getElementById("epop").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
	{
	window.clearInterval(objTimer)
	objTimer = window.setInterval("resizeDiv()",1)
	}
	divTop = parseInt(document.getElementById("epop").style.top,10)
	document.getElementById("epop").style.top = divTop - 1
	}
	catch(e){}
}

function closeDiv()
{
	document.getElementById('epop').style.visibility='hidden';
	if(objTimer) window.clearInterval(objTimer)
}
function changeDiv(){
	var cobj = document.getElementById('ctrl').src;	
	if(cobj=="http://www.chinaname.cn/images/pop-small.gif") {
		document.getElementById('popad').innerHTML = "";
		document.getElementById('ctrl').src = "http://www.chinaname.cn/images/pop-max.gif";
		}
	if(cobj=="http://www.chinaname.cn/images/pop-max.gif"){
		document.getElementById('ctrl').src = "http://www.chinaname.cn/images/pop-small.gif";
		document.getElementById('popad').innerHTML = '<iframe marginheight="0" marginwidth="0" frameborder="0" width="157" height="105" scrolling="no" src="http://www.chinaname.cn/pop.htm"></iframe>';
		}
		
}
	window.onload = getMsg;
	window.onresize = resizeDiv;
	//window.onerror = function(){}
