// JavaScript Document

var flashMovieName = 'navigation';

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
	// First make sure the movie's defined.
	if (typeof(theMovie) != "undefined") {
		// If it is, check how much of it is loaded.
		return theMovie.PercentLoaded() == 100;
	} else {
		// If the movie isn't defined, it's not loaded.
		return false;
	}
}


function flashMovie() {
	// IE and Netscape refer to the movie object differently.
	// This function returns the appropriate syntax depending on the browser.
	if (navigator.appName.indexOf ("Microsoft") !=-1) {
		return window[flashMovieName]
	} else {
		return document[flashMovieName]
	}
}


function ChangeFlashPage() {
	var strURL = document.URL;
	if (strURL.indexOf("students") != -1) {
		flashMovie().TGotoLabel("_root", "Students"); 
	} else if (strURL.indexOf("admission") != -1) {
		flashMovie().TGotoLabel("_root", "Admission"); 
	} else if (strURL.indexOf("aboutus") != -1) {
		flashMovie().TGotoLabel("_root", "AboutUS"); 
	} else if (strURL.indexOf("news") != -1) {
		flashMovie().TGotoLabel("_root", "News"); 
	} else if (strURL.indexOf("courses") != -1) {
		if (strURL.indexOf("fd.htm") != -1) {
			flashMovie().TGotoLabel("_root", "FD");
		} else if(strURL.indexOf("fm.htm") != -1) {
			flashMovie().TGotoLabel("_root", "FM");		
		} else if(strURL.indexOf("ba.htm") != -1) {
			flashMovie().TGotoLabel("_root", "BA");		
		} else if(strURL.indexOf("id.htm") != -1) {
			flashMovie().TGotoLabel("_root", "ID");		
		} else if(strURL.indexOf("gd.htm") != -1) {
			flashMovie().TGotoLabel("_root", "GD");		
		} else if(strURL.indexOf("mm.htm") != -1) {
			flashMovie().TGotoLabel("_root", "MM");		
		}
	}
}
