// Highmark Javascript Functions
$(document).ready(function(){
	$(".ro").hover( 
    	function () { 
        	this.src = this.src.replace("_off","_on");
      	},  
      	function () { 
        	this.src = this.src.replace("_on","_off");
      	} 
    ); 
	
	$("#menu li a").mouseover(function() {
		$(this).parent().find(".sub").css("visibility","visible");
		
		$(this).parent().hover(
			function(){}, 
			function(){
				$(this).parent().find(".sub").css("visibility","hidden");
		});
	});
	$("#menu li .sub ul li a").mouseover(function() {
		$(this).parent().find(".subsub").css("visibility","visible");
		
		$(this).parent().hover(
			function(){}, 
			function(){
				$(this).parent().find(".subsub").css("visibility","hidden");
		});
	});
});

/* Opens a new, small window for additional information display. */
function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	winprops = 'height=' + h + ',width=' + w +',top=' + wint + ',left=' + winl + ',scrollbars=' + scroll + ',resizable';
	win = window.open(mypage, myname, winprops);
	
	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus(); 
	}
}

/* Shows or hides the contents of a container/div element. */
function show(id, lmsg, smsg, text, text2)
{
    var oElem = document.getElementById(id);
    var message = eval(lmsg);

    if(text == "")
    {
        if(message !== undefined)
        {
            oElem.innerHTML = message;
        }
        else
        {
            oElem.innerHTML = "";
        }
    }
    else
    {
        oElem.innerHTML = message + '<a href="#" onclick="hide(\'' + id +
            '\', \'' + smsg + '\', \'' + lmsg + '\', \'' + text + '\', \'' + text2
            + '\'); return false;">' + text + '</a>';
    }
}
function hide(id, smsg, lmsg, text, text2)
{
    var oElem = document.getElementById(id);
    var message = eval(smsg);
    
    if(text2 == "")
    {
        if(message !== undefined)
        {
            oElem.innerHTML = message;
        }
        else
        {
            oElem.innerHTML = "";
        }
    }
    else
    {
        oElem.innerHTML = message + '<a href="#" onclick="show(\'' + id +
            '\', \'' + lmsg + '\', \'' + smsg + '\', \'' + text + '\', \'' + text2
            + '\'); return false;">' + text2 + '</a>';
    }
}