function openWin( windowURL, windowName, windowFeatures) {
     window.open( windowURL, windowName, windowFeatures ) ;
}

function closeWin( windowURL ) {
	window.close( windowURL );
}

function submitSearchForm()
{
 if (validateSearchForm()) {
    window.location=window.root+'search_results.aspx?q='+document.getElementById("ctl00_top1_SearchText").value;
   }
    return false;
}

function validateSearchForm()
{
    var valid = true;
    if (document.getElementById('ctl00_top1_SearchText').value.length == 0 ) {
 	    window.alert ("Please enter a search text.");
  		valid = false;
 	}
 	else
 	{
 	    var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
 		for (var i = 0; i < document.getElementById('ctl00_top1_SearchText').value.length; i++) {
  		    if (iChars.indexOf(document.getElementById('ctl00_top1_SearchText').value.charAt(i)) != -1) {
  			    window.alert ("Your search text has special characters. \nThese are not allowed.\nPlease remove them and try again.");
  			    valid = false;
  			    break;
  	        }
        }
     }
     return valid;
}

function doClear(theText) {
    if (theText.value == theText.defaultValue) {
        theText.value = ""
    }
}

function bookmark(url,pageTitle){
    if ( navigator.appName != 'Microsoft Internet Explorer' ){
        window.sidebar.addPanel(pageTitle,url,"");
    }
    else{
        window.external.AddFavorite(url,pageTitle);
    }
} 