/** tabbing function
 *  author : Leonard Adhitya
 *
 *
 */
 
function tabbing () {
   var urls = new Array("http://www.revitanail.com.au/index.php?id=27","http://www.revitanail.com.au/index.php?id=7","http://www.revitanail.com.au/index.php?id=6","http://www.revitanail.com.au/index.php?id=5","http://www.revitanail.com.au/index.php?id=4");
   var images = new Array('p3','p7','p6','p5','p4');
   var img = "";
   var theurl = window.location.href;
   var taboff = "url(/fileadmin/templates/images/tab_off.gif)";
   var tabon = "url(/fileadmin/templates/images/tab_on.gif)";
   var found = false;
   //alert('aaaaaaaa');
   
   for(var i=0;i<urls.length;i++){
	   
	   if(urls[i] == theurl) { //if the url match do the tabbing img change
	       //alert('aaaaaaaa');
		   found = true;
		   img = document.getElementById(images[i]);
		   //alert('gg '+img.style.backgroundImage);
		   //alert('bbbbb '+img.style.background-image);
		   img.style.backgroundImage = taboff;
		   img.onmouseout="";
		   //alert('cccc '+img.style.backgroundImage);
		   if(i != 0) {//to change the default tab
			   //document.getElementById('p3').style.backgroundImage = tabon;
		   }
		   
		   break;
	   }
   }
   if(theurl == 'http://www.revitanail.com.au/index.php?id=3' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=10' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=11' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=19' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=9' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=8' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=16' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=17' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=18' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=25' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=51' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=41' 
	  ) { //hardcoded for all the range pages to stay black
   
      found = true;
	  document.getElementById('p3').style.backgroundImage = taboff;
	  document.getElementById('p3').onmouseout = "";
   }
   if(theurl == 'http://www.revitanail.com.au/index.php?id=36') { //hardcoded for all the range pages to stay black
   
      found = true;
	  document.getElementById('p5').style.backgroundImage = taboff;
	  document.getElementById('p5').onmouseout = "";
   }
    if((theurl == 'http://www.revitanail.com.au/index.php?id=29' || theurl == 'http://revitanail.com.au/index.php?id=29') || 
	  (theurl == 'http://www.revitanail.com.au/index.php?id=28' || theurl == 'http://revitanail.com.au/index.php?id=28')) {
	   found = true;
	  document.getElementById('p5').style.backgroundImage = taboff;
  	  document.getElementById('p5').onmouseout = "";
   }
   
   if(	  theurl == 'http://www.revitanail.com.au/index.php?id=67' ||
   	  theurl == 'http://www.revitanail.com.au/index.php?id=69' ||
   	  theurl == 'http://www.revitanail.com.au/index.php?id=70' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=71' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=72' ||
	  theurl == 'http://www.revitanail.com.au/index.php?id=77' ) 
   { //hardcoded for all the expert tips pages to stay black
      	  found = true;
	  document.getElementById('p7').style.backgroundImage = taboff;
	  document.getElementById('p7').onmouseout = "";
   }


   if(!found){ //default page tab  
	   //document.getElementById('p3').style.backgroundImage = tabon; 
   }
      
}