	var isNav = (navigator.appName.indexOf("Netscape") != -1);
	var count=0;
	var layerArray = new Array();
	
	//====================================================================
	function playSound(soundfile, loops) {
	//====================================================================
		var numTimes = (arguments.length>1)?loops:1;
		if (isNav)
			document.write("<EMBED SRC='" + soundfile + "' HEIGHT=\"0\" WIDTH=\"0\" AUTOSTART='TRUE'></EMBED>");
		else
			document.write ("<NOEMBED><BGSOUND SRC='" +soundfile + "' LOOP='" + numTimes + "'></NOEMBED>");

	}
	//====================================================================
	function openLayer(layerName) {
	//====================================================================
		if (isNav)
			document.write ("<LAYER ID=" + layerName + ">");
		else
			document.write ("<DIV ID=" + layerName + ">");
	}
	//====================================================================
	function closeLayer (layerName) {
	//====================================================================
		if (isNav) {
			document.write ("</LAYER>");
			document.layers[layerName].visibility = "hide";
		}
		else {
			document.write ("</DIV>");
			document.all(layerName).style.visibility = "hidden";
		}		
	}
	//====================================================================
	function drawAd(width, height, gif, href, alt) {
	//====================================================================
		if (href.length > 0) {
			document.write ("<A HREF=" + href + " target=detail>");
		}
		document.write ("<IMG border=0 width=" + width + " height=" + height + " SRC= " + gif + " ALT=\"" + alt + "\"></IMG>");
		if (href.length > 0) {
			document.write ("</A>");
		}
	}
	//====================================================================
	function startTable() {
	//====================================================================
		document.write ("<table border=0 cellspacing=2 cellpadding=0>");
	}
	//====================================================================
	function endTable() {
	//====================================================================
		document.write ("</table>");
	}
	//====================================================================
	function startRow() {
	//====================================================================
		document.write ("<tr>");
	}
	//====================================================================
	function endRow() {
	//====================================================================
		document.write ("</tr>");
	}
	//====================================================================
	function startCell(width, height, align, valign, colspan) {
	//====================================================================
		document.write ("<td WIDTH= " + width + " HEIGHT= " + height + 
			" ALIGN=" + align + " VALIGN=" + valign + " COLSPAN=" + colspan + ">");
	}
	//====================================================================
	function endCell() {
	//====================================================================
		document.write ("</td>");
	}
	//====================================================================
	function juggleLayers () {
	//====================================================================
			
		if (isNav) {
			document.layers[layerArray[count]].visibility = "hide";
		}
		else
			document.all(layerArray[count]).style.visibility="hidden";
		//for (var i = 0; i < 2200000; ++i);
	//status = document.layers[layerArray[count]];
		count = (count + 1)% (layerArray.length);
		if (isNav)
			document.layers[layerArray[count]].visibility = "show";
		else
			document.all(layerArray[count]).style.visibility="visible";
	}
	//====================================================================
	function showLayer() {
	//====================================================================
	var whichLayer = Math.floor(Math.random() * 89 * Math.random()) % (layerArray.length);
	status = whichLayer;
	count = whichLayer;
	if (isNav)
		document.layers[layerArray[count]].visibility = "show";
	else
		document.all(layerArray[count]).style.visibility="visible";
	}

