<!-- page variables -->
var d = ''; // location of current file from root
var z = 0;
var y = 0;
var x = 4;

var u = 0;
var v = 0;
var w = 4;

var pause=0;
var rotate=0;

var links=0;

<!-- /page variables -->

var detaillength = 5;


var ver5up = false;
if (document.getElementById) {ver5up = true;}
function showHide(num) {
	// call like this: <a href="?PHPSESSID=17d33b30c2ee2b3858eb87bb45e09a1d" onmouseover="showHide('block','myDiv');" onmouseout="showHide('none','myDiv');"
	for (n = 0; n < detaillength; n++) {
		var display = 'none';
		if (n == num) {
			var display = 'block';
			clearTimeout(timer_id);
			rotator(n,detaillength);
			}
		document.getElementById('feat_'+n).style.display = display;
		}
	}
function rotator(n) {
	var g=0;
if(pause==1){
timer_id = setTimeout('rotator('+n+')',1000000000);
}
else{
	for (var i = 0; i < detaillength; i++) {
		var divid = 'feat_'+i;
		var display = 'none';
		if (i == n) {display = 'block';}
		document.getElementById(divid).style.display = display;
		}
	g=n+1;
	n++;
                if (n >= detaillength) {n = 0;}
	timer_id = setTimeout('rotator('+n+')',8000);
	document.getElementById("currentImage").innerHTML=g+" of 5";
	}
}

function switcher(n){
if(pause==0){
pause=1;
}
else{
pause=0;
x++;
showHide(x);
}
}

var detaillength = 5;
var ver5up = false;
if (document.getElementById) {ver5up = true;}
function showHideEvent(num) {
	for (n = 0; n < detaillength; n++) {
		var display = 'none';
		if (n == num) {
			var display = 'block';
			clearTimeout(timer_id);
			rotatorEvent(n,detaillength);
			}
		document.getElementById('feat_'+n).style.display = display;
		}
	}
function rotatorEvent(n) {
var h=0;
	for (var i = 0; i < detaillength; i++) {
		var divid = 'event_'+i;
		var display = 'none';
		if (i == n) {display = 'block';}
		document.getElementById(divid).style.display = display;
		}
	n++;
	if (n >= detaillength) {n = 0;}
	
	h=n+1;
	document.getElementById("currentImage").innerHTML=h+" of 5";

}






var detaillength2 = 5;
var ic = 5; 

function pickRandom(range) 
{ 
	if (Math.random) return Math.round(Math.random() * (range-1)); 
	else { var now = new Date(); 
	return (now.getTime() / 1000) % range; } } 
// Write out an IMG tag, using a randomly-chosen image name. 
var choice = pickRandom(ic); 



var ver5up2 = false;
if (document.getElementById) {ver5up2 = true;}
function showHideEvent2(num) {
rotate=1;
	for (n = 0; n < detaillength2; n++) {
		var display = 'none';
		if (n == num) {
			var display = 'block';
			rotatorEvent2(n,detaillength2);
			}
		document.getElementById('event_'+n).style.display = display;
		}
	}
	
	
	
function rotatorEvent2(n) {
	var q=0;
	if(rotate==0){
    n=0;
    }
    for (var i = 0; i < detaillength2; i++) {
		var divid = 'event_'+i;
		var display = 'none';
		if (i == n) {display = 'block';}
		document.getElementById(divid).style.display = display;
		}
	q=n+1;
	document.getElementById("currentImage2").innerHTML=q+" of 5";
	rotate=1;
}



function newslink(link){
//if(link =="Conferences - For Nurses"){
//document.write('<a href="http://www.childrensnational.org/nursing/environment/calendar/conferences/">More Conferences ></a>')
//}

//else if(link =="Conferences - For Doctors"){
//document.write('<a href="http://www.childrensnational.org/ForDoctors/cme/conferences/">More Conferences ></a>')
//}

//else if(link =="Conferences - Other"){
//document.write('<a href="http://www.childrensnational.org/archives/conferences/misc/">More Conferences ></a>')
//}

//else if(link =="Children in the News – News Releases"){
//document.write('<a href="http://www.childrensnational.org/pressroom/NewsReleases/">More News Releases></a>')
//}

//else if(link =="Children in the News – Media Coverage"){
//document.write('<a href="http://www.childrensnational.org/pressroom/ChildrensInTheNews/">More Media Coverage></a>')
//}

//else if(link =="Hospital Related News"){
//document.write('<a href="http://www.childrensnational.org/pressroom/HospitalRelated/news/">More Hospital Related News ></a>')
//}




//else if(link =="Features"){
//document.write('<a href="http://www.childrensnational.org/pressroom/features/">More Features ></a>')
//}

//else if(link =="Events - Foundation"){
//document.write('<a href="http://www.dcchildrensfoundation.com/">More Events - Foundation ></a>')
//}

//else if(link =="Events & Classes - For Doctors"){
//document.write('<a href="http://www.childrensnational.org/ForDoctors/cme/GrandRounds/">More Events & Classes></a>')
//}

//else if(link =="Events & Classes - Nurses"){
//document.write('<a href="http://www.childrensnational.org/nursing/environment/calendar/calendar.aspx">More Events & Classes ></a>')
//}

//else if(link =="Classes - Consumer"){
//document.write('<a href="http://www.childrensnational.org/ForPatients/classes/classes.aspx">More Classes></a>')
//}

//else if(link =="Events & Classes - Other / Miscellaneous"){
//document.write('<a href="http://www.childrensnational.org/archives/EventsClasses/misc/">More Events & Classes ></a>')
//}

//else if(link =="Hospital Alerts"){
//document.write('<a href="http://www.childrensnational.org/archives/NewsAndAlerts/misc/">More Hospital Alerts></a>')
//}

//else{
//document.write('<a href="http://www.childrensnational.org/pressroom/NewsReleases/">More News ></a>')
//}

}

function showlinks() {
if(links==0){
	document.getElementById('morelinks').style.display = 'block';
                 links=1;
                 }

else{
	document.getElementById('morelinks').style.display = 'none';
                 links=0;
                 }

}