var currentWindow = null;var counter = 0;function reset(){	currentWindow = null;}function openNewWindow(audiofile, imagefile, subtitles, top, left, width, height) { 	counter++;	//alert (typeof(currentWindow));	//alert(currentWindow);	if (currentWindow != null) {		//alert ('currentWindow is true - going to kill it');		currentWindow.close();	}	newWindow=window.open('','Win'+counter+'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,top='+ top +',left='+ left +',width='+ width +',height='+ height);	newWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">');	newWindow.document.write('<html lang="en">');	newWindow.document.write('<head>');	newWindow.document.write('<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">');	newWindow.document.write('<title>FOLLOW THE TRAIL</title><link rel="stylesheet" type="text/css" href="scripts/styles.css">');	newWindow.document.write('</head>');	newWindow.document.write("<body bgcolor='#F7EEB2' marginwidth='0' marginheight='0' topmargin='0' style='margin: 0px;' onunload='javascript:opener.reset();'>");	newWindow.document.write('<div style="width:100%;text-align:center;">');	newWindow.document.write("<a href='javascript:this.close()'>");	newWindow.document.write('<img src="imgaudio/'+imagefile+'" alt=""  border="0"></a>');	newWindow.document.write('<br><span class="subtitles">'+subtitles+'</span><br><br>');	newWindow.document.write('<object width="160" height="16"');	newWindow.document.write('CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">');	newWindow.document.write('	<PARAM name="src"        VALUE="imgaudio/'+audiofile+'">');	newWindow.document.write('	<PARAM name="autoplay"   VALUE="true">');	newWindow.document.write('	<PARAM name="controller" VALUE="true">');	newWindow.document.write('   <PARAM NAME="volume"     VALUE="90">');	newWindow.document.write('   <PARAM NAME="type"       VALUE="audio/x-aiff">');	newWindow.document.write('<EMBED SRC="imgaudio/'+audiofile+'" ');	newWindow.document.write('	TYPE="audio/x-aiff"');	newWindow.document.write('	WIDTH="160"');	newWindow.document.write('	HEIGHT="16"');	newWindow.document.write('	VOLUME="90"');	newWindow.document.write('	AUTOPLAY="true"');	newWindow.document.write('	CONTROLLER="true"');	newWindow.document.write('	PLUGINSPAGE="http://www.apple.com/quicktime/download/">');	newWindow.document.write('</EMBED>');	newWindow.document.write('</OBJECT>');	newWindow.document.write('</div>');	newWindow.document.write('</body>');	newWindow.document.write('</html>');	newWindow.focus();	currentWindow = newWindow;	newWindow.document.close();}/***********************************************************///POP UPS BELOW// open winfunction newwin(url, width, height) {	Win = window.open(url,'Win','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,top='+ ((screen.height/2)-(height/2)) +',left='+ ((screen.width/2)-(width/2)) +',width='+width+',height='+height);		//Win.focus();}