function searchCheck()
{
	var str = '';
	
	if (document.frm.ss.value=='' || document.frm.ss.value=='Enter Search Keyword...')	{
		alert("Please Enter Search Keyword to search.");
		document.frm.ss.focus();
		document.frm.ss.value='';
		return false;
	}
	if (document.frm.ss.value.length < 3) {
	alert("Please Enter atleast 3 character");
	document.frm.ss.focus();
	return false;
	}
	if (document.frm.ss.value){
		str += 'ss='+document.frm.ss.value;
window.location = "http://www.soltechpumpsindia.com/search.html?"+str;
return false;
	}
}

function searchClear()
{
	if (document.frm.ss.value=='Enter Search Keyword...')	{
		document.frm.ss.value='';
	}
}

function settext()
{
	if (document.frm.ss.value=='')  {
	        document.frm.ss.value='Enter Search Keyword...';
	}    
}

function settextvalue()
{
	document.frm.ss.value='Enter Search Keyword...';    
}

function getDwsCookie(Name)
{
	var search = Name + "="
	if (document.cookie.length > 0)
	{ // if there are any cookies
		offset = document.cookie.indexOf(search)
		if (offset != -1)
		{ // if cookie exists
			offset += search.length
			// set index of beginning of value
			end = document.cookie.indexOf(";", offset)
			// set index of end of cookie value
			if (end == -1) end = document.cookie.length
			return unescape(document.cookie.substring(offset, end))
		}
	}
	return "";
}

function setDwsCookie(name, value)
{
	expires = new Date();
	expires.setTime (expires.getTime() + 24 * 60 * 60 * 150 * 1000);

	if (value.length > 0)
	document.cookie = name + "=" + escape(value)+ ";"+"expires=" + expires.toGMTString() + ";";
}

function showTradeOfferLink()
{
  if( (cookie = getDwsCookie("ETO_OFFERS")) > "")
	{
		if(cookie != "")
		{
				document.write(' | <a href="tradeoffers.html">Trade Offers</a>');
		}
	}
	else
	{
		var surl = "http://www.media4trade.com/tradeofferserver?id=773789&setcookie=1&disp=link";
		document.write('<scr' + 'ipt language="javascript"' + ' src="' + surl + '"></scr' + 'ipt>');
	}
  }

function showTradeOfferLink2()
{
	document.write(' | <a href="tradeoffers.html">Trade Offers</a>');
}

function flash()
{
	objects = document.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++)
	{
		objects[i].outerHTML = objects[i].outerHTML;
	}
}
function showflash()
{
	document.getElementById("flash").innerHTML='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" WIDTH="474" HEIGHT="290"><PARAM NAME="movie" VALUE="ts/flash.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="transparent"><embed src="ts/flash.swf"  WIDTH="474" HEIGHT="290" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" WMODE="transparent"></OBJECT>';
}
function openchild(sPicURL,h,w)
{
	window.open(sPicURL, 'Lookup', 'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width='+w+',height='+h+'');
}

function flash()
{
	objects = document.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++)
	{
		objects[i].outerHTML = objects[i].outerHTML;
	}
}
//for open vidio's
var win = null;

function NewWinIM(mypage,myname,compname)
{
var embedcode='';

if (mypage.search(/heavy\#\#/) != -1){
mypage = mypage.replace('heavy##','');
embedcode = '<div align="center"><object type="application/x-shockwave-flash" data="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false" width="352" height="288" wmode="transparent"><param name="movie" value="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv"><param name="wmode" value="transparent"><embed src="http://www.videowebtown.com/community/flvplayer/flvplayer.swf?file=http://www.videowebtown.com/indiamartvideo/video/'+mypage+'.flv&autoStart=false"  quality="high" bgcolor="#ffffff" width="352" height="288" name="movie" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object></div>';
}
else
{
embedcode = '<div align="center"><embed id="VideoPlayback" style="width:400px;height:326px" allowFullScreen="true" src="http://video.google.com/googleplayer.swf?docid='+mypage+'&hl=en&fs=true&autoplay=1"  type="application/x-shockwave-flash"></embed></div>';
}
LeftPosition = (screen.width) ? (screen.width-400)/2 : 0;
TopPosition = (screen.height) ? (screen.height-326)/2 : 0;

var settings = 'width=440';
settings += ', height=366';
settings += ', top='+TopPosition+', left='+LeftPosition;
settings += ', directories=no';
settings += ', location=no';
settings += ', menubar=no';
settings += ', resizable=no';
settings += ', scrollbars=no';
settings += ', status=no';
settings += ', toolbar=no';

win = window.open("",myname,settings);
win.document.write('<HTML><HEAD><TITLE>'+compname+' Video</TITLE></HEAD><BODY BGCOLOR="#000000"><DIV style="color:white;font-size:11px;font-family:arial" align="center">Video by '+compname+'</DIV>'+embedcode+'</BODY></HTML>');
}


// show and hide product name on home page

var plnew = "pl1"; 
function show(obj, plus)
{
        if(document.getElementById)
	{
		var el = document.getElementById(obj);
		var ar = document.getElementById("masterdiv1").getElementsByTagName("div");
		for (var i=0; i<ar.length; i++)
		{
			if(ar[i].className == "on") 
			{
				ar[i].className = "off";
			}
		}
		document.getElementById(obj).className = "on";
	}
	if(document.getElementById(plnew))
	{
		document.getElementById(plnew).className = "prhd";
	}
	if(document.getElementById(plus).className == "prhd")
	{
		document.getElementById(plus).className = "prhdm";
	}
	plnew = plus;
}