// JavaScript Document


	function ucase(str)
	{

		return  str.toUpperCase();

	}


var strurl=window.location.href;	

strurl=ucase(strurl)
if (strurl == "HTTP://WWW.LOWCOSTBATTERIES.COM/DEFAULT.ASP" || strurl == "WWW.LOWCOSTBATTERIES.COM/DEFAULT.ASP" || strurl=="LOWCOSTBATTERIES.COM/DEFAULT.ASP")
	{
		window.location = "http://www.lowcostbatteries.com";
	}

function onenter()
	{
		if (window.event.keyCode == 13)
		 {
	
			 submitsearch();
 			 return false;
		}
		return true;
	}
function onenterNew()
	{
		if (window.event.keyCode == 13)
		 {
			 submitsearch();
 			 return false;
		}
		return true;
	}

function submitsearch() //Added by senthil on 21th Oct 2005
	{
		var temp
				
		if (frm3.txtsearchkey.value.length > 0)
		{
			temp = frm3.txtsearchkey.value;
		}
		else
		{
			return false;
		}
		
		
		if(temp.length < 2 )
		{
			alert("Sorry, There should be atleast 2 characters to search")
			return false;
		}
		
		if  (temp.length > 2)
		{
			window.location = "http://www.lowcostbatteries.com/productsearchebatts.asp?txtsearchkey=" + temp;							
			return;
		}
		else
		{
		   return false;		 
		}  	
	}	
	
	function submitlist(obj)
	{
		if (obj.name == "seldevicetype")
			window.location="ProductSearch.asp?seldevicetype=" + obj.value
		if (obj.name == "seldevicemfr")
			window.location = 'productsearch.asp?seldevicetype=' + document.frm1.seldevicetype.value + '&seldevicemfr=' + obj.value
		if (obj.name == "seldevicemodel")
			window.location = 'productsearch.asp?seldevicetype=' + document.frm1.seldevicetype.value + '&seldevicemfr=' + document.frm1.seldevicemfr.value + '&seldevicemodel=' + obj.value
		}