// JavaScript Document

function getEl(tagID) {
  if (document.getElementById(tagID)) {
    return document.getElementById(tagID);
  }
  if (document[tagID]) {
    return document[tagID];
  }
  if (document.all) {
    return document.all[tagID];
  }
  if (document[tagID]) {
    return document[tagID];
  }
  return false;
}

function isMSIE() {
   return (navigator.userAgent.indexOf("; MSIE ") >= 0);
}

function country_change() {
   var state_ddl = getEl('state_ddl');
   var ostate = getEl('other_state');
   var cntry = getEl('other_country');
   var Country = getEl('RequestCountry');
   if (Country.options[Country.selectedIndex].value == "OT") {
      state_ddl.style.display = 'none';
      ostate.style.display = (isMSIE()) ? 'block' : 'table-row';
      cntry.style.display = (isMSIE()) ? 'block' : 'table-row';
   } else {
      cntry.style.display = 'none';
      if (Country.options[Country.selectedIndex].value == "US") {
         ostate.style.display = 'none';
         state_ddl.style.display = (isMSIE()) ? 'block' : 'table-row';
      } else {
         state_ddl.style.display = 'none';
         ostate.style.display = (isMSIE()) ? 'block' : 'table-row';
      }
   }
}

function toggleMail(obj, init){
	x = getEl(obj);
	if(init.checked == true)
		x.style.display = '';
	else
		x.style.display = 'none';
}
function toggleMail2(obj, init){
	x = getEl(obj);
	if(x.style.display == 'none')
		x.style.display = '';
	else
		x.style.display = 'none';
}

function toggleAttributes(theAttr){
	
	x = getEl(theAttr);
	if(x.style.display == 'none'){
		new Effect.BlindDown(theAttr, {duration: 0.5});	
	} else {
		new Effect.BlindUp(theAttr, {duration: 0.5});	
	}
	
}