function initIEHover(o, tag, recurse) {
	for(var cn = o.firstChild; cn; cn = cn.nextSibling) {
		if(cn.nodeName == tag) {
			cn.onmouseover = function() { this.className = "hover"; }
			cn.onmouseout = function() { this.className = ""; }
		}
		if(recurse) initIEHover(cn, tag, recurse);
	}
}
function correctProtocol(html) {
	// set http protocol for all root relative links
	var re = new RegExp('href="/', 'g');
	var s = html.replace(re, 'href="http://www.edelman.com/');
	// set https protocol for careers pages
	// var re = new RegExp('http://www.edelman.com/careers/want_to_join_us/career_opportunities/secure/index.asp', 'g');
	// var s = s.replace(re, 'https://www.edelman.com/careers/want_to_join_us/career_opportunities/secure/index.asp');
	// var re = new RegExp('http://www.edelman.com/careers/want_to_join_us/internships/secure/index.asp', 'g');
	// var s = s.replace(re, 'https://www.edelman.com/careers/want_to_join_us/internships/secure/index.asp');
	return s;
}
function getNavigationHTML() {
	return '<div id="mnav-container"></div>';
}
function initNavigation() {
	var ie = document.all && document.getElementById && !window.opera;

	document.getElementById('mnav-container').innerHTML = correctProtocol(frames['buffer'].document.body.innerHTML);
	if(ie) initIEHover(document.getElementById("mnav-container"), "LI", true);
	
	//alert(frames['buffer'].document.body.innerHTML);
	var buffer = document.getElementById("buffer");
	buffer.parentNode.removeChild(buffer);
	
	if (readCookie("landingblog") == null){
	    createCookie("landingblog","minus","365")
	}
	MyStatus(readCookie("landingblog"));
	
}
// cannot use display:none style for iframe before the onload event, won't get added to frames array if so

 {

if (window.location.protocol == 'https:') {
	if (window.location.href.substring(0,11) == 'https://www'){
		document.write('<iframe id="buffer" style="position:absolute;width:0px;height:0px;" name="buffer" src="https://www.edelman.com/code/data/navigation.html"></iframe>');
	}
	else
	{
		document.write('<iframe id="buffer" style="position:absolute;width:0px;height:0px;" name="buffer" src="https://edelman.com/code/data/navigation.html"></iframe>');
	}

}
else {
	if (window.location.href.substring(0,10) == 'http://www'){
		document.write('<iframe id="buffer" style="position:absolute;width:0px;height:0px;" name="buffer" src="http://www.edelman.com/code/data/navigation.html"></iframe>');
	}
	else {
		document.write('<iframe id="buffer" style="position:absolute;width:0px;height:0px;" name="buffer" src="http://edelman.com/code/data/navigation.html"></iframe>');
	}
}

//document.write('<iframe id="buffer" style="position:absolute;width:0px;height:0px;" name="buffer" src="http://www.edelman.com/code/data/navigation.html"></iframe>');
}

addListener({ onload:initNavigation });
