function BrowserInfo() {
	var agent = window.navigator.userAgent;
	if (agent.indexOf("MSIE") != -1) {
			var start = agent.indexOf("MSIE");
			this.name = "MSIE";
			this.version = parseFloat(agent.substring(start + 5, agent.indexOf(";", start)));
	} else if (agent.indexOf("Firefox") != -1) {
			var start = agent.indexOf("Firefox");
			this.name = "Firefox";
			this.version = agent.substring(start + 8, agent.length);
			var firstDec = this.version.indexOf(".") + 1;
			while (this.version.indexOf(".", firstDec) != -1)
				this.version = this.version.substring(0, firstDec) + this.version.substring(firstDec).replace(".", "");
			this.version = parseFloat(this.version);
	} else {
			this.name = "Unknown";
			this.version = 0;
	}
}

var info = new BrowserInfo();
var isIE6 = (info.name == "MSIE" && info.version < 7);

var message="";
function clickIE() {
  if (document.all) {
  (message);
  return false;
  }
}
function key(k)   
{
	if(info.name == "MSIE") {
		if(event.keyCode==17 || event.keyCode==18 || event.keyCode==93) {
			(message);
			return false;
		 } 
	}
    else {
		(message); 
		return false; 
	}   
}



function clickMZ(e) {
 if (document.layers||(document.getElementById&&!document.all)) {
  if (e.which==2||e.which==3) {(message);return false;}
 }
}
if (document.layers) {
//document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickMZ;
}
else{
  //document.onmouseup=clickMZ;
  document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
//if (document.layers) window.captureEvents(Event.KEYPRESS);  
//document.onkeydown=key; 


 
if (info.name == "MSIE" && info.version < 7){
	document.writeln('<link href="/css/stylesIE6.css" rel="stylesheet" type="text/css" />');
	 
 
	}
else {
	document.writeln('<link href="/css/stylesDynamic.css" rel="stylesheet" type="text/css" />');
	 

	}


function renderFlash(src, width, height, features) {
	document.writeln('<embed src="' + src + '" quality="high" width="' + width + 
					 '" height="' + height + '" align="middle" allowscriptaccess="sameDomain" ' +
					 'type="application/x-shockwave-flash" ' + features + 
  					 'pluginspage="http://www.macromedia.com/go/getflashplayer" />');
}

var userAgent = window.navigator.userAgent
var isIE = (window.navigator.userAgent.indexOf("MSIE") != -1);
var isFirefox = (window.navigator.userAgent.indexOf("Firefox") != -1);
var isIE6 = (parseFloat(userAgent.substring(userAgent.indexOf("MSIE ") + 5)) <= 6);
var isSafari = (navigator.userAgent.indexOf("Safari") > 0);

function writePngClass(url, width, height, alt, className) {
	if (!isIE6)
		document.write("<img alt=\"" + alt + "\" class=\"" + className + "\" src=\"" + url + "\" style=\"width: " + width + "px; height: " + height + "px;\">");
	else
		document.write("<img alt=\"" + alt + "\" class=\"" + className + "\"  src=\"spacer.png\" style=\"width: " + width + "px; height: " + height + 
			"px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url + "', sizingMethod=scale);\">");
}

function submitForm(id) {
	document.getElementById(id).submit();
	return false;
}

function setOpacity(div_name, opacity) {
	var div = document.getElementById(div_name);
	div.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + opacity + ")";
	div.style.MozOpacity = opacity/100;
	div.style.opacity = opacity/100;
}

var hide;
var show;
var Showing = 0;
var menuVisible = false;

function showMoreMenu(force, nav_index) {
//	alert(nav_index);
	if (menuVisible == true || force == true) {
		if (Showing==1 && !force) { window.status = new Date().getMilliseconds().toString(); return; }

		Showing = 1;

		clearTimeout(show);

		switch (nav_index) {
			case '1':
				menuVisible = true;
				show = setTimeout("menuFadeIn('menu_about_dropdown');", 250);
				document.getElementById('menu_industry_dropdown').style.display='none';
				document.getElementById('menu_programs_dropdown').style.display='none';
				break;

			case '2':
				menuVisible = true;
				show = setTimeout("menuFadeIn('menu_industry_dropdown');", 250);
				document.getElementById('menu_about_dropdown').style.display='none';
				document.getElementById('menu_programs_dropdown').style.display='none';
				break;

			case '3':
				menuVisible = true;
				show = setTimeout("menuFadeIn('menu_programs_dropdown');", 250);
				document.getElementById('menu_industry_dropdown').style.display='none';
				document.getElementById('menu_about_dropdown').style.display='none';
				break;
		}
	}
}

function hideMoreMenu(force) {
	clearTimeout(hide);
	hide = setTimeout("start_hideMoreMenu();", 500);
}


function cancelHide() {
	Showing = 1;
	clearTimeout(hide);
}

function start_hideMoreMenu() {
	Showing = 0;

	menuFadeOut('menu_about_dropdown');
/*	menuFadeOut('menu_industry_dropdown');
	menuFadeOut('menu_programs_dropdown');*/
}

function menuFadeIn(id) {
	menuFadeInStep(id, 0);
}

var dontHideMenus = false;
function hideAllMenus() {
	//alert("HIDEALLMENUS");
	dontHideMenus = false;
	setTimeout("doHideAll()", 200);
}
function cancelHideAll() {
	//alert("Cancel");
	dontHideMenus = true;
}
function doHideAll() {
	if (dontHideMenus) { return; }
	//alert("HIDING");
	document.getElementById('menu_industry_dropdown').style.display='none';
	document.getElementById('menu_about_dropdown').style.display='none';
	document.getElementById('menu_programs_dropdown').style.display='none';
}

function menuFadeInStep(id,val) {
	var more = document.getElementById(id);

	more.style.display = 'block';

	if (val < 100) {
		val = val + 25;
		setOpacity(id, val);
	}	
	if (val != 100) {
		var hdl = setTimeout("menuFadeInStep('" + id + "'," + val + ");",25);
		id = hdl;
	}
	else {
		//if (id=="menu_about_dropdown") {
			moreVisible = true;
			more.style.filter = "";
		//}
	}
}

function menuFadeOut(id) {
	var element = document.getElementById("id");
	menuFadeOutStep(id, 100);
}

function menuFadeOutStep(id,val) {
	var more = document.getElementById(id);

	if (val > 0) {
		val = val - 10;
		setOpacity(id, val);
	}
	if (val != 0) {
		var hdl = setTimeout("menuFadeOutStep('" + id + "'," + val + ");",25);
		id = hdl;
	}
	else {	
		if (id=="menu_about_dropdown") {
			menuVisible = false;
			more.style.display = 'none';
		}
	}
}

String.prototype.trim = function () {
	return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

reset_form_value = function(str1, str2, val) {
	if(str1 == val.value.trim())
		val.value = str2;
}
function changeTab(tab) {
		var tab_images = document.getElementById("tab_images");
			var tab_images_pg01 = document.getElementById("tab_images_pg01");
			var tab_images_pg02 = document.getElementById("tab_images_pg02");
			var tab_images_pg03 = document.getElementById("tab_images_pg03");
		var tab_videos = document.getElementById("tab_videos");
		var tab1_1 = document.getElementById("tab1_1");
		var tab1_2 = document.getElementById("tab1_2");
		var tab2_1 = document.getElementById("tab2_1");
		var tab2_2 = document.getElementById("tab2_2");
		
		var tab_year_2007a= document.getElementById("tab_year_2007a");
		var tab2007_1a = document.getElementById("tab2007_1a");


		var tab_year_2008a= document.getElementById("tab_year_2008a");
			var tab2008_1a = document.getElementById("tab2008_1a");
			var tab2008_2a = document.getElementById("tab2008_2a");
		var tab_year_2009a = document.getElementById("tab_year_2009a");
			var tab2009_1a = document.getElementById("tab2009_1a");
			var tab2009_2a = document.getElementById("tab2009_2a");

		var tab_year_2008b= document.getElementById("tab_year_2008b");
			var tab2008_1b = document.getElementById("tab2008_1b");
			var tab2008_2b = document.getElementById("tab2008_2b");
		var tab_year_2009b = document.getElementById("tab_year_2009b");
			var tab2009_1b = document.getElementById("tab2009_1b");
			var tab2009_2b = document.getElementById("tab2009_2b");

		switch (tab) {
			case 'tab_images':
				tab_images.style.display = "";
				tab_videos.style.display = "none";
				break;
				case 'tab_images_pg01':
					tab_images_pg01.style.display = "";
					tab_images_pg02.style.display = "none";
					tab_images_pg03.style.display = "none";
					break;
				case 'tab_images_pg02':
					tab_images_pg02.style.display = "";
					tab_images_pg01.style.display = "none";
					tab_images_pg03.style.display = "none";
					break;
				case 'tab_images_pg03':
					tab_images_pg03.style.display = "";
					tab_images_pg01.style.display = "none";
					tab_images_pg02.style.display = "none";
					break;

			case 'tab_videos':
				tab_videos.style.display = "";
				tab_images.style.display = "none";
				break;

			case '1_1':
				tab1_1.style.display = "";
				tab1_2.style.display = "none";
				break;
			case '1_2':
				tab1_2.style.display = "";
				tab1_1.style.display = "none";
				break;

			case '2_1':
				tab2_1.style.display = "";
				tab2_2.style.display = "none";
				break;
			case '2_2':
				tab2_2.style.display = "";
				tab2_1.style.display = "none";
				break;
            case 'tab_year_2007a':
				tab_year_2008a.style.display = "none";
				tab_year_2009a.style.display = "none";
				tab_year_2007a.style.display = "";
				break;
					case 'tab2007_1a':
						tab2007_1a.style.display = "";
						tab2007_2a.style.display = "none";
						break;
			case 'tab_year_2008a':
				tab_year_2008a.style.display = "";
				tab_year_2009a.style.display = "none";
				tab_year_2007a.style.display = "none";
				break;
					case 'tab2008_1a':
						tab2008_1a.style.display = "";
						tab2008_2a.style.display = "none";
						break;
					case 'tab2008_2a':
						tab2008_2a.style.display = "";
						tab2008_1a.style.display = "none";
						break;
			case 'tab_year_2009a':
				tab_year_2009a.style.display = "";
				tab_year_2008a.style.display = "none";
				tab_year_2007a.style.display = "none";
				break;
					case 'tab2009_1a':
						tab2009_1a.style.display = "";
						tab2009_2a.style.display = "none";
						break;
					case 'tab2009_2a':
						tab2009_2a.style.display = "";
						tab2009_1a.style.display = "none";
						break;

			case 'tab_year_2008b':
				tab_year_2008b.style.display = "";
				tab_year_2009b.style.display = "none";
				break;
				case 'tab2008_1b':
					tab2008_1b.style.display = "";
					tab2008_2b.style.display = "none";
					break;
				case 'tab2008_2b':
					tab2008_2b.style.display = "";
					tab2008_1b.style.display = "none";
					break;
			case 'tab_year_2009b':
				tab_year_2009b.style.display = "";
				tab_year_2008b.style.display = "none";
				break;
				case 'tab2009_1b':
					tab2009_1b.style.display = "";
					tab2009_2b.style.display = "none";
					break;
				case 'tab2009_2b':
					tab2009_2b.style.display = "";
					tab2009_1b.style.display = "none";
					break;
		}
}




function clickLink(url) {
	window.parent.iBox.hide();
	setTimeout("showURL('" + url + "')", 200);
}

function showURL(url) {
	window.parent.iBox.showURL(url, "", "");
}
