var gActiveElement = 0;var gThisHTML;var gFileType;var gNextArray;var gFileName;var gFileNameEnglish;var gFileWidth;var gFileHeight;var gFileBgColor;var gFileComments;var commentFont = '<font face="verdana, arial, helvetica, sans-serif" size=-2 color="#999999">';function initPlaylistVars() {	var locationString	= location.search;	var pos				= locationString.indexOf("?");	var passedElement	= (pos != -1) ? locationString.substring(pos+1,locationString.length) : false;	if (passedElement) {		gActiveElement = parseInt(locationString.substring(pos+1,locationString.length));		}	// gActiveElement is the array element we're working with.		var pathString	= location.pathname;	var start		= pathString.lastIndexOf("/");	gThisHTML		= pathString.substring((start+1), pathString.length);	// gThisHTML is the html file calling all this stuff 	gFileName			= playList[gActiveElement][0];	gFileNameEnglish	= playList[gActiveElement][1];	gFileWidth			= parseInt(playList[gActiveElement][2]);	gFileHeight			= parseInt(playList[gActiveElement][3]);	gFileBorder			= parseInt(playList[gActiveElement][4]);	gFileBorderColor	= playList[gActiveElement][5];	gFileBgColor		= playList[gActiveElement][6];	gFileComments		= playList[gActiveElement][7];	gFileType			= gFileName.substring( (gFileName.lastIndexOf(".") + 1), gFileName.length)	// alert("file type is " + fileType);	gNextArray = 0;	if (gActiveElement < (playList.length-1)) {		gNextArray = gActiveElement + 1;	}}function embedFile() {	//  PLACING AN IMAGE FILE //	if ((gFileType == "jpg") || (gFileType == "gif")) {		document.write('<table cellspacing="0" cellpadding=0" border="0">');		document.write('<tr><td>');				if (gNextArray != gActiveElement) {			document.write('<a href="' + gThisHTML +'?'+ gNextArray + '">');			}				if (gFileBgColor != "") {			document.write('<font color="' + gFileBgColor + '">');		}				document.write('<img src="' + gFileName + '" ');		document.write('border="'  + gFileBorder  + '" ');		document.write('alt="'  + gFileNameEnglish  + '" ');		if (gFileWidth != 0) {			document.write('width="'  + gFileWidth  + '" ');			document.write('height="' + gFileHeight + '" ');		}		document.write('hspace="" vspace="5"></font>');				if (gNextArray != gActiveElement) {			document.write('</a>');			}					document.write('</td></tr>');				if (gNextArray != gActiveElement) {			// don't put a "next" button if there's only one file on display			document.write('<tr><td align="right" valign="top">');			document.write(commentFont + '&gt; <a href="' + gThisHTML +'?'+ gNextArray + '">next</a>');			document.write('</td></tr>');			}				document.write('</table>');	}	// PLACING A SWF FILE //	else if ((gFileType == "swf") || (gFileType == "mov")) {		document.write('<table width="' + (gFileWidth + (2 * gFileBorder)) );		document.write(' height="'  + (gFileHeight + (2 * gFileBorder)) );		document.write(' cellspacing="0" cellpadding="' + gFileBorder + '" border="0" bgcolor="' + gFileBorderColor +'">');		document.write('<tr><td>');				if (gFileType == "swf") {			document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');			document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ');			document.write('WIDTH=' + gFileWidth + ' HEIGHT=' + gFileHeight + '> ');			document.write('<PARAM NAME=movie VALUE="' + gFileName + '"> ');			document.write('<PARAM NAME=loop VALUE=false> ');			document.write('<PARAM NAME=quality VALUE=high> ');			document.write('<PARAM NAME=bgcolor VALUE=#' + gFileBgColor + '> ');			document.write('<EMBED src="' + gFileName + '" ');			document.write('loop=false quality=high bgcolor=#' + gFileBgColor + ' ');			document.write('WIDTH=' + gFileWidth + ' ');			document.write('HEIGHT=' + gFileHeight + ' ');			document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');		} else {			document.write('<embed width="'+gFileWidth+'" height="'+(gFileHeight+16)+'" kioskmode="true" cache="true" ');			document.write('bgcolor="' + gFileBgColor + '" src="'+gFileName+'" controller="true" border="0" pluginspage="http://www.apple.com/quicktime/download/index.html"></embed><br>');		}				document.write('</td></tr></table>');				document.write('<table border=0 width="' + (gFileWidth + (2 * gFileBorder)) );		document.write(' cellspacing="0" cellpadding="' + gFileBorder + '" border="0">');		document.write('<tr><td align="left" valign="top">');					if (gFileType == "swf") {			document.write(commentFont + '&gt; <a href="' + gThisHTML +'?'+ gActiveElement + '">replay</a>');			}		document.write('</td><td align="right" valign="top">');				if (gNextArray != gActiveElement) {			document.write(commentFont + '&gt; <a href="' + gThisHTML +'?'+ gNextArray + '">next</a>');			}		document.write('</td></tr></table>');			}		if (gFileComments != "") {		document.write(commentFont + '<p>&gt; ' + gFileComments + '</font>');		}}function makeDropDown() {	document.write('<select style="background-color:#555555; border-style:0; ');	document.write('font-size: 9; color: #FFFFFF; font-family: verdana, arial, helvetica, sans-serif" ');	document.write('name="drop" onchange="javascript:(window.location=this.options[this.selectedIndex].value);"> ');		for (var i=0; i<playList.length; i++) 		{ 		SelectIfTrue = ""; 		if (i == gActiveElement) {			SelectIfTrue = "selected";			}		// alert('<option value="' + gThisHTML + '?' + i + '" ' + SelectIfTrue + '>'+ playList[i][1] +'</option>'); 		document.write('<option value="' + gThisHTML + '?' + i + '" ' + SelectIfTrue + '>'+ playList[i][1] +'</option>'); 		}	document.write('</select>');}function resizeFix() {	// window resize fix (netscape)	if (!(navigator.appVersion.indexOf("MSIE") != -1)) {		// netscape blanks out if resize the window.  This refreshes it.		location.reload(location.href);	}}