/*
aphrodite@amxnetwork.com
20.06.02

Notice: Browser check takes place in browser_check.js

browserIE5
browserIE5_5
browserIE6
browserIE
browserNS 
browserNS6
*/

	function showHide(){//this function is called by the dynC function that follows
		for (c=0;c<arguments.length;c+=2){
		//arguments[c]="layer_name",arguments[c+1]="layer_visibility"
		var theObjVis=(browserNS7 || browserNS6|| browserIE5 || browserIE5_5 || browserIE6)?eval('document.getElementById("'+arguments[c]+'").style'):(browserNS)?eval('document.'+arguments[c]):eval('document.all.'+arguments[c]+'.style');
		var v=arguments[c+1];
		var v=(v=='show')?'visible':(v='hide')?'hidden':v;	
			if(browserNS7 || browserNS6|| browserIE5 || browserIE5_5 || browserIE6){
				theObjVis.visibility=v;
			}else if(browserIE){
				theObjVis.visibility=v;
			}else if(browserNS){
				theObjVis.visibility=v;
			}
		}
	}
	
var layerName=new Array();

function dyn(myDivs){//this is the function called from the html template
	for (l=0; l<layerName.length; l++){
		var layerState='hide';
		for(q=0; q<myDivs.length; q++){
			if(myDivs[q]==layerName[l]){
				layerState='show';
			}
		}
		showHide(layerName[l],layerState);
	}
}

var facilitiesName=new Array();

function dynFa(myfacilities){//this is the function called from the html template
	for (fs=0; fs<facilitiesName.length; fs++){
		var facilitiesState='hide';
		for(a=0; a<myfacilities.length; a++){
			if(myfacilities[a]==facilitiesName[fs]){
				facilitiesState='show';
			}
		}
		showHide(facilitiesName[fs],facilitiesState);
	}
}

/*needs this script inthe html template in order to declare the layers
<script language="JavaScript" type="text/javascript">
var layerName= ['0','1'];
</script>*/

function movePwdMask(dir, amt)
{
	// temp fix to position label mask over login password input
	// when club locator opened/closed
	
	var lDivStl = (browserNS7 || browserNS6|| browserIE5 || browserIE5_5 || browserIE6) ? document.getElementById('divPassword').style : (browserNS) ? document.divPassword : document.all.divPassword.style;
	var lDivTop = parseInt(lDivStl.top);
	switch(dir){
	case 'up':
		lDivTop -= amt;
		break;
	case 'down':
		lDivTop += amt;
		break;
	}
	lDivTopPx = lDivTop + 'px';
	lDivStl.top = lDivTopPx;
}
