// make it look the way it's supposed to for IE
var ieOld = (document.all) ? 1 : 0;
var ieBrowser = (ieOld && parseFloat(navigator.appVersion) >= 4)
if (ieBrowser == true) {

	var tag = document.getElementById("HeaderContent"); 
	tag.style.setAttribute('top','0px', 0);
/*
	var tag = document.getElementById("Header"); 
	tag.style.setAttribute('height','26px', 0);
	var tag = document.getElementById("HeaderEmail"); 
	tag.style.setAttribute('top','-16px', 0);
	tag = document.getElementById("HeaderImage");
	tag.style.setAttribute('top','-1px', 0);
	tag = document.getElementById("HeaderLinks");
	tag.style.setAttribute('top','-1px', 0);
	*/
}
// -------------------------------------------------------------------------------------------------- //

// global navigation for everybody
document.writeln('<span id="FoodGlobalNav" class="GlobalNav"><a href="' + site + '/food/" title="Go to the Food section">Food</a></span>');
document.writeln('<span id="TravelGlobalNav" class="GlobalNav"><a href="' + site + '/travel/" title="Go to the Travel section">Travel</a></span>');
document.writeln('<span id="ViceGlobalNav" class="GlobalNav"><a href="' + site + '/vice/" title="Go to the Vice section">Vice</a></span>');
document.writeln('<span id="ArtGlobalNav" class="GlobalNav"><a href="' + site + '/art/" title="Go to the Art section">Art</a></span>');
// -------------------------------------------------------------------------------------------------- //


// I got your footer right here pal
document.writeln('<div id="Footer">');
document.writeln('<span id="FooterLeft"><a href="mailto:iamjacksbrain@yahoo.com" class="HeaderLink" title="Comments, Suggestions">IamJacksBrain@yahoo.com</a></span>');
document.writeln('<span id="FooterRight"><a href="' + site + '/IamJacksRSS.xml" title="Get site updates" style="text-decoration:none;">RSS</a></span>');
document.writeln('</div>');
// -------------------------------------------------------------------------------------------------- //

// figure out where to place the global navigation
var nBrowser = (document.layers) ? 1 : 0;
var standardsBrowser = (document.getElementById) ? 1 : 0;

//var usefulBrowser = ((nBrowser && parseFloat(navigator.appVersion) >= 4.07) || (ieOld && parseFloat(navigator.appVersion) >= 4))
var usefulBrowser = ((nBrowser && parseFloat(navigator.appVersion) >= 4.07) || (ieOld && parseFloat(navigator.appVersion) >= 4) || standardsBrowser)

if (usefulBrowser == true) {
	// Monitor the window resize event and resize the navigation when it occurs
	if (window.attachEvent) {
		window.attachEvent("onresize", function() {ResizeNav()} );
	} else {
		window.addEventListener("resize", function() {ResizeNav()}, false);
	}

	if (ieOld == true) {
	var oParent = Content.offsetParent;
	}
	
	if (nBrowser) {
		x = document.MindMapImage.pageX
	} 
	if (ieOld) {
		x = MindMapImage.offsetLeft
	} 
	if ((standardsBrowser == 1) && (ieOld != 1)) {
		MindMapImage = document.getElementById("MindMapImage")
		x = parseInt(MindMapImage.offsetLeft)
	}

	//x=(n) ?  document.MindMapImage.pageX : MindMapImage.offsetLeft
	//alert(x)

	var FoodWidth = x + 18
	var TravelWidth = x - 2
	var ViceWidth = x + 8
	var ArtWidth = x + 28

	document.writeln("<style type=\"text/css\">")
	document.writeln("#FoodGlobalNav {")
	document.writeln("position : absolute;")
	document.writeln("top : 45px;")
	document.writeln("left : " + FoodWidth + "px;")
	document.writeln("}")
	document.writeln("#TravelGlobalNav {")
	document.writeln("position : absolute;")
	document.writeln("top : 70px;")
	document.writeln("left : " + TravelWidth + "px;")
	document.writeln("}")
	document.writeln("#ViceGlobalNav {")
	document.writeln("position : absolute;")
	document.writeln("top : 95px;")
	document.writeln("left : " + ViceWidth + "px;")
	document.writeln("}")
	document.writeln("#ArtGlobalNav {")
	document.writeln("position : absolute;")
	document.writeln("top : 120px;")
	document.writeln("left : " + ArtWidth + "px;")
	document.writeln("}")
	document.writeln("</style>")
}
// -------------------------------------------------------------------------------------------------- //

// Resize the navigation
function ResizeNav() {

	if (nBrowser) {
		x = document.MindMapImage.pageX
	}
	if (ieOld) {
		x = MindMapImage.offsetLeft
	} 
	if ((standardsBrowser == 1) && (ieOld != 1)) {
		MindMapImage = document.getElementById("MindMapImage")
		x = parseInt(MindMapImage.offsetLeft)
	}
	
	document.getElementById("FoodGlobalNav").style.left = parseFloat(x + 18) + 'px';
	document.getElementById("TravelGlobalNav").style.left = parseFloat(x - 2) + 'px';
	document.getElementById("ViceGlobalNav").style.left = parseFloat(x + 8) + 'px';
	document.getElementById("ArtGlobalNav").style.left = parseFloat(x + 28) + 'px';
}
// -------------------------------------------------------------------------------------------------- //

