<!--
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=01,resizable=1,width=800,height=650,left = 500,top = 200');");
}
<!--
function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=01,resizable=1,width=800,height=700,left = 500,top = 200');");
}
<!--
function popUp3(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=01,resizable=1,width=850,height=850,left = 200,top = 50');");
}
<!--
function toggleElement(objID)
{
    var obj = document.getElementById(objID);
        
	if (obj && obj.style)
	{
        if (obj.style.visibility == "hidden" || obj.style.visibility == "")
        {
            showElement(obj);
        }
        else
        {
            hideElement(obj);
        }
    }
}

function toggleStates(selCountryID, selStatesUSID, selStatesCANID)
{
	var selCountry = document.getElementById(selCountryID);	
	if (selCountry != null)
	{
	    var countryValue = selCountry.options[selCountry.selectedIndex].value;
    	
	    var selUS = document.getElementById(selStatesUSID);
	    var selCAN = document.getElementById(selStatesCANID);
    	
	    if (countryValue == "USA")
	    {
		    showElement(selUS);
		    hideElement(selCAN);
		    selUS.disabled = false;
	    }
	    else if (countryValue == "CAN")
	    {	
		    showElement(selCAN);
		    hideElement(selUS);	
		    selCAN.disabled = false;
	    }
	    else
	    {
		    showElement(selUS);
		    hideElement(selCAN);
		    selUS.disabled = true;
		    selCAN.disabled = true;
	    }
	}
}	

function toggleMarkets(selMarketsID, selInstSchoolID, selInstCollegeID, selJobTitlesSchoolID, selJobTitlesCollegeID, txtMarketID, txtInstID, txtJobTitleID)
{
	//catch block handles the FreeTrial page, 
	//when some of these elements aren't always present
	try
	{
		var selMarket = document.getElementById(selMarketsID);		
		var selInstSchool = document.getElementById(selInstSchoolID);		
		var selInstCollege = document.getElementById(selInstCollegeID);		
		var selJobTitlesSchool = document.getElementById(selJobTitlesSchoolID);		
		var selJobTitlesCollege = document.getElementById(selJobTitlesCollegeID);			
				
		toggleOtherDropDown(selMarketsID, txtMarketID);
		
		var marketValue = selMarket.options[selMarket.selectedIndex].value;
								
		if (marketValue == 'School')
		{
			//show school dropdowns, hide college dropdowns
			showElement(selInstSchool);
			showElement(selJobTitlesSchool);
			hideElement(selInstCollege);
			hideElement(selJobTitlesCollege);
			
			//properly toggle the "other" textbox for the school dropdowns
			toggleOtherDropDown(selInstSchoolID, txtInstID);
			toggleOtherDropDown(selJobTitlesSchoolID, txtJobTitleID);
		}
		else
		{
			//show college dropdowns, hide school dropdowns		
			showElement(selInstCollege);
			showElement(selJobTitlesCollege);
			hideElement(selInstSchool);
			hideElement(selJobTitlesSchool);	
			
			if (selMarket.selectedIndex == (selMarket.options.length - 1))
			{
				//if the "other" textbox is displayed for market,
				//display the college "other" textboxes, too,
				//unless they've already got a value selected
				if (selInstCollege.selectedIndex == 0)
					selInstCollege.selectedIndex = selInstCollege.options.length - 1;
				if (selJobTitlesCollege.selectedIndex == 0)
					selJobTitlesCollege.selectedIndex = selJobTitlesCollege.options.length - 1;				
			}
			else
			{
				//if nothing is selected, then de-select the college dropdowns
				if (selInstCollege.selectedIndex == (selInstCollege.options.length - 1) && document.getElementById(txtInstID).value == '')
					selInstCollege.selectedIndex = 0;
				if (selJobTitlesCollege.selectedIndex == (selJobTitlesCollege.options.length - 1) && document.getElementById(txtJobTitleID).value == '')
					selJobTitlesCollege.selectedIndex = 0;									
			}

			//properly toggle the "other" textbox for the college dropdowns
			toggleOtherDropDown(selInstCollegeID, txtInstID);
			toggleOtherDropDown(selJobTitlesCollegeID, txtJobTitleID);
		}
	}
	catch (Exception) {}
}	

function toggleOtherDropDown(selID, txtID)
{
	var sel = document.getElementById(selID);	
	var txt = document.getElementById(txtID);	

    if (sel != null && txt != null)
    {
	    if ($F(selID) == "other")
	    {
		    showElement(txt);
	    }
	    else
	    {
		    hideElement(txt);			
	    }
	}
}
//-->