//Work around for XHTML _target problem taken form http://articles.sitepoint.com/article/standards-compliant-world/1
function externalLinks() {   
	if (!document.getElementsByTagName) return;   
		var anchors = document.getElementsByTagName("a");   
		for (var i=0; i<anchors.length; i++) {   
		var anchor = anchors[i];   
	if (anchor.getAttribute("href") &&   
		anchor.getAttribute("rel") == "external")   
		anchor.target = "_blank";   
	}   
}   
function setFocus() {
	document.getElementById("txtSearch").focus();
}
function doSearch() {
	term = document.getElementById("txtSearch").value
	
	//if( document.getElementById("chkExact").checked == false ) {
//		exact = 0;
//	} else {
//		exact = 1;
//	}
	
	if ( term == "" ) {
		alert( "Please enter a search term" );
	} else {
		window.location="http://8564612.3843581.temp.prositehosting.co.uk/search-results/?page=1&s="+escape(term);
	}
}
window.onload = externalLinks;
