//AC_RUNACTIVECONTENT.JS
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function setCookie(c_name, value, expiredays) {
        var exdate = new Date();
        exdate.setDate(exdate.getDate() + 90);
        document.cookie = c_name + "=" + escape(value) +
    ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
    }

    function getCookie(c_name) {
        if (document.cookie.length > 0) {
            c_start = document.cookie.indexOf(c_name + "=");
            if (c_start != -1) {
                c_start = c_start + c_name.length + 1;
                c_end = document.cookie.indexOf(";", c_start);
                if (c_end == -1) c_end = document.cookie.length;
                return unescape(document.cookie.substring(c_start, c_end));
            }
        }
        return "";
    }

    function getQuerystring(key, default_) {
        if (default_ == null) default_ = "";
        key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
        var qs = regex.exec(window.location.href);
        if (qs == null)
            return default_;
        else
            return qs[1];
    }

    function getUTMCCN(c_name) {
        c_start = c_name.indexOf("utmccn=") + 7;
        c_end = c_name.indexOf("|", c_start);
        return c_name.substring(c_start, c_end);
    }
    function getUTMCSR(c_name) {
        c_start = c_name.indexOf("utmcsr=") + 7;
        c_end = c_name.indexOf("|", c_start);
        return c_name.substring(c_start, c_end);
    }      
      function getUTMCTR(c_name) {
        c_start = c_name.indexOf("utmctr=") + 7;
        c_end = c_name.indexOf("|", c_start);
        return c_name.substring(c_start, c_end);
    }
    function WriteCookie(strSR, strUTMCSR, strUTMCTR) {
        setCookie("SR", strSR, 900);
        setCookie("REFERRER", strUTMCSR, 900);
        setCookie("SEARCHTERM", strUTMCTR, 900);
    }
    
        function isBranded(searchterm) {                
            searchterm = searchterm.toUpperCase();
            var strBranded=new Array();
            
            
            if (searchterm == "WSOP" || searchterm == "HARRAHS" || searchterm == "CAESARS" || searchterm == "WORLD SERIES OF POKER")
                return true;
            else
                return false;
    }
    
    function setTracking() {
        strUTMZ = getCookie("__utmz");
        strUTMCCN = getUTMCCN(strUTMZ);
        strUTMCSR = getUTMCSR(strUTMZ);
        strUTMCTR = getUTMCTR(strUTMZ);

        var strSR = getQuerystring("SR", "");
        var strCookieSR = getCookie("SR");

        if (strUTMCCN == "(organic)") {
            if (isBranded(strUTMCTR)) {
                if (strCookieSR != "") {
                    strSR = "485476";
                    WriteCookie(strSR, strUTMCSR, strUTMCTR);
                }
            }
            else { //NOT BRANDED
                strSR = "485472";
                WriteCookie(strSR, strUTMCSR, strUTMCTR);
            }
        }
        else if (strSR != "") {
            WriteCookie(strSR, "", "");
            //301 REDIRECT TO CLEAN URL
        }
        else if (strCookieSR == "") {
            strSR = "485691";
            WriteCookie(strSR, "", "");
        }

        if (strSR == null || strSR == "")
            strSR = strCookieSR;

        
        var sHref;                        
        var zHref = document.getElementById("pkrdl1");   
		
		if (zHref != null) {    
        sHref = document.getElementById("pkrdl1").href;
        sHref = sHref.substring(0, sHref.indexOf("?"));
        sHref += '?SR=' + strSR + '&DownloadBrand=WSOP';
            }
			
        if (zHref != null) {                        
            document.getElementById("pkrdl1").href = sHref;
        }                        
        
        zHref = document.getElementById("pkrdl2");
        if (zHref != null) {
            document.getElementById("pkrdl2").href = sHref;
        }        
        zHref = document.getElementById("pkrdl3");
        if (zHref != null) {
            document.getElementById("pkrdl3").href = sHref;
        }        
        zHref = document.getElementById("pkrdl4");
        if (zHref != null) {
            document.getElementById("pkrdl4").href = sHref;
        }
        zHref = document.getElementById("pkrdl5");
        if (zHref != null) {
            document.getElementById("pkrdl5").href = sHref;
        }
    }
    
function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}




//JS FUNCTIONS
// JavaScript Document
function swapnews(x) {	
	if (x == 'wsop') {
	
	document.getElementById('wsopnewstab-on').style.display=""
	document.getElementById('wsopnewstab-off').style.display="none"
	document.getElementById('circuitnewstab-on').style.display="none"
	document.getElementById('circuitnewstab-off').style.display=""	
	
	document.getElementById('WSOPNews').style.display=""
	
	document.getElementById('CircuitNews').style.display="none"		
	
	}else if (x == 'circuit') {
	
	document.getElementById('wsopnewstab-on').style.display="none"
	document.getElementById('wsopnewstab-off').style.display=""
	document.getElementById('circuitnewstab-on').style.display=""
	document.getElementById('circuitnewstab-off').style.display="none"
	
	document.getElementById('WSOPNews').style.display="none"		
	document.getElementById('CircuitNews').style.display=""
		
	}else if (x == 'toc') {
	document.getElementById('wsopnewstab-on').style.display="none"
	document.getElementById('wsopnewstab-off').style.display=""
	document.getElementById('circuitnewstab-on').style.display="none"
	document.getElementById('circuitnewstab-off').style.display=""
		
	document.getElementById('WSOPNews').style.display="none"	
	document.getElementById('CircuitNews').style.display="none"
	
	}
	
	
	
	
	
	
}


function runSlideShow() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="326" height="252">')
	document.write('<param name="movie" value="/flashcoms/slideshow.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')
	document.write('<param name="FlashVars" value="dataUrl=/flashcoms/data/slide_show.xml&useFsCommand=1" />')
	document.write('<embed src="/flashcoms/slideshow.swf" wmode="transparent" FlashVars="dataUrl=/flashcoms/data/slide_show.xml&useFsCommand=1"  wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="326" height="252"></embed>')
	document.write('</object>')
}

function runLogo() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="204" height="97">')
	document.write('<param name="movie" value="/images/logo.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/images/logo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="204" height="97"></embed>')
	document.write('</object>')
}

function runiPhonead() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="311" height="168">')
	document.write('<param name="movie" value="/images/ads/iphone.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/images/ads/iphone.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="311" height="168"></embed>')
	document.write('</object>')
}


function runTOChomead() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="517" height="95">')
	document.write('<param name="movie" value="/images/ads/toc_home.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/images/ads/toc_home.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="517" height="95"></embed>')
	document.write('</object>')
}

function runTOCsmallad() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="311" height="78">')
	document.write('<param name="movie" value="/images/ads/toc_small.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/images/ads/toc_small.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="311" height="78"></embed>')
	document.write('</object>')
}

function runTOCrightad() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="159" height="600">')
	document.write('<param name="movie" value="/images/ads/toc_inside.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/images/ads/toc_inside.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="159" height="600"></embed>')
	document.write('</object>')
}

function runTOChorizontalad() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="950" height="75">')
	document.write('<param name="movie" value="/images/ads/toc_banner_950x75.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/images/ads/toc_banner_950x75.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="950" height="75"></embed>')
	document.write('</object>')
}

function runHomeUpdate() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="326" height="252">')
	document.write('<param name="movie" value="/flashcoms/tournament_updates2.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')
	document.write('<param name="FlashVars" value="dataUrl=/flashcoms/data/tournament_updates.xml" />')
	document.write('<embed src="/flashcoms/tournament_updates2.swf" wmode="transparent" FlashVars="dataUrl=/flashcoms/data/tournament_updates.xml" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="326" height="252"></embed>')
	document.write('</object>')
}

function runHomeUpdateTest() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="326" height="252">')
	document.write('<param name="movie" value="/flashcoms/tournament_updates2.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')
	document.write('<param name="FlashVars" value="dataUrl=/flashcoms/data/tournament_updatesTest.xml" />')
	document.write('<embed src="/flashcoms/tournament_updates.swf" wmode="transparent" FlashVars="dataUrl=/flashcoms/data/tournament_updatesTest.xml" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="326" height="252"></embed>')
	document.write('</object>')
}


function runWSOPStats() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="354" height="188">')
	document.write('<param name="movie" value="/flashcoms/stats.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="FlashVars" value="dataUrl=/flashcoms/data/wsop_stats_config.xml" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/flashcoms/stats.swf" wmode="transparent" FlashVars="dataUrl=/flashcoms/data/wsop_stats_config.xml" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="354" height="188"></embed>')
	document.write('</object>')
}

function runWSOPResults() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="354" height="188">')
	document.write('<param name="movie" value="/flashcoms/results.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="FlashVars" value="dataUrl=/flashcoms/data/wsop_results_config.xml" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/flashcoms/results.swf" wmode="transparent" FlashVars="dataUrl=/flashcoms/data/wsop_results_config.xml" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="354" height="188"></embed>')
	document.write('</object>')
}

function runCircuitStats() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="354" height="188">')
	document.write('<param name="movie" value="/flashcoms/circuit_stats.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="FlashVars" value="dataUrl=/flashcoms/data/circuit_stats_config.xml" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/flashcoms/circuit_stats.swf" wmode="transparent" FlashVars="dataUrl=/flashcoms/data/circuit_stats_config.xml" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="354" height="188"></embed>')
	document.write('</object>')
}

function runCircuitResults() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="354" height="188">')
	document.write('<param name="movie" value="/flashcoms/circuit_results.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="FlashVars" value="dataUrl=/flashcoms/data/circuit_results_config.xml" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="/flashcoms/circuit_results.swf" wmode="transparent" FlashVars="dataUrl=/flashcoms/data/circuit_results_config.xml" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="354" height="188"></embed>')
	document.write('</object>')
}

function runFlashBanner(filePath,FlashVars,width,height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="' + width + '" height="' + height + '">')
	document.write('<param name="movie" value="' + filePath + '" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="FlashVars" value="' + FlashVars + '" />')
	document.write('<param name="wmode" value="transparent" />')	
	document.write('<embed src="' + filePath + '" FlashVars="' + FlashVars + '" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>')
	document.write('</object>')
}           

function runArchiveVideo(SRC,FILENAME,W,H) {
	document.write('<object id="mediaPlayer" ')
	document.write('codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ')
	document.write('type="application/x-oleobject" height="' + H + '" width="' + W + '" ')
	document.write('standby="Loading Microsoft Windows Media Player components..." ')
	document.write('classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" VIEWASTEXT> ')	
	document.write('<param name="FileName" value="' + FILENAME + '"> ')
	document.write('<param name="AutoStart" value="true"> ')
	document.write('<param name="ShowTracker" value="true"> ')
	document.write('<param name="ShowStatusBar" value="true"> ')	
	document.write('<param name="invokeURLs" value="-1"> ')
	document.write('<param name="EnableContextMenu" value="false"> ')
	document.write('<param name="windowlessvideo" value="true"> ')
	document.write('<param name="bgcolor" value="black"> ')	
	document.write('<embed ')
	document.write('type="application/x-mplayer2" ')
	document.write('pluginspage="http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx/" ')	
	document.write('id="mediaPlayer"')
	document.write('name="mediaPlayer" ')
	document.write('filename="' + FILENAME + '" ')	
	document.write('src="' + SRC + '" ')
	document.write('displaysize="4" ')
	document.write('windowlessvideo="true" ')
	document.write('autosize="-1" ')	
	document.write('bgcolor="black" ')
	document.write('showcontrols="false" ')
	document.write('showtracker="1" ')
	document.write('showdisplay="0" ')	
	document.write('showstatusbar="1" ')
	document.write('videoborder3d="-1" ')
	document.write('width="' + W + '"	')
	document.write('height="' + H + '" ')	
	document.write('autostart="true" enablefullscreencontrols="true" invokeurls="-1" ')
	document.write('enablecontextmenu="false"> ')
	document.write('</embed> ')
	document.write('</object>')
}

function runArchiveVideo2(SRC,FILENAME,W,H) {
	document.write('<OBJECT ID="MediaPlayer" ')
	document.write('WIDTH="' + W + '" HEIGHT="' + H + '" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ')
	document.write('STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"> ')	
	document.write('<PARAM NAME="FileName" VALUE="' + FILENAME + '"> ')
	document.write('<PARAM name="ShowControls" VALUE="true"> ')
	document.write('<param name="ShowStatusBar" value="false"> ')
	document.write('<PARAM name="ShowDisplay" VALUE="false"> ')	
	document.write('<PARAM name="autostart" VALUE="false"> ')	
	document.write('<embed ')
	document.write('TYPE="application/x-mplayer2" ')
	document.write('SRC="' + SRC + '" ')
	document.write('WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0" ')	
	document.write('</embed> ')
	document.write('</object>')
}

function runLoadVideo(SRC,FILENAME) {
	document.write('<object id="mediaPlayer" ')
	document.write('codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ')
	document.write('type="application/x-oleobject" height="360" width="480" ')
	document.write('standby="Loading Microsoft Windows Media Player components..." ')
	document.write('classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" VIEWASTEXT> ')	
	document.write('<param name="FileName" value="' + FILENAME + '"> ')
	document.write('<param name="AutoStart" value="true"> ')
	document.write('<param name="ShowTracker" value="false"> ')
	document.write('<param name="ShowStatusBar" value="true"> ')	
	document.write('<param name="invokeURLs" value="-1"> ')
	document.write('<param name="EnableContextMenu" value="false"> ')
	document.write('<param name="windowlessvideo" value="true"> ')
	document.write('<param name="bgcolor" value="black"> ')	
	document.write('<embed ')
	document.write('type="application/x-mplayer2" ')
	document.write('pluginspage="http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx/" ')	
	document.write('id="mediaPlayer"')
	document.write('name="mediaPlayer" ')
	document.write('filename="' + FILENAME + '" ')	
	document.write('src="' + SRC + '" ')
	document.write('displaysize="4" ')
	document.write('windowlessvideo="true" ')
	document.write('autosize="-1" ')	
	document.write('bgcolor="black" ')
	document.write('showcontrols="false" ')
	document.write('showtracker="0" ')
	document.write('showdisplay="0" ')	
	document.write('showstatusbar="1" ')
	document.write('videoborder3d="-1" ')
	document.write('width="480"	')
	document.write('height="360" ')	
	document.write('autostart="true" enablefullscreencontrols="true" invokeurls="-1" ')
	document.write('enablecontextmenu="false"> ')
	document.write('</embed> ')
	document.write('</object>')
}

function runPrevVideo(SRC,FILENAME) {
	document.write('<object id="mediaPlayer" ')
	document.write('codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ')
	document.write('type="application/x-oleobject" height="293" width="432" ')
	document.write('standby="Loading Microsoft Windows Media Player components..." ')
	document.write('classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" VIEWASTEXT> ')	
	document.write('<param name="FileName" value="' + FILENAME + '"> ')
	document.write('<param name="AutoStart" value="true"> ')
	document.write('<param name="ShowTracker" value="false"> ')
	document.write('<param name="ShowStatusBar" value="true"> ')	
	document.write('<param name="invokeURLs" value="-1"> ')
	document.write('<param name="EnableContextMenu" value="false"> ')
	document.write('<param name="windowlessvideo" value="true"> ')
	document.write('<param name="bgcolor" value="black"> ')	
	document.write('<embed ')
	document.write('type="application/x-mplayer2" ')
	document.write('pluginspage="http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx/" ')	
	document.write('id="mediaPlayer"')
	document.write('name="mediaPlayer" ')
	document.write('filename="' + FILENAME + '" ')	
	document.write('src="' + SRC + '" ')
	document.write('displaysize="4" ')
	document.write('windowlessvideo="true" ')
	document.write('autosize="-1" ')	
	document.write('bgcolor="black" ')
	document.write('showcontrols="false" ')
	document.write('showtracker="0" ')
	document.write('showdisplay="0" ')	
	document.write('showstatusbar="1" ')
	document.write('videoborder3d="-1" ')
	document.write('width="432"	')
	document.write('height="293" ')	
	document.write('autostart="true" enablefullscreencontrols="true" invokeurls="-1" ')
	document.write('enablecontextmenu="false"> ')
	document.write('</embed> ')
	document.write('</object>')
}

function runLivePreview(img1,img2,clickTAG) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="346" height="107">')
	document.write('<param name="movie" value="/images/liveCoverage.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="flashvars" value="img1=' + img1 + '&img2=' + img2 + '&clickTAG=' + clickTAG + '" />')
	document.write('<embed src="/images/liveCoverage.swf" width="346" height="107" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="img1=' + img1 + '&img2=' + img2 + '&clickTAG=' + clickTAG + '"></embed>')
	document.write('</object>')
}

function runCountdown(intDL,intHL,intML,intSL) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="179" height="36">')
	document.write('<param name="movie" value="/images/homepage/clock.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')
	document.write('<param name="flashvars" value="intDL=' + intDL + '&intHL=' + intHL + '&intML=' + intML + '&intSL=' + intSL + '" />')
	document.write('<embed src="/images/homepage/clock.swf" wmode="transparent" flashvars="intDL=' + intDL + '&intHL=' + intHL + '&intML=' + intML + '&intSL=' + intSL + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="260" height="40"></embed>')
	document.write('</object>')
}

function runCountdown2(intDL,intHL,intML,intSL,strTag) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="200" height="34">')
	document.write('<param name="movie" value="/images/hm/clock2.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')
	document.write('<param name="flashvars" value="intDL=' + intDL + '&intHL=' + intHL + '&intML=' + intML + '&intSL=' + intSL + '&clickTAG=' + strTag + '" />')
	document.write('<embed src="/images/hm/clock2.swf" wmode="transparent" flashvars="intDL=' + intDL + '&intHL=' + intHL + '&intML=' + intML + '&intSL=' + intSL + '&clickTAG=' + strTag + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="34"></embed>')
	document.write('</object>')
}


function popUpConsole(winURL) {
  window.open(winURL,"popup","width=970,height=566");
}

function runWinnings(amount) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="215" height="30">')
	document.write('<param name="movie" value="/images/hm/winnings.swf" />')
	document.write('<param name="quality" value="high" />')
	document.write('<param name="wmode" value="transparent" />')
	document.write('<param name="flashvars" value="sWin=' + amount + '" />')
	document.write('<embed src="/images/hm/winnings.swf" wmode="transparent" flashvars="sWin=' + amount + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="215" height="30"></embed>')
	document.write('</object>')
}


function runESPNvideo() { 	
	var div  = document.getElementById( 'videowindow' );
	var flash_thing = document.getElementById("ESPNvideo");
	var espn_pic = document.getElementById("ESPNpic");
	
	// remove element if exists
	if( flash_thing ) {
		div.removeChild( flash_thing );
	}
	
	div.removeChild( espn_pic );	 
    
	// create new element
	var anchor = document.createElement("A");
	anchor.setAttribute("href","/video/harrahsWK5.flv");
	anchor.setAttribute("style","display:block;width:260px;height:145px;");
	anchor.setAttribute("id","player");
		
	// add the element to the document
	div.appendChild( anchor );
	
	//document.write ("<script language='JavaScript'>flowplayer('player', '/videoAssets/flowplayer.commercial-3.0.7.swf');</script>")
    //flowplayer('player', '/videoAssets/flowplayer.commercial-3.0.7.swf');	
    
   flashembed("player", {src:'/videoAssets/FlowPlayerLight.swf'}, {config: {
    // list of variables goes here
    autoPlay: true,
    videoFile: '/video/harrahsWK5.flv',
    initialScale: 'scale', 
    useNativeFullScreen: true,
    controlsOverVideo: 'ease',
    showMenu: false,
    loop: false
    
  }} 
);

}



<!--
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function slideshow_DoFSCommand(command, args) {
	var slideshowObj = isInternetExplorer ? document.all.slideshow : document.slideshow;
	//
	if(command == "setTitle"){
	
		MM_setTextOfLayer("titleDiv", "", args);
		
	}else if(command == "setText"){
	
		MM_setTextOfLayer("textDiv", "", args);
		
	}else if(command == "clear"){
		
		MM_setTextOfLayer("titleDiv", "", "");
		MM_setTextOfLayer("textDiv", "", "");
		
	}
	//
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub slideshow_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call slideshow_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function MM_setTextOfLayer(objId,x,newText) { //v9.0
  with (document) if (getElementById && ((obj=getElementById(objId))!=null))
    with (obj) innerHTML = unescape(newText);
}

function VideoMenu(mt) {
	if (mt == 1) {		
	document.getElementById("WSOP_BTN").src = "/images/video/menu_wsop_on.gif";
	document.getElementById("WSOPC_BTN").src = "/images/video/menu_wsopc_off.gif";
	document.getElementById("WSOPE_BTN").src = "/images/video/menu_wsope_off.gif";
	document.getElementById("LIST_WSOP").style.display = "";
	document.getElementById("LIST_WSOPC").style.display = "none";
	document.getElementById("LIST_WSOPE").style.display = "none";
	}
	if (mt == 2) {	
	document.getElementById("WSOP_BTN").src = "/images/video/menu_wsop_off.gif";
	document.getElementById("WSOPC_BTN").src = "/images/video/menu_wsopc_on.gif";
	document.getElementById("WSOPE_BTN").src = "/images/video/menu_wsope_off.gif";
	document.getElementById("LIST_WSOP").style.display = "none";
	document.getElementById("LIST_WSOPC").style.display = "";
	document.getElementById("LIST_WSOPE").style.display = "none";
	}
	if (mt == 3) {		
	document.getElementById("WSOP_BTN").src = "/images/video/menu_wsop_off.gif";
	document.getElementById("WSOPC_BTN").src = "/images/video/menu_wsopc_off.gif";
	document.getElementById("WSOPE_BTN").src = "/images/video/menu_wsope_on.gif";
	document.getElementById("LIST_WSOP").style.display = "none";
	document.getElementById("LIST_WSOPC").style.display = "none";
	document.getElementById("LIST_WSOPE").style.display = "";
	}
}









// FORMVAL.JS
var focusField = ""
function submitForm() {
	var success = true;
	if(document.form1.firstName.value == "") {
		alert("Please enter your First Name")
		if(!focusField) focusField = "" + form1.firstName.focus() + "";
		success = false;
		return false;
	}
	if(document.form1.lastName.value == "") {
		alert("Please enter your Last Name")
		if(!focusField) focusField = "" + form1.lastName.focus() + "";
		success = false;
		return false;
	}		
	if(document.form1.address1.value == "") {
		alert("Please enter your Address")
		if(!focusField) focusField = "" + form1.address1.focus() + "";
		success = false;
		return false;
	}		
	if(document.form1.city.value == "") {
		alert("Please enter City")
		if(!focusField) focusField = "" + form1.city.focus() + "";
		success = false;
		return false;
	}	
	if(document.form1.country.value == "") {
		alert("Please enter Country")
		if(!focusField) focusField = "" + form1.country.focus() + "";
		success = false;
		return false;
	}	
	if(document.form1.zipcode.value == "") {
		alert("Please enter Zip Code")
		if(!focusField) focusField = "" + form1.zipcode.focus() + "";
		success = false;
		return false;
	}
	if (document.form1.birthdate.value == "")
	{
		alert("Please enter Date of Birth")
		success = false;
		return false;
	} else {
		var strDate = document.form1.birthdate.value;
		if(strDate.length>0)
		{
			var dateregex = /^[ ]*[0]?(\d{1,2})\/(\d{1,2})\/(\d{4,})[ ]*$/;
			var match = strDate.match(dateregex);
			if (!match)
			{
				alert("All dates need to be formatted like this:\nExample: mm/dd/yyyy\n")
				if(!focusField) focusField = "" + form1.birthdate.focus() + "";
				success = false;
				return false;
			}
		}
	}
	// Added to prevent users from entering DOB below whatever year you choose
	var ss = document.form1.birthdate.value;
	var year = ss.substring((ss.length-4),ss.length);
	if (parseFloat(year) < 1908){
		alert("Please enter a valid Date of Birth")
		if(!focusField) focusField = "" + form1.birthdate.focus() + "";
		success = false;
		return false;
	}
	//if(document.form1.username.value == "") {
	//	alert("Please enter a UserName")
	//	if(!focusField) focusField = "" + form1.username.focus() + "";
	//	success = false;
	//	return false;
	//}
	if(document.form1.moutletcompany.value == "") {
		alert("Please enter Media Outlet Company")
		if(!focusField) focusField = "" + form1.moutletcompany.focus() + "";
		success = false;
		return false;
	}	
	var radioButtonsChecked = false;
	for (var i=0;i<document.form1.moutlet.length;i++) {
		if(document.form1.moutlet[i].checked == 1) {	
			if (document.form1.moutlet[i].value == "7") {
				if(document.form1.moutletc_other.value == "") {
					alert("You entered \"Other\" as Media Outlet. Could you explain?")
					if(!focusField) focusField = "" + form1.moutletc_other.focus() + "";
					success = false;
					return false;
				}
			}
			radioButtonsChecked = true;
		}
	}
	if (radioButtonsChecked == false) {
		alert("Please enter Media Outlet")
		success = false;
		return false;
	}
	var radioButtonsChecked = false;
	for (var i=0;i<document.form1.staff.length;i++) {			
		if(document.form1.staff[i].checked == 1) {
			radioButtonsChecked = true;				
		}
	}
	if (radioButtonsChecked == false) {
		alert("Please enter Staff/Freelancer member information")
		success = false;
		return false;
	}				
	if(document.form1.phone.value == "") {
		alert("Please enter your Telephone")
		if(!focusField) focusField = "" + form1.phone.focus() + "";
		success = false;
		return false;
	}	
	if(document.form1.cellphone.value == "") {
		alert("Please enter your Cell phone")
		if(!focusField) focusField = "" + form1.cellphone.focus() + "";
		success = false;
		return false;
	}
	if(document.form1.emailAddress.value == "") {
		alert("Please enter your Email address")
		if(!focusField) focusField = "" + form1.emailAddress.focus() + "";
		success = false;
		return false;
	} else {
		var strEmail = document.form1.emailAddress.value
		var intLastDot = strEmail.lastIndexOf(".")
		if(intLastDot == -1 || strEmail.length - intLastDot > 4)
		{
			alert("The correct placement of the (.) dot is required.\n")
			if(!focusField) focusField = "" + form1.emailAddress.focus() + "";
			success = false;
			return false;
		}
		var intAt = strEmail.lastIndexOf("@")
		if(intAt == -1 ||  strEmail.length - intAt < 5)
		{
			alert("Please enter your e-mail address correctly.\n")
			if(!focusField) focusField = "" + form1.emailAddress.focus() + "";
			success = false;
			return false;
		}
	}
	return success;
}

//FLASHEMBED.MIN.JS
function flashembed(g,h,j){if(typeof g=='string')g=document.getElementById(g);var k={src:'#',width:'100%',height:'100%',version:null,loadEvent:null,onFail:null,expressInstall:null,allowfullscreen:true,allowscriptaccess:'always',quality:'high',bgcolor:'#ffffff',type:'application/x-shockwave-flash',pluginspage:'http://www.adobe.com/go/getflashplayer'};extend(k,h);var l=k.loadEvent;k.loadEvent=null;if(l){g['on'+l]=function(){return load()}}else{return load()}function extend(a,b){if(b){for(key in b){a[key]=b[key]}}}function load(){var a=getVersion();var b=k.version;var c=k.expressInstall;if(!g)return;if(!b||isSupported(b)){k.onFail=k.version=k.expressInstall=null;g.innerHTML=getHTML();return g.firstChild}else if(k.onFail){var d=k.onFail.call(k,getVersion(),j);if(d)g.innerHTML=d}else if(b&&c&&isSupported([6,0,65])){extend(k,{src:c});j={MMredirectURL:location.href,MMplayerType:'PlugIn',MMdoctitle:document.title};g.innerHTML=getHTML()}else{if(g.innerHTML!=''){}else{g.innerHTML="<h2>Flash version "+b+" or greater is required</h2>"+"<h3>"+(a[0]>0?"Your version is "+a:"You have no flash plugin installed")+"</h3>"+"<p>Download latest version from <a href='"+k.pluginspage+"'>here</a></p>"}}g['on'+l]=null}function isSupported(a){var b=getVersion();return b[0]>=a[0]&&b[1]>=a[1]&&(b[2]==null||b[2]>=a[2])}function getHTML(){var a="";if(typeof j=='function')j=j();if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){a='<embed type="application/x-shockwave-flash" ';extend(k,{name:k.id});for(var b in k){if(k[b]!=null)a+=[b]+'="'+k[b]+'"\n\t'}if(j){a+='flashvars=\'';for(var b in j){a+=[b]+'='+asString(j[b])+'&'}a+='\''}a+='/>'}else{a='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';a+='width="'+k.width+'" height="'+k.height+'"';if(document.all&&parseInt(navigator.appVersion)<=6){k.id="_"+(""+Math.random()).substring(5)}if(k.id)a+=' id="'+k.id+'"';a+='>';a+='\n\t<param name="movie" value="'+k.src+'" />';k.id=k.src=k.width=k.height=null;for(var b in k){if(k[b]!=null)a+='\n\t<param name="'+b+'" value="'+k[b]+'" />'}if(j){a+='\n\t<param name="wmode" value="transparent"><param name="flashvars" value=\'';for(var b in j){a+=[b]+'='+asString(j[b])+'&'}a+='\' />'}a+="</object>"}return a}function getVersion(){var a=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var b=navigator.plugins["Shockwave Flash"].description;if(typeof b!="undefined"){b=b.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var c=parseInt(b.replace(/^(.*)\..*$/,"$1"),10);var d=/r/.test(b)?parseInt(b.replace(/^.*r(.*)$/,"$1"),10):0;a=[c,d]}}else if(window.ActiveXObject){try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=[6,0];f.AllowScriptAccess="always"}catch(e){if(a[0]==6)return}try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(typeof f=="object"){var b=f.GetVariable("$version");if(typeof b!="undefined"){b=b.replace(/^\S+\s+(.*)$/,"$1").split(",");a=[parseInt(b[0],10),parseInt(b[2],10)]}}}return a}function asString(b){switch(typeOf(b)){case'string':return'"'+b.replace(new RegExp('(["\\\\])','g'),'\\$1')+'"';case'array':return'['+map(b,function(a){return asString(a)}).join(',')+']';case'object':var c=[];for(var d in b){c.push('"'+d+'":'+asString(b[d]))}return'{'+c.join(',')+'}'}return String(b).replace(/\s/g," ").replace(/\'/g,"\"")}function typeOf(a){if(a===null||a===undefined)return false;var b=typeof a;return(b=='object'&&a.push)?'array':b}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function map(a,b){var c=[];for(var i in a){c[i]=b(a[i])}return c}flashembed.getVersion=getVersion;flashembed.isSupported=isSupported;return g}if(typeof jQuery=='function'){(function($){$.fn.extend({flashembed:function(a,b){return this.each(function(){new flashembed(this,a,b)})}})})(jQuery)}

//FLOWPLAYER-3.1.2.min.js
(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.substring(0,q)||"*";var o=s.substring(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).substring(2,10)}var h=function(t,r,s){var q=this;var p={};var u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.substring(0,v.length-1);var w="onBefore"+v.substring(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var s={};var o=this;var u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var y=q._api().fp_getPlugin(p);if(!y){return}i(o,y);delete o.methods;if(!u){m(y.methods,function(){var A=""+this;o[A]=function(){var B=[].slice.call(arguments);var C=q._api().fp_invoke(p,A,B);return C==="undefined"||C===undefined?o:C}});u=true}}var z=s[w];if(z){z.apply(o,v);if(w.substring(0,1)=="_"){delete s[w]}}}})};function b(o,t,z){var E=this,y=null,x,u,p=[],s={},B={},r,v,w,D,A,q;i(E,{id:function(){return r},isLoaded:function(){return(y!==null)},getParent:function(){return o},hide:function(F){if(F){o.style.height="0px"}if(y){y.style.height="0px"}return E},show:function(){o.style.height=q+"px";if(y){y.style.height=A+"px"}return E},isHidden:function(){return y&&parseInt(y.style.height,10)===0},load:function(F){if(!y&&E._fireEvent("onBeforeLoad")!==false){m(a,function(){this.unload()});x=o.innerHTML;if(x&&!flashembed.isSupported(t.version)){o.innerHTML=""}flashembed(o,t,{config:z});if(F){F.cached=true;j(B,"onLoad",F)}}return E},unload:function(){try{if(!y||y.fp_isFullscreen()){return E}}catch(F){return E}if(x.replace(/\s/g,"")!==""){if(E._fireEvent("onBeforeUnload")===false){return E}y.fp_close();y=null;o.innerHTML=x;E._fireEvent("onUnload")}return E},getClip:function(F){if(F===undefined){F=D}return p[F]},getCommonClip:function(){return u},getPlaylist:function(){return p},getPlugin:function(F){var H=s[F];if(!H&&E.isLoaded()){var G=E._api().fp_getPlugin(F);if(G){H=new l(F,G,E);s[F]=H}}return H},getScreen:function(){return E.getPlugin("screen")},getControls:function(){return E.getPlugin("controls")},getConfig:function(F){return F?k(z):z},getFlashParams:function(){return t},loadPlugin:function(I,H,K,J){if(typeof K=="function"){J=K;K={}}var G=J?e():"_";E._api().fp_loadPlugin(I,H,K,G);var F={};F[G]=J;var L=new l(I,null,E,F);s[I]=L;return L},getState:function(){return y?y.fp_getState():-1},play:function(G,F){function H(){if(G!==undefined){E._api().fp_play(G,F)}else{E._api().fp_play()}}if(y){H()}else{E.load(function(){H()})}return E},getVersion:function(){var G="flowplayer.js 3.1.2";if(y){var F=y.fp_getVersion();F.push(G);return F}return G},_api:function(){if(!y){throw"Flowplayer "+E.id()+" not loaded when calling an API method"}return y},setClip:function(F){E.setPlaylist([F]);return E},getIndex:function(){return w}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var F="on"+this;if(F.indexOf("*")!=-1){F=F.substring(0,F.length-1);var G="onBefore"+F.substring(2);E[G]=function(H){j(B,G,H);return E}}E[F]=function(H){j(B,F,H);return E}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip").split(","),function(){var F=this;E[F]=function(H,G){if(!y){return E}var I=null;if(H!==undefined&&G!==undefined){I=y["fp_"+F](H,G)}else{I=(H===undefined)?y["fp_"+F]():y["fp_"+F](H)}return I==="undefined"||I===undefined?E:I}});E._fireEvent=function(O){if(typeof O=="string"){O=[O]}var P=O[0],M=O[1],K=O[2],J=O[3],I=0;if(z.debug){g(O)}if(!y&&P=="onLoad"&&M=="player"){y=y||c(v);A=y.clientHeight;m(p,function(){this._fireEvent("onLoad")});m(s,function(Q,R){R._fireEvent("onUpdate")});u._fireEvent("onLoad")}if(P=="onLoad"&&M!="player"){return}if(P=="onError"){if(typeof M=="string"||(typeof M=="number"&&typeof K=="number")){M=K;K=J}}if(P=="onContextMenu"){m(z.contextMenu[M],function(Q,R){R.call(E)});return}if(P=="onPluginEvent"){var F=M.name||M;var G=s[F];if(G){G._fireEvent("onUpdate",M);G._fireEvent(K,O.slice(3))}return}if(P=="onPlaylistReplace"){p=[];var L=0;m(M,function(){p.push(new h(this,L++,E))})}if(P=="onClipAdd"){if(M.isInStream){return}M=new h(M,K,E);p.splice(K,0,M);for(I=K+1;I<p.length;I++){p[I].index++}}var N=true;if(typeof M=="number"&&M<p.length){D=M;var H=p[M];if(H){N=H._fireEvent(P,K,J)}if(!H||N!==false){N=u._fireEvent(P,K,J,H)}}m(B[P],function(){N=this.call(E,M,K);if(this.cached){B[P].splice(I,1)}if(N===false){return false}I++});return N};function C(){if($f(o)){$f(o).getParent().innerHTML="";w=$f(o).getIndex();a[w]=E}else{a.push(E);w=a.length-1}q=parseInt(o.style.height,10)||o.clientHeight;if(typeof t=="string"){t={src:t}}r=o.id||"fp"+e();v=t.id||r+"_api";t.id=v;z.playerId=r;if(typeof z=="string"){z={clip:{url:z}}}if(typeof z.clip=="string"){z.clip={url:z.clip}}z.clip=z.clip||{};if(o.getAttribute("href",2)&&!z.clip.url){z.clip.url=o.getAttribute("href",2)}u=new h(z.clip,-1,E);z.playlist=z.playlist||[z.clip];var F=0;m(z.playlist,function(){var H=this;if(typeof H=="object"&&H.length){H={url:""+H}}m(z.clip,function(I,J){if(J!==undefined&&H[I]===undefined&&typeof J!="function"){H[I]=J}});z.playlist[F]=H;H=new h(H,F,E);p.push(H);F++});m(z,function(H,I){if(typeof I=="function"){if(u[H]){u[H](I)}else{j(B,H,I)}delete z[H]}});m(z.plugins,function(H,I){if(I){s[H]=new l(H,I,E)}});if(!z.plugins||z.plugins.controls===undefined){s.controls=new l("controls",null,E)}s.canvas=new l("canvas",null,E);t.bgcolor=t.bgcolor||"#000000";t.version=t.version||[9,0];t.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";function G(H){if(!E.isLoaded()&&E._fireEvent("onBeforeClick")!==false){E.load()}return f(H)}x=o.innerHTML;if(x.replace(/\s/g,"")!==""){if(o.addEventListener){o.addEventListener("click",G,false)}else{if(o.attachEvent){o.attachEvent("onclick",G)}}}else{if(o.addEventListener){o.addEventListener("click",f,false)}E.load()}}if(typeof o=="string"){flashembed.domReady(function(){var F=c(o);if(!F){throw"Flowplayer cannot access element: "+o}else{o=F;C()}})}else{C()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var r=arguments[1];var q=(arguments.length==3)?arguments[2]:{};if(typeof o=="string"){if(o.indexOf(".")!=-1){var t=[];m(n(o),function(){t.push(new b(this,k(r),k(q)))});return new d(t)}else{var s=c(o);return new b(s!==null?s:o,r,q)}}else{if(o){return new b(o,r,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.prototype.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var e=typeof jQuery=="function";function i(){if(c.done){return false}var k=document;if(k&&k.getElementsByTagName&&k.getElementById&&k.body){clearInterval(c.timer);c.timer=null;for(var j=0;j<c.ready.length;j++){c.ready[j].call()}c.ready=null;c.done=true}}var c=e?jQuery:function(j){if(c.done){return j()}if(c.timer){c.ready.push(j)}else{c.ready=[j];c.timer=setInterval(i,13)}};function f(k,j){if(j){for(key in j){if(j.hasOwnProperty(key)){k[key]=j[key]}}}return k}function g(j){switch(h(j)){case"string":j=j.replace(new RegExp('(["\\\\])',"g"),"\\$1");j=j.replace(/^\s?(\d+)%/,"$1pct");return'"'+j+'"';case"array":return"["+b(j,function(m){return g(m)}).join(",")+"]";case"function":return'"function()"';case"object":var k=[];for(var l in j){if(j.hasOwnProperty(l)){k.push('"'+l+'":'+g(j[l]))}}return"{"+k.join(",")+"}"}return String(j).replace(/\s/g," ").replace(/\'/g,'"')}function h(k){if(k===null||k===undefined){return false}var j=typeof k;return(j=="object"&&k.push)?"array":j}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function b(j,m){var l=[];for(var k in j){if(j.hasOwnProperty(k)){l[k]=m(j[k])}}return l}function a(q,s){var o=f({},q);var r=document.all;var m='<object width="'+o.width+'" height="'+o.height+'"';if(r&&!o.id){o.id="_"+(""+Math.random()).substring(9)}if(o.id){m+=' id="'+o.id+'"'}o.src+=((o.src.indexOf("?")!=-1?"&":"?")+Math.random());if(o.w3c||!r){m+=' data="'+o.src+'" type="application/x-shockwave-flash"'}else{m+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}m+=">";if(o.w3c||r){m+='<param name="movie" value="'+o.src+'" />'}o.width=o.height=o.id=o.w3c=o.src=null;for(var j in o){if(o[j]!==null){m+='<param name="'+j+'" value="'+o[j]+'" />'}}var n="";if(s){for(var l in s){if(s[l]!==null){n+=l+"="+(typeof s[l]=="object"?g(s[l]):s[l])+"&"}}n=n.substring(0,n.length-1);m+='<param name="flashvars" value=\''+n+"' />"}m+="</object>";return m}function d(l,o,k){var j=flashembed.getVersion();f(this,{getContainer:function(){return l},getConf:function(){return o},getVersion:function(){return j},getFlashvars:function(){return k},getApi:function(){return l.firstChild},getHTML:function(){return a(o,k)}});var p=o.version;var q=o.expressInstall;var n=!p||flashembed.isSupported(p);if(n){o.onFail=o.version=o.expressInstall=null;l.innerHTML=a(o,k)}else{if(p&&q&&flashembed.isSupported([6,65])){f(o,{src:q});k={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};l.innerHTML=a(o,k)}else{if(l.innerHTML.replace(/\s/g,"")!==""){}else{l.innerHTML="<h2>Flash version "+p+" or greater is required</h2><h3>"+(j[0]>0?"Your version is "+j:"You have no flash plugin installed")+"</h3>"+(l.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(l.tagName=="A"){l.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!n&&o.onFail){var m=o.onFail.call(this);if(typeof m=="string"){l.innerHTML=m}}if(document.all){window[o.id]=document.getElementById(o.id)}}window.flashembed=function(k,l,j){if(typeof k=="string"){var m=document.getElementById(k);if(m){k=m}else{c(function(){flashembed(k,l,j)});return}}if(!k){return}var n={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false};if(typeof l=="string"){l={src:l}}f(n,l);return new d(k,n,j)};f(window.flashembed,{getVersion:function(){var l=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var k=navigator.plugins["Shockwave Flash"].description;if(typeof k!="undefined"){k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var m=parseInt(k.replace(/^(.*)\..*$/,"$1"),10);var q=/r/.test(k)?parseInt(k.replace(/^.*r(.*)$/,"$1"),10):0;l=[m,q]}}else{if(window.ActiveXObject){try{var o=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(p){try{o=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");l=[6,0];o.AllowScriptAccess="always"}catch(j){if(l[0]==6){return l}}try{o=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(n){}}if(typeof o=="object"){k=o.GetVariable("$version");if(typeof k!="undefined"){k=k.replace(/^\S+\s+(.*)$/,"$1").split(",");l=[parseInt(k[0],10),parseInt(k[2],10)]}}}}return l},isSupported:function(j){var l=flashembed.getVersion();var k=(l[0]>j[0])||(l[0]==j[0]&&l[1]>=j[1]);return k},domReady:c,asString:g,getHTML:a});if(e){jQuery.tools=jQuery.tools||{version:{}};jQuery.tools.version.flashembed="1.0.3";jQuery.fn.flashembed=function(k,j){var l=null;this.each(function(){l=flashembed(this,k,j)});return k.api===false?this:l}}})();


//AUTOTAB
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e)
{
	var keyCode = (isNN) ? e.which : e.keyCode;
	var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
	if(input.value.length >= len && !containsElement(filter,keyCode))
	{
		input.value = input.value.slice(0, len);
		input.form[(getIndex(input)+1) % input.form.length].focus();
	}
	function containsElement(arr, ele)
	{
		var found = false, index = 0;
		while(!found && index < arr.length)
			if(arr[index] == ele) found = true;
			else
				index++;
			return found;
	}
	function getIndex(input)
	{
		var index = -1, i = 0, found = false;
		while (i < input.form.length && index == -1)
			if (input.form[i] == input)index = i;
			else
				i++;
		return index;
	}
	return true;
}


