<!-- hide this script from non-javascript-enabled browsers
// this function is used by the maillist optin form to check mandatory
// fields, and display the GO button
//
// note:
//   the displayDiv function must be loaded (it is in cart.js)
//   the maillist optin form must be called "mlform" and
//     contain elements "name", "email" and a DIV section called "mlgo"
function checkMLForm() {
  var a = document.mlform;
  if (a.name.value && a.email.value.indexOf('@') > 0)
    displayDiv("mlgo",1);
  else
    displayDiv("mlgo",0);

}
// -->

<!-- hide this script from non-javascript-enabled browsers
// these 2 functions are used by order.php
//
function displayDiv(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
       document.layers[szDivID].display = iState ? "block" : "none";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
	obj.style.display = iState ? "block" : "none";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
	document.all[szDivID].style.display = iState ? "block" : "none";

    }
}
//
function checkOrderForm() {
	var a = document.form1;
        var b = (a.fname.value && a.lname.value && a.email.value && a.phone.value && a.address1.value && a.city.value && a.state.value && a.postcode.value);

	if (a.deliver.checked == false)
	  b = (b && a.dfname.value && a.dlname.value && a.demail.value && a.dphone.value && a.daddress1.value && a.dcity.value && a.dstate.value && a.dpostcode.value);

        if (b)
	  document.form1.sub1.disabled = false;
        else
          document.form1.sub1.disabled = true;

}


function NewWindow(mypage, myname, w, h, scroll) { var winl =
(screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops =
'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'; win
= window.open(mypage, myname, winprops);if
(parseInt(navigator.appVersion) >= 4) { win.window.focus(); }}

