function showbox(c)
{
var a=c;
/*window.alert(a);*/
/*document.writeln("<input name=\"Web_Id\" type=\"hidden\" id=\"Web_Id\" value=\""+a+"\" \/>");*/
document.writeln("<!--留言-->");
document.writeln("<style>");
document.writeln("#leavemessages ul,");
document.writeln("#leavemessages li{ margin:0; margin:0}");
document.writeln("#leavemessages{width:200px; overflow:hidden;position:absolute; font-size:12px}");
document.writeln("#leavemessages_con{ width:150px; padding:10px 5px; border:1px solid #cccccc; background:#f5f5f5; float:left;}");
document.writeln("");
document.writeln("\/*表单样式*\/");
document.writeln("#leavemessages_con textarea,input{border:1px solid #d9d9d9; color:#666666}");
document.writeln("#leavemessages_con textarea{ overflow:auto; height:100px; width:100%; margin-top:5px; font-size:12px }");
document.writeln("#leavemessages_con ul li input{ float:right; height:20px; line-height:20px; border:none; width:125px; text-indent:2px}");
document.writeln("");
document.writeln("#leavemessages_con ul li{ background:#f6f6f6 url(http:\/\/www.youngsunpack.com\/Message\/leavemessages\/leavemessage_icon.gif) no-repeat; height:20px; line-height:20px;overflow:hidden; border:1px solid #d9d9d9; width:100%}");
document.writeln("#leavemessages_con ul li.bg01{ background-position:-3px -3px}");
document.writeln("#leavemessages_con ul li.bg02{ background-position:-3px -26px}");
document.writeln("#leavemessages_con ul li.bg03{ background-position:-3px -50px}");
document.writeln(".submitbut{ background:url(http:\/\/www.youngsunpack.com\/Message\/leavemessages\/leavemessages_but.gif); width:69px; height:21px; border:none; color:#808080; margin-top:5px}");
document.writeln(".zxly{ float:left}");
document.writeln("<\/style>");
document.writeln("");
document.writeln("<div id=\"leavemessages\" onmouseover=toBig() onmouseout=toSmall()>");
document.writeln("<form id=\"leavemessages_con\" accept-charset=\"gb2312\" action=\"http:\/\/www.youngsunpack.com\/Message\/\" method=\"post\" name=\"leaveorderForm\" target=\"_blank\" onsubmit=\"return checkform1()\">");
document.writeln("欢迎给我们留言<br \/>");
document.writeln("<textarea onmouseover=\"javascript:if(this.value==\'请在此留言,我们会及时联系你。\'){ this.select();}\" name=\"Pro_Content\" id=\"Pro_Content\">请在此留言,我们会及时联系你。<\/textarea>");
document.writeln("<ul>");
document.writeln("<li class=\"bg01\"><input onmouseover=\"javascript:if(this.value==\'请输入您的联系电话\'){ this.select();}\" name=\"Tel\" id=\"Tel\" class=\"have\" type=\"text\" value=\"请输入您的联系电话\" \/><\/li>");
document.writeln("<li class=\"bg02\"><input onmouseover=\"javascript:if(this.value==\'请输入您的电子邮箱\'){ this.select();}\" name=\"Email\" id=\"Email\"  type=\"text\" value=\"请输入您的电子邮箱\" \/><\/li>");
document.writeln("<li class=\"bg03\"><input onmouseover=\"javascript:if(this.value==\'请输入您的联系地址\'){ this.select();}\" name=\"Addr\" id=\"Addr\" type=\"text\" value=\"请输入您的联系地址\" \/><\/li>");
document.writeln("<\/ul>");
document.writeln("<input name=\"Pro_Name\" id=\"Pro_Name\" type=\"hidden\"\/>");
document.writeln("<input name=\"Web_Id\" type=\"hidden\" id=\"Web_Id\" value=\""+a+"\" \/>");
document.writeln("<input name=\"Act\" type=\"hidden\" id=\"Act\" value=\"AddSave\" \/>");
document.writeln("<input class=\"submitbut\" type=\"submit\" value=\"提交留言\" name=\"\" \/>");
document.writeln("<\/form>");
document.writeln("<div class=\"zxly\"><img src=\"http:\/\/www.youngsunpack.com\/Message\/leavemessages\/leavemessages_r.gif\" \/><\/div>");
document.writeln("<\/div>");
document.writeln("");
document.writeln("<SCRIPT language=javascript>");
document.writeln("		aaa=function (id,_top,_left){");
document.writeln("		var me=id.charAt?document.getElementById(id):id, d1=document.body, d2=document.documentElement;");
document.writeln("		d1.style.height=d2.style.height=\'100%\';me.style.top=_top?_top+\'px\':0;me.style.left=_left+\"px\";\/\/[(_left>0?\'left\':\'left\')]=_left?Math.abs(_left)+\'px\':0;");
document.writeln("		me.style.position=\'absolute\';");
document.writeln("		setInterval(function (){me.style.top=parseInt(me.style.top)+(Math.max(d1.scrollTop,d2.scrollTop)+_top-parseInt(me.style.top))*0.1+\'px\';},10+parseInt(Math.random()*20));");
document.writeln("		return arguments.callee;");
document.writeln("		};");
document.writeln("		\/*window.onload=*\/");
document.writeln("if (document.all) {  ");
document.writeln("window.attachEvent(\'onload\', function (sss){aaa(\'leavemessages\',100,-165)}); ");
document.writeln("}  ");
document.writeln("else {  ");
document.writeln("window.addEventListener(\'load\', function (sss){aaa(\'leavemessages\',100,-165)}, false);  ");
document.writeln("} ");
document.writeln("	<\/SCRIPT>");
document.writeln("");
document.writeln("<SCRIPT language=javascript> ");
document.writeln("			lastScrollY=0; ");
document.writeln("			");
document.writeln("			var InterTime = 1;");
document.writeln("			var maxWidth=-1;");
document.writeln("			var minWidth=-165;");
document.writeln("			var numInter = 8;");
document.writeln("			");
document.writeln("			var BigInter ;");
document.writeln("			var SmallInter ;");
document.writeln("			");
document.writeln("			var o =  document.getElementById(\"leavemessages\");");
document.writeln("				var i = parseInt(o.style.left);");
document.writeln("				function Big()");
document.writeln("				{");
document.writeln("					if(parseInt(o.style.left)<maxWidth)");
document.writeln("					{");
document.writeln("						i = parseInt(o.style.left);");
document.writeln("						i += numInter;	");
document.writeln("						o.style.left=i+\"px\";	");
document.writeln("						if(i==maxWidth)");
document.writeln("							clearInterval(BigInter);");
document.writeln("					}");
document.writeln("				}");
document.writeln("				function toBig()");
document.writeln("				{");
document.writeln("					clearInterval(SmallInter);");
document.writeln("					clearInterval(BigInter);");
document.writeln("						BigInter = setInterval(Big,InterTime);");
document.writeln("				}");
document.writeln("				function Small()");
document.writeln("				{");
document.writeln("					if(parseInt(o.style.left)>minWidth)");
document.writeln("					{");
document.writeln("						i = parseInt(o.style.left);");
document.writeln("						i -= numInter;");
document.writeln("						o.style.left=i+\"px\";");
document.writeln("						");
document.writeln("						if(i==minWidth)");
document.writeln("							clearInterval(SmallInter);");
document.writeln("					}");
document.writeln("				}");
document.writeln("				function toSmall()");
document.writeln("				{");
document.writeln("					clearInterval(SmallInter);");
document.writeln("					clearInterval(BigInter);");
document.writeln("					SmallInter = setInterval(Small,InterTime);");
document.writeln("					");
document.writeln("				}");
document.writeln("				");
document.writeln("<\/SCRIPT>");
document.writeln("<script language=\"javascript\" type=\"text\/javascript\">");
document.writeln("function checkmail(email)");
document.writeln("{");
document.writeln("if (email==\"\" )");
document.writeln("return false;");
document.writeln("	invalidChars = \" \/:\"");
document.writeln("");
document.writeln("	if (email == \"\") {");
document.writeln("		return (false);");
document.writeln("	}");
document.writeln("");
document.writeln("	for (i=0; i < invalidChars.length; i++) {");
document.writeln("		badChar = invalidChars.charAt(i)");
document.writeln("		if (email.indexOf(badChar,0) != -1) {");
document.writeln("			return (false);");
document.writeln("		}");
document.writeln("	}");
document.writeln("");
document.writeln("	atPos = email.indexOf(\"@\", 1)");
document.writeln("	if (atPos == -1) {");
document.writeln("		return (false);");
document.writeln("	}");
document.writeln("");
document.writeln("	\/\/if (email.indexOf(\"@\", atPos + 1) != -1) {");
document.writeln("	\/\/	return (false);");
document.writeln("	\/\/}");
document.writeln("");
document.writeln("	periodPos = email.indexOf(\".\", atPos)");
document.writeln("	if (periodPos == -1) {");
document.writeln("		return (false);");
document.writeln("	}");
document.writeln("");
document.writeln("	if (periodPos + 3 > email.length) {");
document.writeln("		return (false);");
document.writeln("	}");
document.writeln("");
document.writeln("	return (true);");
document.writeln("}");
document.writeln("");
document.writeln("function checkform1()");
document.writeln("{");
document.writeln("var xx=document.leaveorderForm.Pro_Content.value;");
document.writeln("var cc=xx.slice(0,20)+\'...\'");
document.writeln("document.leaveorderForm.Pro_Name.value=cc;");
document.writeln("");
document.writeln("if(document.leaveorderForm.Pro_Content.value==\"请在此留言,我们会及时联系你。\"|document.leaveorderForm.Pro_Content.value==\"\"){");
document.writeln(" alert(\"请填写您的留言内容！\");");
document.writeln(" document.leaveorderForm.Pro_Content.focus();");
document.writeln(" return false;");
document.writeln(" }");
document.writeln("  if(document.leaveorderForm.Tel.value==\"\"|document.leaveorderForm.Tel.value==\"请输入您的联系电话\"){");
document.writeln(" alert(\"请填好联系电话！\");");
document.writeln(" document.leaveorderForm.Tel.focus();");
document.writeln(" return false;");
document.writeln(" }");
document.writeln("  if(document.leaveorderForm.Email.value==\"\"|document.leaveorderForm.Email.value==\"请输入您的电子邮箱\"){");
document.writeln(" alert(\"请填好联系的Email！\");");
document.writeln(" document.leaveorderForm.Email.focus();");
document.writeln(" return false;");
document.writeln(" }");
document.writeln(" if (!checkmail(document.leaveorderForm.Email.value))");
document.writeln("	{alert(\"您的电子邮件有错误！\");");
document.writeln("	 document.leaveorderForm.Email.focus();");
document.writeln("	 return false;");
document.writeln("	}");
document.writeln(" return true;");
document.writeln("}");
document.writeln("<\/script>")
}
