
// dhtml for collapsing

document.WM = new Object();
document.WM.menu = new Object();
document.WM.menu.dropdown = new Array();

function WM_initializeToolbar(){
    var i;
    if (document.all){
	for(i = 0; i < document.all('container').all.length; i++){
	    if ((document.all('container').all[i].className == 'header') ||
(document.all('container').all[i].className == 'links')){
		document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= document.all('container').all[i];
	    }
	}
    } else if (document.getElementsByTagName && document.getElementById){
	var contained =
document.getElementById('container').getElementsByTagName('div');
	for(i = 0; i < contained.length; i++){
	    if ((contained[i].getAttribute('class') == 'header') ||
(contained[i].getAttribute('class') == 'links')){
		document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= contained[i];
	    }
	}
    }
}

function WM_collapse(item){
    if(document.WM.menu.dropdown.length){
	if (document.WM.menu.dropdown[item + 1].style.display == 'none'){
	    document.WM.menu.dropdown[item + 1].style.display = '';} 
	else { document.WM.menu.dropdown[item + 1].style.display = 'none';}
    }
}


//dhtml for displaying layers
function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}

//functions for the dhtml tabs
function tab1() {ShowContent('tab1'); HideContent('tab2'); HideContent('tab3'); HideContent('tab4'); 
if (document.images) document.tabs1.src= 'images/tabs_on_01.gif';
if (document.images) document.tabs2.src= 'images/tabs_off_02.gif';
if (document.images) document.tabs3.src= 'images/tabs_off_03.gif';
if (document.images) document.tabs4.src= 'images/tabs_off_04.gif';
}




function tab2() {ShowContent('tab2'); HideContent('tab1'); HideContent('tab3'); HideContent('tab4'); 
if (document.images) document.tabs1.src= 'images/tabs_off_01.gif';
if (document.images) document.tabs2.src= 'images/tabs_on_02.gif';
if (document.images) document.tabs3.src= 'images/tabs_off_03.gif';
if (document.images) document.tabs4.src= 'images/tabs_off_04.gif';
}

function tab3() {ShowContent('tab3'); HideContent('tab1'); HideContent('tab2'); HideContent('tab4');
if (document.images) document.tabs1.src= 'images/tabs_off_01.gif';
if (document.images) document.tabs2.src= 'images/tabs_off_02.gif';
if (document.images) document.tabs3.src= 'images/tabs_on_03.gif';
if (document.images) document.tabs4.src= 'images/tabs_off_04.gif';
}

function tab4() {ShowContent('tab4'); HideContent('tab1'); HideContent('tab2'); HideContent('tab3'); 
if (document.images) document.tabs1.src= 'images/tabs_off_01.gif';
if (document.images) document.tabs2.src= 'images/tabs_off_02.gif';
if (document.images) document.tabs3.src= 'images/tabs_off_03.gif';
if (document.images) document.tabs4.src= 'images/tabs_on_04.gif';
}