//
// standard page header
//
function headerMenu(page) {
	if (page == "mobis") {
			var menuTitle = ["MOBIS Home","Client Information","Corporate Overview","MOBIS Offerings","Labor Categories","Rates","Download Catalog"]
			var menuLink  = ["index.cfm","cust_info.cfm","scra_corp.cfm","scra_mobis.cfm","scra_labor.cfm","scra_rates.cfm","scra_catalog.cfm"]
		}
	if (page == "log") {
			var menuTitle = ["LOGWORLD Home","Client Information","Corporate Overview","LOGWORLD Offerings","Labor Categories","Rates","Download Catalog"]
			var menuLink  = ["index.cfm","cust_info.cfm","corp.cfm","logworld.cfm","labor.cfm","rates.cfm","catalog.cfm"]
		}
	if (page == "gsa") {
			var menuTitle = ["GSA Home","Corporate Overview","Labor Categories","Rates","Download Catalog"]
			var menuLink  = ["index.cfm","gsa_corp.cfm","gsa_labor.cfm","gsa_rates.cfm","GSA_IT_Schedule_Catalog.pdf"]
		} 
	if (page == "sea") {
			var menuTitle = ["SeaPort-e Home","Contacts","Task<br>Orders","Technical Instructions","Team<br>Members","Team Experience","Quality Assurance"]
			var menuLink  = ["index.cfm","contacts.cfm","task_orders.cfm","tech_instructions.cfm","team_members.cfm","team_experience.cfm","quality_assurance.cfm"]
		}

	textOut = "<table cellpadding='0' cellspacing='0' align='center' valign='top' border='0' width='100%'>";
	for (var i = 0; i < menuLink.length; i++) {
		textOut += "<tr><td valign='middle' align='left' nowrap><a href='" + menuLink[i] + "'>"
		textOut += "<img src='images/menuicon" + i + ".jpg' width='49' height='49' border='0' align='absmiddle'></a></td>"    
		textOut += "<td class='rightpad'><a class='menutext' href='" + menuLink[i] + "'>" + menuTitle[i] + "</a></td></tr>"
		}
	textOut += "</table>"
	document.write(textOut)
	}

//
// standard page footer
//
function footer() {
	document.write("<div class='pagefoot' align='center'>");
	document.write("<hr noshade size=1>");
	document.write("&copy;2000-2007 <a class='pagefoot' href='http://www.scra.org'>SCRA&reg;</a>, a Public Non-Profit Corporation<br>");
	document.write("<a class='pagefoot' href='terms_conditions.html'>Terms and Conditions</a>.<br>");
	document.write("</div>")
	}
	
//
// last modified date
//
function lastmod() {
	var days   = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]
	var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]

	var dateObj = new Date(document.lastModified)
	var wday = days[dateObj.getDay()]
	var lmonth = months[dateObj.getMonth()]
	var date = dateObj.getDate()
	var fyear = 2000 + dateObj.getYear()%100

	document.write("<i>Last Modified " + date + " " + lmonth + " " + fyear + "</i>")
	}

//
// email to a given name (protects from email harvesting)
//
var subject = "MOBIS%20Inquiry"
function emailto(name,domain) {
	domain = (domain ? domain : "scra.org");		// default doamin
	address = name + "@" + domain
	document.writeln("<a class='email' href='mailto:" + address + "?subject=" + subject + "'>" + address + "</a>");
	}

// toggle paragraph/sub-section expansion/collapse
var imageSource = "/images/"
function expandToggle( rowid,hide ) {
	var sectionId = document.getElementById(rowid);

	if (sectionId == null) return;									// abort if this object is missing

	hide = (hide!=null)?hide:(sectionId.style.display == '');		// manually hide or toggle

	if ((hide)) {											// hide the object
		sectionId.style.display = 'none';
		var ImgSrc = document.getElementById("i" + rowid);
		if (ImgSrc!=null) ImgSrc.src = imageSource + "plus.gif";	// ignore the image swap if missing
		}
	else {													// show the object
		sectionId.style.display = '';
		var ImgSrc = document.getElementById("i" + rowid);
		if (ImgSrc!=null) ImgSrc.src = imageSource + "minus.gif";	// ignore the image swap if missing
		}
	}
