if (document.location.href.lastIndexOf("#") == -1) {
	if (document.location.href.lastIndexOf("?") == -1 ) {
		/* if no "#" or "?" in the URL set the variable to document.location.href */
		var currLoc = document.location.href;
	} else {
		/* if a "?" is contained in the URL, set the variable to everything before the "?" */
		var tempLoc = window.location.href.split('?');
		var currLoc = tempLoc[0];
	}
} else {
	/* if a "#" is contained in the URL, set the variable to everything before the "#" */
	var tempLoc = window.location.href.split('#');
	var currLoc = tempLoc[0];
}

document.write('<label for="searchSelect">Select the portion of the VA web site you want to search</label><select name="SQ" id="searchSelect" size="1">' + 
	'<option value="">Search All VA Web Pages</option> ' + 
	'<option value="URL:' + currLoc + '">Search Current Site Only</option></select> ');
