var xmlHttp

	///////////////////////////评分系统
function vote_update(id,sid){
    	vote_update_sendRequest("/link_directory/action.do?action=vote&id="+id+"&sID="+sid);
}
function vote_update_sendRequest(url){
	xmlHttp=GetXmlHttpObject(vote_update_stateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 
function vote_update_stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
//	alert(xmlHttp.responseText);
//document.getElementById("divtemp").innerHTML=xmlHttp.responseText;
//document.getElementById("update11").innerHTML="";
var objText=xmlHttp.responseText;
if (objText=="1"){
	alert("对不起，您已经评过分了，谢谢参与！");	
	return;
}
alert("谢谢参与！");
var arr = objText.split("|");
document.getElementById("vote_res").innerHTML="谢谢参与！平均分:"+arr[1]+"&nbsp;共"+arr[0]+"人参与";
document.getElementById("vote_res1").innerHTML=arr[0];
	}
}
////-------------
/////////////////////////////////////////////////////////////////////////
function webyz(id){
	//if (confirm("如果该网站有违反本站的收录条件，您可以向本站举报。您是否真的要举报该网站？")){
    	webyzsendRequest("/customer_center/authentication.do?action=yz&id="+id);
    //}
}
function webyzsendRequest(url){
	xmlHttp=GetXmlHttpObject(webyzstateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 
function webyzstateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	//alert(xmlHttp.responseText);
document.getElementById("divtemp").innerHTML=xmlHttp.responseText;
//alert("谢谢您的支持，您的更新申请已经发送！");
	}
}
////-------------
/////////////////////////////////////////////////////////////////////////
function webupdate(id){
	//if (confirm("如果该网站有违反本站的收录条件，您可以向本站举报。您是否真的要举报该网站？")){
    	webupdatesendRequest("/link_directory/action.do?action=webupdate&id="+id);
    //}
}
function webupdatesendRequest(url){
	xmlHttp=GetXmlHttpObject(webupdatestateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 
function webupdatestateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	//alert(xmlHttp.responseText);
//document.getElementById("divtemp").innerHTML=xmlHttp.responseText;
alert("谢谢您的支持，您的更新申请已经发送！");
	}
}
////-------------

function chk_stat(id){
    sendRequest("/link_directory/linkout.do?id="+id);
}
function sendRequest(url){
	xmlHttp=GetXmlHttpObject(stateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 
function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
//	alert(xmlHttp.responseText);
//document.getElementById("divtemp").innerHTML=xmlHttp.responseText;
	}
} 

///////---------------------
function checkNick(id){
    checkNicksendRequest("/customer_center/check_log_name.do?id="+id);
}

function checkNicksendRequest(url){
	xmlHttp=GetXmlHttpObject(checkNickstateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 
function checkNickstateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
//	alert(xmlHttp.responseText);
document.getElementById("divtemp").innerHTML=xmlHttp.responseText;
	}
} 



/////////////////////////////////////////////////////////////////////////////////////////

function GetXmlHttpObject(handler){ 
	var objXmlHttp=null
	if (navigator.userAgent.indexOf("Opera")>=0){
		alert("This example doesn't work in Opera") 
	return; 
	}
	
	if (navigator.userAgent.indexOf("MSIE")>=0){ 
		var strName="Msxml2.XMLHTTP"
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0){
			strName="Microsoft.XMLHTTP"
		} 
		try{ 
		objXmlHttp=new ActiveXObject(strName)
		objXmlHttp.onreadystatechange=handler 
		return objXmlHttp
		} 
		catch(e){ 
		alert("Error. Scripting for ActiveX might be disabled") 
		return 
		} 
	} 
	if (navigator.userAgent.indexOf("Mozilla")>=0){
		objXmlHttp=new XMLHttpRequest()
		objXmlHttp.onload=handler
		objXmlHttp.onerror=handler 
		return objXmlHttp
	}
} 




<!-- Beginning of JavaScript -
function fucCheckNUM(NUM){
	//函数名：fucCheckNUM
	//功能介绍：检查是否为数字
	//参数说明：要检查的数字
	//返回值：1为是数字，0为不是数字
	var i,j,strTemp;
	strTemp="0123456789";
	if ( NUM.length== 0)
		return 0
	for (i=0;i<NUM.length;i++){
		j=strTemp.indexOf(NUM.charAt(i));	
		if (j==-1){
			//说明有字符不是数字
			return 0;
		}
	}
	//说明是数字
	return 1;
}

function winopen(url,w,h,style){
	//智能打开窗口
	//style要以逗号结尾scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,
	//w,h为0时为全屏
	varputItThere = null; 
	var chasm = screen.availWidth;
	var mount = screen.availHeight;
	if (w==0&&h==0){
		w= screen.availWidth-10;
		h= screen.availHeight-30;
		
	}
	putItThere = window.open(url,'_blank',style+'width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5));
	putItThere.focus();
}


function submitonce(theform){
		//让表单只提交一次，禁提交按扭
	if (document.all||document.getElementById)
	{
		for (i=0;i<theform.length;i++)
		{
			var tempobj=theform.elements[i];
			if (tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
	
			tempobj.disabled=true;
			
		}
	}
}
	
function bbimg(o){
	//滚轮缩放图片
	var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}

function isEmail(strEmail) {
if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1){
return true;
}else{
return false;
}
}

function isDomain(objText){
		var arr = objText.split(".");
		if (arr.length>2){
			return true;
		}else{
			return false;
		}
		return arr.length;

}


function checkformcomments(theform){
	if (theform.name.value==""){
		alert("请输入名字!");
		theform.name.focus();
		return false;
	}
	
	if (theform.body.value==""){
		alert("请输入评论内容!");
		theform.body.focus();
		return false;
	}	
	if (theform.SecurityCode.value==""){
		alert("请输入验证码!");
		theform.SecurityCode.focus();
		return false;
	}		

	submitonce(theform);
}

//搜索框
function checkform(theform){
	if (theform.q.value==""){
		alert("请输入要查询内容！");
		theform.q.focus();
		return false;
	}
}
function clickform(v){
	if (v=="1"){
		f.action="/history/search.do";
	}
	if (v=="2"){
		f.action="/link_directory/search.do";
	}
}
//会员登录框
function checkloginform(theform){
	if (theform.userid.value==""){
		alert("请输入帐户名称!");
		theform.userid.focus();
		return false;
	}
	
	if (theform.password.value==""){
		alert("请输入密码!");
		theform.password.focus();
		return false;
	}	
	if (theform.SecurityCode.value==""){
		alert("请输入验证码!");
		theform.SecurityCode.focus();
		return false;
	}		
	submitonce(theform);
}
function setTab(a,b,d,c){setTimeout(function(){for(i=1;i<=d;i++){var g=document.getElementById(a+i);var f=document.getElementById("con_"+a+"_"+i);g.className=i==b?"cur":"";f.style.display=i==b?"block":"none"}},c)}
// - End of JavaScript - -->
