flag=1;
function showSchedule(no,t)
{	
	flag=no;
	for(i=0,j=1;i<t;i++,j++)
	{	
		document.getElementById('xyz' + j).style.display='none';
		document.getElementById('img'+ j).src=normalimages[i];
		
	}
		document.getElementById('xyz' + no).style.display='block';
		document.getElementById('img'+ no).src = boldimages[no-1];
		
}


function overlay_close()
{
document.getElementById('back').style.display = 'none';
}

var boldimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
boldimages[0]=["http://www.gulfoilindia.com/images/engine_oils_tab_b.gif"] 
boldimages[1]=["http://www.gulfoilindia.com/images/gear_oils_tab_b.gif"] 
boldimages[2]=["http://www.gulfoilindia.com/images/greases_tab_b.gif"]
boldimages[3]=["http://www.gulfoilindia.com/images/coolants_tab_b.gif"]
boldimages[4]=["http://www.gulfoilindia.com/images/brake_fluids_tab_b.gif"] 
boldimages[5]=["http://www.gulfoilindia.com/images/cng_engine_oils_tab_b.gif"] 

var normalimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
normalimages[0]=["http://www.gulfoilindia.com/images/engine_oils_tab.gif"] 
normalimages[1]=["http://www.gulfoilindia.com/images/gear_oils_tab.gif"] 
normalimages[2]=["http://www.gulfoilindia.com/images/greases_tab.gif"]
normalimages[3]=["http://www.gulfoilindia.com/images/coolants_tab.gif"]
normalimages[4]=["http://www.gulfoilindia.com/images/brake_fluids_tab.gif"] 
normalimages[5]=["http://www.gulfoilindia.com/images/cng_engine_oils_tab.gif"] 


function hide_bold(n,t)
{
	
		for(i=0,j=1;i<t;i++,j++)
		{
			if(i==flag-1)
			{
				continue;
			}
			document.getElementById('img'+j).src=normalimages[i];
			
		}
		document.getElementById('img'+n).src=boldimages[n-1];
}


function img_normal(n,t)
{	
	for(i=0,j=1;i<t;i++,j++)
	{
		if(i==flag-1)
		{
			continue;
		}
		document.getElementById('img'+j).src=normalimages[i];
	}
	
	
}

function showwine_main()
{
	showwine();
	showwine_Greases();
	
	
	
	}

function showwine()
{
	if(document.URL.toString().indexOf('=') != "-1")
	{
       	var gearoil= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var Greases= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var coolant= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		var cng= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		
		if(gearoil=="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
			showSchedule(2,5);
		}
		else
		if(Greases=="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
			showSchedule(3,5);
		}
		else
		if(coolant=="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
			showSchedule(4,5);
		}
		else
		if(cng=="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
			showSchedule(5,5);
		}
		else
		{	
			alert("Error");
		}
	}

}


/*
function showwine_Greases()
{
	if(document.URL.toString().indexOf('=') != "-1")
	{
       	var Greases= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		
		if(Greases=="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
			//alert('hj')
			showSchedule(3,6);
		}
		else
		{	
			alert("Error");
		}
	}

}


function showwine_coolant()
{
	if(document.URL.toString().indexOf('=') != "-1")
	{
       	var coolant= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		
		if(coolant=="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
			showSchedule(4,6);
		}
		else
		{	
			alert("Error");
		}
	}

}






function showwine_cng()
{
	if(document.URL.toString().indexOf('=') != "-1")
	{
       	var cng= document.URL.toString().substr(document.URL.toString().indexOf('=') + 1);
		
		if(cng=="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
			showSchedule(6,6);
		}
		else
		{	
			alert("Error");
		}
	}

}*/