// Main code, run whenever this js file is linked

	if( document.images ) {
		var thisAd = 0; 
		var adImages = new Array( "images/banner0.gif", "images/banner1.gif", "images/banner2.gif" );
	}

	var browserSupportsMenus = ( parseInt( navigator.appVersion ) >= 3 );


// JavaScript functions used by index.html

	function showLayer( layerName ) {
		if( parseInt( navigator.appVersion ) > 3 ) {
	   		if (navigator.appName == "Netscape") {  
     				eval('document.layers[layerName].visibility = "visible"');
			} else {
				eval(' document.all.' + layerName + '.style.visibility="visible" ');
			}
		}
	}

	function hideLayer( layerName, callType ) {
		if( parseInt( navigator.appVersion ) > 3 ) {
			if( navigator.appName == "Netscape" ) {  
				eval( 'document.layers[layerName].visibility = "hidden"' );
			} else {
				eval( ' document.all.' + layerName + '.style.visibility="hidden" ' );
			}
		}
	}

	function cycleAds( ) {
		if( document.images ) {
			if( document.images.adBanner.complete ) {
                        thisAd = ( thisAd + 1 ) % adImages.length;
				document.images.adBanner.src = adImages[thisAd];
			}
		setTimeout( "cycleAds( )", 3000 );
		}
	}

	function newWindow(url_href,name,width,height) {
		var xPos = 180, yPos = 50;
		var winCoords;
		if (navigator.appName == "Netscape") {
			winCoords = "screenX=" + xPos + ", screenY=" + yPos;
		} else if (navigator.appVersion.indexOf("MSIE") != -1) {
			winCoords = "left=" + xPos + ", top=" + yPos;
		}
		newwin = window.open( url_href, name, "copyhistory=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,height=" + height + ",width=" + width + "," + winCoords );
		newwin.focus();
	}

	function newWindowScroll(url_href,name,width,height) {
		var xPos = 180, yPos = 50;
		var winCoords;
		if (navigator.appName == "Netscape") {
			winCoords = "screenX=" + xPos + ", screenY=" + yPos;
		} else if (navigator.appVersion.indexOf("MSIE") != -1) {
			winCoords = "left=" + xPos + ", top=" + yPos;
		}
		newwin = window.open( url_href, name, "copyhistory=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,height=" + height + ",width=" + width + "," + winCoords );
		newwin.focus();
	}

