//网站路径(域名)控制器
(function(){
	window.X||(window['X']={});
	X.domain = "10086.cn";
	X.PATH={
		ROOT:"http://music.10086.cn/newweb/",
		SUPPORT:"http://mdll.10086.cn/newweb/",
		VIP:"http://mapi.10086.cn/newweb/",
		CLUB:"http://mclub.10086.cn",
		WM:"http://wm.10086.cn",		
		M:"http://m.10086.cn",
		CONTENT:"http://content.12530.com/"		
	}
	//重载域名
	X.PATH.WAP=X.PATH.M;
	document.domain='10086.cn';
})();
if(window.location.host=='music.10086.cn'){
	document.domain='10086.cn';
}
function changelable(spanid_1,divid_2,aid_gd_1,aid_gd_2,gd_url){
	document.getElementById('span_videonews').className="tabOff cursor";
	document.getElementById('span_activenews').className="tabOff cursor";
	document.getElementById('div_videonews').style.display="none";
	document.getElementById('div_activenews').style.display="none";
	
	document.getElementById(spanid_1).className="cursor";
	document.getElementById(divid_2).style.display="block";
		if(gd_url=="#"){
			document.getElementById(aid_gd_1).style.display="none";
			document.getElementById(aid_gd_2).style.display="none";
		}else{
			document.getElementById(aid_gd_1).style.display="block";
			document.getElementById(aid_gd_2).style.display="none";
		}
}
function newsSearch(fid,sid){
	var inputNode =  document.getElementById(sid);
	var inputValue = inputNode.value;
	if (inputValue == null || inputValue == "") {
		alert("请输入关键字!");
		return false;
	}
	var limitLength=100;
	inputValue=inputValue.length>limitLength?inputValue.substring(0,limitLength):inputValue;
	var validRegExp = /[\/&#<>%+|\\\']/g;
//	if (validRegExp.test(inputValue)) {
//		alert('输入内容不能包含“%”，“/”，“&”，“#”，“+”，“\\”，“|^|”,请尝试其他关键字！');
//		return false;
//	}
	inputValue =inputValue.replace(validRegExp,"");
	if (inputValue.indexOf("|^|") != -1) {
		alert("输入内容不能包含“|^|”,请尝试其他关键字！");
		return false;
	}
	var s_form = document.getElementById(fid);
	s_form.action=X.PATH.ROOT+"news/searchnews/ki/"+encodeURIComponent(encodeURIComponent(inputValue))+"/k.html";
	return true;
}

