<!--

if ((is_nav3up) || (is_ie4up)) br = "good";

else br = "bad";


var webSections = new Array();
		
webSections[0] = "profiles";
webSections[1] = "about";
webSections[2] = "prospective_members";
webSections[3] = "facilities";
webSections[4] = "holidays";
webSections[5] = "traditions";
webSections[6] = "shabbat";
webSections[7] = "calendar";
webSections[8] = "simchas";
webSections[9] = "links";
webSections[10] = "books";
webSections[11] = "recipes";
webSections[12] = "news";
webSections[13] = "isaeli_news";
webSections[14] = "feature_article";
webSections[15] = "parasha";
webSections[16] = "kids";
webSections[17] = "adults";
webSections[18] = "classes";
webSections[19] = "seniors";
webSections[20] = "israel_programs";
webSections[21] = "educators";


var currentPage = '';

// loop through the section array to identify the subscript of the section we're in                
for (i=0; i < webSections.length; i++) {
                
	if (webSections[i] == section) {
		i++;
		currentPage = "img" + i;
	}
}

       if (document.images) {            // Active Images
       
           img2on = new Image();img2on.src = "/images/sub_2_on.gif"; 
           img2off = new Image();img2off.src = "/images/sub_2_off.gif";
           img24on = new Image();img24on.src = "/images/sub_24_on.gif"; 
           img24off = new Image();img24off.src = "/images/sub_24_off.gif";
           img4on = new Image();img4on.src = "/images/sub_4_on.gif"; 
           img4off = new Image();img4off.src = "/images/sub_4_off.gif";              
           img1on = new Image();img1on.src = "/images/sub_1_on.gif"; 
           img1off = new Image();img1off.src = "/images/sub_1_off.gif";
           img3on = new Image();img3on.src = "/images/sub_3_on.gif"; 
           img3off = new Image();img3off.src = "/images/sub_3_off.gif"; 
           img32on = new Image();img32on.src = "/images/sub_32_on.gif"; 
           img32off = new Image();img32off.src = "/images/sub_32_off.gif";           
           img28on = new Image();img28on.src = "/images/sub_28_on.gif"; 
           img28off = new Image();img28off.src = "/images/sub_28_off.gif";
           img14on = new Image();img14on.src = "/images/sub_14_on.gif"; 
           img14off = new Image();img14off.src = "/images/sub_14_off.gif";
           img61on = new Image();img61on.src = "/images/sub_61_on.gif"; 
           img61off = new Image();img61off.src = "/images/sub_61_off.gif";
           img79on = new Image();img79on.src = "/images/sub_79_on.gif"; 
           img79off = new Image();img79off.src = "/images/sub_79_off.gif";
           img80on = new Image();img80on.src = "/images/sub_80_on.gif"; 
           img80off = new Image();img80off.src = "/images/sub_80_off.gif";
           img81on = new Image();img81on.src = "/images/sub_81_on.gif"; 
           img81off = new Image();img81off.src = "/images/sub_81_off.gif";
           img65on = new Image();img65on.src = "/images/sub_65_on.gif"; 
           img65off = new Image();img65off.src = "/images/sub_65_off.gif";
           img66on = new Image();img66on.src = "/images/sub_66_on.gif"; 
           img66off = new Image();img66off.src = "/images/sub_66_off.gif";
           img9on = new Image();img9on.src = "/images/sub_9_on.gif"; 
           img9off = new Image();img9off.src = "/images/sub_9_off.gif";
           img67on = new Image();img67on.src = "/images/sub_67_on.gif"; 
           img67off = new Image();img67off.src = "/images/sub_67_off.gif";
           img75on = new Image();img75on.src = "/images/sub_75_on.gif"; 
           img75off = new Image();img75off.src = "/images/sub_75_off.gif";
           img27on = new Image();img27on.src = "/images/sub_27_on.gif"; 
           img27off = new Image();img27off.src = "/images/sub_27_off.gif";                        	
           img22on = new Image();img22on.src = "/images/sub_22_on.gif"; 
           img22off = new Image();img22off.src = "/images/sub_22_off.gif";                          	
           img19on = new Image();img19on.src = "/images/sub_19_on.gif"; 
           img19off = new Image();img19off.src = "/images/sub_19_off.gif";                          	
           img20on = new Image();img20on.src = "/images/sub_20_on.gif"; 
           img20off = new Image();img20off.src = "/images/sub_20_off.gif";                           	
           img23on = new Image();img23on.src = "/images/sub_23_on.gif"; 
           img23off = new Image();img23off.src = "/images/sub_23_off.gif";                           	
           img62on = new Image();img62on.src = "/images/sub_62_on.gif"; 
           img62off = new Image();img62off.src = "/images/sub_62_off.gif";                           	
           img63on = new Image();img63on.src = "/images/sub_63_on.gif"; 
           img63off = new Image();img63off.src = "/images/sub_63_off.gif";                          	
           img64on = new Image();img64on.src = "/images/sub_64_on.gif"; 
           img64off = new Image();img64off.src = "/images/sub_64_off.gif";                          	
           img86on = new Image();img86on.src = "/images/sub_86_on.gif"; 
           img86off = new Image();img86off.src = "/images/sub_86_off.gif";                           	
           img76on = new Image();img76on.src = "/images/sub_76_on.gif"; 
           img76off = new Image();img76off.src = "/images/sub_76_off.gif";                          	
           img30on = new Image();img30on.src = "/images/sub_30_on.gif"; 
           img30off = new Image();img30off.src = "/images/sub_30_off.gif";                           	
           img13on = new Image();img13on.src = "/images/sub_13_on.gif"; 
           img13off = new Image();img13off.src = "/images/sub_13_off.gif";
           img8on = new Image();img8on.src = "/images/sub_8_on.gif"; 
           img8off = new Image();img8off.src = "/images/sub_8_off.gif";
           img6on = new Image();img6on.src = "/images/sub_6_on.gif"; 
           img6off = new Image();img6off.src = "/images/sub_6_off.gif";
           img10on = new Image();img10on.src = "/images/sub_10_on.gif"; 
           img10off = new Image();img10off.src = "/images/sub_10_off.gif";
           img143on = new Image();img143on.src = "/images/sub_143_on.gif"; 
           img143off = new Image();img143off.src = "/images/sub_143_off.gif";
           img144on = new Image();img144on.src = "/images/sub_144_on.gif"; 
           img144off = new Image();img144off.src = "/images/sub_144_off.gif";
           img145on = new Image();img145on.src = "/images/sub_145_on.gif"; 
           img145off = new Image();img145off.src = "/images/sub_145_off.gif";
           img120on = new Image();img120on.src = "/images/sub_120_on.gif"; 
           img120off = new Image();img120off.src = "/images/sub_120_off.gif";
                                      	
  		   img99on = new Image();img99on.src = "/images/home_on.gif"; 
           img99off = new Image();img99off.src = "/images/home_off.gif";  
           
           
           cat1Aon = new Image();cat1Aon.src = "/images/nav_cat1_on.gif";
           cat1Aoff = new Image();cat1Aoff.src = "/images/nav_cat1_off.gif";
           cat2Aon = new Image();cat2Aon.src = "/images/nav_cat2_on.gif";
           cat2Aoff = new Image();cat2Aoff.src = "/images/nav_cat2_off.gif";
           cat5Aon = new Image();cat5Aon.src = "/images/nav_cat5_on.gif";
           cat5Aoff = new Image();cat5Aoff.src = "/images/nav_cat5_off.gif";
           cat9Aon = new Image();cat9Aon.src = "/images/nav_cat9_on.gif";
           cat9Aoff = new Image();cat9Aoff.src = "/images/nav_cat9_off.gif";
           cat4Aon = new Image();cat4Aon.src = "/images/nav_cat4_on.gif";
           cat4Aoff = new Image();cat4Aoff.src = "/images/nav_cat4_off.gif";
           cat8Aon = new Image();cat8Aon.src = "/images/nav_cat8_on.gif";
           cat8Aoff = new Image();cat8Aoff.src = "/images/nav_cat8_off.gif";
           
       }

function imgOn(imgName) {
        if (br == "good") {
        
        		//alert('imgOn...' + imgName);
                document[imgName].src = eval(imgName + "on.src");
                //document.hold.src = eval(imgName + "hold.src");
                
                //window.status = eval(imgName + "copy");
       			
       }

}

function imgOff(imgName) {
        if (br == "good") {
                
                if (imgName == currentPage) {
                	document[imgName].src = eval(imgName + "on.src");
	            } else { 
	            	document[imgName].src = eval(imgName + "off.src");
	            }
  				     
        
        }

}


// Determine browser.

var isMinNS4 = document.layers
var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
var dom=document.getElementById&&!ie&&navigator.userAgent.indexOf("Opera")==-1

//-----------------------------------------------------------------------------
// Layer visibility.
//-----------------------------------------------------------------------------

//if (dom) { alert('DOM'); }

function hideLayer(layer) {
	
  if (isMinNS4) {
  
    document.layers[layer].visibility = "hide";
  
	}
	  
  if (ie||dom) {
  
  	elm = document.getElementById(layer);
	elm.style.visibility = "hidden";
	}
}

function showLayer(layer) {
	//alert('showLayer' + layer);
	clearTimeout(TimeOutNum);
	beginHide();
	

  if (isMinNS4) {
  	
    document.layers[layer].visibility = "show";
    imgOn(layer + 'A');
    
    }
    
  if (ie||dom) {
  
	elm = document.getElementById(layer);
	elm.style.visibility = "visible";
	imgOn(layer + 'A');
	}

}

function beginHide() {

		var allMenuLayers = Array('cat1','cat2','cat5','cat9','cat4','cat8');

		for (var i=0; i<allMenuLayers.length; i++) {
			
			//alert('beginHide' + allMenuLayers[i]);
			
			if (isMinNS4) {
				
				document.layers[allMenuLayers[i]].visibility="hide";
				imgOff(allMenuLayers[i] + 'A');
				//alert('ON');
			} 
			
			if (ie||dom) {
			
			elm = document.getElementById(allMenuLayers[i]);
			elm.style.visibility = "hidden";
			imgOff(allMenuLayers[i] + 'A');
			}
		
		}
	}

var TimeOutNum = 0;

function SetTimer() {

	TimeOutNum = setTimeout('beginHide();',1000);
	
}


// -->
