function ChangeUser(TheForm)
{
   TheForm.ChangeLogin.value='ChangeUser';
   TheForm.action='/Inquiry/InquireMain.php';
   TheForm.submit();
}

function ChangeUserNew(TheForm)
{
   TheForm.ChangeLogin.value='ChangeUser';
   TheForm.action='/Inquiry/InquireMainnew.php';
   TheForm.submit();
}


function SChangeUser(TheForm)
{
   TheForm.ChangeLogin.value='ChangeUser';
   TheForm.action='/Inquiry/SInquireMain.php';
   TheForm.submit();
}


function CheckEmail(theForm)
{

if ( theForm.Email.value != "" &&  ! /^[_\.\d\w\-]+@([\d\w][\d\w\-]+\.)+[\w]{2,3}$/.test(theForm.Email.value)) 
  { 
    alert("Email address error! Please check your email again."); 
    theForm.Email.focus();
    return (false); 
  } 

return (true);

}

function ClickInquire(theForm)
{
  theForm.ASubmitType.value='Inquire';
  theForm.submit();
}

function ClickAdd2Cart(theForm)
{
  theForm.ASubmitType.value='Add2Cart';
  theForm.submit();
}

function ClickViewCart(theForm)
{
  theForm.ASubmitType.value='ViewCart';
  theForm.submit();
}

function ClickAProductInquiry(theForm,product)
{
  
  theForm.elements[0].value=product;
  alert(theForm.elements[0].value);
  theForm.submit();
}


