	window.onresize = baiduResizeDiv;
	window.onerror = function(){}
	var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
	String.prototype.Trim  = function(){return this.replace(/^\s+|\s+$/g,"");}
	
	function baidu_collapse(obj){
	ct = document.getElementById('tab_c_'+(2+3));
		if(ct.style.display=="none"){
			ct.style.display="";
			obj.src=obj.src.replace("FastGuestBook_Ico3.gif","FastGuestBook_Ico2.gif");
		} else {
			ct.style.display="none";
			obj.src=obj.src.replace("FastGuestBook_Ico2.gif","FastGuestBook_Ico3.gif");
		}
		baiduResizeDiv();
	}
	
	function baiduMsg()
	{
		try{
			start();
                                divTop = parseInt(document.getElementById("eMeng").style.top,10);
			divLeft = parseInt(document.getElementById("eMeng").style.left,10);
			divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10);
			divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10);
			docWidth = document.body.clientWidth;
			docHeight = document.body.clientHeight;
			document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight
			document.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth;
			document.getElementById("eMeng").style.visibility="visible";
			objTimer = window.setInterval("baidu_move_div()",10);
		}catch(e){}
	} 
	
	function baiduResizeDiv()
	{
		i+=1;
		try{
			divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10);
			divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10);
			docWidth = document.body.clientWidth;
			docHeight = document.body.clientHeight;
			document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10);
			document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10);
		}catch(e){}
	}
	
	function baidu_move_div()
	{
		try{
			if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
			{
				window.clearInterval(objTimer);objTimer = window.setInterval("baiduResizeDiv()",1);
			}
			divTop = parseInt(document.getElementById("eMeng").style.top,10);
			document.getElementById("eMeng").style.top = divTop - 1;
		}catch(e){}
	}
	
	 function valid_message()
	{
		
		if (document.FastGuestBookForm1.Title.value.length <1 || document.FastGuestBookForm1.Title.value==FastGuestBookTitleText)
		{
			alert(GuestBook_NoTitle);
			document.FastGuestBookForm1.Title.focus();
			return false;
		}
		if (document.FastGuestBookForm1.LXName.value.length<1 || document.FastGuestBookForm1.LXName.value==FastGuestBookLXNameText)
		{
			alert(GuestBook_NoLXName);
			document.FastGuestBookForm1.LXName.focus();
			return false;
		}
		if (document.FastGuestBookForm1.Text.value.length<1 || document.FastGuestBookForm1.Text.value==FastGuestBookTextText)
		{
			alert(GuestBook_NoText);
			document.FastGuestBookForm1.Text.focus();
			return false;
		}
		if (document.FastGuestBookForm1.Text.value.length>GuestBookTextMaxLen)
		{
			alert(GuestBook_TextLen);
			document.FastGuestBookForm1.Text.focus();
			return false;
		}
		if (document.FastGuestBookForm1.VerifyCode.value.length<1 || document.FastGuestBookForm1.VerifyCode.value==FastGuestBookVerifyCodeText)
		{
			alert(GuestBook_NoVerifyCode);
			document.FastGuestBookForm1.VerifyCode.focus();
			return false;
		}
		if (document.FastGuestBookForm1.VerifyCode.value!=FastGuestBookVerifyCode)
		{
			alert(GuestBook_VerifyCodeErr);
			document.FastGuestBookForm1.VerifyCode.focus();
			return false;
		}
		
		if (document.FastGuestBookForm1.Email.value==FastGuestBookEMailText)
		{
			document.FastGuestBookForm1.Email.value="";
		}
		
		FastGuestBookForm1.submit();
		
		//msee_init();
	}
	
	function msee_init () {
		lea_mess.message.value = lea_mess.message.defaultValue;
		lea_mess.contact.value = lea_mess.contact.defaultValue;
	}
	
	function baiduMessbox(shape,color,userid){
		var styles='position:absolute;top:0px;left:0px;z-index:99999;visibility:hidden;';
		var copic='<img src="'+FastGuestBookImagePath+'ico_'+color+'a.gif" align="absmiddle" class="ioc'+color+'" onClick="baidu_collapse(this)">';
		if(shape>1) window.onload = baiduMsg;
		else {styles='';copic=''}
		var s;
		if(shape==2) {
			s='<div id=eMeng style="Z-INDEX:99999;LEFT:0px;POSITION:absolute;TOP:0px;VISIBILITY:hidden;">'
			+"<iframe style='position:absolute;z-index:-1;width:expression(this.nextSibling.offsetWidth);height:expression(this.nextSibling.offsetHeight-14);top:expression(this.nextSibling.offsetTop+14);left:expression(this.nextSibling.offsetLeft);' frameborder='0'> </iframe>"
				+ "<form name ='FastGuestBookForm1' action ='GuestBook.asp?action=save&type=fastguestbook' method ='post' style='margin:0px; padding:0px;'>"
				+ '<table width="212" border="0" cellpadding="0" cellspacing="0" class="" id="tab_'+(color+3)+'" style="border:0px;">'
				+'  <tr>'
				+'    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">'
				+'        <tr>'
				+'          <td width="32" rowspan="2" valign="bottom"><img src="'+FastGuestBookImagePath+'FastGuestBook_Ico1.gif"></td>'
				+'          <td>&nbsp;</td>'
				+'        </tr>'
				+'        <tr>'
				+'          <td align=left width="60%" style="font-size:12px; background:url('+FastGuestBookImagePath+'FastGuestBook_Bg.gif);line-height:20px;height:21px;border-top:1px solid #808080;border-right:0px solid #808080;padding-left:6px;color:#FFFFFF;" onDblClick="baidu_collapse(this.firstChild.nextSibling)">'+FastGuestBookText
				+'</td>'
				+'<td align=right width="40%" style="font-size:12px; background:url('+FastGuestBookImagePath+'FastGuestBook_Bg.gif);line-height:20px;height:21px;border-top:1px solid #808080;border-right:1px solid #808080;padding-left:6px;color:#FFFFFF;"> '+FastGuestBookMinText+'¡ú<a href="javascript:baidu_collapse(document.all.CloseButton1);"><img border=0 src="'+FastGuestBookImagePath+'FastGuestBook_Ico2.gif" align="absmiddle" class="ioc'+color+'" id="CloseButton1"></a>'
				+'		  </td>'
				+'        </tr>'
				+'      </table>'
				+'	  </td>'
				+'    </tr>'
				+ '</table>'
				+ '<table width="212" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #808080;" id="tab_c_'+(color+3)+'">'
				+'  <tr bgcolor="#FFFFFF">'
				+'   <td style="color:#808080;line-height:14px;" align=left>'
				+'   <input name="Title" type="text" style="width:198px; overflow:auto; font-size:12px; color:#808080; border:1px solid #808080; margin:4px 4px 4px 4px; height:20px" onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;" value="'+FastGuestBookTitleText+'" />'
				+'<table width="98%" border="0"  cellpadding="0" cellspacing="0"><tr><td width="50%" align="left"><input name="LXName" type="text" style="width:95px;font-size:12px; color:#808080; border:1px solid #808080; margin:0px 4px 4px 4px;height=20px;" onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;" value="'+FastGuestBookLXNameText+'" /></td><td width="50%" align="right"><input name="Email" type="text" style="width:95px;font-size:12px; color:#808080; border:1px solid #808080; margin:0px 4px 4px 4px;height=20px;" onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;" value="'+FastGuestBookEMailText+'" /></td></tr></table>'
				+'   <textarea name="Text"   style="width:198px; overflow:auto; font-size:12px; color:#808080; border:1px solid #808080; margin:0px 4px 4px 4px;height=50px;" onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;">'+FastGuestBookTextText+'</textarea>'
				
				+'        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin:0px;padding-right:5px;">'
				+'          <tr>'
				+'            <td  align="left" width="85%" style="padding-left:0px; color=#808080;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="left" width="60%"><input name="VerifyCode" type="text" style="width:87px;font-size:12px; color:#808080; border:1px solid #808080; margin:0px 4px 4px 4px;height=20px;" onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;" value="'+FastGuestBookVerifyCodeText+'" /></td><td align="left" width="40%" style="color:#FF0000; font-weight:bold;">'+FastGuestBookVerifyCode+'</td></tr></table></td>'
				+'            <td  align="right" width="15%"><img src="'+FastGuestBookImagePath+'FastGuestBook_SendButton.gif" border="0" style="cursor:hand;" onclick="valid_message();"></td>'
				+'          </tr>'
				+'        </table>'
				+'<tr> <td height=6 bgcolor="#FFFFFF"></td></tr>'
				+'	   </td>'
				+'    </tr>'
				+'  </table></form>'
				+'</div>';
		} 
		document.writeln(s);
		
	}
	
	baiduMessbox(2, 2, 545224);
