//******** chkEmpty function ***************
function chkEmpty(strValue){
  var aaa=""
  for (i=0;i<strValue.length;i++){
    if (strValue.charAt(i) != " "){
       aaa+=strValue.charAt(i);
    }
  }
 if (aaa.length==0) return true;
}

function isNumeric(value) 
  {
    if (value == "")  { return false }
    if (value.charAt(0) == "-")
      start = 1;
    else
      start = 0;
    for (i=start; i<value.length; i++)
    {
      if (value.charAt(i) < "0") { return false; }
      if (value.charAt(i) > "9") { return false; }
    }
    return true;
  }

function chke2(ObjNm){
        var a=0,b=0;
         for(i=0;i<ObjNm.value.length;i++)
         {
             if(ObjNm.value.substring(i,i+1)=="@"){
                      a++;}
             if(ObjNm.value.substring(i,i+1)=="."){
                      b++;}
         }
         if(((a==1)&&(b>0)&&(ObjNm.value.length>6)) || (ObjNm.value.length==0))
         {    return true;   }
         else
         {   
             return false;
         }
}

function bbsValidate() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
    
    if (chkEmpty(document.bbsFM.fullname.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "-「姓名」不可為空白\n"; 
    }
    
    if (chkEmpty(document.bbsFM.electronicmail.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "-「Email」不可為空白\n"; 
    }
 
	if (chke2(document.bbsFM.electronicmail) == false) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "- 請再檢查一下「Email」, 輸入的E-mail可能有錯誤\n"; 
	}
	
    if (chkEmpty(document.bbsFM.title.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "-「主題」不可為空白\n"; 
    }
    
    if (chkEmpty(document.bbsFM.message.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "-「內容」不可為空白\n"; 
    }
    
    if (document.bbsFM.message.value.length > 1000) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "「內容」不可超過1000字 (目前有"+ document.bbsFM.message.value.length +"字)\n"; 
    } 
   
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.bbsFM.fullname.focus();
			break;
		case 2:
			document.bbsFM.electronicmail.focus();
			break;
		case 3:
			document.bbsFM.message.focus();
			break;
		case 4:
			document.bbsFM.title.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}


function validate_3() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
	n_blank = 0
	for (j = 0; j < document.orderFM.count.value; j++) {
		if (eval("document.orderFM.amount" + j + ".value") != "") {
			break;
		}
		else {
			n_blank = n_blank + 1;
		}
	}
	
	if (n_blank == document.orderFM.count.value) {
		y_err  = true; 
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "「數量」不可皆為空白\n";
	}
	
	for (j = 0; j < document.orderFM.count.value; j++) {
		if (!isNumeric(eval("document.orderFM.amount" + j + ".value"))) {
			y_err  = true; 
			if (y_goto == 0) y_goto = 1;
			y_errorMsg = y_errorMsg + "「數量」必須為整數\n";
			break;
		}
	}
    
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.orderFM.amount0.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}


function ed_validate() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
	n_blank = 0
	    
    if (document.orderFM.ptype[0].checked == false && document.orderFM.ptype[1].checked == false && document.orderFM.ptype[2].checked == false){
        y_err = true;  
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "「繳款方式」必須選擇\n"; 
    }
    
    if (document.orderFM.transfer.value.length < 8 && document.orderFM.ptype[2].checked == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 8;
		y_errorMsg = y_errorMsg + "「轉帳帳號後八碼」為八碼\n"; 
    }
    
    if (chkEmpty(document.orderFM.name.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "「收件人姓名」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.phone.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "「聯絡電話」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.email.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "-「聯絡Email」不可為空白\n"; 
    }
 
	if (chke2(document.orderFM.email) == false) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "- 請再檢查一下「聯絡Email」, 輸入的E-mail可能有錯誤\n"; 
	}
	
    if (chkEmpty(document.orderFM.address.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 5;
		y_errorMsg = y_errorMsg + "「送貨及發票寄送地址」不可為空白\n"; 
    }

//	if (document.orderFM.title.value.length < 1 && document.orderFM.id.value.length > 0) {
//        y_err = true;  
//		if (y_goto == 0) y_goto = 6;
//		y_errorMsg = y_errorMsg + "「發票抬頭」不可為空白\n"; 
//	}
	
//	if (document.orderFM.title.value.length > 0 && document.orderFM.id.value.length < 1) {
//        y_err = true;  
//		if (y_goto == 0) y_goto = 7;
//		y_errorMsg = y_errorMsg + "「公司統一編號」不可為空白\n"; 
//	}

    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.orderFM.ptype[0].focus();
			break;
		case 2:
			document.orderFM.name.focus();
			break;
		case 3:
			document.orderFM.phone.focus();
			break;
		case 4:
			document.orderFM.email.focus();
			break;
		case 5:
			document.orderFM.address.focus();
			break;
		case 6:
			document.orderFM.title.focus();
			break;
		case 7:
			document.orderFM.id.focus();
			break;
		case 8:
			document.orderFM.transfer.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}



function woman_bbs_validate() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
	n_blank = 0
	    
    if (document.womanFM.type.selectedIndex == 0){
        y_err = true;  
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "「類別」必須選擇\n"; 
    }
    
    if (chkEmpty(document.womanFM.name.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "「網友姓名」不可為空白\n"; 
    }
    
    if (chkEmpty(document.womanFM.email.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "-「Email」不可為空白\n"; 
    }
 
	if (chke2(document.womanFM.email) == false) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "- 請再檢查一下「Email」, 輸入的E-mail可能有錯誤\n"; 
	}
	
    if (chkEmpty(document.womanFM.cname.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "「秘方名稱」不可為空白\n"; 
    }
    
    if (chkEmpty(document.womanFM.material.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 5;
		y_errorMsg = y_errorMsg + "「材料/工具」不可為空白\n"; 
    }
    
	if (document.womanFM.material.value.length > 100) {
        y_err = true;  
		if (y_goto == 0) y_goto = 5;
		y_errorMsg = y_errorMsg + "「內容」不可超過100字 (目前有"+ document.womanFM.material.value.length +"字)\n"; 
    } 
    
    if (chkEmpty(document.womanFM.direction.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 6;
		y_errorMsg = y_errorMsg + "「做法」不可為空白\n"; 
    }

	if (document.womanFM.direction.value.length > 200) {
        y_err = true;  
		if (y_goto == 0) y_goto = 6;
		y_errorMsg = y_errorMsg + "「做法」不可超過200字 (目前有"+ document.womanFM.direction.value.length +"字)\n"; 
    }

	if (document.womanFM.good.value.length > 100) {
        y_err = true;  
		if (y_goto == 0) y_goto = 7;
		y_errorMsg = y_errorMsg + "「Good For」不可超過100字 (目前有"+ document.womanFM.good.value.length +"字)\n"; 
    }

	if (document.womanFM.caution.value.length > 200) {
        y_err = true;  
		if (y_goto == 0) y_goto = 8;
		y_errorMsg = y_errorMsg + "「注意事項」不可超過200字 (目前有"+ document.womanFM.caution.value.length +"字)\n"; 
    }
    
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.womanFM.type.focus();
			break;
		case 2:
			document.womanFM.name.focus();
			break;
		case 3:
			document.womanFM.email.focus();
			break;
		case 4:
			document.womanFM.cname.focus();
			break;
		case 5:
			document.womanFM.material.focus();
			break;
		case 6:
			document.womanFM.direction.focus();
			break;
		case 7:
			document.womanFM.good.focus();
			break;
		case 8:
			document.womanFM.caution.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}


function buyGoodBookSubmit() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;

    if (chkEmpty(document.ecFM.name.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "-「姓名」不可為空白\n"; 
    }
    
    if (chkEmpty(document.ecFM.phone.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "-「電話」不可為空白\n"; 
    }
    
    if (chkEmpty(document.ecFM.mobile.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "-「手機」不可為空白\n"; 
    }
    
    if (chkEmpty(document.ecFM.address.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "-「地址」不可為空白\n"; 
    }
    
    if (chkEmpty(document.ecFM.email.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 5;
		y_errorMsg = y_errorMsg + "-「E-Mail」不可為空白\n"; 
    }
 
	if (chke2(document.ecFM.email) == false) {
        y_err = true;  
		if (y_goto == 0) y_goto = 5;
		y_errorMsg = y_errorMsg + "- 請再檢查一下「Email」, 輸入的E-mail可能有錯誤\n"; 
	}
	
    //alert(ecFM.invoice_type[1].checked);
	if (ecFM.invoice_type[1].checked == true) {
		if (chkEmpty(document.ecFM.title.value) == true) {
				y_err = true;  
			if (y_goto == 0) y_goto = 6;
				y_errorMsg = y_errorMsg + "-「發票抬頭」不可為空白\n"; 
		}
    
		if (chkEmpty(document.ecFM.companyid.value) == true) {
				y_err = true;  
			if (y_goto == 0) y_goto = 7;
				y_errorMsg = y_errorMsg + "-「發票統編」不可為空白\n"; 
		}
	}
	
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.ecFM.name.focus();
			break;
		case 2:
			document.ecFM.phone.focus();
			break;
		case 3:
			document.ecFM.mobile.focus();
			break;
		case 4:
			document.ecFM.address.focus();
			break;
		case 5:
			document.ecFM.email.focus();
			break;
		case 6:
			document.ecFM.title.focus();
			break;
		case 7:
			document.ecFM.companyid.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}


function elearningValidate() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
    
    if (chkEmpty(document.orderFM.name.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "-「姓名」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.company.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "-「公司全銜」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.dept.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "-「部門／職稱」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.phone.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "-「電話」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.mobile.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 5;
		y_errorMsg = y_errorMsg + "-「行動電話」不可為空白\n"; 
    }
    
    //if (chkEmpty(document.orderFM.fax.value) == true) {
    //    y_err = true;  
	//	if (y_goto == 0) y_goto = 6;
	//	y_errorMsg = y_errorMsg + "-「傳真」不可為空白\n"; 
   // }
 
	if (chke2(document.orderFM.email) == false) {
        y_err = true;  
		if (y_goto == 0) y_goto = 7;
		y_errorMsg = y_errorMsg + "- 請再檢查一下「Email」, 輸入的E-mail可能有錯誤\n"; 
	}
	
    if (chkEmpty(document.orderFM.address.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 8;
		y_errorMsg = y_errorMsg + "-「聯絡地址」不可為空白\n"; 
    }
    
   
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.orderFM.name.focus();
			break;
		case 2:
			document.orderFM.company.focus();
			break;
		case 3:
			document.orderFM.dept.focus();
			break;
		case 4:
			document.orderFM.phone.focus();
			break;
		case 5:
			document.orderFM.mobile.focus();
			break;
		//case 6:
			//document.orderFM.fax.focus();
			//break;
		case 7:
			document.orderFM.email.focus();
			break;
		case 8:
			document.orderFM.address.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
		orderFM.submit();
	    //return true;
	    return false;
   	}	
}


function SecretValidate() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
    
    if (chkEmpty(document.bbsFM.username.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "-「姓名」不可為空白\n"; 
    }
    
    if (chkEmpty(document.bbsFM.email.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "-「Email」不可為空白\n"; 
    }
 
	if (chke2(document.bbsFM.email) == false) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "- 請再檢查一下「Email」, 輸入的E-mail可能有錯誤\n"; 
	}
	
    if (chkEmpty(document.bbsFM.name.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "-「密方名稱」不可為空白\n"; 
    }
    
    if ((chkEmpty(document.bbsFM.materials.value) == true) && (chkEmpty(document.bbsFM.directions.value) == true) && (chkEmpty(document.bbsFM.precautions.value) == true) && (chkEmpty(document.bbsFM.goodfor.value) == true)) {
        y_err = true;  
		if (y_goto == 0) y_goto = 6;
		y_errorMsg = y_errorMsg + "-「材料、做法、Good For、注意事項」不可全空白\n"; 
    }
    
    if (chkEmpty(document.bbsFM.materials.value) != true) {
		if (document.bbsFM.materials.value.length > 100) {
			y_err = true;  
			if (y_goto == 0) y_goto = 6;
			y_errorMsg = y_errorMsg + "「材料」不可超過100字 (目前有"+ document.bbsFM.materials.value.length +"字)\n"; 
		} 
	 }
	 
    if (chkEmpty(document.bbsFM.directions.value) != true) {
		if (document.bbsFM.directions.value.length > 200) {
			y_err = true;  
			if (y_goto == 0) y_goto = 7;
			y_errorMsg = y_errorMsg + "「做法」不可超過200字 (目前有"+ document.bbsFM.directions.value.length +"字)\n"; 
		} 
	 }
	 
    if (chkEmpty(document.bbsFM.goodfor.value) != true) {
		if (document.bbsFM.goodfor.value.length > 100) {
			y_err = true;  
			if (y_goto == 0) y_goto = 8;
			y_errorMsg = y_errorMsg + "「Good For」不可超過100字 (目前有"+ document.bbsFM.goodfor.value.length +"字)\n"; 
		} 
	 }	 
	 
    if (chkEmpty(document.bbsFM.precautions.value) != true) {
		if (document.bbsFM.precautions.value.length > 200) {
			y_err = true;  
			if (y_goto == 0) y_goto = 9;
			y_errorMsg = y_errorMsg + "「注意事項」不可超過200字 (目前有"+ document.bbsFM.precautions.value.length +"字)\n"; 
		} 
	 }
   
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.bbsFM.username.focus();
			break;
		case 2:
			document.bbsFM.email.focus();
			break;
		case 4:
			document.bbsFM.name.focus();
			break;
		case 6:
			document.bbsFM.materials.focus();
			break;
		case 7:
			document.bbsFM.directions.focus();
			break;
		case 8:
			document.bbsFM.goodfor.focus();
			break;
		case 9:
			document.bbsFM.precautions.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}


function WBTquestionary() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
    
	j = 0;
	for (m=1; m<=28; m++)
	{
		if (m == 3 || m == 7) {
			value = eval("document.wbtFM.q"+ m + ".value");
			
			if(chkEmpty(value) != true) {
					j = j + 1;
			}
		}
		else if (m == 4)
		{
			if (document.wbtFM.q4[0].checked == true || document.wbtFM.q4[1].checked == true) {
				j = j + 1;
			}
		}
		else if (m == 2){
			for (k=0; k<8; k++)
			{
				if(eval("document.wbtFM.q"+ m + "["+ k +"].checked") == true) {
					j = j + 1;
				}
			}
		}
		else if (m == 1){
			for (k=0; k<8; k++)
			{
				if(eval("document.wbtFM.q"+ m + "["+ k +"].checked") == true) {
					j = j + 1;
				}
			}
		}
		else {
			for (k=0; k<5; k++)
			{
				if(eval("document.wbtFM.q"+ m + "["+ k +"].checked") == true) {
					j = j + 1;
				}
			}
		}
   }
   
   if (j < 28) {
		y_errorMsg = y_errorMsg + "您的問卷尚未填寫完整唷！\n";
		alert(y_errorMsg);
		return false;
	}
}

function validate_3() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;
	n_blank = 0
	for (j = 0; j < document.orderFM.count.value; j++) {
		if (eval("document.orderFM.amount" + j + ".value") != "") {
			break;
		}
		else {
			n_blank = n_blank + 1;
		}
	}
	
	if (n_blank == document.orderFM.count.value) {
		y_err  = true; 
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "「數量」不可皆為空白\n";
	}
	
	for (j = 0; j < document.orderFM.count.value; j++) {
		if (!isNumeric(eval("document.orderFM.amount" + j + ".value"))) {
			y_err  = true; 
			if (y_goto == 0) y_goto = 1;
			y_errorMsg = y_errorMsg + "「數量」必須為整數\n";
			break;
		}
	}
    
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.orderFM.amount0.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}

function bookstoreSubmit() {
    //--------------------------- 檢查空白 --------------------------------
    var y_err; y_errorMsg = "";y_goto = 0;

    if (chkEmpty(document.orderFM.name.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 1;
		y_errorMsg = y_errorMsg + "-「收件人」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.phone.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 2;
		y_errorMsg = y_errorMsg + "-「聯絡電話」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.address.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 3;
		y_errorMsg = y_errorMsg + "-「地址」不可為空白\n"; 
    }
    
    if (chkEmpty(document.orderFM.email.value) == true) {
        y_err = true;  
		if (y_goto == 0) y_goto = 4;
		y_errorMsg = y_errorMsg + "-「Email」不可為空白\n"; 
    }
     
	if (chke2(document.orderFM.email) == false) {
        y_err = true;  
		if (y_goto == 0) y_goto = 5;
		y_errorMsg = y_errorMsg + "- 請再檢查一下「Email」, 輸入的E-mail可能有錯誤\n"; 
	}
	
    //alert(orderFM.type[1].checked);
	if (orderFM.type[1].checked == true) {
		if (chkEmpty(document.orderFM.title.value) == true) {
				y_err = true;  
			if (y_goto == 0) y_goto = 6;
				y_errorMsg = y_errorMsg + "-「發票抬頭」不可為空白\n"; 
		}
    
		if (chkEmpty(document.orderFM.companynum.value) == true) {
				y_err = true;  
			if (y_goto == 0) y_goto = 7;
				y_errorMsg = y_errorMsg + "-「統一編號」不可為空白\n"; 
		}
	}
	
    if (y_err == true) {
		alert(y_errorMsg);
		switch(y_goto) {
		case 1:
			document.orderFM.name.focus();
			break;
		case 2:
			document.orderFM.phone.focus();
			break;
		case 3:
			document.orderFM.address.focus();
			break;
		case 4:
			document.orderFM.email.focus();
			break;
		case 5:
			document.orderFM.email.focus();
			break;
		case 6:
			document.orderFM.title.focus();
			break;
		case 7:
			document.orderFM.companynum.focus();
			break;
		default:
			break;
		}
		return false;
	}else{
	    return true;
   	}	
}

