
function popwin(id)
{		window.open("ViewProduct.asp?Product_id="+id,"","status=yes,scrollbars=yes,width=600,height=550");

}
function AddCart(id)
{		window.open("My_Cart.asp?Product_id="+id,"","status=yes,scrollbars=yes,width=0,height=0");
}
function openMyView(aaa)
{		window.open(aaa,"","status=yes,scrollbars=yes,width=600,height=550");
}
function SearchForm() {
var chec=document.form_keyword;
if ( !chec.KeyWord.value.length ) {
alert('\nPlease Input Keyword. \n');
chec.KeyWord.focus();
return false;
}
return true;
}

function checkUser() {
var chec=document.userform;
if ( !chec.UserName.value.length ) {
alert('\nPlease Input UserName. \n');
chec.UserName.focus();
return false;
}
if ( !chec.Password.value.length ) {
alert('\nPlease Input Password. \n');
chec.Password.focus();
return false;
}
return true;
}

function formcheck() {
  if (!document.form1.f1.value.length)
  {
   alert("\Please input Your Company Name!")
   document.form1.f1.focus()
   return false;
  }
  
    if (!document.form1.f2.value.length)
  {
   alert("\Please input Your Contact Person!")
   document.form1.f2.focus()
   return false;
  }
    if (!document.form1.f3.value.length)
  {
   alert("\Please input Your Address:!")
   document.form1.f3.focus()
   return false;
  }
  
      if (!document.form1.f4.value.length)
  {
   alert("\Please input Your Zip Code!")
   document.form1.f4.focus()
   return false;
  }
      if (!document.form1.f5.value.length)
  {
   alert("\Please input Your Phone!")
   document.form1.f5.focus()
   return false;
  }
      if (!document.form1.f6.value.length)
  {
   alert("\Please input Your Fax!")
   document.form1.f6.focus()
   return false;
  }
   if (!document.form1.f7.value.length)
  {
   alert("\Please input Your Email!")
   document.form1.f7.focus()
   return false;
  }
  if (!chkemail(document.form1.f7.value)){
     alert("\Please input your correct email!")
   document.form1.f7.focus()
   return false;	
  	
}
return true;
}

//¼ì²éEmailµØÖ·¸ñÊ½
 function chkemail(a)
 {
     var i=a.length;
     var temp = a.indexOf('@');
     var tempd = a.indexOf('.');
     if (temp > 1) {
      if ((i-temp) > 3){
        if (tempd!=-1){
           return 1;
        }
      }
     }
     return 0;
 }