var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}
function getTermsOfUseCookie() {
  var acceptDate = cbeGetCookie("TermsOfUse");
  if( acceptDate == null )
    return false;
  else
	return true;  
}
function setTermsOfUseCookie() {
  var today = new Date();
  var expires = new Date();
  expires.setTime(today.getTime() + 1000*60*60*24*365);
  cbeSetCookie("TermsOfUse", today, expires);
  if( getTermsOfUseCookie() )
    return true;
  else{
	top.location.href="/index.php?template=cookies";
	return false;
  }
}
function defaultagree(el){
  if (window.checkobj&&checkobj.checked){
    if( setTermsOfUseCookie() )
      window.history.back();
    return false;
  }else{
    alert("Please read & accept the terms to submit")
    return false;
  }
}