// JavaScript Document
var flag = 1;
function tabShow(no)
{
	if(flag==1)
	{
		for(i=1;i<=10;i++)
		{
		document.getElementById('tab'+i).style.display = 'none';
		document.getElementById('img'+i).src = 'images/up_arrow.gif';
		}
		document.getElementById('tab'+no).style.display = 'block';
		document.getElementById('img'+no).src = 'images/down_arrow.gif';
		flag = 0;
	}
	else
	if(flag==0)
	{
			
			if(document.getElementById('tab'+no).style.display == 'block' && document.getElementById('img'+no).src == 'http://www.gulfoilindia.com/images/down_arrow.gif')	
			{
					//alert(no)
					document.getElementById('tab'+no).style.display = 'none';
					document.getElementById('img'+no).src = 'images/up_arrow.gif';
			}
		else
		{
			//alert('hhhh');
			for(i=1;i<=10;i++)
			{
				document.getElementById('tab'+i).style.display = 'none';
				document.getElementById('img'+i).src = 'images/up_arrow.gif';
			}
			document.getElementById('tab'+no).style.display = 'block';
			document.getElementById('img'+no).src = 'images/down_arrow.gif';
			
		}
			
		flag=1;
	}
	else
	{
		
	}
	
}

function divClass(no)
{
	//alert('cfdgf');
	
	{document.getElementById("tab" + no).className = 'industrial_sel';}
	
	//alert('aaaaaaa');
}



function divClassunhide(no)
{
	//alert('cfdgf1212');
	
	document.getElementById("tab" + no).className = 'industrial';
	//alert('aaaaaaa');
}



function showtab(no,count)
{
for(var p=1; p <= count; p++)	
{
	document.getElementById("faq" + p).style.display = "none";
	document.getElementById("pg" + p).className="";
	
	//alert('hiiiiiiiiii');
}

	document.getElementById("faq" + no).style.display = "block";
	document.getElementById("pg" + no).className="selected";
	//alert('hiiiiiiiiii121');
	
}


function showproduct()
{
	if(document.URL.toString().indexOf('=') != "-1")
	{
       	var awsuperclean= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var awplus= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var awplussuperclean= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var hvisuperclean= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var hviplus= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var hviplussuperclean= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var crownrr3 = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var crownflexrr = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var crownflexep = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var crownflexlc = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var crestep = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var wayh = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var quenchc= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var superquench = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var rustone = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var rusttwo = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var rustthree = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var rustst = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var gulfmarselect = document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		
		if(awsuperclean=="true")
		{
			
			//alert("pls check url of page ") //if u reomve this comment u  understand that first menu page is loaded after that wine tab is showing
			showtab(2,4);
		}
		else
		if(awplus=="true1")
		{
			//alert("pls check url of page ") //if u reomve this comment u  understand that first menu page is loaded after that wine tab is showing
			showtab(3,4);
		}
		else
		if(awplussuperclean=="true11")
		{
			//alert("pls check url of page ") //if u reomve this comment u  understand that first menu page is loaded after that wine tab is showing
			showtab(4,4);
		}
		else
		if(hvisuperclean=="true111")
		{
			
			//alert("pls check url of page ") //if u reomve this comment u  understand that first menu page is loaded after that wine tab is showing
			showtab(2,4);
		}
		else
		if(hvisuperclean=="true1111")
		{
			//alert("pls check url of page ") //if u reomve this comment u  understand that first menu page is loaded after that wine tab is showing
			showtab(3,4);
		}
		else
		if(hviplussuperclean=="true11111")
		{
			//alert("pls check url of page ") //if u reomve this comment u  understand that first menu page is loaded after that wine tab is showing
			showtab(4,4);
		}
		else
		if(crownrr3=="true12")
		{
			showtab(2,5);	
		}
		else
		if(crownflexrr=="true121")
		{
			showtab(3,5);	
		}
		else
		if(crownflexep=="true122")
		{
			showtab(4,5);	
		}
		else
		if(crownflexlc=="true123")
		{
			showtab(5,5);	
		}
		else
		if(crestep =="true1234")
		{
			showtab(2,2);	
		}
		else
		if(wayh =="true12345")
		{
			showtab(2,2);	
		}
		else
		if(quenchc =="true123456")
		{
			showtab(2,3);	
		}
		else
		if(superquench =="true1234567")
		{
			showtab(3,3);	
		}
		else
		if(rustone =="true13")
		{
			showtab(2,5);	
		}
		else
		if(rusttwo =="true14")
		{
			showtab(3,5);	
		}
		else
		if(rustthree =="true15")
		{
			showtab(4,5);	
		}
		else
		if(rustst =="true16")
		{
			showtab(5,5);	
		}
		else
		if(gulfmarselect =="true17")
		{
			showtab(2,2);	
		}
		else
		{	
			alert("Error");
		}
	}

}
