// Global variables
var prefs;
var layerRef, styleRef;
var displayPreferencesPage;
var bgTable = "#666666";
var wmStreamServer = "http://wmstream.pbid.com";
var streamInstance = "lminfo";

// Get settings and arguments
var env = new environmentSettings();
var prevList = getCookie("video_player");
var args = getArguments();
var isPreferencesPage = args.pref;
var playerContinue = false;
var radionum;
var savedPrefs = getCookie("video_player");

function environmentSettings() {

	// Base, platform, and configurations
	this.u_agent = navigator.userAgent.toLowerCase();
	this.b_name = navigator.appName.toLowerCase();
	this.int_ver = parseInt(navigator.appVersion);
	this.float_ver = parseFloat(navigator.appVersion);
	this.opera = (this.u_agent.indexOf("opera") != -1);
	this.is_win = ((this.u_agent.indexOf("win") != -1) && (this.u_agent.indexOf("3.1") == -1));
	this.is_mac = (this.u_agent.indexOf("mac") != -1);
	this.is_linux = (this.u_agent.indexOf("linux") != -1);
	this.good_ie = ((this.b_name.indexOf("explorer") != -1) && (this.int_ver >= 4) && (!this.opera));
	this.good_ns = ((this.b_name.indexOf("netscape") != -1) && (this.int_ver >= 4) && (this.int_ver <= 6));
	this.ns6 = ((this.b_name.indexOf("netscape") != -1) && (this.int_ver >= 5));
	this.good_default = ((this.is_linux) || (this.is_mac) || (!this.good_ie && this.int_ver >= 5));
	this.other = (this.opera);
	this.ideal_env = (this.is_win && this.good_ie);
}

function getCookie(cookieName) {

	var offSet, end;
	var search = cookieName + "=";

	// If there are any cookies
	if (document.cookie.length > 0) {
		offSet = document.cookie.indexOf(search);

		// If cookie exists
		if (offSet != -1) {

			// Set index of beginning of value
			offSet += search.length;

			// Set index of end of cookie val
			end = document.cookie.indexOf(";", offSet);


			if (end == -1)
				end = document.cookie.length;

			return unescape(document.cookie.substring(offSet, end));
		}
	}
}

function setCookie(cookieName, myPref) {

	var settingPrefs = "";

	var today = new Date();

	today.setFullYear(2030);
	document.cookie = cookieName + "=" + escape(myPref) + ";expires=" + today.toGMTString();

	var myLoc = (location.href);
	var trunc = myLoc.replace("\&pref=yes" , "");
	location.replace(trunc);
}

function getArguments() {


	var args = new Object();
	var query = location.search.substring(1); // Get query string
	var pairs = query.split("&"); // Break at comma

	for(var i=0;i<pairs.length;i++) {

		var pos = pairs[i].indexOf('='); // Look for "name=value"
		if (pos == -1) continue; // If not found, skip
		var argname = pairs[i].substring(0,pos); // Extract the name
		var value = pairs[i].substring(pos+1); // Extract the value
		args[argname] = unescape(value); // Store as a property
	}

	return args; // Return the object
}


function displayVideoPlayer() {

	var prevList = getCookie("video_player");
	
	// Automatically set to high wm player
	if (prevList == null) {
		setCookie('video_player', 'highwmv');
		prevList = "highwmv";
	}

	if (((prevList == null) || (isPreferencesPage == "yes")) && (playerContinue != true)) {
			displayPreferencesPage = "yes";
			document.write(getPreferencesHTML());
	}
	else {
		if (env.good_default || env.good_ns) {
			displayPreferencesPage = "yes";
			document.write(getVideoHTML());

		} else if (env.ideal_env) {
			displayPreferencesPage = "no";
			document.write(getVideoHTML());
		}
	}

}

// Changes user preferences
function changePreferences() {

	var str = (location.href);
	str += "&pref=yes";
	location.replace(str);
}



// Launches a full screen window
function launchFullScreen() {

	if(document.video.playState == 3) {
		document.getElementById('video').fullScreen = "true";
	}
}



// Builds string to display video interface
function getVideoHTML() {

	var vidObj;
	var mPlayer = getCookie('video_player');

	if ((mPlayer=="highwmv") || (mPlayer=="lowwmv")) {
		vidObj = (embedWMVObject());
	}
	else {
		vidObj = "Error creating video object.";
	}

	var htmlOutput = "<table width=\"690\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"" + bgTable + "\">" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td valign=\"bottom\"><img src=\"images/video_header.gif\" width=\"340\" height=\"8\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "<table width=\"690\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"" + bgTable + "\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"340\" rowspan=\"3\">" + "\n";
	htmlOutput += "<table width=\"340\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"13\" background=\"images/preferences_border_left.gif\"><img src=\"images/clear.gif\" width=\"13\" height=\"1\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "<td bgcolor=\"#000000\">" + "\n";
	htmlOutput += vidObj;
	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td width=\"13\" background=\"images/preferences_border_right.gif\"><img src=\"images/clear.gif\" width=\"7\" height=\"1\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td colspan=\"3\">" + "\n";
	htmlOutput += "<table width=\"340\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td><img src=\"images/video_bottom.gif\" width=\"340\" height=\"8\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td colspan=\"3\" valign=\"bottom\">" + "\n";
	htmlOutput += "<table width=\"340\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + "\n";
	htmlOutput += "<td valign=\"bottom\"><img src=\"images/links_corner_left.gif\" width=\"19\" height=\"31\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "<td width=\"100%\" bgcolor=\"#eeeeee\"><a href=\"javascript:changePreferences()\">Change Preferences</a>";

	// Only display full screen if IE/WIN and WM
	if((env.ideal_env) && (mPlayer=="highwmv") || (mPlayer=="lowwmv")) {
		htmlOutput += " | <a onclick=\"javascript:launchFullScreen(); return false;\" href=\"#\">Full Screen</a>"
	}


	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td valign=\"bottom\"><img src=\"images/links_corner_right.gif\" width=\"16\" height=\"31\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td width=\"350\" colspan=\"4\" valign=\"bottom\"><img src=\"images/content_top.gif\" width=\"350\" height=\"8\" border=\"0\" alt=\"\"><br></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"8\" bgcolor=\"#eeeeee\"><img alt=\"\" src=\"images/clear.gif\" width=\"8\" height=\"287\"></td>" + "\n";
	htmlOutput += "<td width=\"328\" bgcolor=\"#eeeeee\">" + "\n";
	// Display clip title
	if(clipTitle != "") {
			htmlOutput += "<b>" + clipTitle +  "</b><br>" + "\n";
	}

	// Display clip length
	if(clipLength != "") {

			htmlOutput += clipLength +  "<br>" + "\n";
	}

	htmlOutput += "<img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"8\"><br>" + "\n";

	// Display clip description
	if(clipDescription != "") {

		htmlOutput += clipDescription + 	"<br>" + "\n";
	}
	htmlOutput += "<img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"5\"><br>" + "\n";
	htmlOutput += "<table width=\"328\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td><img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"8\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	// Make sure some clip info exists if display horizontal line
	if(!(clipTitle == "") && (clipLength == "") && (clipDescription == "")) {

		htmlOutput += "<tr valign=\"top\">" + "\n";
		htmlOutput += "<td bgcolor=\"#cccccc\"><img alt=\"\" src=\"images/clear.gif\" width=\"328\" height=\"1\"></td>" + "\n";
		htmlOutput += "</tr>" + "\n";
	}

	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td><img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"6\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td width=\"8\" bgcolor=\"#eeeeee\"><img alt=\"\" src=\"images/clear.gif\" width=\"8\" height=\"1\"></td>" + "\n";
	htmlOutput += "<td width=\"6\"><img alt=\"\" src=\"images/clear.gif\" width=\"6\" height=\"1\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"350\" colspan=\"4\"><img src=\"images/content_bottom.gif\" width=\"350\" height=\"16\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "<table width=\"690\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"" + bgTable + "\">" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td colspan=\"3\"><img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"5\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td colspan=\"3\"><img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"6\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";

	return htmlOutput;


}

// Builds string to display user preferences
function getPreferencesHTML() {

	var htmlOutput = "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"" + bgTable + "\" width=\"690\">" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td valign=\"bottom\"><img src=\"images/preferences_header.gif\" width=\"340\" height=\"15\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "<table width=\"690\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"" + bgTable + "\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"340\" rowspan=\"3\">" + "\n";
	htmlOutput += "<table width=\"340\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"13\" background=\"images/preferences_border_left.gif\"><img src=\"images/clear.gif\" width=\"13\" height=\"1\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "<td bgcolor=\"#cccccc\">" + "\n";
	htmlOutput += "<form name=\"preferences_form\">" + "\n";
	htmlOutput += "<table width=\"320\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" valign=\"top\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"10\"><img alt=\"\" src=\"images/clear.gif\" width=\"10\" height=\"1\" /></td>" + "\n";
	htmlOutput += "<td width=\"300\"><b>Choose connection speed</b><br>" + "\n";
	htmlOutput += "In order for you to have the best viewing experience possible, please select your connection speed:<br>" + "\n";
	htmlOutput += "<img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"5\" />" + "\n";
	htmlOutput += "<br>" + "\n";
	htmlOutput += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"300\">" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td colspan=\"2\" colspan=\"2\"><b>Windows Media Player</b></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td bgcolor=\"#cccccc\">" + "\n";
	htmlOutput += "<input type=\"radio\" value=\"lowwmv\" name=\"radio_preferences\" onclick=\"setCookie('video_player', 'lowwmv');\" />Dial-up&nbsp;" + "\n";
	htmlOutput += "<input type=\"radio\" value=\"highwmv\" name=\"radio_preferences\" onclick=\"setCookie('video_player', 'highwmv');\" />Broadband (DSL/Cable/T-1)</td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td colspan=\"2\"><a href=\"http://www.windowsmedia.com/download\" target=\"download\">Download Windows Media Player</a></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "<img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"8\"><br>" + "\n";
	htmlOutput += "Clicking one of the buttons above will set a cookie on your system and begin playing the video you requested. You must have cookies enabled to access video.<br/><br/>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td width=\"10\"><img alt=\"\" src=\"images/clear.gif\" width=\"10\" height=\"1\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</form>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td width=\"13\" background=\"images/preferences_border_right.gif\"><img src=\"images/clear.gif\" width=\"7\" height=\"1\" border=\"0\" alt=\"\"></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td colspan=\"3\">" + "\n";
	htmlOutput += "<table width=\"340\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td><img src=\"images/bottom_corner_left.gif\" width=\"14\" height=\"20\" border=\"0\" alt=\"\" /><img src=\"images/bottom.gif\" width=\"317\" height=\"20\" border=\"0\" alt=\"\" /><img src=\"images/bottom_corner_right.gif\" width=\"9\" height=\"20\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td><img src=\"images/bottom2.gif\" width=\"340\" height=\"8\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td colspan=\"3\" valign=\"bottom\">" + "\n";
	htmlOutput += "<table width=\"340\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" + "\n";	
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td valign=\"bottom\"><img src=\"images/links_corner_left.gif\" width=\"19\" height=\"31\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "<td width=\"100%\" bgcolor=\"#eeeeee\"><img alt=\"\" src=\"images/clear.gif\" width=\"10\" height=\"1\"></td>" + "\n";
	htmlOutput += "<td valign=\"bottom\"><img src=\"images/links_corner_right.gif\" width=\"16\" height=\"31\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td width=\"350\" colspan=\"4\" valign=\"bottom\"><img src=\"images/content_top.gif\" width=\"350\" height=\"8\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"8\" bgcolor=\"#eeeeee\"><img alt=\"\" src=\"images/clear.gif\" width=\"8\" height=\"233\"></td>" + "\n";
	htmlOutput += "<td width=\"340\" bgcolor=\"#eeeeee\">" + "\n";
	htmlOutput += "<b>Need help?</b>" + "\n";
	htmlOutput += "<br>" + "\n";
	htmlOutput += "If this page just refreshes after you choose your player, make sure you are" + "\n";
	htmlOutput += "allowing cookies to be accepted.<br>" + "\n";
	htmlOutput += "<img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"8\">" + "\n";
	htmlOutput += "<br>" + "\n";
	htmlOutput += "We offer two connection speed choices:<br>" + "\n";
	htmlOutput += "<img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"8\"><br>" + "\n";
	htmlOutput += "<b>Dial-up</b>" + "\n";
	htmlOutput += "<br>" + "\n";
	htmlOutput += "If you are dialing in to connect to the Internet, use this option.<br>" + "\n";
	htmlOutput += "<img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"8\" /><br>" + "\n";
	htmlOutput += "<b>Broadband</b>" + "\n";
	htmlOutput += "<br>" + "\n";
	htmlOutput += "If you are using any sort of high-speed connection - like a cable modem or DSL at home or dedicated line (T-1) from work - then use this option.<br>" + "\n";
	htmlOutput += "</td>" + "\n";
	htmlOutput += "<td width=\"8\" bgcolor=\"#eeeeee\"><img alt=\"\" src=\"images/clear.gif\" width=\"8\" height=\"1\" /></td>" + "\n";
	htmlOutput += "<td width=\"6\"><img alt=\"\" src=\"images/clear.gif\" width=\"6\" height=\"1\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "<tr valign=\"top\">" + "\n";
	htmlOutput += "<td width=\"350\" colspan=\"4\"><img src=\"images/content_bottom.gif\" width=\"350\" height=\"17\" border=\"0\" alt=\"\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "<table width=\"690\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"" + bgTable + "\">" + "\n";
	htmlOutput += "<tr>" + "\n";
	htmlOutput += "<td><img alt=\"\" src=\"images/clear.gif\" width=\"1\" height=\"6\" /></td>" + "\n";
	htmlOutput += "</tr>" + "\n";
	htmlOutput += "</table>" + "\n";
	htmlOutput += "<script language=\"JavaScript\">" + "\n";
	htmlOutput += "<!--" + "\n";
	htmlOutput += "if(savedPrefs != null && typeof savedPrefs != \"undefined\") {" + "\n";
	htmlOutput += "for(radionum = 0; radionum < document.preferences_form.radio_preferences.length; radionum++) {" + "\n";
	htmlOutput += "if (savedPrefs == document.preferences_form.radio_preferences[radionum].value) {" + "\n";
	htmlOutput += "document.preferences_form.radio_preferences[radionum].checked = true;" + "\n";
	htmlOutput += "}" + "\n";
	htmlOutput += "}" + "\n";
	htmlOutput += "}" + "\n";
	htmlOutput += "//-->" + "\n";
	htmlOutput += "</script>" + "\n";


	return htmlOutput;
}


// Builds string to embed WMV object
function embedWMVObject()
{
	var htmlOutput, source;
	var mPlayer = getCookie('video_player');

	source = wmStreamServer + "/" +  streamInstance + "/" +  clipName;

	if (mPlayer == "highwmv") {

		source += "_high.wmv";
		width = "320";
		height = "240";
		sizeIE  = "<param name=\"AutoSize\" value=\"False\">\n";
		sizeNN = "";
	}
	else if(mPlayer=="lowwmv") {

		source += "_low.wmv";
		width = "160";
		height = "120";
		sizeIE  = "<param name=\"AutoSize\" VALUE=\"0\">\n";
		sizeIE += "<param name=\"DisplaySize\" value=\"0\">\n";
		sizeIE += "<param name=\"ShowDisplay\" VALUE=\"False\">\n";
		sizeNN = "displaysize=\"0\"";
	}

	htmlOutput  = "<object id=\"video\" width=\"320\" height=\"306\"";
	htmlOutput += " classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\"";
	htmlOutput += " codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\"";
	htmlOutput += " standby=\"Loading Microsoft® Windows® Media Player components...\"";
	htmlOutput += " type=\"application/x-oleobject\">\n";
	htmlOutput += "<param name=\"URL\" value=\"";
	htmlOutput += source;
	htmlOutput += "\">\n";
	htmlOutput += "<param name=\"ShowStatusBar\" value=\"False\">\n";
	htmlOutput += "<param name=\"ShowAudioControls\" value=\"True\">\n";
	htmlOutput += "<param name=\"ShowControls\" value=\"True\">\n";
	htmlOutput += sizeIE;
	htmlOutput += "<embed type=\"application/x-mplayer2\"";
	htmlOutput += " pluginspage = \"http://www.microsoft.com/Windows/MediaPlayer/\" src=\"";
	htmlOutput += source;
	htmlOutput += "\" name=\"video\" width=\"320\" height=\"306\" showstatusbar=\"0\"";
	htmlOutput += " showaudiocontrols=\"1\" showcontrols=\"1\" autosize=\"0\"";
	htmlOutput += sizeNN;
	htmlOutput += ">\n";
	htmlOutput += "</embed>\n";
	htmlOutput += "</object>\n";

	return htmlOutput;
}

