// gh nurse site scripts -->

// tabbed panel function -->
var thumb = new Array('thumb1','thumb2','thumb3','thumb4','thumb5','thumb6','thumb7','thumb8','thumb9','thumb10','thumb11');
var pic = new Array('largepic1','largepic2','largepic3','largepic4','largepic5','largepic6','largepic7','largepic8','largepic9','largepic10','largepic11');

function changeLargepic(thumb,pic){
	hideall();
	showDoc(thumb,pic);
}

function hideall(){
	//loop through the array and hide each element by id
	for (var i=0;i<thumb.length;i++){
		hide(thumb[i],pic[i]);
	}		  
}

function hide(thumb,pic) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(thumb).className = "docthumb";
		document.getElementById(pic).style.display = "none";
	}
}

function showDoc(thumb,pic) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(thumb).className = "docthumb_sel";
		document.getElementById(pic).style.display = "block";
	}
}


var menu = new Array('physicianmenu','aboutmenu');
var arrow = new Array('physicianarrow','aboutarrow');

function openmenu(menu,arrow) {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(menu).className = "dropdown_on";
		document.getElementById(arrow).src = "images/menuarrow_hov.gif";
	}
}

function shutmenu(menu,arrow) {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(menu).className = "dropdown_off";
		document.getElementById(arrow).src = "images/menuarrow_def.gif";
	}
}


var tabs = new Array('tab1','tab2','tab3','tab4');
var ids = new Array('name','specialty','location','advanced');

function switchid(id,tab){
	hideallids();
	showdiv(id,tab);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i],tabs[i]);
	}		  
}

function hidediv(id,tab) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
		document.getElementById(tab).className = id + '_off';
	}
}

function showdiv(id,tab) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
		document.getElementById(tab).className = id + '_on';
	}
}

function expand(divID, linkID)
{
	if (document.getElementById) { // DOM3 = IE5, NS6
	    document.getElementById(divID).style.height = "auto";
	    document.getElementById(linkID).innerHTML = "Shrink article";
	    document.getElementById(linkID).href = "javascript: collapse('" + divID + "', '" + linkID + "');";
	}
}

function collapse(divID, linkID)
{
	if (document.getElementById) { // DOM3 = IE5, NS6
	    document.getElementById(divID).style.height = "120px";
	    document.getElementById(linkID).innerHTML = "Read more &gt;&gt;";
	    document.getElementById(linkID).href = "javascript: expand('" + divID + "', '" + linkID + "');";
	}
}
