/* ****** global site search ****** */

/* ****** site search criteria ****** */
var domainName = "www.aglaw-assn.org";

function siteSearch(srch) {
	srch.q.value = "site:" + domainName + " " + srch.qfront.value;
}

/* ****** draw search box and button ****** */
function drawGlobalSearch() {
	var inputDetails;

	if(browser == "Internet Explorer" && OS == "Mac") {
		inputDetails = '<input name="qfront" type="text" size="18" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />'
	}
	else if(browser == "Safari" && OS == "Mac") {
		inputDetails = '<input name="qfront" type="text" size="17" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />'
	}
	else if(browser == "Netscape Navigator" && OS == "Mac") {
		inputDetails = '<input name="qfront" type="text" size="17" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />'
	}
	else if(browser == "Firefox" && OS == "Mac") {
		inputDetails = '<input name="qfront" type="text" size="17" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />'
	}
	else if(browser == "Internet Explorer" && OS == "Windows") {
		inputDetails = '<input name="qfront" type="text" size="22" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />'
	}
	else if(browser == "Opera" && OS == "Windows") {
		inputDetails = '<input name="qfront" type="text" size="20" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />'
	}
	else {
		inputDetails = '<input name="qfront" type="text" size="20" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />'
	}

	document.write('<form action="http://www.google.com/search" method="get" name="searchGlobal" onsubmit="siteSearch(this)">');
	document.write('<td valign="top" align="left" style="padding-left: 0;">');
	document.write('<input name="q" type="hidden" />');
//	document.write('<input name="qfront" type="text" size="20" class="globalSearch" name="searchSite" value="search this site" onFocus="this.value=\'\'" />');
	//document.write(inputDetails);
	document.write('<input name="qfront" type="text" class="globalSearch" style="width: 205px;" name="searchSite" value="search this site" onFocus="this.value=\'\'" />');
	document.write('</td>');
	document.write('<td><img src="images/clearpixel.gif" width="8" height="1" border="0" alt="" /></td>');
	document.write('<td valign="middle" align="center">');
	document.write('<input type="submit" value="Go" class="search" />');
	document.write('</td>');
	document.write('</form>');
}