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 openWindow(width,height) { //v2.0
	x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }

  window.open('ship_pop.htm','shipping','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
}

function validateForm(form)
{
	 		
	if (document.theForm.FirstName.value == "" )
	{
		alert("Please enter your first name.");
		document.theForm.FirstName.focus();
		return false;	
	}
	
	if (document.theForm.LastName.value == "" )
	{
		alert("Please enter your last name.");
		document.theForm.LastName.focus();
		return false;	
	}
	

	if (document.theForm.Street1.value == "" )
	{
		alert("Please enter your address.");
		document.theForm.Street1.focus();
		return false;	
	}

	if (document.theForm.City.value == "" )
	{
		alert("Please enter your city.");
		document.theForm.City.focus();
		return false;	
	}

	if (document.theForm.State.selectedIndex  == 0 )
	{
		alert("Please select your state.");
		document.theForm.State.focus();
		return false;	
	}
	

	if (document.theForm.Zip.value == "" )
	{
		alert("Please enter your zip code.");
		document.theForm.Zip.focus();
		return false;	
	}
	
	if (document.theForm.Phone.value == "")
	{
		alert("Please enter your phone number.");
		document.theForm.Phone.focus();
		return false;
	}
return window.print();
}



function setCookie(name, value, expire) 
	{
	    strCookie = name + "=" + escape(value);
	    if (expire)
	        strCookie += "; expires=" + expire.toGMTString();
	
	    document.cookie = strCookie;
	}
	
	function saveValue(txtBox)
	{
		setCookie(txtBox.name,txtBox.value);
	}
