

var leftnav = [
				["Home","index.html"],
				["About Us","about.html"],
				["Services","services.html"],
				["Our Work","work.html",[
											["Case Studies","work_case.html","lev2"],
											["Portfolio","work_portfolio.html","lev2"]
										 ]
				],
				["Contact Us","contact.html"]
				];
				
				

var filepath = window.location.pathname;	
var splitfilepath = filepath.split("/");
var filename = splitfilepath[splitfilepath.length -1];
var splitfilename = filename.split(".");
var subfilename = splitfilename[0];
var splitsubfilename = subfilename.split("_");
var subx = splitsubfilename[0];
var currentnum = "1";
var notitle = 0;


function writeTop(){
document.write("4 locations in PA and NJ&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;sitemap&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;contact us");
}


function writeBottom(){
document.write("<div class='bottomtext'>&nbsp;&nbsp;Copyright 2010, The Geere Group. All rights reserved.<\/div>");
}

function writeIcons(){
document.write("<table width='100' cellspacing='0' cellpadding='0' border='0' style='margin-left: 20px;'><tr>");
document.write("<td width='40'><center><div style='width: 21px;'><\/div><\/center><\/td>");
document.write("<td width='40'><center><a href='http://www.facebook.com/pages/The-Geere-Group/122218704492451?v=wall#!/pages/The-Geere-Group/122218704492451' target='_blank'><img src='images/fb_logo.jpg' alt='facebook' width='22' height='22' border='0'><\/a><\/center><\/td>");
document.write("<td width='40'><center><a href='http://www.linkedin.com/profile?viewProfile=&key=26865034&locale=en_US&trk=tab_pro' target='_blank'><img src='images/linkdin_logo.jpg' alt='linkdin' width='21' height='22' border='0'><\/a><\/center><\/td>");
document.write("<\/tr><\/table>");
}

function writeNav(){
document.write("<table width='100' cellspacing='0' cellpadding='0' border='0' class='navtable'>");

	for (x = 0; x < leftnav.length; x++){
	
	var catsplit = leftnav[x][1].split(".");
	var cat = catsplit[0];
	//alert(subx + " " + cat);
	
	document.write("<tr class='navrows'>");
	document.write("<td class='navcells'>");
		if (leftnav[x][1] == filename) {
		document.write("<span class='navlev1on'>&#149; " + leftnav[x][0] + "<\/span>");
		} else if (subx == cat) {
		document.write("<span class='navlev1on'>&#149; <a href='" + leftnav[x][1] + "' class='navlinks'>" + leftnav[x][0] + "<\/a><\/span>");
		} else {
		document.write("<a href='" + leftnav[x][1] + "' class='navlinks'>" + leftnav[x][0] + "<\/a>");
		}
	
	
		if (((leftnav[x][2] != null) && (leftnav[x][1] == filename)) || ((leftnav[x][2] != null) && (subx == cat))){
		//alert(leftnav[x][2][0][1]);
		document.write("<div class='subnavclass'>");
			for (subloop = 0; subloop < leftnav[x][2].length; subloop++){
				if (leftnav[x][2][subloop][1] == null){
				//alert(leftnav[x][2][subloop][0] + " is a category.");
				document.write("<br><span class='subcategory'>" + leftnav[x][2][subloop][0] + "<\/span>");
				} else if ((leftnav[x][2][subloop][2] == 'lev2') && (leftnav[x][2][subloop][1] == filename)) {
				document.write("<br><span class='subitemslev2b'>&rarr; " + leftnav[x][2][subloop][0] + "<\/span>");
				} else if (leftnav[x][2][subloop][2] == 'lev2') {
				document.write("<br><span class='subitemslev2'><a href='" + leftnav[x][2][subloop][1] + "' class='subnavlinks'>" + leftnav[x][2][subloop][0] + "<\/a><\/span>");
				} else if (leftnav[x][2][subloop][1] == filename){
				document.write("<br><span class='subitems'>&rarr; " + leftnav[x][2][subloop][0] + "<\/span>");
				} else {
				document.write("<br><span class='subitems2'><a href='" + leftnav[x][2][subloop][1] + "' class='subnavlinks'>" + leftnav[x][2][subloop][0] + "<\/a><\/span>");
				}
			}
		document.write("<\/div>");
		}
	document.write("<\/td>");
	/*
	document.write("<td valign='top' class='arrowcell'>");
		if ((filename == "") && (notitle == 0)){
		document.write("<img src='images/arrow.gif'>");
		notitle++;
		}
		if ((leftnav[x][1] == filename) || (subx == cat)){
		document.write("<img src='images/arrow.gif'>");
		} else if ((leftnav[x][1] == 'mailinglist.html') && (filename == 'ml_thankyou.php')){
		document.write("<img src='images/arrow.gif'>");
		} else if ((leftnav[x][1] == 'contact.html') && (filename == 'contact_thankyou.php')){
		document.write("<img src='images/arrow.gif'>");
		} else {
		document.write("<br>");
		}
	document.write("<\/td>");
	*/
	document.write("<\/tr>");
	}
document.write("<\/table>");
}










