MM_contentVersion = 6;
var pluginType = 'Netscape';
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<scr' + 'ipt language="VBScript"\>\n');
	document.write('on error resume next\n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('pluginType = "activeX"\n');
	document.write('</scr' + 'ipt\> \n');
}

if (document.platform == 'Win32' && pluginType == 'activeX') {
	pluginType = 'activeX';
}

function resetFormText(elm) {
	if (elm.value == elm.defaultValue) {
		 elm.value = '';
	} else if (elm.value == '') {
		elm.value = elm.defaultValue;
	}
}
			
function enterSubmit(e) {
	var e = (e) ? e : event;
	var charCode = (e.which) ? e.which : e.keyCode;
	if (charCode == 13) {
		document.login.submit();
	}
}

function outputFlashHTML(d, swfFile, domID, width, height, quality, bgcolor, align, scale, flashVars, flashVersion) {
	// take a list of properties in a string (like when you use window.open()) and generate the code for it
	
	if (!d) d = window.document;

	// detect browser type and output appropriate html
	if (pluginType == "activeX") {
		// IE style plugin
		d.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		d.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab');
		if (flashVersion) d.write('#version=' + flashVersion + '"');
		if (domID) d.write(' id='+domID);
		if (width) d.write(' width='+width);
		if (height) d.write(' height='+height);
		if (align) d.write(' align='+align);
		d.writeln('">');
		d.write(' <param name="movie" value="' + swfFile);
		if (flashVars) {
			d.writeln('?' + flashVars + '">');
			d.writeln(' <param name="FlashVars" value="'+flashVars+'">');
		} else {
			d.writeln('">');
		}
		if (scale) d.writeln(' <param name="scale" value="' + scale + '">');
		if (quality) d.writeln(' <param name="quality" value="' + quality + '">');
		if (bgcolor) d.writeln(' <param name="bgcolor" value="' + bgcolor + '">');
		d.writeln('</object>');
	} else {
		// Netscape Style
		
		// required
		if (swfFile) {
			d.write('<embed src="' + swfFile);
			if (flashVars) d.write('?' + flashVars);
			d.write('"');
		}
		if (width)			d.write(' width="' + width + '"');
		if (height)			d.write(' height="' + height + '"');

		// optional
		if (quality)		d.write(' quality="'+quality+'"');
		if (bgcolor)		d.write(' bgcolor="' + bgcolor + '"');
		if (flashVars)		d.write(' flashvars="' + flashVars + '"');
		if (scale)			d.write(' scale="' + scale + '"');
		if (domID)			d.write(' name="' + domID + '"'); // :????: see if id should be here as well
		if (align)			d.write(' align="' + align + '"');
		//if (salign)			d.write(' salign="' + salign + '"');
		//if (swliveconnect)	d.write(' swliveconnect="' + swliveconnect + '"');
		//if (play)			d.write(' play="' + play + '"');
		//if (loop)			d.write(' loop="' + loop + '"');
		//if (base)			d.write(' base="' + base + '"');
		//if (menu)			d.write(' menu="' + menu + '"');

		d.writeln(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	}
}
