//JS for the navigation rollovers
var DHTMLOK = false;

if((navigator.userAgent.indexOf("MSIE") != -1) &&
			((navigator.userAgent.indexOf("Win") != -1))){
				DHTMLOK = true;
			}

//Image Rollovers
/*if (document.images)
{
	imgcampus0on = new Image();
	imgcampus0on.src = "/econnect/images/brookhaven_on.gif";
	imgcampus0off = new Image();
	imgcampus0off.src = "/econnect/images/brookhaven.gif";
	imgcampus1on = new Image();
	imgcampus1on.src = "/econnect/images/cedar_valley_on.gif";
	imgcampus1off = new Image();
	imgcampus1off.src = "/econnect/images/cedar_valley.gif";
	imgcampus2on = new Image();
	imgcampus2on.src = "/econnect/images/eastfield_on.gif";
	imgcampus2off = new Image();
	imgcampus2off.src = "/econnect/images/eastfield.gif";
	imgcampus3on = new Image();
	imgcampus3on.src = "/econnect/images/el_centro_on.gif";
	imgcampus3off = new Image();
	imgcampus3off.src = "/econnect/images/el_centro.gif";
	imgcampus4on = new Image();
	imgcampus4on.src = "/econnect/images/mountain_view_on.gif";
	imgcampus4off = new Image();
	imgcampus4off.src = "/econnect/images/mountain_view.gif";
	imgcampus5on = new Image();
	imgcampus5on.src = "/econnect/images/north_lake_on.gif";
	imgcampus5off = new Image();
	imgcampus5off.src = "/econnect/images/north_lake.gif";
	imgcampus6on = new Image();
	imgcampus6on.src = "/econnect/images/richland_on.gif";
	imgcampus6off = new Image();
	imgcampus6off.src = "/econnect/images/richland.gif";
	imgcampus7on = new Image();
	imgcampus7on.src = "/econnect/images/dallas_tele_on.gif";
	imgcampus7off = new Image();
	imgcampus7off.src = "/econnect/images/dallas_tele.gif";
	imgcampus8on = new Image();
	imgcampus8on.src = "/econnect/images/bill_priest_on.gif";
	imgcampus8off = new Image();
	imgcampus8off.src = "/econnect/images/bill_priest.gif";
}

function imgcampusOn(imgcampusName)
	{ document[imgcampusName].src = eval(imgcampusName + "on.src"); }       

function imgcampusOff(imgcampusName)
	{ document[imgcampusName].src = eval(imgcampusName + "off.src"); }
	
//Second level swapping
//Image Rollovers
if (document.images)
{
	img0on = new Image();
	img1on = new Image();
	img2on = new Image();
	img3on = new Image();
	img4on = new Image();
	img5on = new Image();
	img6on = new Image();
}

// Function to 'activate' images.
// Since we are not going to use onMouseOut anymore, we must do our swapping in the imgOn function
function imgOn(imgName)
{
	//Turn off all images
	imgOff("img0");
	imgOff("img1");
	imgOff("img2");
	imgOff("img3");
	imgOff("img4");
	imgOff("img5");
	imgOff("img6");
	document[imgName];
}       

// Function to 'deactivate' images.
function imgOff(imgName)
	{ document[imgName]; }
*/
//Array of secondlevel menu
var arrSecondLevel = new Array (
'<a href="http://www.dcccd.edu/Our+Locations.htm" class="secondlevel">Our Locations</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Admissions+Registration.htm" class="secondlevel">Admissions & Registration</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Paying+for+College.htm" class="secondlevel">Paying for College</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Student+Services.htm" class="secondlevel">Student Services</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Libraries.htm" class="secondlevel">Libraries</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Jobs.htm" class="secondlevel">Jobs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/eSchedule.htm" class="secondlevel">Schedules</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/eConnectMain.htm" class="secondlevel">eConnect</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/eCampus.htm" class="secondlevel">eCampus</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/CatalogTOC.htm" class="secondlevel">Catalog</a>',

'<a href="http://www.dcccd.edu/About+DCCCD/Board+of+Trustees/" class="secondlevel">Board of Trustees</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/About+DCCCD/Chancellor/" class="secondlevel">Chancellor</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/About+DCCCD/Our+Locations/" class="secondlevel">Our Locations</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/About+DCCCD/DCCCD+Facts/" class="secondlevel">DCCCD Facts</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/About+DCCCD/History.htm" class="secondlevel">History</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/About+DCCCD/News+and+Events/" class="secondlevel">News & Events</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/About+DCCCD/Contact+Us/" class="secondlevel">Contact Us</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/About+DCCCD/Site+Index.htm" class="secondlevel">Site Index</a>',

'<a href="http://www.dcccd.edu/Future+Students/Why+DCCCD/" class="secondlevel">Why DCCCD?</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Future+Students/Admissions+and+Registration/" class="secondlevel">Admissions & Registration</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Future+Students/Paying+for+College/" class="secondlevel">Paying for College</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Future+Students/Courses+and+Programs/" class="secondlevel">Courses & Programs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Future+Students/Student+Services/" class="secondlevel">Student Services</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Future+Students/Student+Life/" class="secondlevel">Student Life</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Future+Students/eConnectAP.htm" class="secondlevel">eConnect</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Future+Students/CatalogTOC.htm" class="secondlevel">Catalog</a>',

'<a href="http://www.dcccd.edu/Current+Students/Registration/" class="secondlevel">Registration</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Paying+for+College/" class="secondlevel">Paying for College</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Courses+and+Programs/" class="secondlevel">Courses & Programs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Student+Services/" class="secondlevel">Student Services</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Student+Life/" class="secondlevel">Student Life</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Libraries/" class="secondlevel">Libraries</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/eConnectST.htm" class="secondlevelcurrent"><span class="secondlevelcurrent">eConnect</span></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/eCampus.htm" class="secondlevel">eCampus</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/CatalogTOC.htm" class="secondlevel">Catalog</a>',

'<a href="http://www.dcccd.edu/Continuing+Education/About+Continuing+Education.htm" class="secondlevel">About Continuing Education</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Continuing+Education/Registration/" class="secondlevel">Registration</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Continuing+Education/Paying+for+College/" class="secondlevel">Paying for College</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Continuing+Education/Courses+and+Programs/" class="secondlevel">Courses & Programs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Continuing+Education/Student+Services/" class="secondlevel">Student Services</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Continuing+Education/Student+Life/" class="secondlevel">Student Life</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Continuing+Education/Libraries/" class="secondlevel">Libraries</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/econnect/ce/cemenu.html" class="secondlevel">eConnect</a>',

'<a href="http://www.dcccd.edu/Business+Community/Donate+to+DCCCD.htm" class="secondlevel">Donate to DCCCD</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Business+Community/Business+Resources/" class="secondlevel">Business Resources</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Business+Community/Jobs/" class="secondlevel">Jobs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Business+Community/Community+Services/" class="secondlevel">Community Services</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Business+Community/Corporate+Training/" class="secondlevel">Corporate Training</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Business+Community/Our+Locations/" class="secondlevel">Visiting DCCCD</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Business+Community/Libraries/" class="secondlevel">Libraries</a>',

'<a href="http://www.dcccd.edu/Employees/Tools+and+Resources/" class="secondlevel">Tools&nbsp;&&nbsp;Resources</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Employees/People/" class="secondlevel">People</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Employees/Training+and+Development/" class="secondlevel">Training&nbsp;&&nbsp;Development</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Employees/Policy+and+Procedures/" class="secondlevel">Policy&nbsp;&amp;&nbsp;Procedures</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Employees/Departments/" class="secondlevel">Departments</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Employees/Councils/" class="secondlevel">Councils</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Employees/Our+Locations/" class="secondlevel">Our&nbsp;Locations</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Employees/eConnectEM.htm" class="secondlevelcurrent"><span class="secondlevecurrent">eConnect</span></a>');

var strCurrentSecondLevel = '<a href="http://www.dcccd.edu/Current+Students/Registration/" class="secondlevel">Registration</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Paying+for+College/" class="secondlevel">Paying for College</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Courses+and+Programs/" class="secondlevel">Courses & Programs</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Student+Services/" class="secondlevel">Student Services</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Student+Life/" class="secondlevel">Student Life</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/Libraries/" class="secondlevel">Libraries</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/econnect/st/stmenu.html" class="secondlevelcurrent"><span class="secondlevelcurrent">eConnect</span></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/eCampus.htm" class="secondlevel">eCampus</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.dcccd.edu/Current+Students/CatalogTOC.htm" class="secondlevel">Catalog</a>';
var intCurrentFirstLevel = 3;

//Swaps menus
function Swap(intArrSecondLevel)
{
	//alert("Cell "+intArrSecondLevel);
	if (!document.layers)
	{

		if (blnIsOnImage)
		{
			
		
			if (typeof(document.getElementById("secondlevel")) != "undefined")
			{
				document.getElementById("secondlevel").innerHTML = arrSecondLevel[intArrSecondLevel];
			}
			if(DHTMLOK){
				var source 	= document.getElementById("img"+intArrSecondLevel);		
		
				resetSwap();
				source.style.backgroundColor = "#77A5D4";
				intTempFirstLevel = intArrSecondLevel;
				if(source.id == "img0"){
					Lnk0.style.backgroundColor = "#77A5D4";
					Lnk0.style.color = "#FFFFFF";
				}else if(source.id == "img1"){
					Lnk1.style.backgroundColor = "#77A5D4";
					Lnk1.style.color = "#FFFFFF";
				}else if(source.id == "img2"){
					Lnk2.style.backgroundColor = "#77A5D4";
					Lnk2.style.color = "#FFFFFF";
				}else if(source.id == "img3"){
					Lnk3.style.backgroundColor = "#77A5D4";
					Lnk3.style.color = "#FFFFFF";
				}else if(source.id == "img4"){
					Lnk4.style.backgroundColor = "#77A5D4";
					Lnk4.style.color = "#FFFFFF";
				}else if(source.id == "img5"){
					Lnk5.style.backgroundColor = "#77A5D4";
					Lnk5.style.color = "#FFFFFF";
				}else if(source.id == "img6"){
					Lnk6.style.backgroundColor = "#77A5D4";
					Lnk6.style.color = "#FFFFFF";
				}
				/*
				else if(source.id == "img7"){
					Lnk7.style.backgroundColor = "#77A5D4";
					Lnk7.style.color = "#FFFFFF";
				}else if(source.id == "img8"){
					Lnk8.style.backgroundColor = "#77A5D4";
					Lnk8.style.color = "#FFFFFF";
				}else if(source.id == "img9"){
					Lnk9.style.backgroundColor = "#77A5D4";
					Lnk9.style.color = "#FFFFFF";
				}	
			*/			
			
			}
		}
	}
	
}

function resetSwap(){
		img0.style.backgroundColor = "#C8D8ED";

		img1.style.backgroundColor = "#C8D8ED";		
		img2.style.backgroundColor = "#C8D8ED";		
		img3.style.backgroundColor = "#C8D8ED";	
		img4.style.backgroundColor = "#C8D8ED";			
		img5.style.backgroundColor = "#C8D8ED";		
		img6.style.backgroundColor = "#C8D8ED";	
	//	img7.style.backgroundColor = "#C8D8ED";	
	//	img8.style.backgroundColor = "#C8D8ED";			
	//	img9.style.backgroundColor = "#C8D8ED";	
		Lnk0.style.textDecoration  = "none";	
		Lnk1.style.textDecoration  = "none";	
		Lnk2.style.textDecoration  = "none";	
		Lnk3.style.textDecoration  = "none";	
		Lnk4.style.textDecoration  = "none";
		Lnk5.style.textDecoration  = "none";	
		Lnk6.style.textDecoration  = "none";				
	//	Lnk7.style.textDecoration  = "none";
	//	Lnk8.style.textDecoration  = "none";
	//	Lnk9.style.textDecoration  = "none";
		Lnk0.style.color = "#000000";
		Lnk0.style.backgroundColor = "#C8D8ED";
		Lnk1.style.color = "#000000";
		Lnk1.style.backgroundColor = "#C8D8ED";	
		Lnk2.style.color = "#000000";
		Lnk2.style.backgroundColor = "#C8D8ED";	
		Lnk3.style.color = "#000000";
		Lnk3.style.backgroundColor = "#C8D8ED";	
		Lnk4.style.color = "#000000";
		Lnk4.style.backgroundColor = "#C8D8ED";	
		Lnk5.style.color = "#000000";
		Lnk5.style.backgroundColor = "#C8D8ED";
		Lnk6.style.color = "#000000";		
		Lnk6.style.backgroundColor = "#C8D8ED";	
	//	Lnk7.style.color = "#000000";
	//	Lnk7.style.backgroundColor = "#C8D8ED";	
	//	Lnk8.style.color = "#000000";
	//	Lnk8.style.backgroundColor = "#C8D8ED";		
	//	Lnk9.style.color = "#000000";
	//	Lnk9.style.backgroundColor = "#C8D8ED";				
		
												
}

//Go back to current menu
//Note delay is set according to a property
function SwapToCurrent()
{
	setTimeout("SwapToCurrentMain()",250);
}

//Go back to current menu
function SwapToCurrentMain()
{
	if (!document.layers)
	{
		if (typeof(document.getElementById("secondlevel")) != "undefined")
		{
			document.getElementById("secondlevel").innerHTML = strCurrentSecondLevel;
			if(DHTMLOK){
				resetSwap();			
				//Restore original image
				if (typeof(intCurrentFirstLevel) != "undefined")
				{
					
					//imgOn("img" + intCurrentFirstLevel);
					var source = document.getElementById("img"+intCurrentFirstLevel);
				  	source.style.backgroundColor = "#77A5D4";
					if(source.id == "img0"){
						Lnk0.style.backgroundColor = "#77A5D4";
						Lnk0.style.color = "#FFFFFF";
					}else if(source.id == "img1"){
						Lnk1.style.backgroundColor = "#77A5D4";
						Lnk1.style.color = "#FFFFFF";
					}else if(source.id == "img2"){
						Lnk2.style.backgroundColor = "#77A5D4";
						Lnk2.style.color = "#FFFFFF";
					}else if(source.id == "img3"){
						Lnk3.style.backgroundColor = "#77A5D4";
						Lnk3.style.color = "#FFFFFF";
					}else if(source.id == "img4"){
						Lnk4.style.backgroundColor = "#77A5D4";
						Lnk4.style.color = "#FFFFFF";
					}else if(source.id == "img5"){
						Lnk5.style.backgroundColor = "#77A5D4";
						Lnk5.style.color = "#FFFFFF";
					}else if(source.id == "img6"){
						Lnk6.style.backgroundColor = "#77A5D4";
						Lnk6.style.color = "#FFFFFF";
					}
					intTempFirstLevel = intCurrentFirstLevel;
				}
			}
			
		}
	}
}

//Function to set blnIsOnImage to false;
function AllowSwitchFalse()
{
	blnIsOnImage = false;
}

//Function to set blnIsOnImage to true;
function AllowSwitchTrue(intArrSecondLevel)
{
	//Only allow switch if level to switch to is different from current onmouse level
	if (intTempFirstLevel != intArrSecondLevel)
		blnIsOnImage = true;
}

//This variable determines if swap is allowed;
//can be set by different events; in general the rule is that swap
//can only happen if on an image; if go off an image, blnIsOnImage is immediate set to off.
//Combine this with delay on swap action to make swaps less easy to do
var blnIsOnImage = false;
//blnIsOnImage = true;

//This is menu item the mouse is currently on
var intTempFirstLevel = -1;
