function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function aboutus(){
newwin = window.open('aboutus.html','','width=450,height=280, titlebar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
}

function pri_policy(){
newwin = window.open('privacyPolicy.html','','width=620,height=550,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
}

function terms(){
newwin = window.open('termsofUse.html','','width=620,height=550,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
}

function Submit()
{ 
var fname= document.getElementById ("fname").value;
var lname=document.getElementById ("lname").value;
var email_add=document.getElementById ("email_add").value;
var phone=document.getElementById ("phone").value;
var street=document.getElementById ("street").value;
var city=document.getElementById ("city").value;
var state=document.getElementById ("state").value;
var zip=document.getElementById ("zip").value;
var country=document.getElementById ("country").value;
var chk1=document.getElementById ("chk1").value;
var r1=document.getElementById ("r1").value;
var r2=document.getElementById ("r2").value;
var comments=document.getElementById ("comments").value;
var fax=document.getElementById ("fax").value;

        if (fname== "")
        {
            alert ("Enter First Name");
            document.getElementById ("fname").focus();
            return false;
        }
        if (lname== "")
        {
            alert ("Enter Last Name");
            document.getElementById ("lname").focus();
            return false;
        }
        if (email_add== "")
        {
            alert ("Enter Email Address");
            document.getElementById ("email_add").focus();
            return false;
            }
        else 
        {
            var emailpatt=/^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$/g;
            if( email_add.match(emailpatt)==null)
            {
                alert('Enter a valid Email');
                document.getElementById ("email_add").focus();
                return false;
            }
        }
		 if (isNaN(phone))
        {
            alert ("Enter Only Numbers ");
            document.getElementById ("phone").focus();
            return false;
        }
        if (isNaN(fax))
        {
            alert ("Enter Only Numbers ");
            document.getElementById ("fax").focus();
            return false;
        }
        if (isNaN(zip))
        {
            alert ("Enter Only Numbers ");
            document.getElementById ("zip").focus();
            return false;
        }
        if (country== "")
        {
        alert ("Enter Country ");
        document.getElementById ("country").focus();
        return false;
        }
         if (document.getElementById ("r1").checked== false && document.getElementById ("r2").checked== false )
         {
            alert ("Please Check One Option");
            document.getElementById ("r1").focus();
            return false;
         }
      document.form.action ="SendMail.asp"
      
}
