/****************************/
/* GENERAL GLOBAL VARIABLES */
/****************************/
var	standardMenuText=" View selected menu items"

var	BeefLeafParcelText="Betel Leaf Parcel";
	springrollText="Spring Roll";
	kingPrawnText="King Prawn Tamarind";
	lambCurryText="Lamb and Pumpkin Curry";
	GlassNoodleText="Glass Noodle Salad";
	//TomYumGoongText="xxx";

var bigBeefLeafParcelImg = "images/betel.jpg";
	bigkingPrawnImg = "images/bigSpiceStirFry.jpg";
	biglambCurryImg = "images/bigLamb.jpg";
	bigGlassNoodleImg = "images/BigGlassNoodle.jpg";
	TomYumGoong="images/TomYumGoong.jpg";
	
	
var doubleBayMapImg= "images/doubleBayMap.gif";
	doubleBayMapText= "Map of Double Bay";
	kirribilliMapImg= "images/KirribilliMap.gif";
	kirribilliMapText= "Map of Kirribilli";
	emptyMapDesc= "";	

var GlassNoodleDesc="with prawns, ginger, fresh herbs & peanut & lemon dressing";
	BeefLeafParcelDesc="";
	lambCurryDesc="rack of lamb & pumpkin stewed in masaman curry sauce";
	kingPrawnDesc="lightly fried king prawn with tamarind and corriander seed";
	TomYumGoongDesc="";

//added to fix browser problem 
//fixed by:roy
//09/Apr/2009
var browser = '';
if (navigator.appName.indexOf('Microsoft') != -1)
    browser = 'ienew';
else if (navigator.appName.indexOf('Netscape') != -1)
    browser = 'Netscape'
else browser = 'ienew';



/******************/
/* PRELOAD IMAGES */
/******************/
if (document.images) 
	{
	standardImg = new Image;
	springrollImg = new Image;
	BeefLeafParcelImg = new Image;
	kingPrawnImg = new Image;
	lambCurryImg = new Image;
	GlassNoodleImg = new Image;
	page1ButtonUpImg = new Image;
	page1ButtonHoverImg = new Image;
	page2ButtonUpImg = new Image;
	page2ButtonHoverImg = new Image;
	page3ButtonUpImg = new Image;
	page3ButtonHoverImg = new Image;
	printMenuImg = new Image;
	printMenuHoverImg = new Image;
	loc1ButtonUpImg = new Image;
	loc1ButtonHoverImg = new Image;
	loc2ButtonUpImg = new Image;
	loc2ButtonHoverImg = new Image;
	loc3ButtonUpImg = new Image;
	loc3ButtonHoverImg = new Image;
	
	standardImg.src="images/standardimage.jpg";
	springrollImg.src="images/Spicemarket-menuM_10.jpg";
	BeefLeafParcelImg.src="images/beefleafparcel.jpg";
	kingPrawnImg.src="images/prawn.jpg";
	lambCurryImg.src="images/lamb.jpg";
	GlassNoodleImg.src="images/glassNoodle.jpg";
	page1ButtonUpImg.src="images/submenupage1up.gif";
	page1ButtonHoverImg.src="images/submenupage1hover.gif";
	page2ButtonUpImg.src="images/submenupage2up.gif";
	page2ButtonHoverImg.src="images/submenupage2hover.gif";
	page3ButtonUpImg.src="images/submenupage3up.gif";
	page3ButtonHoverImg.src="images/submenupage3hover.gif";
	printMenuImg.src="images/printmenu.gif";
	printMenuHoverImg.src="images/printmenuhover.gif";
	loc1ButtonUpImg.src="images/Double-up.gif";
	loc1ButtonHoverImg.src="images/Double-hover.gif";
	loc2ButtonUpImg.src="images/Kirribilli-up.gif";
	loc2ButtonHoverImg.src="images/Kirribilli-hover.gif";
	loc3ButtonUpImg.src="images/Cammeray-up.gif";
	loc3ButtonHoverImg.src="images/Cammeray-hover.gif";
	}
else
	{
	standardImg="";
	springrollImg="";
	BeefLeafParcelImg="";
	kingPrawnImg="";
	lambCurryImg="";
	GlassNoodleImg="";
	page1ButtonUpImg="";
	page1ButtonHoverImg="";
	page2ButtonUpImg="";
	page2ButtonHoverImg="";
	page3ButtonUpImg="";
	page3ButtonHoverImg="";
	printMenuImg="";
	printMenuHoverImg="";
	loc1ButtonUpImg="";
	loc1ButtonHoverImg="";
	loc2ButtonUpImg="";
	loc2ButtonHoverImg="";
	loc3ButtonUpImg="";
	loc3ButtonHoverImg="";
	}


/*************************/
/* HIGHLIGHT LINK TO MAP */
/*************************/
function highlightMap()
	{
	mapLinkObj = document.getElementById('mapId');
	mapLinkObj.style.color = "#CC0000";
	mapLinkObj2 = document.getElementById('mapId2');
	mapLinkObj2.style.color = "#CC0000";	
	}
	
	
/*********************************/
/* CHANGE MAP LINK BACK TO BLACK */
/*********************************/
function unhighlightMap()
	{
	mapLinkObj = document.getElementById('mapId');
	mapLinkObj.style.color = "black";
	mapLinkObj2 = document.getElementById('mapId2');
	mapLinkObj2.style.color = "black";	
	}


/**************************/
/* OPEN A NEW VIEW WINDOW */
/**************************/
function newWindow (menuImage, menuText, menuDesc, winName)
{
    if (browser == "ienew")
		menuWindow = window.open("",winName, "scrollbars=no,width=600,height=523");
	else
		menuWindow = window.open("",winName, "width=600,height=525");		
	menuWindow.focus();
	menuWindow.document.write("<HTML><HEAD><TITLE>Spice Market - Menu Item Viewer</TITLE><BODY STYLE='margin:0px;'><TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR HEIGHT='50'><td width='35'></td><TD WIDTH='400' ALIGN='center'><FONT face='Arial, Helvetica, sans-serif'><STRONG>");
	menuWindow.document.write(menuText);
	menuWindow.document.write("</STRONG></FONT><BR><FONT SIZE='1' FACE='Arial, Helvetica, sans-serif'><EM>");
	menuWindow.document.write(menuDesc);
	menuWindow.document.write("</EM></FONT></TD><TD STYLE='cursor:pointer' ALIGN='right' VALIGN='middle'  WIDTH='125' onClick='javascript:window.close();'><FONT SIZE='2' face='Arial, Helvetica, sans-serif'><U><STRONG>close window</STRONG></U></TD><TD WIDTH='25' ALIGN='center' STYLE='cursor:pointer' onClick='javascript:window.close();'><IMG SRC='images/close.jpg' width='19' height='19'></TD></TR><TR><TD COLSPAN='4'><IMG SRC='images/");
	menuWindow.document.write(menuImage);
	menuWindow.document.write(".jpg' width='600' height='400'></TD></TR><TR><TD COLSPAN='4' ALIGN='center' BGCOLOR='#FFFEF2'><IMG SRC='images/ThaiWritingYellow.gif' WIDTH='482' HEIGHT='79'></TD></TR><TABLE></BODY></HTML>");
	menuWindow.document.close();
	}

/********************************************/
/* OPEN A NEW VIEW WINDOW WITH EXTRA IMAGES */
/********************************************/
function newWindow2 (menuImage, menuText, menuDesc)
	{
	if (browser == "ienew")
		menuWindow = window.open("","menuWin", "scrollbars=yes,width=520");
	else
		menuWindow = window.open("","menuWin", "scrollbars=yes,width=520,height=520");		
	menuWindow.focus();


	menuWindow.document.write("<HTML><HEAD><TITLE>Spice Market - Menu Item Viewer</TITLE><BODY STYLE='text-align:center;'><div style='margin:0px auto; width:482px;'><TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' STYLE='margin:0px auto;'><TR HEIGHT='30'>");
	menuWindow.document.write("<TD STYLE='cursor:pointer' ALIGN='right' WIDTH='475'VALIGN='center' onClick='javascript:window.close();'><FONT SIZE='2' face='Arial, Helvetica, sans-serif'><U><STRONG>close window</STRONG></U></TD><TD WIDTH='25' ALIGN='CENTER' STYLE='cursor:pointer' onClick='javascript:window.close();'><IMG SRC='images/close.jpg' width='19' height='19'></TD></TR></TABLE>");	
	menuWindow.document.write("<TABLE WIDTH='500' BORDER='0' CELLPADDING='5' CELLSPACING='0'><TR>");
	menuWindow.document.write("<TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR HEIGHT='20'>");
	menuWindow.document.write("<TD WIDTH='485' ALIGN='Left'><FONT face='Arial, Helvetica, sans-serif' style='margin-left:40px;'><STRONG>");
	menuWindow.document.write(menuText);
	menuWindow.document.write("</STRONG></FONT></TD><TR HEIGHT='6'><TD><FONT SIZE='1' FACE='Arial, Helvetica, sans-serif'style='margin-left:40px;'><EM>");
	menuWindow.document.write(menuDesc);
	menuWindow.document.write("</EM></FONT></TD></TR></TABLE>");
	menuWindow.document.write("</TR><TR><TD><P ALIGN='JUSTIFY' style='margin:5px 40px; 5px 0;'><FONT SIZE='2' FACE='SANS-SERIF'>Betel leaf is a popular spice in South East Asian cooking, with the leaves being used raw or cooked.  Traditional therapies have also used the betel leaf for the treatment of stomach ailments (digestive aid) & to fight infections (natural antibiotic).  Some evidence suggests that the humble betel leaves also have immune boosting as well as anti-cancer properties.</FONT></P></TD></TR><TR><TD ALIGN='CENTER' COLSPAN='3'><IMG SRC='");
	menuWindow.document.write(menuImage);
	menuWindow.document.write("'></TD></TR><TR>");
	menuWindow.document.write("<TD><P ALIGN='JUSTIFY'  style='margin:5px 40px; 5px 0;'><FONT SIZE='2' FACE='SANS-SERIF'>In Thailand, it is often used as a wrapping for a favourite snack using spiced minced meat complemented with an assortment of fillings, like peanuts, shrimps, shallots, lime and raw ginger.</FONT></P></TD></TR><TR>");
	menuWindow.document.write("<TD ALIGN='CENTER'><IMG SRC='images/bigBeefLeaf.jpg'></TD></TR><TR><TD><P ALIGN='JUSTIFY'  style='margin:5px 40px; 5px 0;'><FONT SIZE='2' FACE='SANS-SERIF'>Spice Market's Betel Leaf Parcel is prepared with spiced chicken breast mince and aubergine, complemented with fresh chilli, ginger, lemon, peanuts & topped with roasted coconut.   It's delicious & nutritious!</FONT></P></TD></TR><TR><TD COLSPAN='3' ALIGN='RIGHT'><P><FONT SIZE='2' FACE='SANS-SERIF'>Wichai 'Anthony' Prombuppa</FONT></P></TD></TR><TR>");	
	menuWindow.document.write("<TD ALIGN='center' BGCOLOR='#FFFEF2'><IMG SRC='images/ThaiWritingYellow.gif' WIDTH='482' HEIGHT='79'></TD></TR><TABLE></div></BODY></HTML>");
	menuWindow.document.close()
	}


/**********************************/
/* OPEN A NEW VIEW WINDOW FOR MAPS*/
/**********************************/
function newWindow3 (menuImage, menuText, menuDesc, winName)
	{
	if (browser == "ienew")
		menuWindow = window.open("",winName, "scrollbars=no,width=600,height=509");
	else
		menuWindow = window.open("",winName, "width=600,height=512");		
	menuWindow.focus();
	menuWindow.document.write("<HTML><HEAD><TITLE>Spice Market - Map Viewer</TITLE><BODY STYLE='margin:0px;'><TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR HEIGHT='30'><TD WIDTH='400' ALIGN='center'><FONT face='Arial, Helvetica, sans-serif'><STRONG>");
	menuWindow.document.write(menuText);
	menuWindow.document.write("</STRONG></FONT><BR><FONT SIZE='1' FACE='Arial, Helvetica, sans-serif'><EM>");
	menuWindow.document.write(menuDesc);
	menuWindow.document.write("</EM></FONT></TD><TD STYLE='cursor:pointer' ALIGN='right' WIDTH='175' VALIGN='middle' onClick='javascript:window.close();'><FONT SIZE='2' face='Arial, Helvetica, sans-serif'><U><STRONG>close window</STRONG></U></TD><TD WIDTH='25' ALIGN='center' STYLE='cursor:pointer' onClick='javascript:window.close();'><IMG SRC='images/close.jpg' width='19' height='19'></TD></TR><TR><TD COLSPAN='3'><IMG SRC='");
	menuWindow.document.write(menuImage);
	menuWindow.document.write("' width='600' height='400'></TD></TR><TR><TD COLSPAN='3' ALIGN='center' BGCOLOR='#FFFEF2'><IMG SRC='images/ThaiWritingYellow.gif' WIDTH='482' HEIGHT='79'></TD></TR><TABLE></BODY></HTML>");
		menuWindow.document.close();
	}

/***************************************/
/* MENU ITEM ROLLED OVER FUNCTIONALITY */
/***************************************/

	
function highlightItem(row,extrarow)
	{
	    //alert(row);
//  Change color of text	
	current_item=document.getElementById(row).style;	
	current_item.color="de0800";
//  Highlight both menu lines if more than 1
	if (extrarow > 1) 
		{
		current_item2 = document.getElementById(row+2).style;
		current_item2.color="de0800";
		}	
}


/***************************************************/
/* MENU ITEM RESTORE AFTER ROLL OVER FUNCTIONALITY */
/***************************************************/
function unHighlightItem(row,extrarow)
	{
	//  Change color of text	
	current_item=document.getElementById(row).style;
	current_item.color="485248";	
//  Unhighlight both menu lines if more than 1
	if (extrarow > 1) 
		{
		current_item2 = document.getElementById(row+2).style;
		current_item2.color="485248";
		}	

//  Replace temporary image with eye image
/*	dishnameObj2=document.getElementById('dishNameId');
	myImg = dishnameObj2.childNodes.item(0);
	myImg.src="images/eye-red.jpg";
	myImg.height="14";
	myImg.width="25";*/
//  Replace the dish text with the standard text
/*	myOT2 = dishnameObj2.childNodes.item(1);
	myText = document.createTextNode(standardMenuText);
	dishnameObj2.removeChild(myOT2);
	dishnameObj2.appendChild(myText);
//  Replace the menu picture with the standard one
	currentPicture=document.getElementById("menuImageId");
	currentPicture.src=standardImg.src*/
	}
	

/********************************/
/* STANDARD BEHAVIOUR FUNCTIONS */
/********************************/
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

