
function showlocation(varItem)
{
  switch(varItem)
  {
    case 0:
      toggleElement('hospitals','none');
      toggleElement('ics','none');
      break;
    case 1:
      toggleElement('hospitals','none');
      toggleElement('ics','none');
      break;
    case 2:
      toggleElement('hospitals','none');
      toggleElement('ics','block');
      break;
    case 3:
      toggleElement('hospitals','block');
      toggleElement('ics','none');
      break;
    case 4:
      break;
    case 5:
      break;
    case 5:
      break;
  }
}


//function switchformfield(varSelectionValue,varTargetField,varTargetValue)
function switchformfield(varSelectionField,varSelectionValue)
{
	if ( varSelectionField == "gender" ) {
		if ( varSelectionValue == "Male" ) {
			document.forms["breastcancertrialsearch"].elements["menopausalstate"].value = "N/A";
			document.forms["breastcancertrialsearch"].elements["menopausalstate"].style.color = "#999999";
			document.forms["breastcancertrialsearch"].elements["menopausalstate"].style.backgroundColor = "#cccccc";
		}
		if ( varSelectionValue == "Female" ) {
			document.forms["breastcancertrialsearch"].elements["menopausalstate"].value = "";
			document.forms["breastcancertrialsearch"].elements["menopausalstate"].style.color = "#000000";
			document.forms["breastcancertrialsearch"].elements["menopausalstate"].style.backgroundColor = "#ffffff";
		}
	}
	//if ( varSelectionField == "trial_diagnosis" ) {
	//	if ( varSelectionValue == "Newly diagnosed" ) {
	//		toggleElement('trial_breast_stage_label','inline');
	//		toggleElement('trial_breast_stage_input','inline');
	//	} else {
	//		toggleElement('trial_breast_stage_label','none');
	//		toggleElement('trial_breast_stage_input','none');
	//	}
	//}
	if ( varSelectionField == "trials_dcis" ) {
		if ( varSelectionValue == "Invasive" ) {
			toggleElement('trial_breast_dcis_no','inline');
		} else {
			toggleElement('trial_breast_dcis_no','none');
		}
	}
}


// ====================
// Function:    toggleView
// ====================
function toggleView(strDivId,strDisplayVal)
{
	var strHeight
	if (!strDisplayVal)
	{
		strDisplayVal = document.getElementById(strDivId).style.overflow;
		strHeight = document.getElementById(strDivId).style.height;

		switch (strDisplayVal)
		{
			case "visible" :
				strDisplayVal = "hidden";
				strHeight = "30";
				break;
			case "hidden" :
				strDisplayVal = "visible";
				strHeight = "auto";
				break;
			case "scroll" :
				strDisplayVal = "auto";
				break;
			case "auto" :
				strDisplayVal = "scroll";
				strHeight = "auto";
				break;
			case "" :
				break;
		}
	}
	document.getElementById(strDivId).style.overflow = strDisplayVal;
	document.getElementById(strDivId).style.height = strHeight;
}
