
function trim(s) {
 if(!s || s==""){
 	return "";
 }else
 	return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );

}
function isNumber(str)
{
	if(str=="")
		return false;
	var num=/^\d+$/g;
	return num.test(str);
}
function isFloat(str)
{
	var i=/^[+]?\d+(\.\d+)?$/g;
	return i.test(str);
}
function isEmail(str)
{
	var email=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/g;
	return email.test(str);
}



function mover(object){
  //主菜单
  var mm=document.getElementById("m_"+object);
    if(object==5)
    	mm.className="i01";
    else	
  		mm.className="m_li_a";
	
//  初始主菜单先隐藏效果
//  if(toplablenum!=0){
//    var mdef=document.getElementById("m_"+toplablenum);
//    mdef.className="m_li";
//  }
  
  //子菜单
  if(toplablenum!=0){
  	if(document.getElementById("s_"+toplablenum))
  		document.getElementById("s_"+toplablenum).style.display="none";
  }
  var ss=document.getElementById("s_"+object);
  if(ss)
  	ss.style.display="block";

}
function mout(object){
  //主菜单
  var mm=document.getElementById("m_"+object);
   if(object==5)
    	mm.className="i01";
    else	
  		mm.className="m_li_a";

  //初始主菜单还原效果
  if(toplablenum!=0){
    var mdef=document.getElementById("m_"+toplablenum);
    	if(toplablenum==5)
    		mdef.className="i01_a";
    	else		
    		mdef.className="hover";
  }
  //子菜单
  var ss=document.getElementById("s_"+object);
  if(ss)
  	ss.style.display="none";
  if(toplablenum!=0){
  	if(document.getElementById("s_"+toplablenum))
  		document.getElementById("s_"+toplablenum).style.display="";
  }
}


//切换语言版本
function cklan(lan){
	if(lan){
		top.location.href='cklanguage.php?l='+lan;
	}
}

function openNewsmore(id){
	window.open('newsmore.php?id='+id,'','scrollbars=yes,resizable=yes,width=800,height=700');
}

function openJobmore(id){
	window.open('jobmore.php?id='+id,'','scrollbars=yes,resizable=yes,width=800,height=700');
}

function openmap(id){
	window.open('openmap.php?id='+id,'','scrollbars=yes,resizable=yes,width=500,height=500');
}

function openprint(){
	window.open('print_exp.php','','scrollbars=yes,resizable=yes,width=690,height=700');
}

function openprint2(){
	window.open('print_imp.php','','scrollbars=yes,resizable=yes,width=690,height=700');
}
