String.prototype.Trim  = function(){return this.replace(/^\s+|\s+$/g,"");}
function initAd(){
	$("AdLayer").style.posTop = -200;            //设置onLoad事件激发以后，广告层相对于固定后的y方向位置
	$("AdLayer").style.visibility = "visible";    //设置层为可见
	$("AdLayer").style.display = "";
	MoveLayer('AdLayer');                                //调用函数MoveLayer()
	//MoveLayer('FreeTel');
}
function MoveLayer(layerName){
	var x = 100;                                           //浮动广告层固定于浏览器的x方向位置
	var y = 348;                                         //浮动广告层固定于浏览器的y方向位置
	//var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.90;
	//var y = document.body.scrollTop + y - diff;
	var diff = (document.documentElement.scrollTop + y - document.all.AdLayer.style.posTop)*.90;
	var y = document.documentElement.scrollTop + y - diff;
	eval("document.all." + layerName + ".style.posTop = y");
	eval("document.all." + layerName + ".style.posLeft = x");//移动广告层
	setTimeout("MoveLayer('AdLayer');",0);              //设置0毫秒后再调用函数MoveLayer()
}

function onyes(){
    window.showModalDialog("ctrem_win.html","content","dialogWidth=550px;dialogHeight=550px;dialogleft=0px;dialogtop=0px;scroll:off");
	}
function onno(){
	document.all("tab").style.display="none";
	document.all("main").style.display="none";
	document.all("ad_kf").style.display="";
}

document.writeln("<div id=\'AdLayer\' style=\'position:absolute; width: 100%; z-index:20; visibility:hidden; right: 0px; top: 100px\'>")
document.writeln("<div id=\"tab\" name=\"tab\" align=\"left\" style=\"position: absolute; width:100%;height:160px;z-index: 1; top:50px; visibility:visible\">");
document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"images/KF_div.gif\" style=\"background-repeat:no-repeat; width:398px; height:145px\">");
document.writeln("	<tr>");
document.writeln("		<td width=\"10\" height=\"47\"><\/td>");
document.writeln("		<td height=\"47\" width=\"261\" align=\"center\" colspan=\"2\" valign=\"bottom\" style=\"font-size:12px; color:#ffffff; font-family:Verdana, Arial, Helvetica, sans-serif;font-weight:bold\"><strong>便捷留言服务<\/strong><\/td>");
document.writeln("		<td width=\"41\" height=\"47\"><\/td>");
document.writeln("		<td width=\"86\" height=\"47\"><\/td>");
document.writeln("	<\/tr>");
document.writeln("	<tr>");
document.writeln("		<td width=\"10\" height=\"60\"><\/td>");
document.writeln("		<td id=\"\' + this.inviteTdId + \'\" width=\"261\" height=\"60\" colspan=\"2\" style=\"font-size:12px; color: #ffffff; font-family:Verdana, Arial, Helvetica, sans-serif;word-break: break-all; padding:2px\">您好,这里是派乐汉堡便捷留言系统!<br>可以在这里留下您的联系方式让我们主动与您取得联系!<\/td>");
document.writeln("		<td width=\"41\" height=\"60\"><\/td>");
document.writeln("		<td width=\"86\" height=\"60\"><\/td>");
document.writeln("	<\/tr>");
document.writeln("	<tr>");
document.writeln("		<td width=\"10\" height=\"35\"><\/td>");
document.writeln("		<td width=\"140\" height=\"35\" align=\"center\" valign=\"top\"><a href=\"javascript:\" onClick=\"onyes();\"><img src=\"images/spacer.gif\" alt=\"现在留言\" width=\"116\" height=\"23\" border=\"0\" \/><\/a><\/td>");
document.writeln("		<td width=\"121\" height=\"35\" align=\"right\" valign=\"top\"><a href=\"javascript:\" onClick=\"onno();setCookie('KFtype','no');\"><img src=\"images/spacer.gif\" alt=\"以后再说\" width=\"116\" height=\"23\" border=\"0\" \/><\/a><\/td>");
document.writeln("		<td width=\"41\" height=\"35\"><\/td><td width=\"86\" height=\"35\"><\/td>");
document.writeln("	<\/tr>");
document.writeln("  <\/table>");
document.writeln("<\/div>");
document.writeln("<div id=\"main\" name=\"main\" style=\"position: absolute; width: 100%; height: 160px; z-index: 1; top:50px; visibility:visible;display:none;\">");
document.writeln("	<form name =\'lea_mess\' action =\'ctrem.asp?action=addmsg\' target=\'_blank\' method=\'post'\>");
//document.writeln("  <form name =\'lea_mess\' action =\'ctrem.asp?action=addmsg\' method=\'post'\>");
document.writeln("  <table width=\'100%\' border=\'0\' cellspacing=\'0\' cellpadding=\'0\' style=\'border-left:1px solid #339933;border-top:1px solid #339933;border-right:1px solid #339933;background-color:#FFFFFF;\'>");
document.writeln("    <tr>");
document.writeln("    <td width=\'67\' height=\'49\' align=\'center\' valign=\'top\'  style=\'background-image:url(images\/mess_bg.gif);\'>");
document.writeln("		  <img src=\'images\/mess_logo.gif\' width=\'47\' height=\'50\'>");
document.writeln("    <\/td>");
document.writeln("    <td height=\'49\' valign=\'top\' style=\'line-height:16px;background-image:url(images\/mess_bg.gif);\'>");
document.writeln("      <span style=\'float:left;padding-right:2px; color:#FFFFFF;font-size:12px; font-family:Arial;\'>&copy 吾饮良品<\/span><br>");
document.writeln('      <textarea onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;" style="width:96%; height:34px;color:#666666;" class="inp1" name="msgContent">');
document.writeln("您好，感谢关注吾饮良品！请点击此处留言，谢谢！<\/textarea>");
document.writeln("	<\/td>");
document.writeln("   <td width=\'5\' height=\'49\' valign=\'bottom\' style=\'background-image:url(images\/mess_bg.gif);\'>&nbsp;<\/td>");
document.writeln("   <td width=\'180\' height=\'49\' valign=\'top\' style=\'line-height:16px;background-image:url(images\/mess_bg.gif);\'>");
document.writeln('     <br><input onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;" name="msgName" style="width:140px;height:12px;font-size:12px;color:#666666;" value="请填写您的姓名"><br>');
document.writeln('     <input name="msgTel" style="width:155px;height:12px;font-size:12px;color:#666666;" value="联系方式(建议填写电话号码)" onfocus="if (this.value == this.defaultValue) this.value=\'\';" onblur="this.value=this.value.Trim(); if (this.value==\'\') this.value=this.defaultValue;">');
document.writeln("	<\/td>");
document.writeln("   <td width=\'160\' height=\'49\' valign=\'bottom\'  style=\'background-image:url(images\/mess_bg.gif);\'>");
document.writeln("      <span style=\'float:right; color:#FF6600;font-size:12px; font-family:Arial;\'>");
document.writeln("         <span style=\'float:right;padding-right:5px;\'>")
document.writeln("           <a href=\"javascript:\" onClick=\"onno();setCookie('KFtype','close');\"><img src=\'images/X.gif\' width=\'9\' height=\'9\' title=\'关闭窗口\' border=\"0\" \/><\/a><\/span><br>")
document.writeln("             <input type=\'Submit\' name=\'Submit\' value=\'立即发送\' onclick=\"return valid_message();\"><br>财富热线:027-85447551<\/span>");
document.writeln("   <\/td>");
document.writeln("  <\/tr>");
document.writeln(" <tr>");
document.writeln("   <td height=\'5\' colspan=\'5\' align=\'right\' valign=\'top\' style=\'color:#999999;font-size:12px; font-family:Arial;border-bottom:1px solid #339933; \'>&nbsp;");
document.writeln("   	<\/td>");
document.writeln("  <\/tr>");
document.writeln("<input type=hidden name=\"msgFace\" value=\'face/face01.gif\' >");
document.writeln("<input type=hidden name=\"msgEmail\" value=\'NoEmail\' >");
document.writeln("<input type=hidden name=\"s1\" value=\'X省\' >");
document.writeln("<input type=hidden name=\"s2\" value=\'X市\' >");
document.writeln("<input type=hidden name=\"msgAddress\" value=\'XXX\' >");
document.writeln("  <\/table>");
document.writeln("<\/form>");
document.writeln("<\/div>");
document.writeln("<div id=\"ad_kf\" name=\"ad_kf\" style=\"position:absolute;background:#00cc00;border:3px solid #ff6600;width:60px;height:76px;text-align:center;line-height:150%;padding-top:4px;z-index:1;left:10px;top:50px;display:none;cursor:pointer;\">");
document.writeln("<img src=\"images/mess_logo.gif\" style=\"border:3px solid #ffff66;\" width=\"47\" height=\"50\" onclick=\"onyes();\"><br />便捷留言");
document.writeln("<\/div>");
document.writeln("<\/div>");