/* font size changer */function doZoom(obj_target,size){document.getElementById(obj_target).style.fontSize=size+"px";}/* china search */function checkSouInput(){   var searchtype = document.souform.searchtype.value;   switch(parseInt(searchtype)){case 1:document.souform.action="http://sou.china.com/result.php";break; case 2:document.souform.action="http://xinwen.china.com/result.php";document.souform.newstype.value = 1;break;     case 3:document.souform.action="http://music.china.com/result.php";document.souform.newstype.value = 1;break;       case 4:document.souform.action="http://pic.china.com/result.php";break;         case 5:document.souform.action="http://forum.china.com/result.php";break;         }//document.souform.submit();}/* endpage side search*/function sideSearch(){var theform=document.queryForm2;	if (theform.query.value=="")	{	alert("请输入查询内容");	theform.query.focus();	return false;	}	else{	theform.action="http://sou.china.com/site/result.php";	return true;	}}/* relatedLink checker */function relatedLink_checker(){	var relatedLinks_cont=document.getElementById("chan_relatedLink").innerHTML;	if (relatedLinks_cont.indexOf("<br>")==-1 && relatedLinks_cont.indexOf("<BR>")==-1){		document.getElementById("chan_relatedLink").style.display="none";	}}/* google search*///document.writeln('<script src="http://news.china.com/zh_cn/etc/requestGoogleAds.js" type="text/javascript"></script>');//document.writeln('<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>');/* onload functions*/function onload_function(){	relatedLink_checker();	picSizeFixer();	set_hiddenVar();}/* hidden var. */function set_hiddenVar(){	var CONTENTKEYWORD=document.getElementById("CONTENTKEYWORD").innerHTML;	document.souform.query.value=CONTENTKEYWORD;	}/* detail pic fixer */function picSizeFixer(){  var doc=document.getElementById("chan_newsDetail").getElementsByTagName("img");  for (i=0;i<doc.length;i++){      var imgLink=doc[i].src;      if (navigator.appName=="Microsoft Internet Explorer"){        doc[i].setAttribute("title","点击查看原图");        doc[i].onclick=function(){window.open('/zh_cn/etc/endpage/showPic.html?'+this.src);}        doc[i].onmouseover=function(){this.style.cursor="hand";}        }      else {        doc[i].setAttribute("title","点击查看原图");        doc[i].setAttribute("onclick",'window.open("/zh_cn/etc/endpage/showPic.html?'+imgLink+'","")');        }    if (doc[i].width>400){      doc[i].width=400;      }    }  }/* mail login */function validmail(){//window.open('http://mail.china.com/extend/gb/notice.html','noticewin','width=360,height=300');if (document.maillogin.LoginName.value == ""){window.open("http://mail.china.com/");return false;}else {if (document.maillogin.LoginName.value !== ""){if (document.maillogin.passwd.value == ""){window.open("http://mail.china.com/");return false;//document.maillogin.passwd.focus();//alert ("请输入密码");return false;}if (document.maillogin.mailtype[0].selected || document.maillogin.mailtype[1].selected){if (document.maillogin.LoginName.value.indexOf("*") != -1) {window.open("http://mail.china.com/");return false;}else {document.maillogin.action="http://mail.china.com/coremail/fcg/login";document.maillogin.user.value = document.maillogin.LoginName.value;document.maillogin.pass.value = document.maillogin.passwd.value;document.maillogin.language.value="";document.maillogin.submit();setTimeout('document.maillogin.reset()',1000);return false;}}if (document.maillogin.mailtype[2].selected){if (document.maillogin.LoginName.value.indexOf("*") != -1) {window.open("http://freemail.china.com/");return false;}else {document.maillogin.action="http://freemail.china.com/extend/gb/NULL/NULL/NULL/SignIn.gen";document.maillogin.submit();setTimeout('document.maillogin.reset()',1000);return false;}}}}}var allcookies = document.cookie;// Look for the start of the cookie named "version"var pos = allcookies.indexOf("area=");var value = "";// If we find a cookie by that name, extract and use its valueif (pos != -1){var start = pos + 5;                       // Start of cookie valuevar end = allcookies.indexOf(";", start);  // End of cookie value        if (end == -1) end = allcookies.length;        value = allcookies.substring(start, end);  // Extract the value}if (value.length < 1){        document.write('<script src="http://ipq.news.china.com/cgi-bin/adpi"><\/script>');}