function switchSysBar()
{
  	var switchPt = document.getElementById('switchPoint');
	if (switchPt.className == 'switchclose'){
		document.all("frmTitle1").style.display="none";
		document.all("frmTitle2").style.display="none";
		switchPt.className = 'open';
		switchPt.title='打开';
	} else {
		document.all("frmTitle1").style.display="";
		document.all("frmTitle2").style.display="";
		switchPt.className = 'switchclose';
		switchPt.title='隐藏';
	}
}


function showMeTree(ccname,bbname) {
      if (document.getElementById(ccname).style.display == "none"){
         document.getElementById(ccname).style.display = "";
		 bbname.className="down";
         }
      else {
         document.getElementById(ccname).style.display = "none";
		 bbname.className="up";
         }
}

function showJobSearch(){
	if (document.getElementById('jobSearch').style.display == "none"){
         document.getElementById('jobSearch').style.display = "";
		 document.getElementById('searchJobBtn').className="button_blue_search_up";
         }
      else {
         document.getElementById('jobSearch').style.display = "none";
		 document.getElementById('searchJobBtn').className="button_blue_search_down";
      }
}

function isDateString(str) {
	var reg=/^\d{4}-[0-1]?\d{1}-[0-3]?\d{1}$/;
	return reg.test(str);
}

function compareFlyDate(strDate1,strDate2) {
	var tmp1=strDate1.split('-');
	var tmp2=strDate2.split('-');
	var date1=eval('new Date('+tmp1[0]+','+tmp1[1]+','+tmp1[2]+')');
	var date2=eval('new Date('+tmp2[0]+','+tmp2[1]+','+tmp2[2]+')');
	if ((date2.valueOf()-date1.valueOf())>=0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function chkDateSpan(startdate,enddate) {
	if (! isDateString(startdate.value)) {
		alert('日期格式不正确，请重新填写！');
		startdate.focus();
		return false;
	}
	if (! isDateString(enddate.value)) {
		alert('日期格式不正确，请重新填写！');
		enddate.focus();
		return false;
	}
	if (! compareFlyDate(startdate.value,enddate.value)) {
		alert('起始日期不能晚于结束日期！');
		startdate.focus();
		return false;
	}
	return true;
}

function checkFileSuffix(fileName){
var fn=DWRUtil.getValue(fileName).split(".");
if(fn[1]=="doc"){
	return true;
}else if(fn[1]=="docx"){
	alert('请将上传的 Word2007 格式的文档转换成 Word97-word2003 格式！');
	return false;
}
else{
	alert('请上传Word格式的简历！');
	return false;
}
}


