function open_window(url,windowname,size)
{ 
window.open(url,windowname,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,top=0,left=0,"+ size); 
}
function open_window2(url,windowname,wWidth,wHeight) 
{ 
	window.open(url,windowname,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,left="+((screen.width-wWidth)/2)+",top="+((screen.height-wHeight)/2)+",width="+wWidth+",height="+wHeight ); 
}
function OpenWindowAndSetValue(Url,Width,Height,WindowObj,SetObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:no;help:no;scroll:no;');
	if (ReturnStr!='') SetObj.value=ReturnStr;
	return ReturnStr;
}
function OpenWindow(Url,Width,Height,WindowObj)
{
	showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:no;help:no;scroll:no;');
}
function doZoom(size){
	var artibody = document.getElementById('artibody');
	if(!artibody){
		return;
	}
	var artibodyChild = artibody.childNodes;
	artibody.style.fontSize = size + 'px';
	//再对artibody div内的直接html节点设置fontSize属性
	for(var i = 0; i < artibodyChild.length; i++){
		if(artibodyChild[i].nodeType == 1){
			artibodyChild[i].style.fontSize = size + 'px';
			artibodyChild[i].style.lineHeight = size+10 + 'px';
		}
	}		
}
function qqSet(){
	document.qqtab.style.display='none';
}
function swfPlayer(swfsrc,w,h){
	swfHtml = '';
	//swfHtml += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'" id="main">';
	swfHtml += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'" id="main">';
	swfHtml += '<param name="allowScriptAccess" value="sameDomain" />';
	swfHtml += '<param name="movie" value="'+swfsrc+'" />';
	swfHtml += '<param name="quality" value="high" />';
	swfHtml += '<param name="menu" value="false" />';
	swfHtml += '<param name="wmode" value="transparent" />';
	swfHtml += '<embed src="main.swf" quality="high" bgcolor="#cc6600" width="'+w+'" height="'+h+'" name="main" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	swfHtml += '<\/object>';
	document.write(swfHtml);
}
function ShowMenu(i)
{
	document.getElementById("m" + i).className="mText2";
}
function ShowMenuOut(i)
{
	document.getElementById("m" + i).className="mText";
}
function chkSearch(theForm) 
{
	if (theForm.s_type.value == "") { theForm.s_type.focus(); return (false); }	
	if (theForm.keyword.value == "") { theForm.keyword.focus(); return (false); } 
}
function chkVote(theForm) 
{
	var obj = document.getElementsByName("iPt_Vote");
	var objLen= obj.length;
	var objChk = false;
	for (var i = 0;i< objLen;i++){
		if (obj [i].checked == true) { objChk = true; break; }
	}
	if(!objChk) {
		alert('错误提示：没有选择要投票的项目！'); return false;
	}
	else {
		open_window2('about:blank','vote','640','330');
		theForm.action='/vote/default.asp';
		theForm.target='vote';
		//theForm.submit();
	}
}