<!--
function expand(x) {
  if (document.all) {
    if (document.all[x].style.display == 'none') {
      document.all[x].style.display = ''
    } else if (document.all[x].style.display == '') {
      document.all[x].style.display = 'none';
    }
  } else {
    if (document.getElementById(x).style.display == 'none') {
      document.getElementById(x).style.display = ''
    } else if (document.getElementById(x).style.display == '') {
      document.getElementById(x).style.display = 'none';
    }
  }
}

// used on the Home Page.
// the haveResBox is the "i already have a res" table.
function expandIncludingHaveResBox(x) {
	if (x == 'discountBox' || x == 'memberBox') {
		if (document.getElementById(x).style.display == 'none') {
			document.getElementById(x).style.display = '';
			document.getElementById('haveResBox').style.display = 'none';
			if (!up3) { swapArrow3(); }
		} else {
			document.getElementById(x).style.display = 'none';
			if ( document.getElementById('discountBox').style.display == 'none' &&
				 document.getElementById('memberBox').style.display == 'none' ) {
				document.getElementById('haveResBox').style.display = '';
				if (up3) { swapArrow3(); }
			}
		}
	}
}

function expandFromCheckbox(chkbx, x, showIfChecked) {
  var showContent = !chkbx.checked;
  if (showIfChecked) {
    showContent = chkbx.checked;
  }
  if (document.all) {
    if (showContent) {
      document.all[x].style.display = ''
    } else {
      document.all[x].style.display = 'none';
    }
  } else {
    if (showContent) {
      document.getElementById(x).style.display = ''
    } else {
      document.getElementById(x).style.display = 'none';
    }
  }
}



function expandSwap(a,t) {
    if (document.getElementById(t).style.display == 'none') {
      document.getElementById(t).style.display = '';
	  document.getElementById(a).src = 'images/arrow_down.gif';
    } else {
      document.getElementById(t).style.display = 'none';
	  document.getElementById(a).src = 'images/arrow_in.gif';
    }

  }







// ==========================================================
// driver methods for some expand/collapse areas of the site
// ==========================================================

function doDropOffOnClickTasks(checkBoxClicked) {
	if (!checkBoxClicked) {
		changeBox('document.forms[0].chkReturn');
	}
	expandFromCheckbox(document.forms[0].chkReturn,'dropoffBox',false);
	// empty value out of field and put cursor there
	if (document.forms[0].chkReturn.checked == true ||
	    document.forms[0].dropoffLocation.value == document.forms[0].pickupLocation.value ) {
		document.forms[0].dropoffLocation.value = "";
		if (document.forms[0].chkReturn.checked == false) {
		}
	}
}

// Home Page has unique name for this checkbox
function doHomePageCountryOfResOnClickTasks(checkBoxClicked) {
	if (!checkBoxClicked) {
		changeBox('document.forms[0].USResident');
	}
	expandFromCheckbox(document.forms[0].USResident,'countryOfResBox',false);
	if (document.forms[0].USResident.checked == true) {
		document.forms[0].countryOfResidence.options.selectedIndex = 0;
	}
}

// Step 1 has unique name for this checkbox
function doStep1CountryOfResOnClickTasks(checkBoxClicked) {
	if (!checkBoxClicked) {
		changeBox('document.forms[0].chkResident');
	}
	expandFromCheckbox(document.forms[0].chkResident,'countryOfResBox',false);
	if (document.forms[0].chkResident.checked == true) {
		document.forms[0].countryOfResidence.options.selectedIndex = 0;
	}
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
