/* Author: Rock Creek Strategic Marketing
	Modified: 10/06/07
*/

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.dropDown{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(subnavcontent){
if(document.getElementById){
var el = document.getElementById(subnavcontent); // Assign Object ID Argument
var ar = document.getElementById("secondaryNav").getElementsByTagName("div");  // Assign Collection
var base = document.getElementById("dropDownHome").style; // Assign Static Object ID

if(el.style.display != "block"){

for (var i=0; i<ar.length;i++){
if (ar[i].className=="dropDown")
ar[i].style.display = "none";
} // end of for
el.style.display = "block";
} // end of if
else{
el.style.display = "none";
base.display = "block";
// reset to default item when all is clear
} // end of else
} // end of if
} // end of function

/*
var changeTab = "";
var insideTimeout = false;

function clearDisplayTab() {
	changeTab = "";
	insideTimeout = false;
}

function DisplayMenu2(subnavcontent) {
	if (changeTab != subnavcontent)
		insideTimeout = false;
	if (insideTimeout == true) {
		if (changeTab == subnavcontent)
			DisplayMenu(subnavcontent);
		changeTab = ""
		insideTimeout = false;
	}
	else {
		changeTab = subnavcontent;
		insideTimeout = true;
		var t = setTimeout("DisplayMenu2('" + subnavcontent + "')", 500);
	}
}*/

function DisplayMenu(subnavcontent) {
	if(document.getElementById) {
		var el = document.getElementById(subnavcontent); // Assign Object ID Argument
		var ar = document.getElementById("secondaryNav").getElementsByTagName("div");  // Assign Collection
		var base = document.getElementById("dropDownHome").style; // Assign Static Object ID
		for (var i=0; i<ar.length;i++) {
			if (ar[i].className=="dropDown")
				ar[i].style.display = "none";
		}
		el.style.display = "block";
	}
}

function HideMenu() {
	if(document.getElementById) {
		var ar = document.getElementById("secondaryNav").getElementsByTagName("div");  // Assign Collection
		for (var i=0; i<ar.length;i++) {
			if (ar[i].className=="dropDown")
				ar[i].style.display = "none";
		}
	}
}

function SwitchIcon(subnavcontent, icn){
SwitchMenu(subnavcontent);
if(document.getElementById){
var el = document.getElementById(subnavcontent); //  Assign Object ID Argument
var ec = document.getElementById(icn); //  Assign Object ID Argument
var ai = document.getElementById("gNav").getElementsByTagName("img"); // Assign Collection
if(el.style.display == "block"){
// reset icon
for (var i=0; i<ai.length; i++){
if (ai[i].className=="arrowicon")
ai[i].src = "http://www.nurse.com/images/nav_expand.gif";
} // end of for
ec.src = "http://www.nurse.com/images/nav_collapse.gif"; // set
} // end of if
else {
ec.src = "http://www.nurse.com/images/nav_expand.gif";
} // end of else
} // end of if
} // end of function

// Rollover and Rollout are optional. If not used remove paramenters from the Event Handler.

function RolloverIcon(subnavcontent, icn){
if(document.getElementById){
var el = document.getElementById(subnavcontent); //  Assign Object ID Argument
var ec = document.getElementById(icn); // Assign Object ID Argument
var ai = document.getElementById("gNav").getElementsByTagName("img"); // Assign Collection
if(el.style.display == "block"){
for(var i=0; i<ai.length; i++){
if(ai[i].className == "arrowicon")
ai[i].src = "http://www.nurse.com/images/nav_expand.gif";
}
ec.src = "http://www.nurse.com/images/nav_collapse_over.gif";
	} else {
	ec.src = "http://www.nurse.com/images/nav_expand_over.gif";
	}

}
}

function RolloutIcon(subnavcontent, icn){
if(document.getElementById){
var el = document.getElementById(subnavcontent); //  Assign Object ID Argument
var ec = document.getElementById(icn); //  Assign Object ID Argument
var ai = document.getElementById("gNav").getElementsByTagName("img"); // Assign Collection
if(el.style.display == "block"){
for(var i=0; i<ai.length; i++){
if(ai[i].className == "arrowicon")
ai[i].src = "http://www.nurse.com/images/nav_expand.gif";
}
ec.src = "http://www.nurse.com/images/nav_collapse.gif";
	} else {
	ec.src = "http://www.nurse.com/images/nav_expand.gif";
	}

}
}