// JavaScript Document

var action = '';

var people = Array();
people[0] = new Image;
people[1] = new Image;
people[2] = new Image;
people[3] = new Image;
people[4] = new Image;
people[5] = new Image;
people[6] = new Image;
people[7] = new Image;
people[8] = new Image;
people[9] = new Image;

people[0].src = 'IM_Custom/ContentStore/Layouts/Images/expertiseBig.gif';
people[1].src = 'IM_Custom/ContentStore/Layouts/Images/expertiseSmall.gif';
people[2].src = 'IM_Custom/ContentStore/Layouts/Images/peopleBig.gif';
people[3].src = 'IM_Custom/ContentStore/Layouts/Images/peopleSmall.gif';
people[4].src = 'IM_Custom/ContentStore/Layouts/Images/opportunitiesBig.gif';
people[5].src = 'IM_Custom/ContentStore/Layouts/Images/opportunitiesSmall.gif';
people[6].src = 'IM_Custom/ContentStore/Layouts/Images/embraceBig.gif';
people[7].src = 'IM_Custom/ContentStore/Layouts/Images/embraceSmall.gif';
people[8].src = 'IM_Custom/ContentStore/Layouts/Images/contactBig.gif';
people[9].src = 'IM_Custom/ContentStore/Layouts/Images/contactSmall.gif';

function enlargeMe(object){
	document.getElementById(object).src = 'IM_Custom/ContentStore/Layouts/Images/'+object+'Big.gif';
	action = 'enlarge'+object;
	enlarge(object);
}

function enlarge(object){

	if(action != 'enlarge'+object){
		return false;
	}

	var width = document.getElementById(object).offsetHeight;
	var height = document.getElementById(object).offsetHeight;
	
	var newWidth = width+10;
	var newHeight = height+10;
		
	document.getElementById(object).style.width = newWidth+'px';
	document.getElementById(object).style.height = newHeight+'px';
	
	if(width < 190){
		var t = setTimeout("enlarge('"+object+"')",1);
	}
}

//==============================================================================================================================================================================================
//==============================================================================================================================================================================================

function shrinkMe(object){
	action = 'shrink';
	shrink(object);
	document.getElementById(object).src = 'IM_Custom/ContentStore/Layouts/Images/'+object+'Small.gif';
}

function shrink(object){
	
	var width = document.getElementById(object).offsetHeight;
	var height = document.getElementById(object).offsetHeight;
	
	var newWidth = width-10;
	var newHeight = height-10;
		
	document.getElementById(object).style.width = newWidth+'px';
	document.getElementById(object).style.height = newHeight+'px';
	
	if(width > 170){
		var t = setTimeout("shrink('"+object+"')",1);
	}
}

//==============================================================================================================================================================================================
//==============================================================================================================================================================================================
//==============================================================================================================================================================================================
//==============================================================================================================================================================================================

var menuImages = Array();
menuImages[0] = new Image;
menuImages[1] = new Image;
menuImages[2] = new Image;
menuImages[3] = new Image;
menuImages[4] = new Image;
menuImages[5] = new Image;
menuImages[6] = new Image;
menuImages[7] = new Image;
menuImages[8] = new Image;
menuImages[9] = new Image;

menuImages[0].src = 'IM_Custom/ContentStore/Layouts/Images/menu/expertiseBig.gif';
menuImages[1].src = 'IM_Custom/ContentStore/Layouts/Images/menu/expertiseSmall.gif';
menuImages[2].src = 'IM_Custom/ContentStore/Layouts/Images/menu/peopleBig.gif';
menuImages[3].src = 'IM_Custom/ContentStore/Layouts/Images/menu/peopleSmall.gif';
menuImages[4].src = 'IM_Custom/ContentStore/Layouts/Images/menu/opportunitiesBig.gif';
menuImages[5].src = 'IM_Custom/ContentStore/Layouts/Images/menu/opportunitiesSmall.gif';
menuImages[6].src = 'IM_Custom/ContentStore/Layouts/Images/menu/embraceBig.gif';
menuImages[7].src = 'IM_Custom/ContentStore/Layouts/Images/menu/embraceSmall.gif';
menuImages[8].src = 'IM_Custom/ContentStore/Layouts/Images/menu/contactBig.gif';
menuImages[9].src = 'IM_Custom/ContentStore/Layouts/Images/menu/contactSmall.gif';

function enlargeMe2(object){
	document.getElementById(object).src = 'IM_Custom/ContentStore/Layouts/Images/menu/'+object+'Big.gif';
	action = 'enlarge'+object;
	enlarge2(object);
}

function enlarge2(object){

	if(action != 'enlarge'+object){
		return false;
	}

	var width = document.getElementById(object).offsetHeight;
	var height = document.getElementById(object).offsetHeight;
	
	var newWidth = width+5;
	var newHeight = height+5;
		
	document.getElementById(object).style.width = newWidth+'px';
	document.getElementById(object).style.height = newHeight+'px';
	
	if(width < 115){
		var t = setTimeout("enlarge2('"+object+"')",1);
	}
}

//==============================================================================================================================================================================================
//==============================================================================================================================================================================================

function shrinkMe2(object){
	action = 'shrink'+object;
	shrink2(object);
	document.getElementById(object).src = 'IM_Custom/ContentStore/Layouts/Images/menu/'+object+'Small.gif';
}

function shrink2(object){
	
	var width = document.getElementById(object).offsetHeight;
	var height = document.getElementById(object).offsetHeight;
	
	var newWidth = width-5;
	var newHeight = height-5;
		
	document.getElementById(object).style.width = newWidth+'px';
	document.getElementById(object).style.height = newHeight+'px';
	
	if(width > 105){
		var t = setTimeout("shrink2('"+object+"')",1);
	}
}
