var lastHighlight = null;
// shsc == "Show/Hide Sub-Categories"
function shsc( catid) {
	//alert( 'shsc')
	el = document.getElementById( "cat_" + catid);
	theTriangle = eval( "document.t" + catid);
	if (el != null) {
		if (el.style.display == "none") {
			el.style.display = "inline";
			if(theTriangle)
				theTriangle.src = "images/skins/" + sf + "/TriangleOpen.png"
			}
		else {
			el.style.display = "none";
			if(theTriangle)
				theTriangle.src = "images/skins/" + sf + "/TriangleClosed.png"
			}
		}
	}

// sh == "Show/Hide"
function sh( catid) {
	//alert( "sh!")
	el = document.getElementById( "cat_" + catid);
	if (el != null)
		el.style.display = "block";
	navHeight();
	}

function navHeight() {
	var container = document.getElementById('nav_content_container');
	var content = document.getElementById('nav_content_content');
	if(container&&content) {
		var newHeight = container.parentNode.parentNode.parentNode.parentNode.parentNode.offsetHeight;
		if(navigator.appName.match(/explorer/i))
			content.style.height = (newHeight + 30) + 'px';
		else
			content.style.minHeight = (newHeight + 17) + 'px';
		}
	}

function hilightCat( catid) {
	if (lastHighlight = document.getElementById( "c" + catid)) {
//		el.style.color = "red";
		lastHighlight.className += " m_selected";
		lastHighlight = null;
		}
	else if (isSignMojo) {
		lastHighlight = document.getElementById( "s" + catid);
		}
	}

function navAddOnLoad(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function')
		window.onload = func;
	else {
		window.onload = function() {
			if (oldonload) oldonload();
			func();
			}
		}
	}

// This function dispatches a category tree click
function cc( jt) {
	if (gaSigAvailable) {
		if (jt.indexOf("javascript") == -1) {
			_gaq.push(['_trackPageview', '/categoryTree/' + jt]);
			}
		}
	if (jt.indexOf("javascript") == -1) {
		window.location.href = "/" + jt;
		}
	else {
		location.href = jt;
		}
	}

function cc2( jt) {
	if (gaSigAvailable) {
		if (jt.indexOf("javascript") == -1) {
			_gaq.push(['_trackPageview', '/categoryTree/' + jt]);
			}
		}
	if (jt.indexOf("javascript") == -1) {
		window.location.href = "/" + jt;
		}
	else {
		location.href = jt;
		}
	}

// A generic link dispatcher
function ld( jt, tp) {
	if (tp == "") {
		tp = 'categoryTree'
		}
	if (gaSigAvailable) {
		if (jt.indexOf("javascript") == -1) {
			_gaq.push(['_trackPageview', '/' + tp + '/' + jt]);
			}
		}
	if (jt.indexOf("javascript") == -1) {
		window.location.href = "/" + jt;
		}
	else {
		location.href = jt;
		}
	}

