// JavaScript Document
	 pic1on= new Image(50,20);
     pic1on.src="./images/home_hbutton.gif";  

     pic1off= new Image(50,20);
     pic1off.src="./images/home_button.gif";
	 
	 pic2on= new Image(60,20);
     pic2on.src="./images/about_us_hbutton.gif";  

     pic2off= new Image(60,20);
     pic2off.src="./images/about_us_button.gif";
	 
	 pic3on= new Image(50,20);
     pic3on.src="./images/menu_hbutton.gif";  

     pic3off= new Image(50,20);
     pic3off.src="./images/menu_button.gif";
	 
	 pic4on= new Image(112,20);
     pic4on.src="./images/kids_corner_hbutton.gif";  

     pic4off= new Image(112,20);
     pic4off.src="./images/kids_corner_button.gif";
	 
	 pic5on= new Image(97,20);
     pic5on.src="./images/stores_hbutton.gif";  

     pic5off= new Image(97,20);
     pic5off.src="./images/stores_button.gif";
	 
	 pic6on= new Image(95,20);
     pic6on.src="./images/franchising_hbutton.gif";  

     pic6off= new Image(95,20);
     pic6off.src="./images/franchising_button.gif";
	 
	 pic7on= new Image(95,20);
     pic7on.src="./images/whats_news_hbutton.gif";  

     pic7off= new Image(95,20);
     pic7off.src="./images/whats_news_button.gif";

function changeImg(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function defaultImg(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }


function show(ThisObj)
{		
nav = document.getElementById(ThisObj).style;

var status = new Array(7);
var name = new Array("subMenu1","subMenu2", "subMenu3","subMenu4","subMenu5","subMenu6","subMenu0");
var i;

for (i=0; i<7; i++)
	status[i] = 0;


if (ThisObj=="subMenu1")
		{
		status[0] = 1;
		}

else if (ThisObj=="subMenu2")
		{
		status[1] = 1;
		}

else if (ThisObj=="subMenu3")
		{
		status[2] = 1;
		}

else if (ThisObj=="subMenu4")
		{
		status[3] = 1;
		}

else if (ThisObj=="subMenu5")
		{
		status[4] = 1;
		}
		
else if (ThisObj=="subMenu6")
		{
		status[5] = 1;
		}
else
		{
		status[6] = 1;
		}

for (i=0; i<7; i++)
	if (status[i]==1)
		nav.display='block';
	else
		document.getElementById(name[i]).style.display='none';
}


function hide(ThisObj)
{
nav = document.getElementById(ThisObj).style;
nav.display ='none';
}

function showURL()
{
//shows your URL
var a = document.URL.split("//"); // split at protocol
a = (a[1] ? a[1] : a[0]).split("/");
// use last element of a; split at /
// host is a[0]; path is a[1..(n-1)]; a[n] is page
//alert(a.join("\n"));
//alert(a[2]);
page = a[2];
//alert(page);
//path = document.URL;
//page = path.substring(23);

if (page=="home.aspx")
	document.getElementById("subMenu0").style.display='block';

if 	((page=="ourvision.aspx") ||
	(page=="ourhistory.aspx") ||
	(page=="ourbrand.aspx") ||
	(page=="ourpeople.aspx") ||
	(page=="milestones.aspx") ||
	(page=="csr.aspx") ||
	(page=="contactus.aspx"))
	
	document.getElementById("subMenu1").style.display='block';
	
if 	((page=="rotisserie.aspx") ||
	(page=="friedchicken.aspx") ||
	(page=="sandwiches.aspx") ||
	(page=="combomeals.aspx") ||
	(page=="sideitems.aspx") ||
	(page=="desserts_drinks.aspx") ||
	(page=="promotions.aspx") ||
	(page=="delivery.aspx"))

	document.getElementById("subMenu2").style.display='block';
	
	if 	((page=="kids_events.aspx") ||	
		 (page=="kids_menu.aspx"))

	{document.getElementById("subMenu3").style.display='block';}
	
	if 	((page=="store_locator.aspx") ||	
		 (page=="store_environment.aspx"))

	{document.getElementById("subMenu4").style.display='block';}
	
	if 	((page=="about_franchising.aspx") ||	
		 (page=="process.aspx") ||
		 (page=="franchisee_login.aspx"))

	{document.getElementById("subMenu5").style.display='block';}
	
	if 	((page=="press_release.aspx") ||	
		 (page=="ourgallery.aspx") ||
		 (page=="onair.aspx") ||
		 (page=="careers.aspx") ||
		 (page=="events.aspx"))

	{document.getElementById("subMenu6").style.display='block';}
}