function subcat(r)
		{
		var k=r;
		var tot=document.frm1.num.value;
		for(i=1;i<=tot;i++)
		{
		if(i==k)
		{
		document.getElementById(k).style.display = 'block';
		}else
		document.getElementById(i).style.display = 'none';
		}
		}
       function SubCatDetail(j)
	   {
	   var scat=j;
	   document.frm1.scatid.value=scat;
	   document.frm1.action="products.php";
	   document.frm1.submit();
	   }
	   function History(j)
	   {
	   //var scat=j;
	   //document.frm1.scatid.value=scat;
	   document.backRES.action="products.php#itemView";
	   document.backRES.submit();
	   }
	  function Display(c)
	  {
	  document.getElementById(c).style.display = 'block';
	  }
	  function Pdetail(p)
	  {
		document.frmdetail.product_cy.value=p;
		document.frmdetail.scatid.value=document.frmdetail.aa.value;
		//alert(document.frmdetail.aa.value);
		document.frmdetail.action="products.php";
	    document.frmdetail.submit();
	  }
	  function SearchProductdetail(p)
	  {
		resultArray=p.split('@');
		var type=resultArray[1];
		var pid=resultArray[0];
		if(type==1)
		{
		type='Double-Acting';
		}
		if(type==2)
		{
		type='SolidModel-DActing';
		}
		if(type==3)
		{
		type='ThreadModel-DActing';
		}
		if(type==4)
		{
		type='Center-DActing';
		}
		document.frmdetail.product_cy.value=pid;
		document.frmdetail.scatid.value=document.frmdetail.aa.value;
		document.frmdetail.double_cylender_type.value=type;
		document.frmdetail.action="products.php#location";
	    document.frmdetail.submit();
	  }
	  function LargeImage(img)
	  {
	  image = "image=" + img;
	  var qrystr=image;
	  myURL="largeimage.php?"+ qrystr ;
	  if( image=='image=HUP-180.jpg' || image=='image=HUP-180-P.jpg' ||image=='image=HAC-6.jpg' )
	  {
	  window.open(myURL,'','menubar=no , height=620 , width=520, resizable=no , scrollbars=no', 'toolbar=no');
	  }else
	  {
	  if(image=='image=RC-10-SA-6.jpg' || image=='image=RC-30-SA-14.jpg' || image=='image=RC-50-SA-14.jpg' || image=='image=HAV-4-1.jpg' || image=='image=HV-3-1.jpg' || image=='image=17_1.jpg' || image=='image=24_1_b.jpg' || image=='image=HAP-050-2.jpg')
	  {
	  window.open(myURL,'','menubar=no , height=510 , width=530, resizable=no , scrollbars=no', 'toolbar=no');
	   }else
	   {
	   if(image=='image=HAV-4-R.jpg' || image=='image=M-4K-1.jpg' || image=='image=HP-55.jpg')
	   {
	   window.open(myURL,'','menubar=no , height=300 , width=520, resizable=no , scrollbars=no', 'toolbar=no');
	   }else
	   window.open(myURL,'','menubar=no , height=400 , width=520, resizable=no , scrollbars=no', 'toolbar=no');
	   }
	  }
	  }
	  
	 function DiemesionImage(image)
	  {
	  image = "image=" + image;
	  var qrystr=image;
	  myURL="largeimage.php?"+ qrystr ;
	  window.open(myURL,'','menubar=no , height=550 , width=630, resizable=no , scrollbars=no', 'toolbar=no');
	  }
	  function TechImage(image)
	  {
	  image = "image=" + image;
	  var qrystr=image;
	  myURL="largeimage.php?"+ qrystr ;
	  window.open(myURL,'','menubar=no , height=340 , width=440, resizable=no , scrollbars=no', 'toolbar=no');
	  }
	  function ProductImage(image)
	  {
	  image = "image=" + image;
	  var qrystr=image;
	  myURL="largeimage.php?"+ qrystr ;
	  window.open(myURL,'','menubar=no , height=360 , width=400, resizable=no , scrollbars=no', 'toolbar=no');
	  }
	  function ProductImage1(image)
	  {
	  image = "image=" + image;
	  var qrystr=image;
	  myURL="largeimage.php?"+ qrystr ;
	  if( image=='image=P940.gif' || image=='image=P802.gif' ||image=='image=HP1-4.gif')
	  {
	  window.open(myURL,'','menubar=no , height=320 , width=430, resizable=no , scrollbars=no', 'toolbar=no');
	  }else
	  window.open(myURL,'','menubar=no , height=500 , width=500, resizable=no , scrollbars=no', 'toolbar=no');
	  }
	  function TypeOfCylendr(t)
	  {
	    document.frmdetail.double_cylender_type.value=t;
		document.frmdetail.scatid.value=document.frmdetail.subcatid.value;
		document.frmdetail.action="products.php";
	    document.frmdetail.submit();
	  }
	  
	  function SearchResult(list)
	  {
	  document.searchfrm.scatid.value=document.searchfrm.sscatid.options[document.searchfrm.sscatid.selectedIndex].value;
	  document.searchfrm.action="products.php#SearchResult"
	  document.searchfrm.submit();
	  }
	  
	  function ShowSubCat(){ 
	 
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		{
		alert ("Browser does not support HTTP Request")
		return
		} 
		var url="Showcat.php"
		var str1=document.searchfrm.CategoryName.options[document.searchfrm.CategoryName.selectedIndex].value;
		url=url+"?key="+str1
		xmlHttp.onreadystatechange=stateChanged 
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
		}
		function stateChanged() 
		{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
	    //alert(xmlHttp.responseText);
		document.getElementById("subc").innerHTML=xmlHttp.responseText ;
		} 
		} 
		
		function GetXmlHttpObject()
		{ 
		var objXMLHttp=null
		if (window.XMLHttpRequest)
		{
		objXMLHttp=new XMLHttpRequest()
		}
		else if (window.ActiveXObject)
		{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
		}
		return objXMLHttp
								}
								
								
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}