/*********************************************************************************
*    FUNCTION:        toFixed
*    Discription: IE5不支持该函数，扩展
**********************************************************************************/
if(!Number.prototype.toFixed)
  {Number.prototype.toFixed= function(num)
    {with(Math)return round(this.valueOf()*pow(10,num))/pow(10,num);
    }
  }
/*********************************************************************************
*    FUNCTION:        isInt
*    PARAMETER:        theStr    AS String 
*    RETURNS:        TRUE if the passed parameter is an integer, otherwise FALSE
*    CALLS:            isDigit
**********************************************************************************/
function isInt (theStr) {
    var flag = true;

    if (isEmpty(theStr)) { flag=false; }
    else
    {    for (var i=0; i<theStr.length; i++) {
            if (isDigit(theStr.substring(i,i+1)) == false) {
                flag = false; break;
            }
        }
    }
    return(flag);
}

/*********************************************************************************
*    FUNCTION:        isBetween
*    PARAMETERS:        val        AS any value
*                    lo        AS Lower limit to check
*                    hi        AS Higher limit to check
*    CALLS:            NOTHING
*    RETURNS:        TRUE if val is between lo and hi both inclusive, otherwise false.
**********************************************************************************/
function isBetween (val, lo, hi) {
    if ((val < lo) || (val > hi)) { return(false); }
    else { return(true); }
}

/*********************************************************************************
*    FUNCTION:        isDate checks a valid date yyyy-mm-dd
*    PARAMETERS:        theStr        AS String
*    CALLS:            isBetween, isInt
*    RETURNS:        TRUE if theStr is a valid date otherwise false.
**********************************************************************************/
function isDate (theStr) {
    var the1st = theStr.indexOf('-');
    var the2nd = theStr.lastIndexOf('-');
    
    if (the1st == the2nd) { return(false); }
    else {
        var y = theStr.substring(0,the1st);
        var m = theStr.substring(the1st+1,the2nd);
        var d = theStr.substring(the2nd+1,theStr.length);
        var maxDays = 31;
        
        if (isInt(m)==false || isInt(d)==false || isInt(y)==false) {
            return(false); }
        else if(eval(y)<1752 || eval(y)>9998){ return(false);}
		else if (y.length < 4) { return(false); }
        else if (!isBetween (m, 1, 12)) { return(false); }
        else if (m==4 || m==6 || m==9 || m==11) maxDays = 30;
        else if (m==2) {
            if (y % 4 > 0) maxDays = 28;
            else if (y % 100 == 0 && y % 400 > 0) maxDays = 28;
               else maxDays = 29;
        }
        if (isBetween(d, 1, maxDays) == false) { return(false); }
        else { return(true); }
    }
}
/*********************************************************************************
*    FUNCTION:        isEuDate checks a valid date in British format
*    PARAMETERS:        theStr        AS String
*    CALLS:            isBetween, isInt
*    RETURNS:        TRUE if theStr is a valid date otherwise false.
**********************************************************************************/
function isEuDate (theStr) {
    if (isBetween(theStr.length, 8, 10) == false) { return(false); }
    else {
        var the1st = theStr.indexOf('/');
        var the2nd = theStr.lastIndexOf('/');
        
        if (the1st == the2nd) { return(false); }
        else {
            var m = theStr.substring(the1st+1,the2nd);
            var d = theStr.substring(0,the1st);
            var y = theStr.substring(the2nd+1,theStr.length);
            var maxDays = 31;
			
            if (isInt(m)==false || isInt(d)==false || isInt(y)==false) {
                return(false); }
            else if(eval(y)<1752 || eval(y)>9998){ return(false);}
			else if (y.length < 4) { return(false); }
            else if (isBetween (m, 1, 12) == false) { return(false); }
            else if (m==4 || m==6 || m==9 || m==11) maxDays = 30;
            else if (m==2) {
                if (y % 4 > 0) maxDays = 28;
                else if (y % 100 == 0 && y % 400 > 0) maxDays = 28;
                else maxDays = 29;
            }
            
            if (isBetween(d, 1, maxDays) == false) { return(false); }
            else { return(true); }
        }
    }
    
}
/********************************************************************************
*   FUNCTION:       Compare Date! Which is the latest!
*   PARAMETERS:     lessDate,moreDate AS String
*   CALLS:          isDate,isBetween
*   RETURNS:        TRUE if lessDate<moreDate
*********************************************************************************/
function isComdate (lessDate , moreDate)
{
    if (!isDate(lessDate)) { return(false);}
    if (!isDate(moreDate)) { return(false);}
    var less1st = lessDate.indexOf('-');
    var less2nd = lessDate.lastIndexOf('-');
    var more1st = moreDate.indexOf('-');
    var more2nd = moreDate.lastIndexOf('-');
    var lessy = lessDate.substring(0,less1st);
    var lessm = lessDate.substring(less1st+1,less2nd);
    var lessd = lessDate.substring(less2nd+1,lessDate.length);
    var morey = moreDate.substring(0,more1st);
    var morem = moreDate.substring(more1st+1,more2nd);
    var mored = moreDate.substring(more2nd+1,moreDate.length);
    var Date1 = new Date(lessy,lessm,lessd); 
    var Date2 = new Date(morey,morem,mored); 
    if (Date1>Date2) { return(false);}
     return(true); 
        
}

/*********************************************************************************
*    FUNCTION    isEmpty checks if the parameter is empty or null
*    PARAMETER    str        AS String
**********************************************************************************/
function isEmpty (str) {
    if ((str==null)||(str.length==0)) return true;
    else return(false);
}

/*********************************************************************************
*    FUNCTION:        isReal
*    PARAMETER:       theStr    AS String 
                      decLen    AS Integer (how many digits after period)
*    RETURNS:         TRUE if theStr is a float, otherwise FALSE
*    CALLS:           isInt
**********************************************************************************/
function isReal (theStr, decLen) {
    var dot1st = theStr.indexOf('.');
    var dot2nd = theStr.lastIndexOf('.');
    var OK = true;
    
    if (isEmpty(theStr)) return false;

    if (dot1st == -1) {
        if (!isInt(theStr)) return(false);
        else return(true);
    }
    
    else if (dot1st != dot2nd) return (false);
    else if (dot1st==0) return (false);
    else {
        var intPart = theStr.substring(0, dot1st);
        var decPart = theStr.substring(dot2nd+1);

        if (decPart.length > decLen) return(false);
        else if (!isInt(intPart) || !isInt(decPart)) return (false);
        else if (isEmpty(decPart)) return (false);
        else return(true);
    }
}

/*********************************************************************************
*    FUNCTION:         isEmail
*    PARAMETER:        String (Email Address)
*    RETURNS:          TRUE if the String is a valid Email address
*                      FALSE if the passed string is not a valid Email Address
*    EMAIL FORMAT:     AnyName@EmailServer e.g; webmaster@hotmail.com
*                      @ sign can appear only once in the email address.
*********************************************************************************/
function isEmail (theStr) {
    var atIndex = theStr.indexOf('@');
    var dotIndex = theStr.indexOf('.', atIndex);
    var flag = true;
    theSub = theStr.substring(0, dotIndex+1)

    if ((atIndex < 1)||(atIndex != theStr.lastIndexOf('@'))||(dotIndex < atIndex + 2)||(theStr.length <= theSub.length)) 
    {    return(false); }
    else { return(true); }
}
/*********************************************************************************
*    FUNCTION:      newWindow
*    PARAMETERS:    doc         ->    Document to open in the new window
                    hite     ->    Height of the new window
                    wide     ->    Width of the new window
                    bars    ->    1-Scroll bars = YES 0-Scroll Bars = NO
                    resize     ->    1-Resizable = YES 0-Resizable = NO
*    CALLS:         NONE
*    RETURNS:       New window instance
**********************************************************************************/
function newWindow (doc, hite, wide, bars, resize) {
    var winNew="_blank";
    var opt="toolbar=0,location=0,directories=0,status=0,menubar=0,";
    opt+=("scrollbars="+bars+",");
    opt+=("resizable="+resize+",");
    opt+=("width="+wide+",");
    opt+=("height="+hite);
    winHandle=window.open(doc,winNew,opt);
    return;
}

/*********************************************************************************
*    FUNCTION:        checkDigit
*    PARAMETERS:      code -> keycode
*    CALLS:           NONE
*    RETURNS:         Digit or Dot       //add by shenjb
**********************************************************************************/
    function checkDigit(code)
	{
	  //alert(code);
	  if(code>47&&code<58)
	  {
	    return code;
	  }
	  else
	  { 
	     return 0;
	  }
	}

/*********************************************************************************
*    FUNCTION:        checkDate
*    PARAMETERS:      code -> keycode
*    CALLS:           NONE
*    RETURNS:         Digit or -      //add by shenjb
**********************************************************************************/
    function checkDate(code)
	{
	  //alert(code);
	  if((code>47&&code<58)||(code==45))
	  {
	    return code;
	  }
	  else
	  { 
	     return 0;
	  }
	}

/*********************************************************************************
*    FUNCTION:        checkReal
*    PARAMETERS:      code -> keycode
*    CALLS:           NONE
*    RETURNS:         Digit or Dot        //add by shenjb
**********************************************************************************/
    function checkReal(code)
	{
	  if((code>47&&code<59)||(code==46))
	  {
	    return code;
	  }
	  else
	  { 
	     return 0; 
	  }
	}

/*********************************************************************************
*    FUNCTION:        checkReal
*    PARAMETERS:      code -> keycode
*    CALLS:           NONE
*    RETURNS:         Digit or - or " "       //add by shenjb
**********************************************************************************/
    function checkTelephone(code)
	{
	  if((code>47&&code<59)||(code==45)||(code==32))
	  {
	    return code;
	  }
	  else
	  { 
	     return 0; 
	  }
	}
/*********************************************************************************
*    FUNCTION:        checkReal
*    PARAMETERS:      code -> keycode
*    CALLS:           NONE
*    RETURNS:         Digit or " "       //add by shenjb
**********************************************************************************/
    function checkMobile(code)
	{
	  if((code>47&&code<59)||(code==32))
	  {
	    return code;
	  }
	  else
	  { 
	     return 0; 
	  }
	}

/*********************************************************************************
*    FUNCTION:        checkDate
*    PARAMETERS:      code -> keycode
*    CALLS:           NONE
*    RETURNS:         Digit or :       //add by shenjb
**********************************************************************************/
	function checkTime(code)
	{
	  if((code > 47)&&(code < 59))
	  {
	    return code;
	  }
	  else
	  { 
	     return 0; 
	  }
	}
/*********************************************************************************
*    FUNCTION:        checkInput
*    PARAMETERS:      code -> keycode
*    CALLS:           NONE
*    RETURNS:         Except '       //add by shenjb
**********************************************************************************/
	function checkInput(code)
	{
	  //alert(code);
	  if(code==39)         //' charasteric is forbiddened
	  {
	     return 0;
	  }
	  return code;
	}
/*********************************************************************************
*    FUNCTION:        DecimalFormat 小数点后缺省保留两位
*    PARAMETERS:      paramValue -> Field value
*    CALLS:           NONE
*    RETURNS:        Formated string
**********************************************************************************/
function DecimalFormat (paramValue) {
    var intPart = parseInt(paramValue);
	if(isNaN(intPart)) intPart=0;
	if(intPart > 2147483647)
	{
		alertWindow("数值太大，请重新填写！<br><br>数字类型值应小于 2^31 - 1 (2,147,483,647)");
		return "";
	}
    var decPart =parseFloat(paramValue) - intPart;
    str = "";
    if ((decPart == 0) || (decPart == null)) str += (intPart + ".00");
    else str += (intPart + decPart);
	if(isNaN(str)) str="";
    return (str);
}

/*********************************************************************************
*    FUNCTION:        DecimalFormat1 2004-9-7 yangxl 不扩展小数位
*    PARAMETERS:      paramValue -> Field value
*    CALLS:           NONE
*    RETURNS:        Formated string
**********************************************************************************/
function DecimalFormat1 (paramValue) {
    var intPart = parseInt(paramValue);
	if(isNaN(intPart)) intPart=0;
	if(intPart > 2147483647)
	{
		alertWindow("数值太大，请重新填写！<br><br>数字类型值应小于 2^31 - 1 (2,147,483,647)");
		return "";
	}
    var decPart =parseFloat(paramValue) - intPart;
    str = "";
    if ((decPart == 0) || (decPart == null)) str += intPart;
    else str += (intPart + decPart);
	if(isNaN(str)) str="";
    return (str);
}

/*********************************************************************************
*    FUNCTION:        CurrencyFormat  2004-9-7 yangxl
*    PARAMETERS:      paramValue -> Field value
*    CALLS:           NONE
*    RETURNS:        Formated string 12,152,355.00
**********************************************************************************/
function CurrencyFormat (paramValue) {
    var reg = /,/g;
    var str = paramValue.replace(reg, ""); //通过正则表达式，替换所有的","
    var intPart = parseInt(str);
	if(isNaN(intPart)) intPart=0;
	if(intPart > 922337203685476)
	{
		alertWindow("金额数值太大，请重新填写！<br><br>货币类型值应小于 2^63 - 1 (+922,337,203,685,477.5807)");
		return "";
	}
    var decPart =parseFloat(str).toFixed(2) - intPart;

    str = "";
    if ((decPart == 0) || (decPart == null)) str += (intPart+".00");
    else str += (intPart + decPart);
	if(isNaN(str)) str="";
	if(str.substring(str.indexOf(".")+1,str.length).length==1)
		str +="0";
	var str1 = str;
	var str2 = "";

	if(str1.indexOf(".")>0)
	{
		str2 = str1.substring(str1.indexOf("."),str1.length) + str2;
		str1 = str1.substring(0,str1.indexOf("."));
	}
	while(str1 != "")
	{
		if(str2.indexOf(".")!=0) str2 = "," + str2;
		str2 = str1.substring(str1.length-3,str1.length) + str2;
		str1 = str1.substring(0,str1.length-3);
		//alert(str1+"-"+str2);
	}

	return (str2);
}
/*********************************************************************************
*    EO_JSLib.js
*   javascript正则表达式检验
**********************************************************************************/


//校验是否全由数字组成
function isDigit(s)
{
    var patrn=/^[0-9]{1,20}$/;
    if (!patrn.exec(s)) return false
    return true
}

//校验登录名：只能输入3-20个以字母开头、可带数字、“_”、“.”的字串
function isRegisterUserName(s)
{
    var patrn=/^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){2,19}$/;
    if (!patrn.exec(s)) return false
    return true
}

//校验用户姓名：只能输入1-30个以字母开头的字串
function isTrueName(s)
{
    var patrn=/^[a-zA-Z]{1,30}$/;
    if (!patrn.exec(s)) return false
    return true
}
//校验开头字母不允许是数字
function isNotDigitBegin(s)
{
    var patrn=/^[0-9]{1}/;
    if (patrn.exec(s)) return false
    return true
}
//校验密码：只能输入6-20个字母、数字、下划线
function isPasswd(s)
{
    var patrn=/^(\w){6,20}$/;
    if (!patrn.exec(s)) return false
    return true
}

//校验普通电话、传真号码：可以“+”开头，除数字外，可含有“-”
function isTel(s)
{
    //var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?(\d){1,12})+$/;
    var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
    if (!patrn.exec(s)) return false
    return true
}

//校验手机号码：必须以数字开头，除数字外，可含有“-”
function isMobil(s)
{
 
	var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;
    if (!patrn.exec(s)) return false
    return true
}

//校验邮政编码
function isPostalCode(s)
{
	//var patrn=/^[a-zA-Z0-9]{3,12}$/;
    var patrn=/^[0-9 ]{6}$/;
    if (!patrn.exec(s)) return false
    return true
}

function isIP(s)  //by zergling
{
	var patrn=/^[0-9.]{1,20}$/;
	if (!patrn.exec(s)) return false
	return true
}

function trim(Str)
{
	var tmpStr;
	tmpStr=Str;
	
	while((tmpStr.length>0)&&(tmpStr.substr(0,1)==' '))
		tmpStr=tmpStr.substr(1,tmpStr.length-1);
		
	while((tmpStr.length>0)&&(tmpStr.substr(tmpStr.length-1,1)==' '))
		tmpStr=tmpStr.substr(0,tmpStr.length-1);
	return tmpStr;
}

/*************************************************************************************************************
*    FUNCTION:        inputCheck,通用文本域校验，识别各种类型，包括非空
*					         input元素属性：cType -> 域类型(email;date;int;loginUser;pwd;telphone;mobile;postCode)；
*									 cTitle -> 域标识，用于出错提示；
*									 allowEmpty -> 非空（"true"/"false";default:"true"）
*									 allowFocus -> 缺省为允许聚焦，false 为不允许
*    PARAMETERS:      formName -> Form Name
*    CALLS:           
*    RETURNS:         true/false
**************************************************************************************************************/
function inputCheck(formName)
{
	var oName;
	var str;
	oName = eval("document.all." + formName);
	//获取表单元素长度
	for(k=0;k<oName.length;k++)
	{   
		if(typeof(oName[k].cTitle)!="undefined"&&oName[k].cTitle!="")
			str=oName[k].cTitle;
		else
			str="";
		if(typeof(oName[k].cType)!="undefined"&&oName[k].cType!=""&&trim(oName[k].value)!="")
		{
			switch(oName[k].cType){
				//如果是邮件地址
				case "email":
					if(isEmail(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确email");
						alertWindow(str + "填入的不是正确email");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				//如果是日期
				case "date":
					if(isDate(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确的日期");
						alertWindow(str + "填入的不是正确的日期");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				//如果是整型
				case "int":
					if(isInt(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确整型数字");
						alertWindow(str + "填入的不是正确整型数字");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				
				//如果是实型
				case "real":
					if(isReal(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确整型数字");
						alertWindow(str + "填入的不是正确实型数字");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				
				//如果登陆账号
				case "loginUser":
					if(isRegisterUserName(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确的账号，请输入3-20个以字母开头、可带数字、“_”、“.”的字串");
						alertWindow(str + "填入的不是正确的账号，请输入3-20个以字母开头、可带数字、“_”、“.”的字串");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				//如果是密码
				case "pwd":
					if(isPasswd(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确的密码，请输入6-20个字母、数字、下划线");
						alertWindow(str + "填入的不是正确的密码，请输入6-20个字母、数字、下划线");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}

				//如果是电话号码、传真
				case "telephone":
					if(isTel(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确的电话号码");
						alertWindow(str + "填入的不是正确的电话号码<br><br>请输入数字、空格、“-”");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				//如果是手机
				case "mobile":
					if(isMobil(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确的手机号码");
						alertWindow(str + "填入的不是正确的手机号码");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				//如果是邮政编码
				case "postCode":
					if(isPostalCode(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确的邮政编码");
						alertWindow(str + "填入的不是正确的邮政编码");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				//如果是邮政编码
				case "notDigitBegin":
					if(isNotDigitBegin(oName[k].value)==false)
					{
						//alert(str + "填入的不是正确的邮政编码");
						alertWindow(str + "开头字符不允许是数字");
						if(oName[k].allowFocus != "false")
							oName[k].focus();
						return false;
					}
					else
					{
						break;
					}
				default:break;
			}//switch
		}

		//判断当前表单项是否必填
		if(typeof(oName[k].allowEmpty)!="undefined"&&oName[k].allowEmpty=="false")
		{
			if(trim(oName[k].value)=="")
			{
				//alert(str + "不能为空");
				alertWindow(str + "不能为空");
				if(oName[k].allowFocus != "false")
					oName[k].focus();
				return false;
			}
		}
	}//end for
	return true;
}
/*************************************************************************************************************
*    FUNCTION:        CheckAll,选中所有
*					  
*    PARAMETERS:      form -> Form Name
*    CALLS:           
*    RETURNS:         none                  //add by shenjb
**************************************************************************************************************/

    function CheckAll(form)
	{
        for (var i=0;i<form.elements.length;i++)
		{
            var e = form.elements[i];
            e.checked = true
        }
    }

/*************************************************************************************************************
*    FUNCTION:        CancelAll,取消所有选择
*					  
*    PARAMETERS:      form -> Form Name
*    CALLS:           
*    RETURNS:         none                  //add by shenjb
**************************************************************************************************************/

    function CancelAll(form)
	{
        for (var i=0;i<form.elements.length;i++)
		{
            var e = form.elements[i];
            e.checked = false
        }
    }
/*************************************************************************************************************
*    FUNCTION:        CheckOther,反选
*					  
*    PARAMETERS:      form -> Form Name
*    CALLS:           
*    RETURNS:         none               //add by shenjb
**************************************************************************************************************/

	
	function CheckOther(form)
	{
        for (var i=0;i<form.elements.length;i++)
		{
            var e = form.elements[i];
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
		}
	}

/*************************************************************************************************************
*    FUNCTION:        CheckAll1,选中所有
*					  
*    PARAMETERS:      obj -> checkbox
*    CALLS:           
*    RETURNS:         none                  //modify by yangxl 2004-8-31
**************************************************************************************************************/

    function CheckAll1(obj)
	{
		if(obj.length == null || obj.length == "undefined")
		{
            obj.checked = true;
		}
        for (var i=0;i<obj.length;i++)
		{
            var e = obj[i];
            e.checked = true;
        }
    }
/*************************************************************************************************************
*    FUNCTION:        CheckOther1,反选
*					  
*    PARAMETERS:     obj -> checkbox
*    CALLS:           
*    RETURNS:         none               //modify by yangxl 2004-8-31
**************************************************************************************************************/

	
	function CheckOther1(obj)
	{
		if(obj.length == null || obj.length == "undefined")
		{
            var e = obj;
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
		}
        for (var i=0;i<obj.length;i++)
		{
            var e = obj[i];
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
		}
	}
/*************************************************************************************************************
*    FUNCTION:        CheckCancel1,取消选择
*					  
*    PARAMETERS:     obj -> checkbox
*    CALLS:           
*    RETURNS:         none               //modify by yangxl 2004-8-31
**************************************************************************************************************/
	
	function CheckCancel1(obj)
	{
		if(obj.length == null || obj.length == "undefined")
		{
            obj.checked = false;
		}
        for (var i=0;i<obj.length;i++)
		{
            var e = obj[i];
			e.checked = false;
		}
	}

	function HaveCheckValue(obj)
	{
		var i = 0;

		if(typeof(obj) != "object") return false;

		if(obj.length == null || obj.length == "undefined")
		{
			var e = obj;
			if (e.checked) 
				return true;
			else 
				return false;
		}
		else
		{
			for (var i=0;i<obj.length;i++)
			{
				var e = obj[i];
				if (e.checked)
				{
					return true;
				}
			}
			return false;
		}
	}

/*************************************************************************************************************
*    FUNCTION:       判断select型对象提交时是否为空
*					  
*    PARAMETERS:     none
*    CALLS:           
*    RETURNS:         none               //created by shenjane
**************************************************************************************************************/
	function checkEmpty(obje)
	{
		var obj=eval("document.all."+obje);
		if(obj.options.length==0)
		{
			obj.focus();
			return false
		}
		else
		{
			return true;
		}
		return false;
	}


/*************************************************************************************************************
*    FUNCTION:       得到当前日期
*					  
*    PARAMETERS:     none
*    CALLS:           
*    RETURNS:         none               //created by shenjane
**************************************************************************************************************/
	function getTodayStr()
	{
		var d=new date();
		var str="";
		str=d.getYear;
		return str;
	}