var gstrRestaurantSuffix = "1";
//initialize gstrRestaurantSuffix to 1 will be changed
//later in SetRestaurant(), and then use to control the
//restaurant when the restaurant menu is clicked.
function ChangeRestaurant(sel)
{
var optSelected = sel.value;
var strFile = GetFileName();
var dotIndex = strFile.indexOf(".");
var strNewHref = "";
var strTemp = "";

//Only want the page change to occur if we're not
//on the menu homepage.  If we're on the menu home
//page this action will only set the restaurant -
//it will take a click on one of the menu choices to
//navigate
//debugger
if(strFile != "menu.html")
{
	if (dotIndex != -1)
	{
		for(intCounter=0;intCounter<strFile.length;intCounter++)
		{
			strTemp	= strFile.substr(intCounter,1);
			if(intCounter != (dotIndex - 1))
			{
				strNewHref += strTemp;
			}
			else
			{
				strNewHref += optSelected;
			}		
		}
	}
	else //something is way screwed up, shouldn't get here
	{
		strNewHref = "menu.html";
	}
	window.location = strNewHref;
}
else
{
	gstrRestaurantSuffix = optSelected;

}


}

function GetFileName()
{
var strSrc = window.location.href;
var arrFile1 = strSrc.split("/");
var intFileIndex = arrFile1.length -1;
var strFile = arrFile1[intFileIndex];
return strFile;
}

function SetRestaurant()
{
var selRestaurant
var strFile = GetFileName();
var dotIndex = strFile.indexOf(".");
var strNewHref = "";
var strSuffix = "";

selRestaurant = document.getElementById("selRestaurant");


if(strFile != "menu.html")
{
	if(selRestaurant != null)
	{
		if (dotIndex != -1)
		{
			//extract the index from the filename
			strSuffix = strFile.substr(dotIndex-1,1);
			gstrRestaurantSuffix = strSuffix;
			selRestaurant.selectedIndex = parseInt(strSuffix-1);	
		
		}
		else //something is way screwed up, shouldn't get here
		{
			selRestaurant.selectedIndex = parseInt(1);
		}
	}
}






}
function navigate(strPage)
{
window.location = strPage + gstrRestaurantSuffix + ".html"; 
}


//----- Start normal menu code ----------------------------
var key="151b980esfid"; 
var isHorizontal=0;



var strSrc = window.location.href;
var arrFile1 = strSrc.split("/");
var intFileIndex = arrFile1.length -1;
var strFile = arrFile1[intFileIndex];


pressedItem = -1;
//#FDF6E4 - Cream


//Light blue 
//#65C3F7

//15,80,160
//#0F50A0

var blankImage="img/blank.gif";
var fontStyle="bold 10pt Verdana";
//var fontColor=["#000000","#FF0000"];
var fontColor=["#65C3F7","#ffffff"];
var fontDecoration=["none","none"];



//var itemBackColor=["#dddddd","#ffffff"];
var itemBackColor=["transparent","transparent"];
var itemBorderWidth=0;
var itemAlign="left";
var itemBorderColor=["#ECBF86","#ECBF86"];
var itemBorderStyle=["solid","solid"];
var itemBackImage=["images/ThaiMenuBackground.png","images/ThaiMenuBackground.png"];

var menuBackImage="";
//var menuBackColor="#dddddd";
var menuBackColor="transparent";
var menuBorderColor="#000000";
var menuBorderStyle="solid";
var menuBorderWidth=1;
var transparency=100;
var transition=24;
var transDuration=500;
var shadowColor="#999999";
var shadowLen=0;
var menuWidth="90px";

var itemCursor="hand";
var itemTarget="_blank";
var statusString="text";
var subMenuAlign = "left";
var iconTopWidth  = 16;
var iconTopHeight = 16;
var iconWidth=16;
var iconHeight=16;
var arrowImageMain=["img/arrow_d.gif","img/arrow_d2.gif"];
var arrowImageSub=["img/arrow_r.gif","img/arrow_r2.gif"];
var arrowWidth=7;
var arrowHeight=7;
var itemSpacing=0;
var itemPadding=3;
//var itemSpacing=0;
//var itemPadding=0;



var separatorImage="img/separ1.gif";
var separatorWidth="100%";
var separatorHeight="5";
var separatorAlignment="center";

var separatorVImage="img/separv1.gif";
var separatorVWidth="5";
var separatorVHeight="16";

var moveCursor = "move";
var movable = 0;

var absolutePos = 0;
var posX = 0;
var posY = 0;

var floatable=1;
var floatIterations=5;
var dmObjectsCheck = 1;


var menuItems = 
[
	["<select id='selRestaurant' name='selRestaurant' onchange='javascript:ChangeRestaurant(this);'><option id='tk1' value='1'>Thai Kitchen I</option><option id='tk2' value='2'>Thai Kitchen II</option><option id='tk3' value='3'>Thai Kitchen III</option></select>",""],
    ["Menu Home","javascript:window.location = 'menu.html'","","","Home"],
    ["Lunch","javascript:navigate('lunchmenu')","","","About Us"],
	["Dinner","javascript:navigate('appsoup')","","","Menu"],
	["|Appetizers/Soups","javascript:navigate('appsoup')","","","Appetizers/Soups"],
	["|Salad/Yum","javascript:navigate('saladyum')","","","Salad/Yum"],
	["|Chef's Specials","javascript:navigate('chefssp')","","","Chef's Specials"],
	["|Entrees","javascript:navigate('entrees')","","","Entrees"],
	["|Curries","javascript:navigate('curries')","","","Curries"],
	["|Noodles","javascript:navigate('noodles')","","","Noodles"]
];
apy_init();






