/*
 	Add-ons
*/
function checkValues () {
	if (document.collector.firstname.value == "") {
		alert("Please input a first name");
		document.collector.firstname.focus();
		return false;
	}
	else if (document.collector.lastname.value == "") {
		alert("Please input a last name");
		document.collector.lastname.focus();
		return false;
	}
	else if (document.collector.emailaddress.value == "") {
		alert("Please input a email address");
		document.collector.emailaddress.focus();
		return false;
	}
	else if (document.collector.security_code.value == "") {
		alert("Please input the security code");
		document.collector.security_code.focus();
		return false;
	}
	if (document.collector.agreement.checked != true) {
    	alert("Please agree to terms of service");
        document.collector.agreement.focus();
        return false;
   	}
	return true;
}
function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}
function setIframeHeight() {
  var iframeWin = window.frames['_ddajaxtabsiframe-navigationdivcontainer'];
  var iframeEl = document.getElementById('_ddajaxtabsiframe-navigationdivcontainer');
  if ( iframeEl && iframeWin ) {
    // helps resize (for some) if new doc shorter than previous
    iframeEl.style.height = "auto";
    var docHt = getDocHeight(iframeWin.document);
    // need to add to height to be sure it will all show
    if (docHt) iframeEl.style.height = docHt + 40 + "px";
  }
}