function tomenu(id){
	if(id=='594'){
		window.location.href = 'about.action';
	 }else if(id=='595'){
		window.location.href = 'news.action';		
	 }else if(id=='596'){
		window.location.href = 'products.action';
	 }else if(id=='597'){
		window.location.href = 'duty.action';
	 }else if(id=='598'){
		window.location.href = 'interactive.action';
	 }else if(id=='599'){
		window.location.href = 'recruitment.action';
	 }else if(id=='600'){
		window.location.href = 'contact.action';
	 }else if(id=='706'){
		 window.open("/app_bbs");
	 }else{
		window.location.href = 'appOut.action';
	}		 	 
}

function details(id){
	window.open("newsDetail.action?headtodetailId=" + id);
}

function toright(id){
	if(id=='612'){//鏂板搧鎺ㄨ崘
		xpjs();
		 }else if(id=='615'){//鍦ㄧ嚎璋冩煡
			 wan_vote();
		 
		 }else if(id=='629'){
		 show_resume();
		 }else if(id=='610'){//濯掍綋鑱氱劍
			 mtjj(id);
		 }else if(id=='611'){
			 mtjj(id);
		 }else if(id=='673'){//涓氬姟绯荤粺
			 mtjj(id);
		 }else if(id=='645'){//瑙嗛骞垮憡
			 showTV1();
		 }else if(id=='618'){//
			 duty_boss();
		 }else if(id=='619'){//
			 mtjj(id);
		 }else if(id=='620'){//
			 mtjj(id);
		 }else if(id=='616'){//
			 mtjj(id);
		 }else if(id=='613'){//浜у搧浠嬬粛 
			 cpjs(id);
		 }else if(id=='614'){//淇冮攢 淇℃伅
			 mtjj(id);
		 }else if(id=='609'){//鍏徃鏂伴椈 
			 mtjj(id);
		 }else{
			 toRightDwr(id);
		 }
	
//	window.location.href = 'gsinfo.action?headId=' + id;
}

//鐢佃鍏憡
function showTV1(){
	createXMLHttpRequest();
	xmlHttp.open("post", "TVlist.action",true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function() {
	if (xmlHttp.readyState == 4) {
		result.innerHTML = xmlHttp.responseText;
		}else{
			result.innerHTML = "鏁版嵁鍔犺浇涓紝璇风◢绛�...";
		}
	}
xmlHttp.send(null);
	
}


//浜у搧浠嬬粛
function cpjs(id){
	createXMLHttpRequest();
	xmlHttp.open("post", "cplist.action",true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function() {
	if (xmlHttp.readyState == 4) {
		result.innerHTML = xmlHttp.responseText;
		}else{
			result.innerHTML = "鏁版嵁鍔犺浇涓紝璇风◢绛�...";
		}
	}
xmlHttp.send(null);
}




function duty_boss(){
	createXMLHttpRequest();
	xmlHttp.open("post", "duty_boss.action",true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function() {
	if (xmlHttp.readyState == 4) {
		result.innerHTML = xmlHttp.responseText;
		}else{
			result.innerHTML = "鏁版嵁鍔犺浇涓紝璇风◢绛�...";
		}
	}
xmlHttp.send(null);
}


function toRightDwr(headId){
	
	DWREngine.setAsync(false);
	menuDwr.leftToRight(headId, callback_detail);
	DWREngine.setAsync(true);
}

function toRightListDwr(headId){
	
	DWREngine.setAsync(false);
	menuListDwr.leftToRight(headId, callback_detail);
	DWREngine.setAsync(true);
}

//鍥炶皟鍑芥暟    
function callback_detail(data)
{   
   document.getElementById("callbackDetail").innerHTML=data;
}

function imagedetails(id){
	

	window.open("newnewsDetail.action?manageImgId=" + id);
	
	
}

function searchnews() {
//	alert("search");
	var searchkey = document.getElementById("searchkey").value;
	
	searchkey = encodeURI(searchkey);
	searchkey = encodeURI(searchkey);//娉ㄦ剰瑕佷袱娆� 
	
	var flag = checkSearch(searchkey);
	
	if(flag){
		window.open("newsSearch.action?searchkey=" + searchkey);
	}else{
		alert("璇疯緭鍏ユ煡璇㈠叧閿瓧!");
	}
}



//濯掍綋鑱氱劍
function mtjj(id){
	createXMLHttpRequest();
	xmlHttp.open("post", "newsList.action?headId="+id,true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function() {
	if (xmlHttp.readyState == 4) {
		result.innerHTML = xmlHttp.responseText;
		}else{
			result.innerHTML = "鏁版嵁鍔犺浇涓紝璇风◢绛�...";
		}
	}
xmlHttp.send(null);
}







//鍥炶皟

//imgList浜у搧浠嬬粛 
function imgList(id){
	createXMLHttpRequest();
	xmlHttp.open("post", "imgList.action?manageImgMenuid = "+id,true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function() {
	if (xmlHttp.readyState == 4) {
		result.innerHTML = xmlHttp.responseText;
		}else{
			result.innerHTML = "鏁版嵁鍔犺浇涓紝璇风◢绛�...";
		}
	}
xmlHttp.send(null);
}


//鏂板搧浠嬬粛
function xpjs(){
	createXMLHttpRequest();
	xmlHttp.open("post", "cpjs.action",true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function() {
	if (xmlHttp.readyState == 4) {
		result.innerHTML = xmlHttp.responseText;
		}else{
			result.innerHTML = "鏁版嵁鍔犺浇涓紝璇风◢绛�...";
		}
	}
xmlHttp.send(null);
	
}

//鍦ㄧ嚎璋冩煡
function wan_vote(){
	createXMLHttpRequest();
	xmlHttp.open("post", "searchVotelist.action",true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function() {
	if (xmlHttp.readyState == 4) {
		result.innerHTML = xmlHttp.responseText;
		}else{
			result.innerHTML = "鏁版嵁鍔犺浇涓紝璇风◢绛�...";
		}
	}
xmlHttp.send(null);
}




function showoneVote(voteid){

openNewWindow("surveyDisplay.action?voteId="+voteid);
}

function openNewWindow(url) {
	var WWidth = 800;
	var WHeight = 400;
	var WLeft = Math.ceil((window.screen.width - WWidth) / 2);
	var WTop = Math.ceil((window.screen.height - WHeight) / 2);

	var winSub = window.open(url, "winSub", "left=" + WLeft + ",top="
			+ WTop + ",width=" + WWidth + ",height=" + WHeight
			+ ",toolbar=no,menubar=no,scrollbars=yes");

}


var xmlHttp = null;
function createXMLHttpRequest()
{
	if(window.XMLHttpRequest)
	{ //Mozilla 娴忚鍣�
		xmlHttp = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		// IE娴忚鍣�
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
			alert("鎮ㄧ殑娴忚鍣ㄧ増鏈お浣庯紝鏃犳硶鏄剧ず淇℃伅锛岃鍗囩骇娴忚鍣紒");
			}
		}
	}
}


function checkSearch(value){
	
	var patrn = "[a-zA-Z0-9_\u4e00-\u9fa5]";   
	var result = value.match(patrn);
	 if(value == null || value == ''){
		alert("请输入查询关键字!");
		return;
		}else if (result == null){
			alert("查询条件中有非法字符,请重新输入!");
			return false; 
		}else {
			return true;
		}
} 

