// JavaScript Document

// *********** Code for BreadCrumbing Activities (Static)

// MISC. CONSTANTS

var ROOTSITE = "http://www.missioncontrol.com/";
//var ROOTSITE = "";
var SHOPSITE = "http://www.missioncontrol.com/shop/";
//var MYMISSIONSITE = "http://www.missioncontrol.com/my_mission/";
var MYMISSIONSITE = ROOTSITE + "my_mc.htm";

var CRUMB_SEP = "&gt;";  // separator for breadcrumbs
var BCseparator= "&nbsp;" + CRUMB_SEP + "&nbsp";
var CrumbStyleDefault = "";
var CURR_PAGE_ID = -1;
var NAV_INDENT = 30;

// ARRAYS
var AllPages = new Array();
var ParentArray = new Array();


// *********** DEFINITIONS - function definitions
// Used for setup purposes

// PageObj Object (individual breadcrumb link)
function PageObj(linkurl, crumbtext, pagetitle, parentid, displaystyle, csslevel, refer_page) {
	
	this.url = linkurl;
	this.title = pagetitle;
	this.parent = parentid;
	this.level = csslevel;
	this.referrer = refer_page;	
	this.display = "";
	this.crumb = crumbtext;	
	
	if (this.crumb == "") {
		this.crumb = pagetitle;	
	}
		
}

// Existing PageObjs (mapping)
function PageObjSetup() {
		
	// Set up hierarchy Array of pages (breadcrumbs)
	
	//TO DO: FIX ID's on all pages and Make sure page titles are consistent with navigation titles
	
	AllPages[0] = new PageObj("/index.php","","Home",-1,"",1);
	
	AllPages[1] = new PageObj("/mission/searchservlet?action=show_search","","Search",0,"",2);
	AllPages[2] = new PageObj("login.htm","","Login",-1,"",2); // -1 to remove. originall off parent "0"
	
	//PROGRAMS - LEVEL 2
	AllPages[3] = new PageObj("programs.htm","","Programs",0,"",2); // section reference (not a page)
		
	//PROGRAMS - LEVEL 3
	AllPages[4] = new PageObj("p_workshops.htm","","Workshops",3,"",3);
	AllPages[5] = new PageObj("p_online.htm","","Online Courses",3,"",3);
	AllPages[6] = new PageObj("p_launch.htm","","Software Add-In",3,"",3);
	AllPages[7] = new PageObj("p_coaching.htm","","Coaching",3,"",3);
	AllPages[8] = new PageObj("p_learning.htm","","Learning Modules",3,"",3);
	AllPages[9] = new PageObj("p_corpprog.htm","","Corporate Programs",3,"",3);
	AllPages[10] = new PageObj("p_lp_method.htm","","Learning Methodology",3,"",3);
	AllPages[11] = new PageObj("p_mcsystem.htm","","What is Mission Control?",3,"",3);
	AllPages[12] = new PageObj("p_saying.htm","","What People are Saying",3,"",3);
	AllPages[13] = new PageObj("video","","Preview Video",3,"",3);	

	//PROGRAMS - LEVEL 4 (see also array items 40-50)
	AllPages[14] = new PageObj("p_mcsys_work.htm","What makes working in the 21st Century so challenging?","What makes working in the <br>21st Century so challenging?",10,"",4);
	AllPages[15] = new PageObj("p_mcsys_stress.htm","How does stress impact productivity?","How does stress impact <br>productivity?",10,"",4);	
	AllPages[16] = new PageObj("p_mcsys_capacity.htm","Can you really promise to Increase productivity?","Can you really promise to <br>Increase productivity?",10,"",4);

	//ABOUT US - LEVEL 2
	AllPages[17] = new PageObj("about.htm","","About Us",0,"",2);
	
	//ABOUT US - LEVEL 3	
	AllPages[18] = new PageObj("","","",-1,"",2); //empty for future use	
	AllPages[19] = new PageObj("","","",-1,"",2); //empty for future use		
	AllPages[20] = new PageObj("a_lic_partners.htm","","Licensed Partners",0,"",2);	
	AllPages[21] = new PageObj("","","",-1,"",2); //empty for future use
	AllPages[22] = new PageObj("a_media.htm","","Media",16,"",3);
	AllPages[23] = new PageObj("a_clients.htm","","Clients",16,"",3);
	AllPages[24] = new PageObj("","","",-1,"",2); //empty for future use
	AllPages[25] = new PageObj("contactus.php","","Contact Us",0,"",2);
	
	AllPages[26] = new PageObj("a_p_become_partner.htm","","Become a Licensed Partner",-1,"",2,19);	
	AllPages[27] = new PageObj("a_m_media_kit.htm","","Frequently Asked Questions",21,"",4);
			
	//MY MISSION CONTROL - LEVEL 2
	//AllPages[27] = new PageObj("http://www.missioncontrol.com/my_mission","My Mission Control",0,"",2);
	AllPages[28] = new PageObj("my_mc.htm","","My Mission Control",0,"",2);
		
	// stand alone pages, e.g. Articles, newsreleases, etc..
	AllPages[29] = new PageObj("a_m_press_release.htm","","Press Releases",-1,"",4);
	AllPages[30] = new PageObj("a_n_articles.htm","","Articles",-1,"",2,21);
	AllPages[31] = new PageObj("a_m_press_rel_1.htm","","Press Release",-1,"",2,21);
	AllPages[32] = new PageObj("a_m_press_rel_2.htm","","Press Release",-1,"",2,21);
	AllPages[33] = new PageObj("a_m_press_rel_3.htm","","Press Release",-1,"",2,21);

	//SHOP - LEVEL 2
	AllPages[34] = new PageObj("http://www.missioncontrol.com/shop","","Shop",0,"",2);
	
	//RESERVED	
	AllPages[35] = new PageObj("a_copyright.htm","","Copyright, Trademarks & Distinct Elements",-1,"",2,16); //empty for future use
	AllPages[36] = new PageObj("a_privacy.htm","","Privacy Policy",-1,"",2,16); //empty for future use
	AllPages[37] = new PageObj("","","Submission Results",-1,"",2,25); //licensed partner
	AllPages[38] = new PageObj("","","Submission Results",-1,"",2,23); //newsletters
	AllPages[39] = new PageObj("p_beingproductive.htm","","Being Productive",-1,"",4);
	AllPages[40] = new PageObj("","","",-1,"",2); //empty for future use
	
	
	// 40-49 for programs sub sections
	AllPages[41] = new PageObj("a_news.htm","","Newsletters",99,"",3);
	AllPages[42] = new PageObj("p_prodwkshop.htm","","Productivity &amp; Accomplishment",4,"",4);
	AllPages[43] = new PageObj("p_prodwkshoplive.htm","", "Productivity &amp; Accomplishment Live",4,"",4);
//	AllPages[43] = new PageObj("","","",-1,"",4);
	
	AllPages[44] = new PageObj("p_prodcrs.htm","","Foundation &amp; Fundamentals",5,"",4);
	AllPages[45] = new PageObj("p_scheduling.htm","","Scheduling for Productivity",5,"",4);
	AllPages[46] = new PageObj("p_prodiyi.htm","","Increase Your Impact",5,"",4);
	
	AllPages[47] = new PageObj("","","",-1,"",2); //empty for future use
	AllPages[48] = new PageObj("p_coachgrp.htm","","Group Coaching",7,"",4);
	
	
	// 48-59 for programs sub sections
	AllPages[49] = new PageObj("/tellafriend/","Free Review Video Promotion","Free Review Video Promotion",0,"",2); 
	AllPages[50] = new PageObj("/tellafriend/emailyourfriend.html","Send Email to a Friend","Send Email to a Friend",49,"",2); 
	AllPages[51] = new PageObj("/tellafriend/thankyou.html","Confirmation","Confirmation",49,"",3); 
	AllPages[52] = new PageObj("/makeover/index.htm","Free Productivity Makeover","Free Productivity Makeover",0,"",2); 
	AllPages[53] = new PageObj("p_scheduling.htm","","Scheduling for Productivity",0,"",2); 
	AllPages[54] = new PageObj("p_prodsalesres.htm","","Producing Sales Results",-1,"",4); 
    AllPages[55] = new PageObj("/impact/index.htm","Increase Your Impact","Increase Your Impact",0,"",2);
	AllPages[56] = new PageObj("a_business.htm","","Now in Business 2.0",21,"",4); 
	AllPages[57] = new PageObj("/gradnight/","Graduate Events","Graduate Events",0,"",2);
	AllPages[58] = new PageObj("/microsoft/","Microsoft","Microsoft",0,"",2);
	AllPages[59] = new PageObj("/gradgift/","Grad Gift","Grad Gift",0,"",2); 
	AllPages[60] = new PageObj("/2004/","Accomplish more in 2004!","Accomplish more in 2004!",0,"",2);
	AllPages[61] = new PageObj("a_training.htm","Top Training Product of the Year","Top Training Product of the Year",21,"",4); 
	AllPages[62] = new PageObj("/close/","","Close your employee productivity gap!",0,"",2);
	AllPages[63] = new PageObj("/WMC/","","Katz Media Group's Women's Career Summit",0,"",2);
	AllPages[64] = new PageObj("/dev/","","New Course Development with Mission Control CEO",0,"",2);
	AllPages[65] = new PageObj("/NAH/","","Mission Control at NAH",0,"",2);
	AllPages[66] = new PageObj("/sellmore/","","Sell more in 2004!",0,"",2);
	AllPages[67] = new PageObj("/success/","","Close your productivity gap!",0,"",2);
	AllPages[68] = new PageObj("/legal/","","Mission Control for Legal Professionals",0,"",2);
	AllPages[69] = new PageObj("/taf/","","Tell your friends about Mission Control",0,"",2);
	AllPages[70] = new PageObj("/ford/","","Mission Control at Ford",0,"",2);
	AllPages[71] = new PageObj("/grads/","","Mission Control Graduate Center",0,"",2);
	AllPages[72] = new PageObj("/dev/06_30_04.htm","","Coaching Call Audio Archive",0,"",2);
	AllPages[73] = new PageObj("/download/index.htm","","Foundations, Fundamentals, Tools and Tips",0,"",2)
	AllPages[74] = new PageObj("/materials.html", "", "Mission Control Materials",0, "", 2)
	AllPages[75] = new PageObj("/discover/","","Discover a Breakthrough in Productivity",0,"",2);
	AllPages[76] = new PageObj("/toronto.html","","Being Productive Workshop, Toronto",0,"",2);
	AllPages[77] = new PageObj("","","",-1,"",2); //empty for future use
	AllPages[78] = new PageObj("/lpapplication/", "", "Licensed Partner Interest Form", 0, "", 2);
	AllPages[79] = new PageObj("/purpose/", "", "Productivity on Purpose", 0, "", 2);

	
	//array tracking. Next usable index=
	//AllPages[34] = new PageObj("","","",-1,"",2);
	
	/*
	//old ones
	AllPages[7] = new PageObj("p_wkshoploc.htm","","Workshop Locations",3,"",3);
	AllPages[13] = new PageObj("p_bpwkshop_reg.htm","","Register Now",-1,"",4);
	AllPages[14] = new PageObj("p_prodwkshop_reg.htm","","Register Now",-1,"",4);
	AllPages[15] = new PageObj("p_gencourse_reg.htm","","Register Now",-1,"",4);
	AllPages[16] = new PageObj("p_implcourse_reg.htm","","Register Now",-1,"",4);
	AllPages[17] = new PageObj("p_outlookcourse_reg.htm","","Register Now",-1,"",4);
	
	*/
}

function getParents(pageid) {
	// get parents and put into parent Array
	
	if (pageid == null) { pageid = CURR_PAGE_ID; }
		
	if (AllPages[pageid].parent > 0) {
		// recurse and add to parent array at last index
		ParentArray[ParentArray.length] = AllPages[pageid].parent;
		getParents(AllPages[pageid].parent);		
	}		
	
}

// Get Children
function getChildren(pageid) {
	//function to get children of page passed

	//if (pageid == null) { pageid = CURR_PAGE_ID; }
		
	var ChildArray = new Array();
			
	// go through page loop
	for (var i=0; i < AllPages.length; i++) {
		if (AllPages[i].parent == pageid) {
			// Child node. Add id to child array.
			ChildArray[ChildArray.length] = i;						
		}
	}
	
	return ChildArray;
}

function getSectionID(pageid) {
	// write HTMl nav for page provided
	var page_obj = AllPages[pageid];
	
	if (page_obj.level == 2) { // top level
		
		return pageid;
		
	} else if (page_obj.level > 2) {
		while (page_obj.level > 2) {
			//get parent
			pageid = page_obj.parent;
			page_obj = AllPages[pageid];
		}
		// should be level 2 now
		return pageid;
		
	} else {
		// less than level 2
		return -1;
	}
	
		
	if (ParentArray.length >= 2) {
		if (pageid == ParentArray[ParentArray.length-2]) {
			toplevel = true;
		}
	}
	
	// select styles
	if (page_obj.level == 3) {

		if (pageid==CURR_PAGE_ID || toplevel) {
			style="rightnav1on";
		} else {
			style="rightnav1off";
		}

	} else if (page_obj.level >= 4) {
		
		if (pageid==CURR_PAGE_ID) {
			style="rightnav2on";
		} else {
			style="rightnav2off";
		}
		
	} 
}


// *** CALLABLE FUNUCTIONS ******************************************
// Called from pages

// Generate BreadCrumbing Display for node
function ShowBreadCrumbs(pageid) {

	if (pageid == null) {
		pageid = CURR_PAGE_ID;
	}

	//set variables
	var BCtext = "";
	//var BChead = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
	//var BCfoot = "</tr></table>";	
	var BCcrumbs = "";
		
	if (AllPages[pageid].parent >= 0) {
		// recurse
		BCcrumbs = getCrumb(AllPages[pageid].parent);		
		BCtext = BCcrumbs;
	
		BCtext = BCtext + BCseparator + "<strong>" + AllPages[pageid].crumb + "</strong>";		
	
	} else {
		
		if (pageid != 0) { //not home page		
			BCcrumbs = getCrumb(AllPages[pageid].referrer);		
			BCtext = BCcrumbs;
	
			BCtext = BCtext + BCseparator + "<strong>" + AllPages[pageid].crumb + "</strong>";
		}
	}
	
	return BCtext + "&nbsp;";
}

// Get Child Links
function ShowChildLinks(pageid) {
	//function to get links to children of pageis passed
		
	if (pageid == null) { pageid = CURR_PAGE_ID; }
	
	if (pageid == 0) { return ""; }
	
	var navstring = "";
	var navstring_head = "<table width=\"100%\" border=0 cellpadding=0 cellspacing=2>";
	var navstring_foot = "</table>";
	//var head_spacer = "<p class=\"body\">&nbsp;</p>";
	var head_spacer = "<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"10\"></td></tr></table>";
	//var foot_spacer = "<p class=\"driverText\">&nbsp;</p>&nbsp;\n";
	var foot_spacer = "";
	
	ParentArray = new Array();
	
	//check if top level section
	if (AllPages[pageid].parent < 0){
		
		navstring = "<tr><td class=\"rightnav1off\"><a href=\"javascript: history.back();\">Return to Previous Page</a></td></tr>\n";		
		//navstring = navstring + "<div class=\"rightNav_L1_ON\"><a href=\"javascript: history.back();\">Return to Previous Page</a></div>\n";		
		return head_spacer + navstring_head + navstring + navstring_foot + foot_spacer;
		
	} else if (AllPages[pageid].parent == 0){
		// section level. LEVEL 2. show children. if no children, go back
		
		var childstring = ProcessChildren(pageid);
		
		//if (childstring == "") {
			// no children
		//	navstring = "<tr><td class=\"rightnav1off\"><a href=\"javascript: history.back();\">Return to Previous Page</a></td></tr>\n";		
			//navstring = navstring + "<div class=\"rightNav_L1_ON\"><a href=\"javascript: history.back();\">Return to Previous Page</a></div>\n";		
		//} else {
			// has children
			navstring = childstring;			
		//}
				
		//navstring = navstring + ProcessChildren(pageid);
		return head_spacer + navstring_head + navstring + navstring_foot + foot_spacer;
	}
	
	// deeper level. get parent ids	
	getParents(pageid);		
	
	// process starting from top level (level 2 pages)
		
	navstring = ProcessChildren(ParentArray[ParentArray.length-1]);
	//alert(navstring);
	return head_spacer + navstring_head + navstring + navstring_foot + foot_spacer;
		
}

function ProcessChildren(pageid) {
	// drill down children from top level
	//if (pageid == null) { pageid = CURR_PAGE_ID; }
	var navstring = "";
	
	var kids = getChildren(pageid); //array of child ids
	
	// go through child id loop
	for (var i=0; i < kids.length; i++) {
		// add nav stuff for child
		var currid = kids[i];
		
		navstring = navstring + NavDisplay(currid);
		
		if (currid==CURR_PAGE_ID) {
			navstring = navstring + ProcessChildren(currid);								
			// return after final level			
		} else {		
			//check if current child is in parent list		
		
			for (var p=0; p < ParentArray.length; p++) {
				if (currid == ParentArray[p]) {
					// child is a direct parent of selected page. recurse.
					navstring = navstring + ProcessChildren(currid);
				}
			}
		}		
	}

	return navstring;
}

function NavDisplay(pageid) {
	// write HTMl nav for page provided
	var CLlinks = "";
	var CLlinks_head = "<tr><td><table width=\"100%\" border=0 cellpadding=0 cellspacing=0><tr>\n";
	var CLlinks_foot = "</tr></table></td></tr>\n";
	var page_obj = AllPages[pageid];
	var style = "";
	var indents = 0;
	var toplevel = false;
		
	if (ParentArray.length >= 2) {
		if (pageid == ParentArray[ParentArray.length-2]) {
			toplevel = true;
		}
	}
	
	// select styles
	if (page_obj.level == 3) {

		if (pageid==CURR_PAGE_ID || toplevel) {
			style="rightnav1on";
		} else {
			style="rightnav1off";
		}

	} else if (page_obj.level >= 4) {
		
		if (pageid==CURR_PAGE_ID) {
			style="rightnav2on";
		} else {
			style="rightnav2off";
		}
		
	} 
	
	/*
	else if (page_obj.level == 5) {
		
		if (pageid==CURR_PAGE_ID) {
			style="rightnav3on";
		} else {
			style="rightnav3off";
		}
		
	}
	*/
	
	indents = page_obj.level - 3;
	
	var indent = "<td width=\"1\" class=\""+style+"\"><img src=\"/images/navigation/curr_blank.gif\" align=\"middle\" width=\"10\" height=\"10\"></td>\n";
	var pointer = "<td width=\"1\" class=\""+style+"\"><img src=\"/images/navigation/curr_nav.gif\" align=\"middle\" width=\"10\" height=\"10\"></td>\n";
	
	for (var i=0; i < indents; i++) { //indents		
		CLlinks =  CLlinks + indent;
	}
	
	// text for nav item
	if (indents > 0) {
	
		if (pageid==CURR_PAGE_ID) {
			CLlinks =  CLlinks + pointer + "<td class=\""+style+"\">" + page_obj.title + "</td>\n";	
		} else {
			CLlinks =  CLlinks + indent + "<td class=\""+style+"\"><a href=\"" + ROOTSITE + page_obj.url + "\">" + page_obj.title + "</a></td>\n";
		}
	
	} else {

		if (pageid==CURR_PAGE_ID) {
			CLlinks =  CLlinks + "<td class=\""+style+"\">" + page_obj.title + "</td>\n";	
		} else {
			if (toplevel) {
				CLlinks =  CLlinks + "<td class=\"rightnav1on\"><a href=\"" + ROOTSITE + page_obj.url + "\">" + page_obj.title + "</a></td>\n";			
			} else {			
				CLlinks =  CLlinks + "<td class=\""+style+"\"><a href=\"" + ROOTSITE  + page_obj.url + "\">" + page_obj.title + "</a></td>\n";
			}
		}
	
	}
	
	return CLlinks_head + CLlinks + CLlinks_foot;
}


function ShowCopyright() {
 	var copyright = ""; //"<p align=\"center\" class=\"copyright\">&nbsp;</p>";
        copyright += "<div align=\"center\" class=\"copyright\"><a href=\"" + ROOTSITE + "a_copyright.htm\">Copyright &copy; 2003 - 2008, Mission Control Productivity, LLC. All rights reserved.</a><br>";
		//copyright += "Mission Control is a registered trademark of Mission Control Productivity Inc.<br>";
		copyright += "<a href=\"" + ROOTSITE + "a_privacy.htm\">Mission Control Privacy Policy</a></div>";


	return copyright;

}

function ShowCopyrightMS() {
 	var copyright = ""; //"<p align=\"center\" class=\"copyright\">&nbsp;</p>";
        copyright += "<div align=\"center\" class=\"copyright\"><a href=\"" + ROOTSITE + "a_copyright.htm\">Copyright &copy; 2003 - 2008, Mission Control Productivity, LLC and Microsoft Corporation. All rights reserved.</a><br>";
	//copyright += "Mission Control is a registered trademark of Mission Control Productivity, LLC<br>";
	copyright += "<a href=\"" + ROOTSITE + "a_privacy.htm\">Mission Control Privacy Statement</a>";
	copyright += "<br><a href=\"http://www.microsoft.com/info/privacy.mspx\">Microsoft Privacy Statement</a></div>";

	return copyright;

}

function PrintPage(arg) {
	//print current page
	window.print();		
}

function PopPage(arg) {
	var pagewin = window.open(arg,'popwin','scrollbars,menubar,resizable,width=600,height=475,screenX=0,screenY=0,left=0,top=0');
}

function resizeWindow(intWidth,intHeight){
	window.resizeTo(intWidth,intHeight);
}

// *** UTILITY FUNCTIONS  **********************************************
// Not called directly (secondary private)

// Get Crumbs for page (recursive)
function getCrumb(pageid) {
	//recursive function to get PageObj hierarchy
	//var BCseparator= "<td>" + CRUMB_SEP + "</td>";	
	//var crumb = "<td class=\"" + AllPages[pageid].style + "\"><a href=\"" + AllPages[pageid].url + "\">" + AllPages[pageid].title + "</a></td>"
		
	var crumb = "<a href=\"" + AllPages[pageid].url + "\">" + AllPages[pageid].crumb + "</a>"	
	
	if (AllPages[pageid].parent >= 0) {
		// recurse
		//if(pageid == 3) {
		//	crumb = "";
		//	crumb = getCrumb(AllPages[pageid].parent) + crumb;
		//} else {		
			crumb = getCrumb(AllPages[pageid].parent) + BCseparator + crumb;		
		//}
	}
	
	return crumb;
}


// *********** INITIALIZATION - called on startup of page
PageObjSetup();


// Main Navigation
function ShowNavigation(){

	var sectionid = getSectionID(CURR_PAGE_ID);

	var nav = "";	
	nav = nav + "<table width=\"283\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"right\">";
	nav = nav + "<tr align=\"left\" valign=\"top\">"; 
	
	if (sectionid != 3) { //PROGRAMS
		nav = nav + "<td><a href=\"" + ROOTSITE + "programs.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Programs','','/images/navigation/programsON.gif',1)\"><img name=\"Programs\" border=\"0\" src=\"/images/navigation/programsOFF.gif\" width=\"65\" height=\"45\" alt=\"Programs\"></a></td>";
	} else {
		nav = nav + "<td><a href=\"" + ROOTSITE + "programs.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Programs','','/images/navigation/programsSTAY.gif',1)\"><img name=\"Programs\" border=\"0\" src=\"/images/navigation/programsSTAY.gif\" width=\"65\" height=\"45\" alt=\"Programs\"></a></td>";
	}
	
	if (sectionid != 33) { //SHOP
		nav = nav + "<td><a href=\"" + SHOPSITE + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Shop','','/images/navigation/shopON.gif',1)\"><img name=\"Shop\" border=\"0\" src=\"/images/navigation/shopOFF.gif\" width=\"125\" height=\"45\" alt=\"Shop\"></a></td>";
	} else {
		nav = nav + "<td><a href=\"" + SHOPSITE + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Shop','','/images/navigation/shopON.gif',1)\"><img name=\"Shop\" border=\"0\" src=\"/images/navigation/shopSTAY.gif\" width=\"125\" height=\"45\" alt=\"Shop\"></a></td>";
	}
	
/*
//	if (sectionid != 27) { //MY MISSION CONTROL
//		nav = nav + "<td><a href=\"" + MYMISSIONSITE + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Mission','','/images/navigation/myMissionON.gif',1)\"><img name=\"Mission\" border=\"0\" src=\"/images/navigation/myMissionOFF.gif\" width=\"117\" height=\"45\" alt=\"My Mission Control\"></a></td>";
//	} else {
//		nav = nav + "<td><a href=\"" + MYMISSIONSITE + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Mission','','/images/navigation/myMissionSTAY.gif',1)\"><img name=\"Mission\" border=\"0\" src=\"/images/navigation/myMissionSTAY.gif\" width=\"117\" height=\"45\" alt=\"My Mission Control\"></a></td>";
//	}
*/

	if (sectionid != 19) { //PARTNERS
		nav = nav + "<td><a href=\"" + ROOTSITE + "a_lic_partners.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Partners','','/images/navigation/partnersON.gif',1)\"><img name=\"Partners\" border=\"0\" src=\"/images/navigation/partnersOFF.gif\" width=\"59\" height=\"45\" alt=\"Partners\"></a></td>";
	} else {
		nav = nav + "<td><a href=\"" + ROOTSITE + "a_lic_partners.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Partners','','/images/navigation/partnersSTAY.gif',1)\"><img name=\"Partners\" border=\"0\" src=\"/images/navigation/partnersSTAY.gif\" width=\"59\" height=\"45\" alt=\"Partners\"></a></td>";
	}
		
	if (sectionid != 16) { //ABOUT			
		nav = nav + "<td><a href=\"" + ROOTSITE + "about.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('About','','/images/navigation/aboutUsON.gif',1)\"><img name=\"About\" border=\"0\" src=\"/images/navigation/aboutUsOFF.gif\" width=\"64\" height=\"45\" alt=\"About Us\"></a></td>";	
	} else {
		nav = nav + "<td><a href=\"" + ROOTSITE + "about.htm\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('About','','/images/navigation/aboutUsSTAY.gif',1)\"><img name=\"About\" border=\"0\" src=\"/images/navigation/aboutUsSTAY.gif\" width=\"64\" height=\"45\" alt=\"About Us\"></a></td>";
	}

	if (sectionid != 24) { //CONTACT
		nav = nav + "<td><a href=\"" + ROOTSITE + "contactus.php\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Contact','','/images/navigation/contactON.gif',1)\"><img name=\"Contact\" border=\"0\" src=\"/images/navigation/contactOFF.gif\" width=\"55\" height=\"45\" alt=\"Contact\"></a></td>";
	} else {
		nav = nav + "<td><a href=\"" + ROOTSITE + "contactus.php\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Contact','','/images/navigation/contactSTAY.gif',1)\"><img name=\"Contact\" border=\"0\" src=\"/images/navigation/contactSTAY.gif\" width=\"55\" height=\"45\" alt=\"Contact\"></a></td>";
	}

	nav = nav + "</tr>";
	
	//search bar
	
//	nav = nav + "<tr align=\"left\" valign=\"top\"><td colspan=\"6\" align=\"right\" valign=\"bottom\">"; 	
		
//	nav = nav + "<form name=\"search\" method=\"post\" action=\"/mission/searchservlet\">";
//	nav = nav + "<input type=\"hidden\" name=\"action\" value=\"show_results\">";
//	nav = nav + "<input type=\"hidden\" name=\"indextype\" value=\"html\">";
//	nav = nav + "<span class=\"breadcrumb\">";
//	nav = nav +	"Search:&nbsp;<input name=\"query\" size=\"15\"/>&nbsp;<input type=\"submit\" class=\"formreset\" value=\"Find\"/>";	
//	nav = nav + "</span>";
  //  nav = nav + "</form>";	
	
//	nav = nav + "</td></tr>";	
	
	nav = nav + "</table>";	
		
	return nav;

}

