<!-- 
var web_url="/";
function errpic(thepic){
thepic.src=web_url+"images/nopic.gif" 
}
function opendiv(o){
	 var id;
	 var e;
	 for(var i=1;i<=3;i++){
	   id ="cat"+i;
	   e = document.getElementById("cat_con"+i);
	   if(id != o.id){
	   	 e.style.display = "none";
	   }else{
		 e.style.display = "block";
	        }
	   }
      }
var tID = "nav1";
function showmenu(ID){
  if(ID!=tID){
	var IDObj = document.getElementById( ID );
	var tIDObj = document.getElementById( tID );
	var IDObj_content = document.getElementById( ID + "_" );
	var tIDObj_content = document.getElementById( tID + "_" );
    	IDObj.className='nav_link_02';
    	tIDObj.className='nav_link_01';
  	tIDObj_content.style.display='none';
  	IDObj_content.style.display='';
    	tID=ID;
  }
}
function Trim(){
	return this.replace(/\s+$|^\s+/g,"");
}
String.prototype.Trim=Trim;

function getObjValues(id){
	if(getObjects(id).value!=undefined)
		return getObjects(id).value.Trim();
	else
		return "";
}
function getObjects(id) { 	
	if (document.getElementById) { 
		return document.getElementById(id); 
	} else if (document.all) { 
		return document.all[id]; 
	} else if (document.layers) { 
		return document.layers[id]; 
	} 
}
function changeStyle(id){	
	var stylesheet=getObjects("skincolor").href=web_url+"Css/index"+id+".css";
	document.cookie="stylesheet="+escape(stylesheet);	
}
function initStyle(){	
		if(/stylesheet=([^;]+)/.test(document.cookie))
			getObjects("skincolor").href=unescape(RegExp.$1);
}
initStyle();
var win = null;
function HxWindow(mypage,myname,w,h,scroll,resiza){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resiza+'resizable'
win = window.open(mypage,myname,settings)
}

var rollspeed=30
var myInter;
function MarqueeV(){
	var ooRollV=document.getElementById("oRollV");
	var ooRollV1=document.getElementById("oRollV1");
	var ooRollV2=document.getElementById("oRollV2");
	if(ooRollV2.offsetTop-ooRollV.scrollTop<=0) {
		ooRollV.scrollTop-=ooRollV1.offsetHeight;
	}else{
		ooRollV.scrollTop++;
	}
}
function StartRollV() {
	var ooRollV=document.getElementById("oRollV");
	var ooRollV1=document.getElementById("oRollV1");
	var ooRollV2=document.getElementById("oRollV2");
	if (ooRollV) {
		if (parseInt(ooRollV.style.height)>=ooRollV2.offsetTop) {
			ooRollV.style.height = ooRollV2.offsetTop;
			return;
		}
		ooRollV2.innerHTML=ooRollV1.innerHTML;
		myInter=setInterval(MarqueeV,rollspeed);
		ooRollV.onmouseover=function() {clearInterval(myInter)};
		ooRollV.onmouseout=function() {myInter=setInterval(MarqueeV,rollspeed)};
	}
}
function copyText(obj) 
{
var rng = document.body.createTextRange();rng.moveToElementText(obj);rng.scrollIntoView();rng.select();rng.execCommand("Copy");rng.collapse(false);
}
var img = new Image();
var Imgwidth=648;
function replaceImgp(obj) {
img.src = obj;
if(img.width>Imgwidth){
img.height=img.height/(img.width/Imgwidth);
img.width=Imgwidth;
}
img.src = obj;
if(img.width>Imgwidth){
img.height=img.height/(img.width/Imgwidth);
img.width=Imgwidth;
}
document.all.mainpic.width = img.width;
document.all.mainpic.height = img.height;
document.all.pichref.href = "View.asp?url="+obj;
document.all.mainpic.src = obj;
}
var img = new Image();
function replaceImgs(obj) {
img.src = obj;
document.all.mainpic.width = 200;
document.all.mainpic.height = 200;
document.all.pichref.href = "../pic/View.asp?url="+obj;
document.all.mainpic.src = obj;
}
function SearchForm() {
	if (getObjValues('Keyword') == "") {
		alert("\搜索关健字不能为空！");
		document.sinfo.Keyword.focus();
	}
	else {
        return true;
    }
    return false;
}
function createXMLHttpRequest(){
       	if (window.XMLHttpRequest) {//wwww.07ing.net
		XMLHttpReq=new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {//IE 浏览器
	     try {
			    XMLHttpReq=new ActiveXObject("Msxml2.XMLHTTP");
	     } catch (e) {
		        try{
					XMLHttpReq=new ActiveXObject("Micrsost.XMLHTTP");
				} catch(e){}
	     }
        }
}
var cache = new Array();
function getHttpObject() {
    var objType = false;
    try {
        objType = new ActiveXObject('Msxml2.XMLHTTP');
    } catch(e) {
        try {
            objType = new ActiveXObject('Microsoft.XMLHTTP');
        } catch(e) {
            objType = new XMLHttpRequest();
        }
    }
    return objType;
}
function GetResult(postBody,messageID){
  var theHttpRequest = getHttpObject();
  theHttpRequest.onreadystatechange = function() {processAJAX(messageID);};
  theHttpRequest.open("POST", "../User/check_reg.asp", true);
  theHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  theHttpRequest.send(postBody);
    function processAJAX(messageID){
       if (theHttpRequest.readyState == 4) {
         if (theHttpRequest.status == 200) {
           document.getElementById(messageID).innerHTML = unescape(theHttpRequest.responseText);
           setTimeout("validate();", 500);
           var incoks="<img align='absMiddle' alt='' src='../images/icn_ok.gif' />";
           if (unescape(theHttpRequest.responseText) == incoks) {
              getObjects("submit").disabled=false;           
              getObjects("submit").value="提交注册";
           } else {
              getObjects("submit").disabled=true;           
              getObjects("submit").value="请将注册信息填写正确和完整";
                  }
           } else {
              document.getElementById(messageID).innerHTML="<p>错误信息:&nbsp;" + unescape(theHttpRequest.statusText) +"<\/p>";
                  }
           }
     }
}
function validate(inputValue, fieldID, messageID){
    if (fieldID){
   // inputValue = encodeURIComponent(inputValue);
    inputValue =escape(inputValue);
    fieldID = escape(fieldID);
    cache.push("inputValue=" + inputValue + "&fieldID=" + fieldID);
    }
    if (cache.length > 0){
    var cacheEntry = cache.shift();
    GetResult(cacheEntry,messageID);
    }
}
function opencat(cat){
    if(cat.style.display=="none"){
    cat.style.display="";
  	} else {
    cat.style.display="none"; 
  	}
}
function sendlogin(){
         createXMLHttpRequest();
	 XMLHttpReq.open("POST","../User/check_reg.asp",true);
	 XMLHttpReq.onreadystatechange= sprocessAJAX;
	 XMLHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	 XMLHttpReq.send("userid=" + escape(getObjValues("userid")) +"&sex=" +escape(getObjValues("sex"))  +"&pwdid=" +escape(getObjValues("pwdid"))+"&spwdid=" +escape(getObjValues("spwdid"))+"&Question=" +escape(getObjValues("Question"))+"&Answers=" +escape(getObjValues("Answers"))+"&sEmail="+escape(getObjValues("sEmail"))+"&source=" + escape(getObjValues("source"))+"&ucode="+escape(getObjValues("ucode")));
}
function sprocessAJAX() {
	 if (XMLHttpReq.readyState==4){
	 if(XMLHttpReq.status==200){
	   var msg=unescape(XMLHttpReq.responseText);
           var checkok= msg.substring(2,4);
           if (checkok == "成功") {
           document.getElementById("logins").innerHTML =msg;
           } else {
                  if(msg == "Err_100"){
				window.alert("对不起，对不起，请输入正确的验证码！");
		  }else if(msg == "Err_101"){
				window.alert("对不起，请将注册数据填写完整！");
		  }else if(msg == "Err_102"){
				window.alert("对不起，用户名非法！！");
		  }else if(msg == "Err_103"){
				window.alert("对不起，密码含有非法字符！");
		  }else if(msg == "Err_104"){
				window.alert("对不起，两次输入密码不一致！");
		  }else if(msg == "Err_105"){
				window.alert("对不起，电子邮件格式为空或非法！");
		  }else if(msg == "Err_106"){
				window.alert("对不起，用户名含有网站禁止注册的字词！");
		  }
           }
         } else {
	   window.alert('您请求的页面出现异常错误！');
	        }
         }
}
function getlogin(){
  var theHttpRequest = getHttpObject();
  theHttpRequest.onreadystatechange = function() {processAJAX();};
  theHttpRequest.open("GET", web_url+"User/check_login.asp", true);
  theHttpRequest.send(null);
    function processAJAX(){
       if (theHttpRequest.readyState == 4) {
         if (theHttpRequest.status == 200) {
           document.getElementById("userinfo").innerHTML = unescape(theHttpRequest.responseText);
           } else {
           document.getElementById("userinfo").innerHTML = "您请求的页面出现异常错误";
                  }
           }
     }
}
function sendRequest(){
         createXMLHttpRequest();
	 XMLHttpReq.open("POST", web_url+"User/check_login.asp",true);
	 XMLHttpReq.onreadystatechange= processResponse;
	 XMLHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	 XMLHttpReq.send("name=" + escape(getObjValues("username")) + "&pwd=" +escape(getObjValues("password"))  + "&cookieDate=" +escape(getObjValues("cookieDate"))  + "&userhidden=" +escape(getObjValues("userhidden")) +"&slogin=" + escape(getObjValues("slogin")));
        }
function goutRequest(){
	 createXMLHttpRequest();
         XMLHttpReq.open("GET", web_url+"User/check_login.asp?hx66=logout",true);
         XMLHttpReq.onreadystatechange= processResponse;
	 XMLHttpReq.send(null);  
	}
function processResponse() {
	 if (XMLHttpReq.readyState==4){
	 if(XMLHttpReq.status==200){
	   var msg=XMLHttpReq.responseText;
	   document.getElementById("userinfo").innerHTML =unescape(msg);
	 } else {
	   window.alert('您请求的页面出现异常错误！');
	        }
         }
   }
function doClick_div(s,o,k,a){
   for(var i=1;i<=10;i++){
   var liid= "lii"+s+"_"+i;
   var navid = document.getElementById(liid);
   if(i==o || o==0){
     navid.className = "active";
     createXMLHttpRequest();
     XMLHttpReq.open("GET", "../inc/cmslist_ajax.asp?a="+a+"&k="+k,false);
     //XMLHttpReq.open("GET", "../inc/cmslist_ajax.asp?a="+a+"&k="+k,true);
     XMLHttpReq.onreadystatechange=function(){
     if(XMLHttpReq.readyState==4){
     if(XMLHttpReq.status==200){
             var msg=unescape(XMLHttpReq.responseText);
             document.getElementById("listword"+s).innerHTML=msg;
         }else{
             window.alert("您请求的页面出现异常错误！！");	
             }
         }
    }
       XMLHttpReq.send(null);
    }else{
       navid.className = "";
         }
    }
}
function doClick_body(id,ck,a){
	 createXMLHttpRequest();		  
	 XMLHttpReq.open("GET","../inc/cmsbody_ajax.asp?a="+a+"&id="+id+"&ck="+ck,true);
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
             var msg=unescape(XMLHttpReq.responseText);
             document.getElementById("ShowBody").innerHTML=msg;
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
         XMLHttpReq.send(null); 
}
function gobodyPage(id,page,a){
	 createXMLHttpRequest();		  
	 XMLHttpReq.open("GET","../inc/cmsbody_ajax.asp?a="+a+"&id="+id+"&page="+page,true);
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
             var msg=unescape(XMLHttpReq.responseText);
             document.getElementById("ShowBody").innerHTML=msg;
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
         XMLHttpReq.send(null); 
}
var currPage = 1;
var currClass = 0;
function doClick_zj(id){
	 createXMLHttpRequest();		  
	 XMLHttpReq.onreadystatechange= djMessage;
	 XMLHttpReq.open("GET","djlist_ajax.asp?t="+id,true);
	 XMLHttpReq.send(null);
         currClass=id;
	 currPage = 1;
	}
function goPagezj(id,page){
	 createXMLHttpRequest();		  
	 XMLHttpReq.onreadystatechange= djMessage;
	 XMLHttpReq.open("GET","djlist_ajax.asp?t="+id+"&page="+page,true);
	 XMLHttpReq.send(null);  
	}
function djMessage() {	       
	if (XMLHttpReq.readyState==4){
	   if(XMLHttpReq.status==200){
	   var msg=XMLHttpReq.responseText;
	   document.getElementById("zjword").innerHTML =msg;
	   } else {
		window.alert('调用页面出现异常错误！');
         	  }
           }
   }
function gooPage(val){
	if(val > 0) currPage++;
	else currPage--;
	if(currPage <= 0) currPage = 1;
	if(currPage <= 10) goPagezj(currClass,currPage);
}
function cart_body(id,a){
	 createXMLHttpRequest();		  
	 XMLHttpReq.open("GET","shop_ajax.asp?id="+id+"&a="+a,true);
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
             var msg=unescape(XMLHttpReq.responseText);
              if (msg == "0") {
                  window.alert("请注册或登陆后购买商品！");
              } else {
                  document.getElementById("cartBody").innerHTML=msg;
              }
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
         XMLHttpReq.send(null); 
}
function cash_body(){
	 createXMLHttpRequest();		  
	 XMLHttpReq.open("POST","shop_ajax_cash.asp",true);
         XMLHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
             var msg=unescape(XMLHttpReq.responseText);
             document.getElementById("cashBody").innerHTML=msg;
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
   var to_name = escape(getObjValues("to_name"));
   var to_adds = escape(getObjValues("to_adds"));
   var email = escape(getObjValues("email"));
   var tel = escape(getObjValues("tel"));
   var sendtype = escape(getObjValues("sendtype"));
   var postcode = escape(getObjValues("postcode"));
   var paymenttype = escape(getObjValues("paymenttype"));
   var totalcash = escape(getObjValues("totalcash"));
   var other = escape(getObjValues("other"));
   var fei = escape(getObjValues("fei"));
   var summoney = escape(getObjValues("summoney"));
   var totaljf = escape(getObjValues("totaljf"));
   var fapiao = escape(getObjValues("fapiao"));
   var wb_num = escape(getObjValues("wb_num"));
   var hg_id = escape(getObjValues("hg_id"));
   if (hg_id=="") hg_id = 0;
   if (wb_num=="") wb_num = 0;
         XMLHttpReq.send("to_name="+to_name+"&to_adds="+to_adds+"&email="+email+"&tel="+tel+"&sendtype="+sendtype+"&postcode="+postcode+"&paymenttype="+paymenttype+"&totalcash="+totalcash+"&other="+other+"&fei="+fei+"&summoney="+summoney+"&totaljf="+totaljf+"&fapiao="+fapiao+"&wb_num="+wb_num+"&hg_id="+hg_id);
}
function comm_body(id,a,page){
	 createXMLHttpRequest();		  
	 XMLHttpReq.open("GET","../inc/cmscomm_ajax.asp?id="+id+"&a="+a+"&page="+page,true);
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
             var msg=unescape(XMLHttpReq.responseText);
             document.getElementById("commBody").innerHTML=msg;
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
         XMLHttpReq.send(null); 
}
function checkForms(){
       	if(getObjValues("uname")==""||getObjValues("txtcomment")==""){
		alert("昵称和评论内容不能为空！");
		return false;
	}
	if(getObjValues("uname").length>20){
		alert("昵称不能大于20字！");
		return false;
	}
	if(getObjValues("txtcomment").length>100){
		alert("评论内容不能大于100字！");
		return false;
	}
       	if(getObjValues("sCode")==""){
		alert("请输入验证码！");
		return false;
	}
	return true;
}
function comm_put(id,a){
         if(checkForms()){
         createXMLHttpRequest();
       	 XMLHttpReq.open("POST","../inc/cmscomm_ajax.asp?id="+id+"&a="+a,true);
         XMLHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
              var msg=unescape(XMLHttpReq.responseText);
              if(msg == "Err_100"){
		  window.alert("非法操作！");
	      }else if(msg == "Err_101"){
		  window.alert("你发表的内容中包含系统禁止字符！");
	      }else if(msg == "Err_102"){
		  window.alert("请输入正确的验证码！");
	      }else{
                  document.getElementById("commBody").innerHTML=msg;
              }
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
         var uname = escape(getObjValues("uname"));
         var txtcomment = escape(getObjValues("txtcomment"));
         var scode = escape(getObjValues("sCode"));
         XMLHttpReq.send("uname="+uname+"&txtcomment="+txtcomment+"&scode="+scode+"&do=add");
   }
}
function Close(id){
        //document.getElementById(id).style.display = "none";
        document.getElementById(id).innerHTML="";
     }
function checkForml(){
       	if(getObjValues("fl_name")==""||getObjValues("fl_url")==""){
		alert("名称和地址不能为空！");
		return false;
	}
	return true;
}
function link_put(){
         if(checkForml()){
         createXMLHttpRequest();
       	 XMLHttpReq.open("POST","../inc/cmslink_ajax.asp",true);
         XMLHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
         var msg=unescape(XMLHttpReq.responseText);
         if(msg == "1"){
	 document.getElementById("linkBody").innerHTML="自助连接提交成功，请等待批准。<br />请确认已经在您的站点加入我们相应的链接!";
	 }else if(msg == "Err_100"){
		                window.alert("非法操作！");
	 }else if(msg == "Err_101"){
				window.alert("对不起，数据不能为空！！");
	 }else if(msg == "Err_102"){
				window.alert("对不起，此网站已提交过！");
	 }else if(msg == "Err_103"){
				window.alert("对不起，网站LOGO不能为空！");
	 }
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
         var flcat_id = escape(getObjValues("flcat_id"));
         var fl_name = escape(getObjValues("fl_name"));
         var fl_url = escape(getObjValues("fl_url"));
         var fl_logo = escape(getObjValues("fl_logo"));
         if (fl_logo=="") fl_logo = 0;
         XMLHttpReq.send("flcat_id="+flcat_id+"&fl_name="+fl_name+"&fl_url="+fl_url+"&fl_logo="+fl_logo);
   }
}
function sendpass(){
         createXMLHttpRequest();
       	 XMLHttpReq.open("POST","user_password_ajax.asp",true);
         XMLHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
         XMLHttpReq.onreadystatechange=function(){
         if(XMLHttpReq.readyState==4){
         if(XMLHttpReq.status==200){
         var msg=unescape(XMLHttpReq.responseText);
              if(msg == "Err_101"){
		  window.alert("请输入您的登陆账号,密码提示问题和密码提示答案！");
	      }else if(msg == "Err_100"){
		  window.alert("无效输入已达到三次！系统锁定您将不能使用本功能！");
	      }else if(msg == "Err_102"){
		  window.alert("输入的密码提示问题或答案不对！");
	      }else if(msg == "Err_103"){
		  window.alert("系统不存在此用户！");
	      }else{
                  document.getElementById("passwords").innerHTML=msg;
              }
         }else{
             window.alert("您请求的页面出现异常错误！！");	
              }
         }
   }
 	 var strA = "cmshx_AccountName="+ escape(getObjValues("cmshx_AccountName"));
	 strA += "&cmshx_Question=" + escape(getObjValues("cmshx_Question"));
	 strA += "&cmshx_Answer=" + escape(getObjValues("cmshx_Answer"));
         XMLHttpReq.send(strA);
}
function killErr(){return true;} 
window.onerror=killErr;
// -->
