
// MENU MOUSEOVERS

/***********************************************
* Highlight Table Cells Script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TD"

var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,highlightcolor){
source=ie? event.srcElement : e.target
if (source.tagName=="TABLE")
return
while(source.tagName!=highlightbehavior && source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function contains_ns6(master, slave) { //check if slave is contained by master
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor){
if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor
}


//SHOW HIDE DIVS////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
Highlight Image Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

function makevisible(cur,which){
if (which==0)
	cur.filters.alpha.opacity=75
else
	cur.filters.alpha.opacity=100
}


/* Show / Hide */
if (parseInt(navigator.appVersion) > 3) {
	if (navigator.appName == "Netscape") {
		layerVar="document.layers";
		styleVar="";
	}else{
		layerVar="document.all";
		styleVar=".style";
	}
}

function skf_ShowHideLayer(TheLayer,TheAttrib) {
	if (parseInt(navigator.appVersion) > 3) {
		eval(layerVar + '["' + TheLayer + '"]' + styleVar + '.display = "' + TheAttrib + '"');
	}
}

function hideAll(){
//	skf_ShowHideLayer('layer1','none');
//	skf_ShowHideLayer('layer1a','none');
//	skf_ShowHideLayer('layer2','none');
//	skf_ShowHideLayer('layer2a','none');
//	skf_ShowHideLayer('layer3','none');
//	skf_ShowHideLayer('layer3a','none');
//	skf_ShowHideLayer('layer5','none');
//	skf_ShowHideLayer('layer5a','none');
//	skf_ShowHideLayer('layer6','none');
//	skf_ShowHideLayer('layer6a','none');
//	skf_ShowHideLayer('layer7','none');
//	skf_ShowHideLayer('layer7a','none');
//	skf_ShowHideLayer('layer8','none');
//	skf_ShowHideLayer('layer8a','none');
	hideallids();
}

//here you place the ids of every element you want.
var ids=new Array('layer1','layer2','layer3');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}


//function toggle(target)
//{
   //obj=(document.all) ? document.all[target] : document.getElementById(target);
   //obj.style.display=(obj.style.display=='none') ? 'inline' : 'none';
//}

// toggle visibility 
function toggle(targetId){ 

  if (document.getElementById){ 
        target = document.getElementById( targetId ); 
           if (target.style.display == "none"){ 
              target.style.display = ""; 
           } else { 
              target.style.display = "none"; 
           } 
     } 
} 


