// programs
function programsRightShow_1() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_1').style.background = 'url(/web/mtm/images/programs_right_link1_ON.jpg)';
	}
}
function programsRightHide_1() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_1').style.background = 'url(/web/mtm/images/programs_right_link1.jpg)';
	}
}

function programsRightShow_2() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_2').style.background = 'url(/web/mtm/images/programs_right_link2_ON.jpg)';
	}
}
function programsRightHide_2() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_2').style.background = 'url(/web/mtm/images/programs_right_link2.jpg)';
	}
}

function programsRightShow_3() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_3').style.background = 'url(/web/mtm/images/programs_right_link3_ON.jpg)';
	}
}
function programsRightHide_3() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_3').style.background = 'url(/web/mtm/images/programs_right_link3.jpg)';
	}
}

function programsRightShow_4() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_4').style.background = 'url(/web/mtm/images/programs_right_link4_ON.jpg)';
	}
}
function programsRightHide_4() {
	if (document.getElementById) {
		document.getElementById('programsRightLink_4').style.background = 'url(/web/mtm/images/programs_right_link4.jpg)';
	}
}

// more info
function moreInfoFormShow() {
	if (document.getElementById) {
		allNavClose();
		document.getElementById('moreInfoForm').style.visibility = 'visible';
		document.getElementById('allNavClose').style.visibility = 'visible';
	}
}
function moreInfoFormHide() {
	if (document.getElementById) {
		document.getElementById('moreInfoForm').style.visibility = 'hidden';
	}
}

// browse areas
function programAreasShow() {
	if (document.getElementById) {
		//alert("MTM");
		//window.location='<cms:url:gallery/>'; 
		allNavClose();
		document.getElementById('programAreasWrapper').style.visibility = 'visible';
		document.getElementById('browseProgram2').style.visibility = 'visible';
		document.getElementById('archiveYearVideo').style.visibility = 'hidden';
	}
}
function programAreasHide() {
	if (document.getElementById) {
		document.getElementById('programAreasWrapper').style.visibility = 'hidden';
		document.getElementById('browseProgram2').style.visibility = 'hidden';
		document.getElementById('archiveYearVideo').style.visibility = 'visible';
	}
}

// careers
function careersShow() {
	if (document.getElementById) {
		allNavClose();
		document.getElementById('submenuCareers').style.visibility = 'visible';
		document.getElementById('allSubNavCloseCareers').style.visibility = 'visible';
		//document.getElementById('careersID').style.color = '#ffc545';
		//MM_swapImage('careersID','','/web/mtm/images/mm_careers_ON.gif',1);
	}
}
function careersHide() {
	if (document.getElementById) {
		document.getElementById('submenuCareers').style.visibility = 'hidden';
		//MM_swapImage('careersID','','/web/mtm/images/mm_careers.gif',1);
	}
}

// diplomas
function diplomasShow() {
	if (document.getElementById) {
		allNavClose();
		document.getElementById('submenuDiplomas').style.visibility = 'visible';
		document.getElementById('allSubNavCloseDiplomas').style.visibility = 'visible';
		//document.getElementById('diplomasID').style.color = '#ffc545';
		//MM_swapImage('diplomasID','','/web/mtm/images/mm_diplomas_ON.gif',1);
	}
}
function diplomasHide() {
	if (document.getElementById) {
		document.getElementById('submenuDiplomas').style.visibility = 'hidden';
		//MM_swapImage('diplomasID','','/web/mtm/images/mm_diplomas.gif',1);
	}
}

// howtoapply
function howtoapplyShow() {
	if (document.getElementById) {
		allNavClose();
		document.getElementById('submenuHowToApply').style.visibility = 'visible';
		document.getElementById('allSubNavCloseHowToApply').style.visibility = 'visible';
		//document.getElementById('howtoapplyID').style.color = '#ffc545';
		//MM_swapImage('howtoapplyID','','/web/mtm/images/mm_howtoapply_ON.gif',1);
	}
}
function howtoapplyHide() {
	if (document.getElementById) {
		document.getElementById('submenuHowToApply').style.visibility = 'hidden';
		//MM_swapImage('howtoapplyID','','/web/mtm/images/mm_howtoapply.gif',1);
	}
}

// employers
function employersShow() {
	if (document.getElementById) {
		allNavClose();
		document.getElementById('submenuEmployers').style.visibility = 'visible';
		document.getElementById('allSubNavCloseEmployers').style.visibility = 'visible';
		//document.getElementById('employersID').style.color = '#ffc545';
		//MM_swapImage('employersID','','/web/mtm/images/mm_employers_ON.gif',1);
	}
}
function employersHide() {
	if (document.getElementById) {
		document.getElementById('submenuEmployers').style.visibility = 'hidden';
		//MM_swapImage('employersID','','/web/mtm/images/mm_employers.gif',1);
	}
}

// job categories
function jobCat0Show() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_0').className  = 'jobON';
	}
}
function jobCat0Hide() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_0').className  = 'jobOFF';
	}
}
function jobCat1Show() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_1').className  = 'jobON';
	}
}
function jobCat1Hide() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_1').className  = 'jobOFF';
	}
}
function jobCat2Show() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_2').className  = 'jobON';
	}
}
function jobCat2Hide() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_2').className  = 'jobOFF';
	}
}
function jobCat3Show() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_3').className  = 'jobON';
	}
}
function jobCat3Hide() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_3').className  = 'jobOFF';
	}
}
function jobCat4Show() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_4').className  = 'jobON';
	}
}
function jobCat4Hide() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_4').className  = 'jobOFF';
	}
}
function jobCat5Show() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_5').className  = 'jobON';
	}
}
function jobCat5Hide() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_5').className  = 'jobOFF';
	}
}
function jobCat6Show() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_6').className  = 'jobON';
	}
}
function jobCat6Hide() {
	if (document.getElementById) {
		document.getElementById('jobCategoriesLink_6').className  = 'jobOFF';
	}
}

// nav close
function allNavClose() {
	if (document.getElementById) {
		document.getElementById('allNavClose').style.visibility = 'hidden';
		document.getElementById('allSubNavCloseCareers').style.visibility = 'hidden';
		document.getElementById('allSubNavCloseDiplomas').style.visibility = 'hidden';
		document.getElementById('allSubNavCloseHowToApply').style.visibility = 'hidden';
		document.getElementById('allSubNavCloseEmployers').style.visibility = 'hidden';
		moreInfoFormHide();
		careersHide();
		diplomasHide();
		howtoapplyHide();
		employersHide();
	}	
}

// swap images
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



// changing backgrounds
var bg = null;
var timingBg = 4000;

function changeBg2() {
  bg.style.visibility = 'visible';
  setTimeout(changeBg1,timingBg);
}
function changeBg1() {
  bg.style.visibility = 'hidden';
  setTimeout(changeBg2,timingBg);
}

function startBg() {
  bg = document.getElementById('OH_ID');
  bg.style.visibility = 'hidden';
  changeBg1(); // start animating
}




















