
//LEFT HEADER IMAGES SETUP - Images Used in each area
imagecount2					= new Array();
imagecount2["news"]			= 1;
imagecount2["recruitment"]	= 2;
imagecount2["automation"]	= 6;

// DO NOT EDIT BELOW HERE //






function showPhoto(obj){
	gp					= document.getElementById("galleryPopup");
	pd					= document.getElementById("project_detail");
	pt					= document.getElementById("project_title");
	
	thumb				= obj.src;
	thumb				= thumb.replace("_s.","_m.");
	big					= thumb.replace("_m.",".");
	
	pd.style.display	=	"none";
	pt.style.display	=	"none";
	gp.innerHTML="<div class='box'><h3>"+obj.alt+"</h3><div class='btleft'><div class='btright'>&nbsp;</div></div><div class='bmain'><div class='binner'><img src='"+thumb+"' alt='"+obj.alt+"' class='image' /><br /><a href='Javascript:hidePhoto()'>Project Details</a> | <a href='"+big+"'>Larger Version</a></div></div><div class='bbleft'><div class='bbright'>&nbsp;</div></div></div>";
	gp.style.display	=	"block";
}

function hidePhoto(){
	gp					= document.getElementById("galleryPopup");
	pd					= document.getElementById("project_detail");
	pt					= document.getElementById("project_title");

	gp.style.display	= "none";
	pd.style.display	= "block";
	pt.style.display	= "block";
}


//Create Ranom Left Hand Image 
function randomLeftImage(keyword){
	rli							= document.getElementById("tpl_topbar");

	keyword = keyword.toLowerCase();

	//Decide how many images are available to randomize depending on keyword.
	imgnum = imagecount2[keyword];

	var randomnumber			= (Math.floor(Math.random()*imgnum)) + 1;
	rli.style.backgroundImage	= "url('/images/photo_left_"+keyword+"_"+randomnumber+".jpg')";
}


//Show and Hide Job Details
function showJobDetails(id,obj){
	bit = document.getElementById("jd_"+id);
	if(bit.style.display == "none"){
		bit.style.display = "block";
		document.getElementById("jdi_"+id).innerHTML = "Hide Details";
	}else{
		bit.style.display = "none";
		document.getElementById("jdi_"+id).innerHTML = "Show Details";
	}
}