	//mouseover
	function td_o_m_ovr(oObject,sLevel) {
//		alert(oObject.className);
//		alert(sLevel);
		if (sLevel == '1') {
//			alert("case1");
			oObject.className="TDNML1o"
		} else {
//			alert("case2");
			oObject.className="TDNML2o"
		}
	}	

	//mouseout
	function td_o_m_out(sName,sLevel) {
		if (sLevel == "1") {
			sName.className="TDNML1"
		} else {
			sName.className="TDNML2"
		}
	}	

//--REMARKS-------------------------------------------------------------------------------------------------------------------------
// 
// It is very important to understand the structure of the site that you want to show.
// Here it is assumed that you have 1 main menu and 1 submenu for each element in the mainmenu
// 		(It is fairly easy to add even more submenus but this makes perceived navigation complex)
// The amount of elements in the main and sub is not subject to any assumptions
// When redesigning the menu structure, please adapt MainMenuToShowIs() and MenuElementToExpandIs()
//
// Remarks: When adding, modifying or deleting elements, please update in strMainMenu and MenuElementToExpandIs(me);
// For file system compatibility, please use only letters, numbers (no spaces or special characters)
//
// Remarks: please update the 'intMaxSupportedFileNameLength' variable if necessary
//
// Used Javascript syntax elements: document.images, document.layers, document.write(),
//
//----------------------------------------------------------------------------------------------------------------------------------

NS4=document.layers;

//stuff for a document structure: passive table on the top, active menu bar on the left and active page content on the right
strTop="<table cellspacing=0 cellpadding=0 border=0><tr><td><img src='../img/TB1.gif' border=0 alt='' onmouseover=''alert(1);''></td><td><table cellspacing=0 cellpadding=0 border=0><tr><td><img src='../img/TB2.gif' border=0 height='14' width='86' alt=''></td></tr><tr><td><A href='de/Bot.html' target='Bot' onmouseover=''swpImg('PDs','../img/TBsy.gif');'' onmouseout=''swpImg('PDs','../img/TBsn.gif');'' onmousedown=''deselectAll();' onmouseup=''swpImg('PD','../img/TBD_.gif');''><img alt='' border=0 name=PDs src='../img/TBsn.gif'><img alt='' border=0 name=PD src='../img/TBD.gif'></a></td></tr><tr><td><A href='fr/bot.html' target='Bot' onmouseover=''swpImg('PFs','../img/TBsy.gif');'' onmouseout=''swpImg('PFs','../img/TBsn.gif');'' onmousedown=''deselectAll();'' onmouseup=''swpImg('PF','../img/TBF_.gif');''><img alt='' border=0 name=PFs src='../img/TBsn.gif'><img alt='' border=0 name=PF src='../img/TBF.gif'></a></td></tr><tr><td><A href='en/Bot.html' target='Bot' onmouseover=''swpImg('PEs','../img/TBsy.gif');'' onmouseout=''swpImg('PEs','../img/TBsn.gif');'' onmousedown=''deselectAll();'' onmouseup=''swpImg('PE','../img/TBE_.gif');''><img alt='' border=0 name=PEs src='../img/TBsn.gif'><img alt='' border=0 name=PE src='../img/TBE.gif'></a></td></tr><tr><td><img src='../img/TB2.gif' border=0 height='14' width='86' alt=''></td></tr></table></td><td><img src='../img/TB3.gif' border=0 alt=''></td></tr></table>"
strStart="<a name='topofpage'></a><table cellpadding=0 cellspacing=0 border=0 ><tr bgcolor='#FFFFFF'><td><img src='img/topleft3.gif' border=0></td><td width=100% BACKGROUND='img/topmid3.gif'></td><td><a href='http://www.emalaya.com/'><img src='img/topright3.gif' border=0></a></td></tr></table><table cellpadding=0 cellspacing=0 border=0><tr><td valign=top><img src='sp.gif' width=150 height=0 border=0><br>";
strStartEMA="<table cellpadding=0 cellspacing=0 border=0 ><tr bgcolor='#FFFFFF'><td><img src='img/topleft.gif' border=0></td><td width=100%></td><td><img src='img/topright.gif' border=0></td></tr></table><table cellpadding=0 cellspacing=0 border=0><tr><td valign=top><img src='sp.gif' width=150 height=0 border=0><br>";
strStartDNS="<table cellpadding=0 cellspacing=0 border=0 ><tr bgcolor='#0099FF'><td><img src='img/topleft.jpg' border=0></td><td width=100%></td><td><img src='img/topright.jpg' border=0></td></tr></table><table cellpadding=0 cellspacing=0 border=0><tr><td valign=top><img src='sp.gif' width=150 height=0 border=0><br>";
strMenuToPage="</td><td><img src='sp.gif' width=25 height=0 border=0></td><td width=100% valign=top><img src='sp.gif' width=100 height=0 border=0><br>";
strPageToLinks="</td><td valign=top><img src='sp.gif' width=150 height=0 border=0><br><table cellpadding=0 cellspacing=0 border=0><tr><td colspan=2><img src='img/sp.gif' width=150 height=20 border=0><br></td></tr>";
strEnd="</table></td></tr></table><hr color=#DDDDDD><table cellpadding=0 cellspacing=0 border=0><tr><td><a href='#topofpage'><img src='img/returntotop.gif' border=0></a></td><td width=100%></td><td><img src='img/copyrightemalaya.gif' border=0><img src='img/sp.gif' width=20 height=1 border=0></td></tr></table>";
//stuff for a document structure: passive table on the top, active menu bar on the left and active page content on the right

strMenu="";
strPageContent="";
strLinkedDocuments="";

//----------------------------------------------------------------------------------------------------------------------------------
intMaxSupportedFileNameLength = 100;	// For +1/-1 errors, make it bigger then you will actually use

//----------------------------------------------------------------------------------------------------------------------------------
// Math functions
function IsOdd(i) {	if ((i/2)==Math.round(i/2)) { return "NO"} else { return "YES" } }
function TellOdd(i) { if ((i/2)==Math.round(i/2)) { alert("IsOdd("+i+")=No")} else { alert("IsOdd("+i+")=Yes") } }
function TellEven(i) { if ((i/2)==Math.round(i/2)) { alert("IsEven("+i+")=Yes")} else { alert("IsEven("+i+")=No") } }
//----------------------------------------------------------------------------------------------------------------------------------
// String manipulations
function MakeInternalREF(strIn,href) { strIn="<A HREF=#"+href+strIn+"</a>";	return strIn; }
function MakeExternalREF(strIn,href) { strIn="<A HREF="+href+strIn+"</a>"; return strIn; }

//--ACTUAL CONTENT FUNCTIONS CALLED BY THE PAGE EDITOR------------------------------------------------------------------------------
function StartPage() {
	//alert("Entering StartPage()");
	document.write(strStart);
}

function StartPageContent() {
	//alert("Entering StartPageContent()");
	document.write(strMenuToPage);
}

function StartLinksSection() {
	//alert("Entering StartLinksSection()");
	document.write(strPageToLinks);
}

function EndPage() {
	//alert("Entering EndPage()");
	document.write(strEnd);
}

//----------------------------------------------------------------------------------------------------------------------------------				
function CheckFrameBeingOnTop() {
	if (window != top) { top.location.href = document.location;	}
}

//----------------------------------------------------------------------------------------------------------------------------------				
function ShowTop() {
	//alert("Entering ShowTop()");
	//alert(strTop);
	document.write(strTop);
	//alert("Leaving ShowTop()");
}

//--MAINMENU FUNCTIONS--------------------------------------------------------------------------------------------------------------				
function AddMainMenuElement(strDescription,strReference) {
	strMenu=strMenu+"<img SRC='img/sp.gif' height=15 width=1 border=0><br><table cellspacing=0 cellpadding=0 border=0><tr><td><img SRC='img/sp.gif' height=1 width=10 border=0></td><td><A HREF='"+strReference+"' style='text-decoration: none'><font FACE='Book Antiqua, Times New Roman, Serif' SIZE='-1' color='#666666'><b>"+strDescription+"</b></font></a></td></tr></table>";
}

function AddSubMenuElement(strDescription,strReference) {
	strMenu=strMenu+"<img SRC='img/sp.gif' height=15 width=1 border=0><br><table cellspacing=0 cellpadding=0 border=0><tr><td><img SRC='img/sp.gif' height=1 width=20 border=0></td><td><A HREF='"+strReference+"' style='text-decoration: none'><font FACE='Book Antiqua, Times New Roman, Serif' SIZE='-2' color='#666666'><b>"+strDescription+"</b></font></a></td></tr></table>";
//<a href="finsvcs.htm" style="text-decoration: none"><font FACE="Verdana,Arial,Helvetica" SIZE="-2"><b>Financial Services</b></font></a>
}

// This is a crucial part in the customer's website! Please, print out this part and refer to it at all times when adding
// or modifying the customer's folder structure! Note that uppercase/lowercase naming is very important as only correct naming will
// ensure that the correct submenu is expanded and that the correct files are linked. This is the central part that describes
// the document structure!
function BuildMenu(strMenuToExpand) {
	//alert("Entering BuildMenu()");
	AddMainMenuElement("Introduction","introduction.html");
	AddMainMenuElement("Open Supply Chain","opensupplychain.html");
	AddMainMenuElement("SAP Integration","sapintegration.html");
	if (strMenuToExpand=="SAP Integration") {
		AddSubMenuElement("Web & BAPI","sapintegration_1.html");
		AddSubMenuElement("SAP ITS","sapintegration_2.html");
	}
	AddMainMenuElement("Open B2B","openb2b.html");
	if (strMenuToExpand=="Open B2B") {
		AddSubMenuElement("Process","openb2b_1.html");
		AddSubMenuElement("Functionalities","openb2b_2.html");
		AddSubMenuElement("Technical Environment","openb2b_3.html");
	}
	AddMainMenuElement("Open Info","openinfo.html");
	if (strMenuToExpand=="Open Info") {
		AddSubMenuElement("SAP Web Reporting using ITS","openinfo_1.html");
		AddSubMenuElement("Web enabled data warehouse","openinfo_2.html");
	}
	AddMainMenuElement("Open B2C","openb2c_1.html"); //For the moment there is not enough info to fill a page!
	if (strMenuToExpand=="Open B2C") {
		AddSubMenuElement("Market Challenges","openb2c_1.html");
		AddSubMenuElement("Emalaya's commitments","openb2c_2.html");
	}
	AddMainMenuElement("Slideshow","slideshow.html");
	if (strMenuToExpand=="Slideshow") {
		AddSubMenuElement("Start","slide1.html");
		AddSubMenuElement("Emalaya","slide4.html");
		AddSubMenuElement("Solutions","slide10.html");
		AddSubMenuElement("Open B2B","slide16.html");
		AddSubMenuElement("Open Info","slide29.html");
		AddSubMenuElement("Open B2C","slide36.html");
	}
	AddMainMenuElement("Demonstration","Demonstration.html");
}

function ShowMenu(strMenuElementToExpand) {
	//alert("Entering ShowMenu()");
	//alert(strMenu);
	document.write(strMenu);
}

//--PAGE CONTENT DISPLAY FUNCTIONS--------------------------------------------------------------------------------------------------------
function ShowPageContent() {
	document.write(strPageContent);
}

function ShowLinkedSection() {
	document.write(strLinkedDocuments);
}

//--PAGE CONTENT MANIPULATION FUNCTIONS---------------------------------------------------------------------------------------------------
function AddBreak() {
	//alert("Entering AddBreak()");
	strPageContent=strPageContent+"<br>";
}

function AddPageTitle(strTitle) {
	//alert("Entering AddPageTitle()");
	strPageContent=strPageContent+"<font FACE='Book Antiqua, Times New Roman, Serif' ><SPAN CLASS=PageTitle>"+strTitle+"</SPAN></FONT><br>";
	if (NS4) strPageContent=strPageContent+"<br>"; // in the stylesheet there is an extra space defined but NS doesn't do this
}

function AddParagraphTitle(strTitle) {
	//alert("Entering AddParagraphTitle()");
	strPageContent=strPageContent+"<font FACE='Book Antiqua, Times New Roman, Serif' SIZE='-1'><SPAN CLASS=ParagraphTitle>"+strTitle+"</SPAN></FONT><br>";
	if (NS4) strPageContent=strPageContent+"<br>"; // in the stylesheet there is an extra space defined but NS doesn't do this
}

function AddExecutiveSummary(strSummary) {
	//alert("Entering AddParagraphTitle()");
	strPageContent=strPageContent+"<font FACE='Book Antiqua, Times New Roman, Serif' SIZE='-1'><SPAN CLASS=ExecutiveSummary><B>"+strSummary+"</b></SPAN></FONT><br>";
	if (NS4) strPageContent=strPageContent+"<br>"; // in the stylesheet there is an extra space defined but NS doesn't do this
}

function AddIndentedParagraph(intLevel,strAdd) {
	//alert("Entering AddIndentedParagraph()");
	extraSpacing=intLevel*10+10;
	strPageContent=strPageContent+"<TABLE cellspacing='0' cellpadding='0' border='0' bgcolor=white><TR width=497><td width="+extraSpacing+"><img SRC='gif\\sp.gif' width="+extraSpacing+"></td><td>";
	AddParagraph(strAdd);
	strPageContent=strPageContent+"</td></tr></table>";
}

function AddParagraph(strAdd) {
	//alert("Entering AddParagraph()");
	AddText(strAdd);
	AddBreak();
}

function AddCapitalizedParagraph(strAdd) {
	//alert("Entering AddCapitalizedParagraph()");
	strCap=strAdd.charAt(0);
	strAdd=strAdd.substring(1,strAdd.length);
	strPageContent=strPageContent+"<font FACE='Book Antiqua, Times New Roman, Serif' SIZE='+1'><b>"+strCap+"</b></font><font FACE='Book Antiqua, Times New Roman, Serif' SIZE='-1'><SPAN CLASS=MyText>"+strAdd+"</span></font>";
	AddBreak();
}

function AddText(strAdd) {
	//alert("Entering AddText()");
	strPageContent=strPageContent+"<font FACE='Book Antiqua, Times New Roman, Serif' SIZE='-1'><SPAN CLASS=MyText>"+strAdd+"</SPAN></FONT>";
}

function AddPicture(strPicture) {
	//alert("Entering AddPicture()");
	strPageContent=strPageContent+"<center><img SRC='../img/"+strPicture+"' width=410></center>"
}

function AddCenteredPicture(strFileName) {
	//alert("Entering AddPicture("+strFileName+")");
	strPageContent=strPageContent+"<CENTER><img SRC='img/"+strFileName+"'></center><br>";
}

//--SPECIFIC DOCUMENT ELEMENT FUNCTIONS------------------------------------------------------------------------------------------------
function CheckFrameBeingOnTop() {
	if (window != top) { top.location.href = document.location;	}
}

//--SPECIFIC DOCUMENT ELEMENT FUNCTIONS------------------------------------------------------------------------------------------------

function AddInternalAnchor(strTarget) {
	//alert("Entering AddInternalAnchor()");
	strPageContent=strPageContent+"<A NAME='#"+strTarget+"'>";
}

function AddInternalJumppoint(strTarget,strDescription) {
	//alert("Entering AddInternalJumppoint()");
	strPageContent=strPageContent+"<img SRC='img/BlueArrow.gif'><A HREF='#"+strTarget+"'><font FACE='Book Antiqua, Times New Roman, Serif' SIZE='-1'><SPAN CLASS=MyText>"+strDescription+"</SPAN></FONT></A><br>";
}

//--SPECIFIC LOCAL FUNCTIONS FOR SPECIFIC PAGES-------------------------------------------------------------------------------------
	if (document.images) {
		P1 = new Image(595,90); P1.src = "img/clubfarah.gif";
		P1i = new Image(595,90); P1i.src = "img/ClubFarah_.gif";
		P2 = new Image(595,90); P2.src = "img/aboutus.gif";
		P2i = new Image(316,40); P2i.src = "img/aboutus_.gif";
		P3 = new Image(595,90); P3.src = "img/ourhorses.gif";
		P3i = new Image(316,40); P3i.src = "img/OurHorses_.gif";
		P4 = new Image(595,90); P4.src = "img/ridingtreks.gif";
		P4i = new Image(316,40); P4i.src = "img/RidingTreks_.gif";
		P5 = new Image(595,90); P5.src = "img/royalcities.gif";
		P5i = new Image(316,40); P5i.src = "img/RoyalCities_.gif";
		P6 = new Image(595,90); P6.src = "img/westsahara.gif";
		P6i = new Image(316,40); P6i.src = "img/WestSahara_.gif";
		P7 = new Image(595,90); P7.src = "img/sabledor.gif";
		P7i = new Image(316,40); P7i.src = "img/SableDOr_.gif";
		P8 = new Image(595,90); P8.src = "img/middleatlas.gif";
		P8i = new Image(316,40); P8i.src = "img/MiddleAtlas_.gif";
		P9 = new Image(595,90); P9.src = "img/antiatlas.gif";
		P9i = new Image(316,40); P9i.src = "img/AntiAtlas_.gif";
		PA = new Image(595,90); PA.src = "img/ouarzazate.gif";
		PAi = new Image(316,40); PAi.src = "img/Ouarzazate_.gif";
		PB = new Image(595,90); PB.src = "img/oasetalifalelt.gif";
		PBi = new Image(316,40); PBi.src = "img/OaseTalifalelt_.gif";
		PC = new Image(595,90); PC.src = "img/stationary.gif";
		PCi = new Image(316,40); PCi.src = "img/Stationary_.gif";
		PD = new Image(595,90); PD.src = "img/holidays.gif";
		PDi = new Image(316,40); PDi.src = "img/Holidays_.gif";
		PE = new Image(595,90); PE.src = "img/courses.gif";
		PEi = new Image(316,40); PEi.src = "img/Courses_.gif";
		PF = new Image(595,90); PF.src = "img/questions.gif";
		PFi = new Image(316,40); PFi.src = "img/Questions_.gif";
		PG = new Image(595,90); PG.src = "img/climate.gif";
		PGi = new Image(316,40); PGi.src = "img/Climate_.gif";
		PH = new Image(595,90); PH.src = "img/conditions.gif";
		PHi = new Image(316,40); PHi.src = "img/contactus_.gif";
		PI = new Image(595,90); PI.src = "img/contactus.gif";
		PIi = new Image(316,40); PIi.src = "img/contactus_.gif";
    }

	//mouseover
	function o_m_ovr(id, newSrc) {
		var theImage = FindImage(document, id, 0);
		if (theImage.src.indexOf("nbs_")>0) {
			//nothing
		} else {
			swpImg(id, newSrc)
		}
	}	

	//mouseout
	function o_m_out(id, newSrc) {
		var theImage = FindImage(document, id, 0);
		if (theImage.src.indexOf("nbs_")>0) {
			//nothing
		} else {
			swpImg(id, newSrc)
		}
	}	

	// The source of object "id" will be replaced with "newSrc"
	function swpImg(id, newSrc) {
		//alert("Entering SwapImage");
//		alert(newSrc);
		var theImage = FindImage(document, id, 0);
		if (theImage) {
			theImage.src = newSrc;
		}
	}

	// The source of object "id" will be replaced with "newSrc"
	function FindImage(doc, name, j) {
		var theImage = false;
		if (doc.images) {
			theImage = doc.images[name];
		}
		if (theImage) {
			return theImage;
		}
		if (doc.layers) {
			for (j = 0; j < doc.layers.length; j++) {
				theImage = FindImage(doc.layers[j].document, name, 0);
				if (theImage) {
					return (theImage);
				}
			}
		}
		return (false);
	}

	// Return all images to their default state
	function deselectAll() {
		// alert("Entering DeselectAll");
		swpImg('clubfarah',"img/nbn_clubfarah.gif");
		swpImg('aboutus',"img/nbn_aboutus.gif");
		swpImg('ourhorses',"img/nbn_ourhorses.gif");
		swpImg('ridingtreks',"img/nbn_ridingtreks.gif");
		swpImg('royalcities',"img/nbn_royalcities.gif");
		swpImg('westsahara',"img/nbn_westsahara.gif");
		swpImg('sabledor',"img/nbn_sabledor.gif");
		swpImg('middleatlas',"img/nbn_middleatlas.gif");
		swpImg('antiatlas',"img/nbn_antiatlas.gif");
		swpImg('ouarzazate',"img/nbn_ouarzazate.gif");
		swpImg('oasetalifalelt',"img/nbn_oasetalifalelt.gif");
		swpImg('stationary',"img/nbn_stationary.gif");
		swpImg('holidays',"img/nbn_holidays.gif");
		swpImg('courses',"img/nbn_courses.gif");
		swpImg('questions',"img/nbn_questions.gif");
		swpImg('climate',"img/nbn_climate.gif");
		swpImg('conditions',"img/nbn_conditions.gif");
		swpImg('contactus',"img/nbn_contactus.gif");
	}
	
		// Return all images to their default state
	function deselectAllTop() {
		// alert("Entering deselectAllTop");
		swpImg('PD',"img/tbd.gif");
		swpImg('PF',"img/tbf.gif");
		swpImg('PE',"img/tbe.gif");
	}

function TickAll() {
	bFirstValueFound=false;
	bFirstValue=false;
	intObjectCounter=0;
	for (oObject in document.theForm.all) {
		if (document.theForm[oObject]) {
			if (document.theForm[oObject].type) {
				if (document.theForm[oObject].type=="checkbox") {
					if (document.theForm[oObject].name.substring(0,3)=="an_") {
						intObjectCounter++;
						if (!bFirstValueFound) {
							bFirstValue=document.theForm[oObject].checked;
							bFirstValueFound=true;
						}
						document.theForm[oObject].checked=!bFirstValue;
					}
				}
			}
		}
	}
	theForm.AllNoneSelector.checked = !bFirstValue;
	return intObjectCounter;
}

function SubmitFor(sAction) {
	document.theForm.batchJob.value=sAction;
//	if (confirm("Are you sure you want to "+sAction.toUpperCase()+ " items in batch?")) {
		document.theForm.submit();
//	}
}

function SubmitForm(oForm,sLanguage) {
//	alert(oForm);
	var pass=true;
	for (i=0;i<oForm.length;i++) {
		var tempobj=oForm.elements[i]
		if (tempobj.name.substring(0,8)=="required") {
			if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)) {
//				alert(tempobj.name);
				pass=false;
				break;
			}
		}
	}
	if (!pass){
		switch (sLanguage) {
			case "en" :
				alert("One or more of the required form-elements are not completed.\nPlease verify them, then submit again!");
				break;
			case "fr" :
				alert("Un ou plusieurs des forme-éléments exigés n'est pas accompli. Veuillez les vérifier, soumettent alors encore.");
				break;
			case "de" :
				alert("Man oder mehr der angeforderten Form-Elemente werden nicht durchgeführt. Überprüfen Sie sie bitte, einreichen dann wieder!");
				break;
		}
		tempobj.focus();
		return false;
	} else {
		oForm.submit();
		return true;
	}
}

function PopupImageCustomSize(strURL,sWidth,sHeight) {
	window.open(strURL,"","top=100,left=100,height=" + sHeight + ",width=" + sWidth + ",toolbar=no,menubar=no,location=no");
}

function PopupImage(strURL) {
	window.open(strURL,"","top=100,left=100,height=420,width=660,toolbar=no,menubar=no,location=no");
}