function Unsubscribeform()
{
    var form=document.UnsubscribeForm;
    document.UnsubscribeForm.action="unsubscribe.php";
            
     if(form.store.selectedIndex==0)
    {
        alert("Please select a \"valid Store\" ");
        form.store.focus();
        return(false);        
    }
    
      
    if(form.email.value=="")
    {
        alert("You must enter the email address");
        form.email.focus();
        return(false);
    }
    
    
    var checkemail="@.";
    var checkstr=form.email.value;
    var emailvalid=false;
    var emailat=false;
    var emailperoid=false;
    for(i=0;i<checkstr.length;i++)
    {
        ch=checkstr.charAt(i);
        for(j=0;j<checkemail.length;j++)
        {
        if(ch==checkemail.charAt(j) && ch=="@")
        emailat=true;
        if(ch==checkemail.charAt(j) && ch==".")
        emailperiod=true;
        if(emailat && emailperiod)
        break;
        if(j==checkemail.length)
        break;
        }
        if(emailat && emailperiod)
        {
            emailvalid=true;
            break;
        }
    }
    if(!emailvalid)
    {
        alert("please enter the valid email which contain a \"@\" and \".\".");
        form.email.focus();
        return(false);
    }
    
   
    //alert("hai");
    document.UnsubscribeForm.submit();   
}

