
// provides the list of page names which the JS compares in order to decided which page the user is on
var url_A = new Array ("welcome");
var url_B = new Array ("future");
var url_C = new Array ("arts");
var url_D = new Array ("science");
var url_E = new Array ("commerce");
var url_F = new Array ("alumni");
var url_G = new Array ("fs2");
var url_H = new Array ("test");
var url_I = new Array ("assess");
var url_J = new Array ("self","self_value","self_skills","self_int","self_pref","self_learn","self_comp","self_ac");
var url_K = new Array ("career","career_check","career_cruising","career_program", "career_career", "career_cycle","career_trans");
var url_L = new Array ("jobinfo","job_cruis","job_market","job_tips");
var url_M = new Array ("seek","seek_info","seek_net","seek_sites","seek_int","seek_vol");
var url_N = new Array ("resume");
var url_O = new Array ("interview","int_type","int_quest","int_body");
var url_P = new Array ("vol");
var url_Q = new Array ("intern","intern_why","intern_success","intern_find");
var url_R = new Array ("grad","grad_gre","grad_lsat","grad_gmat","grad_ggsi");
var url_S = new Array ("parents");
var url_T = new Array ("jotm");
var url_U = new Array ("employ");
var url_V = new Array ("email");
var url_W = new Array ("contact");
var url_X = new Array ("fs");


// determines the parent link names in the menu
var text_A = new Array ("Welcome");
var text_B = new Array ("Future Students");
var text_C = new Array ("Arts");
var text_D = new Array ("Science");
var text_E = new Array ("Commerce");
var text_F = new Array ("Alumni");
var text_G = new Array ("Faculty & Staff");
var text_H = new Array ("Testimonials");
var text_I = new Array ("Assessments");
var text_J = new Array ("Self Assessments","Values","Skills","Interests","Preferences","Learning Style","Competencies","Academic Strengths");
var text_K = new Array ("Career Development","Career Check","Career Cruising","Choosing a Program","Choosing a Career","Career Decision Cycle","Transitions for Students");
var text_L = new Array ("Job Information","Career Cruising","Labour Market Information","International Work Tips");
var text_M = new Array ("Job Search","Info. Gathering Interviews","Networking","Job Websites","Etiquette","Evaluating Job Offers");
var text_N = new Array ("Resume/CVs/Cover Letters");
var text_O = new Array ("Interviews","Interview Types","Interview Questions","Body Language");
var text_P = new Array ("Volunteer Opportunities");
var text_Q = new Array ("Internship Opportunities","Why be an Intern","A Successful Intern","Find Internships");
var text_R = new Array ("Graduate Schools","GRE", "LSAT","GMAT","Others");
var text_S = new Array ("Parent & Family");
var text_T = new Array ("Job of The Month");
var text_U = new Array ("Current Employment Issues");
var text_V = new Array ("Send us an Email");
var text_W = new Array ("Contact Information");
var text_X = new Array ("Career Services Staff");



// determines the flyout status of the submenus
var hideshow_J = new Array ("none","block");
var hideshow_K = new Array ("none","block");
var hideshow_L = new Array ("none","block");
var hideshow_M = new Array ("none","block");
var hideshow_O = new Array ("none","block");
var hideshow_Q = new Array ("none","block");
var hideshow_R = new Array ("none","block");

// gets the full path for use later 
var thisPage=String((document.location.href));

// takes the above variable and strips out the extraneous path components and 
// makes a name for the page, eg 'www.smu.ca/academic/welcome.html' becomes just 'welcome'
var loc= String((thisPage));
loc=loc.split("/");
loc=loc[loc.length-1].split(".");
loc=loc[loc.length-2];

// A URL not displaying an HTML file, eg 'www.smu.ca/academic/' returns a 'null' value to this script.
// This forces a 'null' value to assume the value of 'welcome' to display the root menu.
if (loc == null)   loc = "welcome";

if(typeof(loc)=="undefined"){ 

loc="welcome"; 

}

// CHANGE THIS!!!  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
// CHANGE THIS!!!   \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
// CHANGE THIS!!!    \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
// CHANGE THIS!!!     \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
// CHANGE THIS!!!      V V V V V V V V V V V V V V V V

// SETS THE BASE URL
var baseURL = ('http://www.smu.ca/administration/career/');

// CHANGE THIS!!!      A A A A A A A A A A A A A A A A
// CHANGE THIS!!!     / / / / / / / / / / / / / / / /
// CHANGE THIS!!!    / / / / / / / / / / / / / / / /
// CHANGE THIS!!!   / / / / / / / / / / / / / / / /
// CHANGE THIS!!!  / / / / / / / / / / / / / / / /

// (uncomment the line below for testing and troubleshooting)
// document.write (loc)

function ShowHideLayer(boxID) {
	/* Obtain reference for the selected boxID layer and its button */
	var box = document.getElementById("submenu"+boxID);
	/* find the submenu with currently open page */
	var curloc = 0;
	if (loc==url_J[1] || loc==url_J[2] || loc==url_J[3] || loc==url_J[4] || loc==url_J[5] || loc==url_J[6] || loc==url_J[7]){
		curloc = 10;
	}
	else if (loc==url_K[1] || loc==url_K[2] || loc==url_K[3] || loc==url_K[4] || loc==url_K[5] || loc==url_K[6]){
		curloc = 20;
	}
	else if (loc==url_L[1] || loc==url_L[2] || loc==url_L[3]){
		curloc = 30;
	}
	else if (loc==url_M[1] || loc==url_M[2] || loc==url_M[3] || loc==url_M[4] || loc==url_M[5]){
		curloc = 40;
	}
	else if (loc==url_O[1] || loc==url_O[2] || loc==url_O[3]){
		curloc = 50;
	}
	else if (loc==url_Q[1] || loc==url_Q[2] || loc==url_Q[3]){
		curloc = 60;
	}
	else if (loc==url_R[1] || loc==url_R[2] || loc==url_R[3] || loc==url_R[4]){
		curloc = 70;
	}
	/* If the selected box is currently invisible, show it */
	if(box.style.display == "none" || box.style.display=="") {
		box.style.display = "block";
	}
	else {
		box.style.display = "none";
	}

/* and hide other open submenus, leaving the one with the current page open 
   (s must loop through the existing submenus - submenu40,submenu60,...)  */

//	for(var s=10; s<130; s+=10)
//	{
//		if((s != boxID) && (s != curloc))
//		{
//			var otherbox = document.getElementById("submenu"+s);
//			otherbox.style.display = "none";
//		}
//	}
}

var menubegin = ('<ul class="menu"><li class="menu"><a class="menu')
var menumid1 = ('" href="')
var menumid2 = ('.html">')
var aul = ('</a></li></ul>')

var lia = ('<li class="menu2"><a href="')
var suboff = ('.html" class="menu2">')
var subon = ('.html" class="menu2thispage">')
var ali = ('</a> &#8226;</li>')



// this function takes the value of loc 
// and compares it to all the contents of the arrays until it finds a match.

function sectionDetect()
{
for(var i=0; i<20; i++)
{

/* and hide other open submenus, leaving the one with the current page open 
   (s must loop through the existing submenus - submenu40,submenu60,...)  */

//	for(var s=10; s<130; s+=10)
//	{
//		if((s != boxID) && (s != curloc))
//		{
//			var otherbox = document.getElementById("submenu"+s);
//			otherbox.style.display = "none";
//		}
//	}
//}

// this function takes the value of loc 
// and compares it to all the contents of the arrays until it finds a match.

document.write('<ul class="menu"><li class="menu"><b>Home</b></li></ul>');

// A
document.write( menubegin ); switch (loc) { case url_A[i]: document.write('thispage'); break } document.write( menumid1 + url_A[0] + menumid2 + text_A[0] + aul );

// B
document.write( menubegin ); switch (loc) { case url_B[i]: document.write('thispage'); break } document.write( menumid1 + url_B[0] + menumid2 + text_B[0] + aul );

// C
document.write( menubegin ); switch (loc) { case url_C[i]: document.write('thispage'); break } document.write( menumid1 + url_C[0] + menumid2 + text_C[0] + aul );

// D
document.write( menubegin ); switch (loc) { case url_D[i]: document.write('thispage'); break } document.write( menumid1 + url_D[0] + menumid2 + text_D[0] + aul );

// E
document.write( menubegin ); switch (loc) { case url_E[i]: document.write('thispage'); break } document.write( menumid1 + url_E[0] + menumid2 + text_E[0] + aul );

// F
document.write( menubegin ); switch (loc) { case url_F[i]: document.write('thispage'); break } document.write( menumid1 + url_F[0] + menumid2 + text_F[0] + aul );

// G
document.write( menubegin ); switch (loc) { case url_G[i]: document.write('thispage'); break } document.write( menumid1 + url_G[0] + menumid2 + text_G[0] + aul );

// H
document.write( menubegin ); switch (loc) { case url_H[i]: document.write('thispage'); break } document.write( menumid1 + url_H[0] + menumid2 + text_H[0] + aul );

document.write('<br><ul class="menu"><li class="menu"><b>Resources</b></li></ul>');


// I
document.write( menubegin ); switch (loc) { case url_I[i]: document.write('thispage'); break } document.write( menumid1 + url_I[0] + menumid2 + text_I[0] + aul );

// J
document.write('<ul class="menu"><li class="menu"><div><a href="' + url_J[0] + '.html" class="menu'); switch (loc) { case url_J[i]: document.write('thispage'); break } document.write('">' +text_J[0]+ '</a></div></li>');
if(loc==url_J[0] || loc==url_J[1] || loc==url_J[2] || loc==url_J[3] || loc==url_J[4] || loc==url_J[5] || loc==url_J[6] || loc==url_J[7]){ document.write('<div><ul class="menu2">'); } else { document.write('<div style="display: none;"><ul class="menu2">'); }
if(loc==url_J[1]){ document.write( lia + url_J[1] + subon + text_J[1] + ali ); } else { document.write( lia + url_J[1] + suboff + text_J[1] + ali ); }
if(loc==url_J[2]){ document.write( lia + url_J[2] + subon + text_J[2] + ali ); } else { document.write( lia + url_J[2] + suboff + text_J[2] + ali ); }
if(loc==url_J[3]){ document.write( lia + url_J[3] + subon + text_J[3] + ali ); } else { document.write( lia + url_J[3] + suboff + text_J[3] + ali ); }
if(loc==url_J[4]){ document.write( lia + url_J[4] + subon + text_J[4] + ali ); } else { document.write( lia + url_J[4] + suboff + text_J[4] + ali ); }
if(loc==url_J[5]){ document.write( lia + url_J[5] + subon + text_J[5] + ali ); } else { document.write( lia + url_J[5] + suboff + text_J[5] + ali ); }
if(loc==url_J[6]){ document.write( lia + url_J[6] + subon + text_J[6] + ali ); } else { document.write( lia + url_J[6] + suboff + text_J[6] + ali ); }
if(loc==url_J[7]){ document.write( lia + url_J[7] + subon + text_J[7] + ali ); } else { document.write( lia + url_J[7] + suboff + text_J[7] + ali ); }
switch (loc) { case url_J[i]: document.write('</ul>'); break }
document.write('</div></ul>');

// K
document.write('<ul class="menu"><li class="menu"><div><a href="' + url_K[0] + '.html" class="menu'); switch (loc) { case url_K[i]: document.write('thispage'); break } document.write('">' +text_K[0]+ '</a></div></li>');
if(loc==url_K[0] || loc==url_K[1] || loc==url_K[2] || loc==url_K[3] || loc==url_K[4] || loc==url_K[5] || loc==url_K[6]){ document.write('<div><ul class="menu2">'); } else { document.write('<div style="display: none;"><ul class="menu2">'); }
if(loc==url_K[1]){ document.write( lia + url_K[1] + subon + text_K[1] + ali ); } else { document.write( lia + url_K[1] + suboff + text_K[1] + ali ); }
if(loc==url_K[2]){ document.write( lia + url_K[2] + subon + text_K[2] + ali ); } else { document.write( lia + url_K[2] + suboff + text_K[2] + ali ); }
if(loc==url_K[3]){ document.write( lia + url_K[3] + subon + text_K[3] + ali ); } else { document.write( lia + url_K[3] + suboff + text_K[3] + ali ); }
if(loc==url_K[4]){ document.write( lia + url_K[4] + subon + text_K[4] + ali ); } else { document.write( lia + url_K[4] + suboff + text_K[4] + ali ); }
if(loc==url_K[5]){ document.write( lia + url_K[5] + subon + text_K[5] + ali ); } else { document.write( lia + url_K[5] + suboff + text_K[5] + ali ); }
if(loc==url_K[6]){ document.write( lia + url_K[6] + subon + text_K[6] + ali ); } else { document.write( lia + url_K[6] + suboff + text_K[6] + ali ); }
switch (loc) { case url_K[i]: document.write('</ul>'); break }
document.write('</div></ul>');

// L
document.write('<ul class="menu"><li class="menu"><div><a href="' + url_L[0] + '.html" class="menu'); switch (loc) { case url_L[i]: document.write('thispage'); break } document.write('">' +text_L[0]+ '</a></div></li>');
if(loc==url_L[0] || loc==url_L[1] || loc==url_L[2] || loc==url_L[3]){ document.write('<div><ul class="menu2">'); } else { document.write('<div style="display: none;"><ul class="menu2">'); }
if(loc==url_L[1]){ document.write( lia + url_L[1] + subon + text_L[1] + ali ); } else { document.write( lia + url_L[1] + suboff + text_L[1] + ali ); }
if(loc==url_L[2]){ document.write( lia + url_L[2] + subon + text_L[2] + ali ); } else { document.write( lia + url_L[2] + suboff + text_L[2] + ali ); }
if(loc==url_L[3]){ document.write( lia + url_L[3] + subon + text_L[3] + ali ); } else { document.write( lia + url_L[3] + suboff + text_L[3] + ali ); }
switch (loc) { case url_L[i]: document.write('</ul>'); break }
document.write('</div></ul>');

// M
document.write('<ul class="menu"><li class="menu"><div><a href="' + url_M[0] + '.html" class="menu'); switch (loc) { case url_M[i]: document.write('thispage'); break } document.write('">' +text_M[0]+ '</a></div></li>');
if(loc==url_M[0] || loc==url_M[1] || loc==url_M[2] || loc==url_M[3] || loc==url_M[4] || loc==url_M[5]){ document.write('<div><ul class="menu2">'); } else { document.write('<div style="display: none;"><ul class="menu2">'); }
if(loc==url_M[1]){ document.write( lia + url_M[1] + subon + text_M[1] + ali ); } else { document.write( lia + url_M[1] + suboff + text_M[1] + ali ); }
if(loc==url_M[2]){ document.write( lia + url_M[2] + subon + text_M[2] + ali ); } else { document.write( lia + url_M[2] + suboff + text_M[2] + ali ); }
if(loc==url_M[3]){ document.write( lia + url_M[3] + subon + text_M[3] + ali ); } else { document.write( lia + url_M[3] + suboff + text_M[3] + ali ); }
if(loc==url_M[4]){ document.write( lia + url_M[4] + subon + text_M[4] + ali ); } else { document.write( lia + url_M[4] + suboff + text_M[4] + ali ); }
if(loc==url_M[5]){ document.write( lia + url_M[5] + subon + text_M[5] + ali ); } else { document.write( lia + url_M[5] + suboff + text_M[5] + ali ); }
switch (loc) { case url_M[i]: document.write('</ul>'); break }
document.write('</div></ul>');

// N
document.write( menubegin ); switch (loc) { case url_N[i]: document.write('thispage'); break } document.write( menumid1 + url_N[0] + menumid2 + text_N[0] + aul );

// O
document.write('<ul class="menu"><li class="menu"><div><a href="' + url_O[0] + '.html" class="menu'); switch (loc) { case url_O[i]: document.write('thispage'); break } document.write('">' +text_O[0]+ '</a></div></li>');
if(loc==url_O[0] || loc==url_O[1] || loc==url_O[2] || loc==url_O[3]){ document.write('<div><ul class="menu2">'); } else { document.write('<div style="display: none;"><ul class="menu2">'); }
if(loc==url_O[1]){ document.write( lia + url_O[1] + subon + text_O[1] + ali ); } else { document.write( lia + url_O[1] + suboff + text_O[1] + ali ); }
if(loc==url_O[2]){ document.write( lia + url_O[2] + subon + text_O[2] + ali ); } else { document.write( lia + url_O[2] + suboff + text_O[2] + ali ); }
if(loc==url_O[3]){ document.write( lia + url_O[3] + subon + text_O[3] + ali ); } else { document.write( lia + url_O[3] + suboff + text_O[3] + ali ); }
switch (loc) { case url_O[i]: document.write('</ul>'); break }
document.write('</div></ul>');

// P
document.write( menubegin ); switch (loc) { case url_P[i]: document.write('thispage'); break } document.write( menumid1 + url_P[0] + menumid2 + text_P[0] + aul );

// Q
document.write('<ul class="menu"><li class="menu"><div><a href="' + url_Q[0] + '.html" class="menu'); switch (loc) { case url_Q[i]: document.write('thispage'); break } document.write('">' +text_Q[0]+ '</a></div></li>');
if(loc==url_Q[0] || loc==url_Q[1] || loc==url_Q[2] || loc==url_Q[3]){ document.write('<div><ul class="menu2">'); } else { document.write('<div style="display: none;"><ul class="menu2">'); }
if(loc==url_Q[1]){ document.write( lia + url_Q[1] + subon + text_Q[1] + ali ); } else { document.write( lia + url_Q[1] + suboff + text_Q[1] + ali ); }
if(loc==url_Q[2]){ document.write( lia + url_Q[2] + subon + text_Q[2] + ali ); } else { document.write( lia + url_Q[2] + suboff + text_Q[2] + ali ); }
if(loc==url_Q[3]){ document.write( lia + url_Q[3] + subon + text_Q[3] + ali ); } else { document.write( lia + url_Q[3] + suboff + text_Q[3] + ali ); }
switch (loc) { case url_Q[i]: document.write('</ul>'); break }
document.write('</div></ul>');

// R
document.write('<ul class="menu"><li class="menu"><div><a href="' + url_R[0] + '.html" class="menu'); switch (loc) { case url_R[i]: document.write('thispage'); break } document.write('">' +text_R[0]+ '</a></div></li>');
if(loc==url_R[0] || loc==url_R[1] || loc==url_R[2] || loc==url_R[3] || loc==url_R[4]){ document.write('<div><ul class="menu2">'); } else { document.write('<div style="display: none;"><ul class="menu2">'); }
if(loc==url_R[1]){ document.write( lia + url_R[1] + subon + text_R[1] + ali ); } else { document.write( lia + url_R[1] + suboff + text_R[1] + ali ); }
if(loc==url_R[2]){ document.write( lia + url_R[2] + subon + text_R[2] + ali ); } else { document.write( lia + url_R[2] + suboff + text_R[2] + ali ); }
if(loc==url_R[3]){ document.write( lia + url_R[3] + subon + text_R[3] + ali ); } else { document.write( lia + url_R[3] + suboff + text_R[3] + ali ); }
if(loc==url_R[4]){ document.write( lia + url_R[4] + subon + text_R[4] + ali ); } else { document.write( lia + url_R[4] + suboff + text_R[4] + ali ); }
switch (loc) { case url_R[i]: document.write('</ul>'); break }
document.write('</div></ul>');

// S
document.write( menubegin ); switch (loc) { case url_S[i]: document.write('thispage'); break } document.write( menumid1 + url_S[0] + menumid2 + text_S[0] + aul );

// T
document.write( menubegin ); switch (loc) { case url_T[i]: document.write('thispage'); break } document.write( menumid1 + url_T[0] + menumid2 + text_T[0] + aul );

// U
document.write( menubegin ); switch (loc) { case url_U[i]: document.write('thispage'); break } document.write( menumid1 + url_U[0] + menumid2 + text_U[0] + aul );

document.write('<br><ul class="menu"><li class="menu"><b>Contact Us</b></li></ul>');

// V
document.write( menubegin ); switch (loc) { case url_V[i]: document.write('thispage'); break } document.write( menumid1 + url_V[0] + menumid2 + text_V[0] + aul );

// W
document.write( menubegin ); switch (loc) { case url_W[i]: document.write('thispage'); break } document.write( menumid1 + url_W[0] + menumid2 + text_W[0] + aul );

// X
document.write( menubegin ); switch (loc) { case url_X[i]: document.write('thispage'); break } document.write( menumid1 + url_X[0] + menumid2 + text_X[0] + aul );

break
}
}

sectionDetect ();
 

// Delete the line below if the site doesn't need a related links table.
// If it needs a related links table then complete the table below
// this remains commented out until the development site shows some signs of going live
document.write('<br><br><ul class="menu"><li class="menu"><b>Related Links</b></li></ul>');
document.write('<ul class="menu"><li class="menu"><a class="menu" href="http://www.smu.ca/administration/sec/">Student Employment Center</a></li></ul>');
document.write('<ul class="menu"><li class="menu"><a class="menu" href="http://www.smu.ca/partners/smubdc/htmls/">SMU Business Development Centre</a></li></ul>');
document.write('<ul class="menu"><li class="menu"><a class="menu" href="http://www.smu.ca/academic/sobey/programs/mba/services.html">MBA Career Development Office</a></li></ul>');
document.write('<ul class="menu"><li class="menu"><a class="menu" href="http://www.smu.ca/currentstudents/advice.html">Academic Advisors</a></li></ul>');
document.write('<ul class="menu"><li class="menu"><a class="menu" href="http://www.smu.ca/administration/coop/">Co-operative Education</a></li></ul>');

