 //<![CDATA[
 /*
 if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent) &&
  document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule)
 {
  document.styleSheets[0].addRule('*', 'behavior: url(iepngfix.htc)');
  // Feel free to add rules for specific elements only, as above.
  // You have to call this once for each selector, like so:
  //document.styleSheets[0].addRule('img', 'behavior: url(iepngfix.htc)');
  //document.styleSheets[0].addRule('div', 'behavior: url(iepngfix.htc)');
 }
 */


 // Here's another script that disables all PNGs in IE when the page is printed.
 /*
 if (window.attachEvent && /MSIE (5\.5|6)/.test(navigator.userAgent))
 {
  function printPNGFix(disable)
  {
   for (var  i = 0; i < document.all.length; i++)
   {
    var e = document.all[i];
    if (e.filters['DXImageTransform.Microsoft.AlphaImageLoader'] || e._png_print)
    {
     if (disable)
     {
      e._png_print = e.style.filter;
      e.style.filter = '';
     }
     else
     {
      e.style.filter = e._png_print;
      e._png_print = '';
     }
    }
   }
  };
  window.attachEvent('onbeforeprint',  function() { printPNGFix(1) });
  window.attachEvent('onafterprint',  function() { printPNGFix(0) });
 }
 */

 //]]>



function hideshow()
{
if (c1==0) 
  {
  c1=1;
  document.getElementById('colorblue').style.display="none";
  document.getElementById('colororange').style.display="none";
  }
  
else
  {
  c1=0;
  document.getElementById('colorblue').style.display="block";
  document.getElementById('colororange').style.display="block";
  }

}

var a1=new Array(6);
a1[0]=0;
a1[1]=0;
a1[2]=0;
a1[3]=0;
a1[4]=0;
  
function showhide(id1,id2,n)
{
if (a1[n]==0) 
{
  document.getElementById(id1).style.display="block";
  document.getElementById(id2).src="images/arrow-minus.png";
  a1[n]=1;
}
else 
{
  document.getElementById(id1).style.display="none";
  document.getElementById(id2).src="images/arrow-plus.png";
  a1[n]=0;
}
}
 
function hidetree()
{
document.getElementById('home-subelm').style.display="none";
document.getElementById('product-sub').style.display="none";
document.getElementById('publication-sub').style.display="none";
document.getElementById('testimonial-sub').style.display="none";
document.getElementById('company-sub').style.display="none";


document.getElementById('home-plus').src="images/arrow-plus.png";
document.getElementById('company-sub').src="images/arrow-plus.png";
document.getElementById('product-plus').src="images/arrow-plus.png";
document.getElementById('publication-plus').src="images/arrow-plus.png";
document.getElementById('testimonial-plus').src="images/arrow-plus.png";

a1[1]=0;
a1[2]=0;
a1[3]=0;
a1[4]=0;
}

function showtree()
{
document.getElementById('home-subelm').style.display="block";
document.getElementById('company-sub').style.display="block";
document.getElementById('product-sub').style.display="block";
document.getElementById('publication-sub').style.display="block";
document.getElementById('testimonial-sub').style.display="block";

document.getElementById('home-plus').src="images/arrow-minus.png";
document.getElementById('product-plus').src="images/arrow-minus.png";
document.getElementById('publication-plus').src="images/arrow-minus.png";
document.getElementById('testimonial-plus').src="images/arrow-minus.png";

a1[1]=1;
a1[2]=1;
a1[3]=1;
a1[4]=1;
}
 
/* form validation script */

var r=0;
var ck=0;
var sc=new Array(10);
sc[0]="hj2c13";
sc[1]="mkp39a";
sc[2]="p3qw19";
sc[3]="7yuxk8";
sc[4]="5uh9ws";
sc[5]="8qwr2p";
sc[6]="gk541m";
sc[7]="pmba2s";
sc[8]="sd8xvn";
sc[9]="v2c4as";
sc[10]="zgd4tm";


var scimg=new Array(10);
scimg[0]="scode0.jpg";
scimg[1]="scode1.jpg";
scimg[2]="scode2.jpg";
scimg[3]="scode3.jpg";
scimg[4]="scode4.jpg";
scimg[5]="scode5.jpg";
scimg[6]="scode6.jpg";
scimg[7]="scode7.jpg";
scimg[8]="scode8.jpg";
scimg[9]="scode9.jpg";
scimg[10]="scode10.jpg";

function scodeimg(img1)
{
	r=Math.floor(Math.random()*11);
	document.getElementById(img1).src=scimg[r];
}

function codecheck(code)
{
	var c=document.getElementById(code).value;
		c=c.toLowerCase();
		
		

	if(sc[r]==c)
	 {
	  return true;
	 }
	else 
	 {
	  return false;
	 }
}


function validate(id1,id2,id3,id4,id5,id6) 
{
if(document.getElementById(id1).value=="" || 
document.getElementById(id2).selectedIndex=="0" ||
!checknum(id3) || document.getElementById(id4).value=="" ||
!check_mail(id5))
{
alert("Please enter the Mandatory fields");
return false;
}
else
 return true;

	
if(!codecheck(id6))
 {
  alert("Security code in invalid");
  return false;
 }

else
  return true;
  
}

function checknum(id1)
{
 
 	var temp1=0;
	var st;
	ph=document.getElementById(id1).value;
	
	if(ph.charAt(0)=='+')
	  st=1;
	else
	  st=0;
	  
	
	for (i = st; i < ph.length; i++)
    {   
        // Check that current character is number.
        var c = ph.charAt(i);
        if (((c < "0") || (c > "9"))) 
		{
		temp1=1;
		return false;
		}
		 
		
    }
	
	if(temp1==0)
	  return true;

								
}

function checkyear(id1)
{
 
 	var temp=1;
	ph=document.getElementById(id1).value;
		if(ph.length!=4)
	  return false;
	

	for (i = 0; i < ph.length; i++)
    {   
        // Check that current character is number.
        var c = ph.charAt(i);
        if (((c < "0") || (c > "9"))) 
		{
		temp=1;
		return false;
		}
    }
	
	if(temp==1)
	  return true;

								
}


function check_mail(m)
{
	
			var e=document.getElementById(m).value;
			ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
			for(i=0; i < e.length ;i++)
			{
				if(ok.indexOf(e.charAt(i))<0)
				{ 
					return (false);
				}	
			} 
			if (document.images) 
			{
				re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
				re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
				if (!e.match(re) && e.match(re_two)) 
				{
					return (-1);		
				} 
			}

	
}


	var a=new Array();
	a[0]="ozone#generator";
	a[1]="ozonator";
	a[2]="oem#ozone#generator";
	a[3]="ozone#skid#system";
	a[4]="ozone#monitor";
	a[5]="Ambient#ozone#monitor#and#controller";
	a[6]="dissolved#ozone#monitor";
	a[7]="orp#monitor#and#controller";
	a[8]="dissolved#ozone#meter";
	a[9]="dissolved#ozone#test#kit";
	a[10]="oxygen#analyzer";
	a[11]="voc#monitor#ad";
	a[13]="ozone#destruct#and#controller";
	a[12]="co2#meter#handhelnit";
	a[14]="static#mixers";
	a[15]="venturi#injector";
	a[16]="co2#monitor";
	a[17]="air#purifiers";
	a[18]="car#air#purifiers";
	a[19]="ozone#vegetable#wash";
	a[20]="air#sterilizer";
	a[20]="domestic#ozone#generator";
	var c=7,i,j;
	var d=0,t;

	var b=new Array();
	var p=new Array();
	var x=new Array();
	var pr;
	
	p[0]="product-list/ozone-generator.html";
	p[1]="product-list/ozone-generator.html";
	p[2]="product-list/OEM.html";
	p[3]="product-list/skid.html";
	p[4]="product-list/all-ozone-monitors.html";
	p[5]="product-list/ambient-o3-monitor.html";
	p[6]="product-list/dissolved-o3-monitor.html";
	p[7]="product-list/orp-monitor.html";
	p[8]="product-list/ozone-meter.html";
	p[9]="product-list/test-kit.html";
	p[10]="product-list/o2-analyzer.html";
	p[11]="product-list/voc-monitor.html";
	p[12]="product-list/co2-meter.html";
	p[13]="product-list/o3-destruct-unit.html";
	p[14]="product-list/static-mixer.html";
	p[15]="product-list/ventur.html";
	p[16]="product-list/co2-meter.html";
	p[17]="product-list/air-purifiers.html";
	p[18]="product-list/car-purifier.html";
	p[19]="product-list/o3-veg-wash.html";
	p[20]="product-list/air-sterilizer.html";
	p[21]="product-list/Domestic-ozone-generator.html";
	var ar=21;

function search1()
{
var item=document.getElementById('srtext').value;
var n=item.length;
var s=0;

for(i=0;i<=ar;i++)
 {
	x=a[i].split("#");
	var xn=x.length-1;
	b[i]=0;
	for(j=0;j<=xn;j++)
	 {
		 if((item.search(x[j]))>=0)
		   {
			   b[i]++;
			   s=1;
		   }
	 }
	 
	 if(b[i]==x.length)
	  {
       b[i]=7;
	   i=ar+10;
	  }

 }
 
 if(s==0)
 {
   alert("Sorrry your search didnt match any of your products");
   exit;
 }
 
t=b[0];
for(i=1;i<=ar;i++)
 {
	 if(t<b[i])
	 {
		 t=b[i];
	 }  
 }
 document.getElementById("contentBlock").innerHTML="";
 d=0;
 temp();
}

function temp()
{
	if(t==b[d])
	{
	    doc2(p[d]);
	}
	d=d+1;
	
	if(d<=ar)
	{
	  setTimeout("temp()",0);
	}
}


function doc2(pr)
{
	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {

  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {	
	document.getElementById("contentBlock").innerHTML +=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET",pr,true);
xmlhttp.send();
}


function dformvalidate() {
	
	dform=document.getElementById('dform');
	
	if(dform.elements['dname'].value=="" || dform.elements['daddress'].value=="" || !checknum('dtel') || !checkyear('dyear')      
	 || !checknum('dsalesno') || !checknum('dsupportno') || !check_mail('dmail') || dform.elements['dmsg'].value=="" 
	 || dform.elements['dbusiness'].value=="" || dform.elements['dterritory'].value=="" || !codecheck('dcode') || 
	 dform.elements['corpstatus'].selectedIndex=="0") 
	 {
		 alert("Please Enter All the Fields accurately");
		 return false;
	 }
	else
	 return true;
	
}



