// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function checkobj(obj,str)
{
	if(obj.value=="")
	{
		CBAlert(3,str+"不能为空");
		obj.focus();
		return false;
	}
	if(checkString(obj.value) == false)
	{
		CBAlert(3,str+"中包含非法字符 '，请重新输入");
		obj.focus();
		return false;
	}
	return true;
}
function getObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
}

function showtab(m,n,count)
{
	var strPic1_0="../images1/index_55.gif";		//短未选中；
	var strPic1_1="../images1/index_54.gif";		//短选中；
	for(var i=1;i<=count;i++)
	{
		if (i==n)
		{
			 getObject(m+'_'+i).className='tab2';
			 //getObject(m+'_'+i).background=strPic1_1;
			 getObject('tab_'+m+'_'+i).style.display='';		 	
		}
		else
		{
			getObject(m+'_'+i).className='tab1';
			//getObject(m+'_'+i).background=strPic1_0;
			getObject('tab_'+m+'_'+i).style.display='none';
		}
	}
}
function zhfw()
{
	var xwtype=document.all.xwtypeselect[document.all.xwtypeselect.selectedIndex].value;
	var xwunit=document.all.xwunitselect[document.all.xwunitselect.selectedIndex].value;
	
	var str="";
	if(xwtype!="所有")
	{
		if(str=="")
		{
			str+="?xwtype="+xwtype;
		}
		else
		{
			str+="&xwtype="+xwtype;
		}
	}
	if(xwunit!="所有")
	{
		if(str=="")
		{
			str+="?xwunit="+xwunit;
		}
		else
		{
			str+="&xwunit="+xwunit;
		}		
	}
	window.open("zhfw/zhfw.jsp"+str);
}
