function popUp(URL,width,height) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+width+",height="+height+"');");
}

//################################################

function right(e) {
var msg = "Right-clicking is not possible in this document.";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg); 
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' &&
event.button==2) {
alert(msg); 
return false;
}
return true;
}

// Comment it to remove

//document.onmousedown = right;

//### HIDER ######################################

function doitON()
{
   document.all.hider.style.display='block';	   
}
function doitOFF()
{
   document.all.hider.style.display='none';	   
}

//### COPY VALUES #################################

function copybill()
{
  if (document.regform.bsp.checked) {
     document.all.bfname.value  = document.all.pfname.value;
     document.all.bmname.value  = document.all.pmname.value;
     document.all.blname.value  = document.all.plname.value;
     document.all.baddr1.value  = document.all.paddr1.value;
     document.all.baddr2.value  = document.all.paddr2.value;
     document.all.bcity.value   = document.all.pcity.value;
     document.all.bstate.selectedIndex = document.all.pstate.selectedIndex;
     document.all.bcountryid.selectedIndex = document.all.pcountryid.selectedIndex;
     document.all.bstate2.value = document.all.pstate2.value;
     document.all.bzip.value = document.all.pzip.value;
     document.all.bhphone.value = document.all.phphone.value;

  }
}

function copyship()
{
  if (document.regform.ssp.checked) {
     document.all.sfname.value  = document.all.pfname.value;
     document.all.smname.value  = document.all.pmname.value;
     document.all.slname.value  = document.all.plname.value;
     document.all.saddr1.value  = document.all.paddr1.value;
     document.all.saddr2.value  = document.all.paddr2.value;
     document.all.scity.value   = document.all.pcity.value;
     document.all.sstate.selectedIndex = document.all.pstate.selectedIndex;
     document.all.scountryid.selectedIndex = document.all.pcountryid.selectedIndex;
     document.all.sstate2.value = document.all.pstate2.value;
     document.all.szip.value = document.all.pzip.value;
     document.all.shphone.value = document.all.phphone.value;

  }
}

function freezp() {
  if (document.all.pcountryid.selectedIndex == 0) {
    document.all.pstate2.disabled = true;
  } else {
    document.all.pstate2.disabled = false;  
  }
}

function freezs() {
  if (document.all.scountryid.selectedIndex == 0) {
    document.all.sstate2.disabled = true;
  } else {
    document.all.sstate2.disabled = false;  
  }
}

function freezb() {
  if (document.all.bcountryid.selectedIndex == 0) {
    document.all.bstate2.disabled = true;
  } else {
    document.all.bstate2.disabled = false;  
  }
}
