function checkform_onsubmit() {

if (document.form1.shipping_type.options[document.form1.shipping_type.options.selectedIndex].value == "")
     {
     alert ( "Please Select a Shipping Method" );
     document.form1.shipping_type.focus();
     return false;
    }
Else
    {
    return true;
     }
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=400');");
}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail Address Format")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail Address Format")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail Address Format")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail Address Format")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail Address Format")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail Address Format")
		    return false
		 }

		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail Address Format")
		    return false
		 }

 		 return true
	}

function ValidateForm(){
	var emailID=document.myform.Email

	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email Address")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }


function pass_form ( )
{
    valid = true;
    if ( document.myform.Customer.value == "" )
    {
        alert ( "Please fill in your Name." );
        document.myform.Customer.focus();
        return false;
    }
    if ( document.myform.Email.value == "" )
    {
        alert ( "Please fill in your Email Address." );
        document.myform.Email.focus();
        return false;
    }
    if ( document.myform.cap.value == "" )
    {
        alert ( "Please fill in your Spam Guard Answer." );
        document.myform.cap.focus();
        return false;
    }
    if ( document.myform.Comments.value == "" )
    {
        alert ( "Please fill in the Comments field." );
        document.myform.Comments.focus();
        return false;
    }

}

function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=500,left = 312,top = 234');");
}


document.write("<style type='text/css'>#thephoto {visibility:hidden;}</style>");

function initImage() {
  imageId = 'thephoto';
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);
}





function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}



function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;

  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";

  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;

  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;

  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

window.onload = function() {initImage()}
  function show_hide(ISID){
      // Toggle visibility between none and inline
      if ((document.getElementById(ISID).style.display == 'none'))
      {
        document.getElementById(ISID).style.display = 'inline';
      } else {
        document.getElementById(ISID).style.display = 'none';
      }
  }



