var imagesNormal = new Object();
var imagesHilite = new Object();

function enableBillingAddressFields(checkbox) {
  if(checkbox.checked) {
    document.billingOptionForm.first_name.disabled = true;
    document.billingOptionForm.last_name.disabled = true;
    document.billingOptionForm.address_1.disabled = true;
    document.billingOptionForm.address_2.disabled = true;
    document.billingOptionForm.city.disabled = true;
    document.billingOptionForm.state.disabled = true;
    document.billingOptionForm.zip.disabled = true;
    document.billingOptionForm.country.disabled = true;
    document.billingOptionForm.phone.disabled = true;
    return true;
  }
  else {
    document.billingOptionForm.first_name.disabled = false;
    document.billingOptionForm.last_name.disabled = false;
    document.billingOptionForm.address_1.disabled = false;
    document.billingOptionForm.address_2.disabled = false;
    document.billingOptionForm.city.disabled = false;
    document.billingOptionForm.state.disabled = false;
    document.billingOptionForm.zip.disabled = false;
    document.billingOptionForm.country.disabled = false;
    document.billingOptionForm.phone.disabled = false;
    return true;
  }
}

function handlePurchasedTrackSubmit(dropDown,newWindow) {
  var target = document.trackSelectionForm.target;
	var bebebe = document.trackSelectionForm.bebebe;
	var myVal = dropDown.options[dropDown.selectedIndex].value;
	if(myVal != '') {
    var link = '/members/predictions/' + myVal + '.html';
		if(bebebe) {
			link = link + '?bebebe=' + bebebe.value;
		}
		if(newWindow) {
      window.open(link, target,'width=1024,height=600,resizable=1,\
							    scrollbars=1,toolbar=0,location=0,status=1,menubar=0,\
							    copyhistory=0,left=200,top=200,screenX=200,screenY=200');
	  }
		else {
		  window.location=link;
		}
	}
	return false;
}

function changeClass(element,newClass) {
  element.className = newClass;
	return true;
}

function disableButton(button) {
	  if (document.getElementById) {
  		// this is the way the standards work
    	document.getElementById(button).disabled = true;
    }
    else if (document.all) {
      // this is the way old msie versions work
      document.all[button].disabled = true;
    }
    else if (document.layers) {
     // this is the way nn4 works
     document.layers[button].disabled = true;
    } 
}
