<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function SwapClass(){ //v1.4 by PVII
 var i,x,tB,j=0,tA=new Array(),arg=SwapClass.arguments;
 if (arg[1] == null || (arg[1].length == 0)) {
	 	return;
 }
 if(document.getElementsByTagName){for(i=4;i<arg.length;i++){tB=document.getElementsByTagName(arg[i]);for(x=0;x<tB.length;x++){
		tA[j]=tB[x];j++;
	}
	}for(i=0;i<tA.length;i++){

	if(tA[i].className){if(tA[i].id==arg[1]){if(arg[0]==1){
	
	tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}else{tA[i].className=arg[2];}
	}else if(arg[0]==1 && arg[1]=="none"){if(tA[i].className==arg[2] || tA[i].className==arg[3]){
	tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
	} else if(tA[i].className==arg[2])	{
				tA[i].className=arg[3];
			}
			
	}}}
}

var cellBackgroundColor="#D2E7FC";
var fontColor="#000000";
var white="#ffffff";
var black="#000000";
var blue="#0066cc";
var pathPrefix ="";
var section="";
var subsection="";
var subsection2="";

function expandDOM(el, image) {
	whichEl =  document.getElementById(el);
	whichImage = document.getElementById(image);
	if (!whichEl || !whichImage) {
		return;
	}
	
	if (whichEl.style.display == "none") {
		whichEl.style.display = "block";
		if (image) {
			document.images[image].src = pathPrefix + "images/Ranchville/menminus.gif";
		}
	} else {
		whichEl.style.display = "none";
		if (image )
			document.images[image].src =  pathPrefix + "images/Ranchville/menplus.gif"; 
   }
}
function collapse(el) {
	
	var whichEl =  document.getElementById(el);
	if (!whichEl) {
		return;
	}
	whichEl.style.display = "none";
}
function nohilite(el, subsection) {
	var whichEl =  document.getElementById(el);
	var whichElCell = document.getElementById(el+'Cell');
	var whichElHeading = document.getElementById(subsection+'Heading');
	
	if (!whichEl) {
		return;
	}
	whichEl.style.color = blue;  
	whichElHeading.style.color = blue;  
	whichElCell.style.backgroundColor = white;
}
function expandComponent(elCell, el, elSection) {
	
	
	var whichEl =  document.getElementById(el);
	if (!whichEl) {
		return;
	}
	//remember previous cell state
	previousSection = section;
	previousSubsection = subsection;
	previousSubcomponent = subcomponent;
	section = elSection;
	subcomponent = el;
	subsection = elCell;
	collapse(previousSubcomponent);
	nohilite(previousSubsection, previousSection);
	if ((whichEl.style.display == "none")) {
		whichEl.style.display = "block";
	} else {
	     whichEl.style.display = "none";
	}
	
	hiliteSubsection(elCell);
	hiliteSection(elSection+'Heading');
}

function initMenu(){
	var tempCol = document.getElementsByTagName("DIV") ;
    for (i=0; i<tempCol.length; i++) {
        if ((tempCol[i].className == "child") ) {
            tempCol[i].style.display = "none";
		}
    }
	
	if ((section != null) && (subsection == null)) {
        hiliteSection(section);
     } else if ((section != null) && (subsection != null)) {
		
        expandDOM(section,section+'Box');
        hiliteSection(section+'Heading');
        hiliteSubsection(subsection);
     } 
}      
function initMenuWithComponent(){
		var tempCol = document.getElementsByTagName("DIV") ;
		for (i=0; i<tempCol.length; i++) {
			if ((tempCol[i].className == "child") )
				tempCol[i].style.display = "none";
		}
		
   	if (section) {
		expandDOM(section,section+'Box');
	}
	if (subcomponent) {
		expandComponent(subsection,subcomponent, section);
	}
} 
function hiliteSection(el) {	
	var text= null;
	text = document.getElementById(el);
	
	if (text) {
		text.style.color = black; 
	}
}

function hiliteSubsection (subsection) {	
	var text= null;
	var subtext = null;
	if (subsection) {
		text = document.getElementById(subsection);
		if (text) {
			text.style.color = black; 
		}
		subtext = document.getElementById(subsection +'Cell');
		if (subtext) {
			subtext.style.backgroundColor=cellBackgroundColor;  
		}
	}
}
// For new left navigation 4/5/2005 release
function ActivateNavSection() {
	SwapClass(1,section,'nav-sub1-active','nav-sub1', 'div');
    SwapClass(1,section + 'Link','nav-sub1-active-a','nav-sub1-a', 'a');

	SwapClass(1,section+ 'Subsection','Ranchville-sub-show', 'Ranchville-sub-hide', 'div');
   	SwapClass(1,subsection,'nav-sub2', 'nav-sub2-active', 'div');
    SwapClass(1,subsection+'Link','nav-sub2-active-a', 'nav-sub2-a', 'a');

	SwapClass(1,subsection+ 'Subsection','Ranchville-sub-show3', 'Ranchville-sub-hide3', 'div');
   	SwapClass(1,subsection2,'nav-sub3', 'nav-sub3-active', 'div');
    SwapClass(1,subsection2+'Link','nav-sub3-active-a', 'nav-sub3-a', 'a');

}
//-->
