
/* function to swap image on mouse_over or mouse_out using the images id - put in file called emi.js  */
		function pic_show(name, id) {
  			document.getElementById(id).src= "" + name;
		}
		
		function set_backgrounds(name1, name2, name3, name4) {
  			document.getElementById("home_view_" + name1).style.backgroundImage="url(on_view_background.png)";
			
			document.getElementById("home_view_" + name2).style.backgroundImage="url(off_view_background.png)";
			document.getElementById("home_view_" + name3).style.backgroundImage="url(off_view_background.png)";
			document.getElementById("home_view_" + name4).style.backgroundImage="url(off_view_background.png)";
		}
		
		


/*functions for top of page navigation links */

var mmOpenContainer = null;
var mmOpenMenus = null;
var mmHideMenuTimer = null;

function MM_menuStartTimeout(hideTimeout) {
	mmHideMenuTimer = setTimeout("MM_menuHideMenus()", hideTimeout);	
}

function MM_menuHideMenus() {
	MM_menuResetTimeout();
	if(mmOpenContainer) {
		var c = document.getElementById(mmOpenContainer);
		c.style.visibility = "inherit";
		mmOpenContainer = null;
	}
	if( mmOpenMenus ) {
		for(var i = 0; i < mmOpenMenus.length ; i++) {
			var m = document.getElementById(mmOpenMenus[i]);
			m.style.visibility = "hidden";			
		}
		mmOpenMenus = null;
	}
}

function MM_menuHideSubmenus(menuName) {
	if( mmOpenMenus ) {
		var h = false;
		var c = 0;
		for(var i = 0; i < mmOpenMenus.length ; i++) {
			if( h ) {
				var m = document.getElementById(mmOpenMenus[i]);
				m.style.visibility = "hidden";
			} else if( mmOpenMenus[i] == menuName ) {
				h = true;
			} else {
				c++;
			}
		}
		mmOpenMenus.length = c+1;
	}
}

function MM_menuOverMenuItem(menuName, subMenuSuffix) {
	MM_menuResetTimeout();
	MM_menuHideSubmenus(menuName);
	if( subMenuSuffix ) {
		var subMenuName = "" + menuName + "_" + subMenuSuffix;
		MM_menuShowSubMenu(subMenuName);
	}
}

function MM_menuShowSubMenu(subMenuName) {
	MM_menuResetTimeout();
	var e = document.getElementById(subMenuName);
	e.style.visibility = "inherit";
	if( !mmOpenMenus ) {
		mmOpenMenus = new Array;
	}
	mmOpenMenus[mmOpenMenus.length] = "" + subMenuName;
}

function MM_menuResetTimeout() {
	if (mmHideMenuTimer) clearTimeout(mmHideMenuTimer);
	mmHideMenuTimer = null;
}

function MM_menuShowMenu(containName, menuName, xOffset, yOffset, triggerName) {
	MM_menuHideMenus();
	MM_menuResetTimeout();
	MM_menuShowMenuContainer(containName, xOffset, yOffset, triggerName);
	MM_menuShowSubMenu(menuName);
}

function MM_menuShowMenuContainer(containName, x, y, triggerName) {	
	var c = document.getElementById(containName);
	var s = c.style;
	s.visibility = "inherit";
	
	mmOpenContainer = "" + containName;
}

/* END FUNCTIONS FOR TOP BAR NAVIGATION LINKS */




/*  BEGIN PORTFOLIO FUNCTIONS */

function show_hide_orange(video_id, color) {
	var name = "xsnazzy_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	
	var name = "xb2_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb3_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb4_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "gradient_box_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	
	name = "xb2_b_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb3_b_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb4_b_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	
	
	


}

function show_hide_orange2(video_id, color) {
	var name = "xsnazzy_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	
	var name = "xb2_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb3_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb4_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "gradient_box_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	
	name = "xb2_b_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb3_b_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	name = "xb4_b_" + video_id;
	document.getElementById(name).style.backgroundColor = color;
	
	
	


}

/* END PORTFOLIO FUNCTIONS */


