/**
 * Ajax request to get header content.
 *
 * @access 	public
 * @return	void
 */
function getAdjContent(a_strCurrentLocation) {
	new Ajax.Request('/mach3turbo/HTMLapp/Nav.aspx', {
		method: 'get',
		parameters: 'location=' + a_strCurrentLocation,
		onSuccess: function(a_objResponse) {
			Element.update('sprite', a_objResponse.responseText);
		}
	});


	new Ajax.Request('/HTMLShell/Services/GilletteTopNav.aspx', {
		method: 'get',
		parameters: 'location=' + a_strCurrentLocation,
		onSuccess: function(a_objResponse) {
			Element.update('divNavWrapper', a_objResponse.responseText);
		}
	});


	new Ajax.Request('/HTMLShell/Services/GilletteFooterNav.aspx', {
		method: 'get',
		parameters: 'location=' + a_strCurrentLocation,
		onSuccess: function(a_objResponse) {
			Element.update('divFooter', a_objResponse.responseText);
		}
	});

}

window.onload = function() {  
	getAdjContent(window.location.href);
} 

/**
 * Navigation handler
 *
 * @access 	public
 * @return	void
 */
var intMaxElements = 6;


function closify(el) {
	for (i=1; i<=intMaxElements; i++) {
		if ($('nv' + i) != null) {
			if (typeof($('nv' + i)) != 'undefined') {
				if (('nv' + i) != el) {
					$('nv' + i).style.display = 'none';
					$('nv' + i + 'a').style.backgroundPosition = '0 -34px';
				}
				
				else {
					$('nv' + i + 'a').style.backgroundPosition = '0 0';
				}
			}
		}
	}
}

document.observe("click", function(e) {
	for (i=1; i<=intMaxElements; i++) {
		if ($('nv' + i) != null) {
			if (typeof($('nv' + i)) != 'undefined') {
				$('nv' + i).style.display = 'none';
				$('nv' + i + 'a').style.backgroundPosition = '0 -34px';
			}
		}
	}
});

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));