// Script for the search field widget
/***********************************************/

/*	LEXISNEXIS SEARCH
=================================*/
	function pressentersite2(e)
		{
		var code;
		if (e.keyCode) code = e.keyCode;
		else if (e.which) code = e.which;
				if (code == 13) { 
				//enter key				
					gotosearchsite2();
					return false;
				}
				return true;
		}
		
	/*button*/				
	function gotosearchsite2()
		{
			var loc="/search.aspx?query=" + window.document.forms[0].s2.value + "&CB1=1&CB2=1&CB3=1";
			window.location = loc;
		}
	
	function resetkeywordssite2()
			{
				window.document.forms[0].s2.value = "";
			}
	
	
/*	STORE SEARCH
=================================*/
	function storeenter(e)
		{
		//alert("character typed");
		var code;	
		if (e.keyCode) code = e.keyCode;
		else if (e.which) code = e.which;
				if (code == 13) { 
				//enter key
				/*To open in current window*/
				//storeshearch();
				//return false; 
				
				/*To open in new window*/
				var loc="http://www.lexisnexis.com/store-search/default.aspx?query=" + window.document.forms[0].fieldsearchstore.value;
				window.open(loc,'search'); /*To open in new window*/
			}
				return true;
		}
		
	/*button*/		
	function storeshearch()
		{
		//alert("button pressed");
		var loc="http://www.lexisnexis.com/store-search/default.aspx?query=" + window.document.forms[0].fieldsearchstore.value;
		/*To open in current window*/
		//window.location = loc;
		
		/*To open in new window*/
		window.open(loc,'search');
		}
	
	
/*	LEXIS WEB
=================================*/
	function lwebenter(e)
		{
		//alert("character typed");
		var code;	
		if (e.keyCode) code = e.keyCode;
		else if (e.which) code = e.which;
				if (code == 13) { 
				//enter key
				/*To open in current window*/
				//lwebbutton();
				//return false; 
				
				/*To open in new window*/
				var loc="http://www.lexisnexis.com/websearch/default.asp?query=" + window.document.forms[0].lwebfield.value;
				window.open(loc,'search');
			}
				return true;
		}
		
	/*button*/		
	function lwebbutton()
		{
		//alert("button pressed");
		var loc="http://www.lexisnexis.com/websearch/default.asp?query=" + window.document.forms[0].lwebfield.value;
		/*To open in current window*/
		//window.location = loc; 
		
		/*To open in new window*/
		window.open(loc,'search');
		}
