function ToggleNews(storyid)
{

	if (document.getElementById (storyid).getAttribute("Open") == "T")
	{
		document.getElementById (storyid).setAttribute("Open","F");
		document.getElementById (storyid).style.display = "none"
	}
	else
	{
		document.getElementById (storyid).setAttribute("Open","T");
		document.getElementById (storyid).style.display = "inline"
	}
}

function HasValidJobsearchCriteria(categoryControlId, locationsControlId)
{
	var ddlCategory = document.getElementById(categoryControlId);
	
	if (!ddlCategory)
	{
		alert('*** error: could not find category control: ' + categoryControlId);
		return false;
	}
	
	var ddlLocations = document.getElementById(locationsControlId);
	
	if (!ddlLocations)
	{
		alert('*** error: could not find locations control: ' + locationsControlId);
		return false;
	}

    var allSearchValues='';
//    if (document.getElementById(namePrefix + 'jKeywords1') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jKeywords1').value;
//    if (document.getElementById(namePrefix + 'jKeywords2') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jKeywords2').value;
        
    allSearchValues += ddlCategory.value;
    
    if (ddlLocations != null && ddlLocations.value != "-1")
    {
		allSearchValues += ddlLocations.value;
    }
    
//    if (document.getElementById(namePrefix + 'jCategory2') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jCategory2').value;
        
//    if (document.getElementById(namePrefix + 'jPositionType') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jPositionType').value;
        
//    if (document.getElementById(namePrefix + 'jState1') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jState1').value;
//    if (document.getElementById(namePrefix + 'jState2') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jState2').value;
        
//    if (document.getElementById(namePrefix + 'jCity1') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jCity1').value;
//    if (document.getElementById(namePrefix + 'jCity2') != null)
//        allSearchValues += document.getElementById(namePrefix + 'jCity2').value;
    
    //alert(allSearchValues);
    if (allSearchValues == '')
    {
        //popupWindow('Test.aspx',300,150);
        alert('Please select a search categories or a location to begin your search!');
        return false;
    }
    
    return true;
}

