// Checkbox for T&C
function validateTerms(form) {

if(!document.frmDeliveryMethod.agree.checked){alert("You must confirm that you are over the age of 18 before you can continue.");
return false; }


return true;
}
// Prevent people from submitting a form twice
var firsttime
function stopSecondSubmit(theForm)
{	if (firsttime == "Y")
  {	alert("Please wait... \n\nThe request has already been submitted\nand is currently being processed."); return (false); }
  firsttime = "Y";
  theForm.btnSubmit.value="Please Wait...";
  document.body.style.cursor = "wait";
  return (true);
}

// Show / Hide Content (Simple Version)
function toggleContentSimple(el) {

 var myelement = document.getElementById(el);
 var myimg = document.getElementById("btn-" + el);

 if( !myelement.style.display || myelement.style.display == "none" ) {
 myelement.style.display = "block";
 if(navigator.appName != "Microsoft Internet Explorer")
 {
 myelement.style.display = "table-row";
 };

 } else {
 myelement.style.display = "none";
 }
}

// Show / Hide Content
function toggleContent(el) {

  var myelement = document.getElementById(el);
  var myimg = document.getElementById("btn-" + el);

  if( !myelement.style.display || myelement.style.display == "none" ) {
	myelement.style.display = "inline";
    myimg.src= "/img/icons/btnContract.gif";
  } else {
    myelement.style.display = "none";
    myimg.src= "/img/icons/btnExpand.gif";
  }
}

// Select/deselect all
function fnCheckAll(bState, sElementName) {
	var all = document.getElementsByName(sElementName);
	for (var iLoop=0; iLoop < all.length; iLoop++) all[iLoop].checked=bState
}


// Open in new window
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(); }
}

// Break out of a frameset
function breakFree() {
	if (parent.frames.length > 0) {
	    parent.location.href = self.document.location;
	}
}