/* attempt to highlight the link to the current page */
function highlightCurrentLink() {
    var a = document.getElementsByTagName("A");
    var href = window.location.href.split("#")[0];
    var hrefSplit = href.split("/");
    var hrefSplitLength = hrefSplit.length;

    if (hrefSplitLength > 2 && hrefSplit[hrefSplitLength - 2] == 'demo') {
        var elem = document.getElementById("demoProjects");
		doHighlight(elem);
		return;
    }

    for(var i=0;i<a.length;i++) {
        if(a[i].href == href) {
			doHighlight(a[i]);
        }
    }
}

function doHighlight(elem) {
	var cssString = 'background-color:#99CCFF;';
	if( typeof(elem.style.cssText) == 'string' ) {
	    elem.style.cssText = cssString;
	}
	elem.setAttribute('style',cssString); 
}

/* handles demo project pop-up (NOT USED ANYMORE)*/
/*
var demoProjectsElem = document.getElementById("demoProjects");

function hideDemoProjects() {
	demoProjectsElem.style.display = "none";
}


function showDemoProjects() {
	demoProjectsElem.style.display = "";
}

hideDemoProjects();
*/
