function GetVacancyList()
{
	var link = "VacancyList.aspx?PageID=0062";
	link += "&BusinessUnitID=" + document.getElementById("ddlBusinessUnit").value;				
	link += "&DivisionID=" + document.getElementById("ddlDivision").value;				
	link += "&CityID=" + document.getElementById("ddlLocation").value;
	window.location.href = link;
}

function WriteFlashCenter()
{
	document.write('<OBJECT codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"	height="166" width="329" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">\n');
	document.write('<PARAM NAME="_cx" VALUE="4763">\n');
	document.write('<PARAM NAME="_cy" VALUE="4868">\n');
	document.write('<PARAM NAME="FlashVars" VALUE="">\n');
	document.write('<PARAM NAME="Movie" VALUE="images/home2.swf">\n');
	document.write('<PARAM NAME="Src" VALUE="images/home2.swf">\n');
	document.write('<PARAM NAME="WMode" VALUE="Transparent">\n');
	document.write('<PARAM NAME="Play" VALUE="-1">\n');
	document.write('<PARAM NAME="Loop" VALUE="-1">\n');
	document.write('<PARAM NAME="Quality" VALUE="High">\n');
	document.write('<PARAM NAME="SAlign" VALUE="">\n');
	document.write('<PARAM NAME="Menu" VALUE="-1">\n');
	document.write('<PARAM NAME="Base" VALUE="">\n');
	document.write('<PARAM NAME="AllowScriptAccess" VALUE="">\n');
	document.write('<PARAM NAME="Scale" VALUE="ShowAll">\n');
	document.write('<PARAM NAME="DeviceFont" VALUE="0">\n');
	document.write('<PARAM NAME="EmbedMovie" VALUE="0">\n');
	document.write('<PARAM NAME="BGColor" VALUE="">\n');
	document.write('<PARAM NAME="SWRemote" VALUE="">\n');
	document.write('<PARAM NAME="MovieData" VALUE="">\n');
	document.write('<PARAM NAME="SeamlessTabbing" VALUE="1">\n');
	document.write('<PARAM NAME="Profile" VALUE="0">\n');
	document.write('<PARAM NAME="ProfileAddress" VALUE="">\n');
	document.write('<PARAM NAME="ProfilePort" VALUE="0">\n');
	document.write('<embed src="images/home2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" WMode="Transparent" width="329" height="166"></embed>\n');
	document.write('</OBJECT>\n');
}

function WriteFlashFooter()
{
	document.write('<OBJECT codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" height="100" width="1000" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID="Shockwaveflash1">\n');
	document.write('<PARAM NAME="_cx" VALUE="4763">\n');
	document.write('<PARAM NAME="_cy" VALUE="4868">\n');
	document.write('<PARAM NAME="FlashVars" VALUE="">\n');
	document.write('<PARAM NAME="Movie" VALUE="images/logo.swf">\n');
	document.write('<PARAM NAME="Src" VALUE="images/logo.swf">\n');
	document.write('<PARAM NAME="WMode" VALUE="Transparent">\n');
	document.write('<PARAM NAME="Play" VALUE="-1">\n');
	document.write('<PARAM NAME="Loop" VALUE="-1">\n');
	document.write('<PARAM NAME="Quality" VALUE="High">\n');
	document.write('<PARAM NAME="SAlign" VALUE="">\n');
	document.write('<PARAM NAME="Menu" VALUE="-1">\n');
	document.write('<PARAM NAME="Base" VALUE="">\n');
	document.write('<PARAM NAME="AllowScriptAccess" VALUE="">\n');
	document.write('<PARAM NAME="Scale" VALUE="ShowAll">\n');
	document.write('<PARAM NAME="DeviceFont" VALUE="0">\n');
	document.write('<PARAM NAME="EmbedMovie" VALUE="0">\n');
	document.write('<PARAM NAME="BGColor" VALUE="">\n');
	document.write('<PARAM NAME="SWRemote" VALUE="">\n');
	document.write('<PARAM NAME="MovieData" VALUE="">\n');
	document.write('<PARAM NAME="SeamlessTabbing" VALUE="1">\n');
	document.write('<PARAM NAME="Profile" VALUE="0">\n');
	document.write('<PARAM NAME="ProfileAddress" VALUE="">\n');
	document.write('<PARAM NAME="ProfilePort" VALUE="0">\n');
	document.write('<embed src="images/logo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" WMode="Transparent" width="1000" height="100"> </embed>\n');
	document.write('</OBJECT>\n');	
}

var step = 0;
var minstep = 1;
var maxstep = 13;
var imgText = new Array("Brainstorming in one of our meeting rooms.", "A quick discussion between team mates.", "Members of the fashion and footwear division discuss trends.", "A Starbucks outlet inside the headoffice premises.", "The Starbucks finance team having a discussion over coffee.", "The Casual Dining team has a number of products on display in their office.", "The trainer helps staff understand new trends in retail.", "Our office assistants are always there for a good cup of tea.", "Members of central HR discuss new recruitment initiatives.", "The accounting team crunching numbers.", "A large covered parking lot is available for staff.", "Our canteen hands out delicious, healthy meals.", "Chefs serve the staff with a smile.");
var imgpath = "images/alshaya_office ($).jpg";

function slideit(next)
{
	if (next == null)
		next = true;
	
	var imagePath;

	if (next)	
	{
		if (step < maxstep)
			step++;						
	}
	else
	{
		if (step >= minstep)
			step--;						
	}				

	document.getElementById("step").src = imgpath.replace("$",step);
	
	var divImageText = document.getElementById("imageText");
	if(divImageText.innerText == null) 
		divImageText.textContent = imgText[step-1];
	else
		divImageText.innerText = imgText[step-1];
					
	if (step == minstep)
	{
		document.getElementById("slideshowprevious").style.display = 'none';
	}
	else if(step == maxstep)
	{
		document.getElementById("slideshownext").style.display = 'none';
	}
	else 
	{
		document.getElementById("slideshownext").style.display = 'block';
		document.getElementById("slideshowprevious").style.display = 'block';
	}	
}

function PreloadOfficeImages()
{
	if(document.getElementById("step") != null)
	{
		var arguments = new Array("images/alshaya_office (1).jpg", "images/alshaya_office (2).jpg", "images/alshaya_office (3).jpg", "images/alshaya_office (4).jpg", "images/alshaya_office (5).jpg", "images/alshaya_office (6).jpg", "images/alshaya_office (7).jpg", "images/alshaya_office (8).jpg", "images/alshaya_office (9).jpg", "images/alshaya_office (10).jpg", "images/alshaya_office (11).jpg", "images/alshaya_office (12).jpg", "images/alshaya_office (13).jpg", "images/alshaya_office (14).jpg", "images/alshaya_office (15).jpg");
		for(var i = 0; i<arguments.length; i++)
		{
			jQuery("<img>").attr("src", arguments[i]);
		}
	}
}

function GM_swapImgRestore() { //v3.0
  var i,x,a=document.GM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function GM_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=GM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function GM_swapImage() { //v3.0
  var i,j=0,x,a=GM_swapImage.arguments; document.GM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=GM_findObj(a[i]))!=null){document.GM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
