function clearDefault(el) { if (el.defaultValue==el.value) el.value = "" }

function checkCheckBox(f){ if (f.agree.checked == false ) { alert("Please accept our terms and conditions to continue"); return false; }else return true; }

function checkAffiliateBox(h){ if (h.agree.checked == false ) { alert("Please accept our Affiliate Terms and Conditions to continue"); return false; }else return true; }

function checkPaypalBox(g){ if (g.affiliate.checked == false ) { alert("Please confirm that you have a Paypal Account before registering"); return false; }else return true; }

function changeBox1() {    document.getElementById('div1').style.display='none';    document.getElementById('div2').style.display='';    document.getElementById('restore1').focus(); } 
function restoreBox1() {    if(document.getElementById('restore1').value=='')    {      document.getElementById('div1').style.display='';      document.getElementById('div2').style.display='none'; } }

function changeBox2() {    document.getElementById('div3').style.display='none';    document.getElementById('div4').style.display='';    document.getElementById('restore2').focus(); } 
function restoreBox2() {    if(document.getElementById('restore2').value=='')    {      document.getElementById('div3').style.display='';      document.getElementById('div4').style.display='none'; } }

function changeBox3() {    document.getElementById('div5').style.display='none';    document.getElementById('div6').style.display='';    document.getElementById('restore3').focus(); } 
function restoreBox3() {    if(document.getElementById('restore3').value=='')    {      document.getElementById('div5').style.display='';      document.getElementById('div6').style.display='none'; } }

function changeBox4() {    document.getElementById('div7').style.display='none';    document.getElementById('div8').style.display='';    document.getElementById('restore4').focus(); } 
function restoreBox4() {    if(document.getElementById('restore4').value=='')    {      document.getElementById('div7').style.display='';      document.getElementById('div8').style.display='none'; } }

function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}
