//JavaScriptFlashGateway.js
function Exception(name, message)
{
    if (name)
        this.name = name;
    if (message)
        this.message = message;
}

Exception.prototype.setName = function(name)
{
    this.name = name;
}

Exception.prototype.getName = function()
{
    return this.name;
}

Exception.prototype.setMessage = function(msg)
{
    this.message = msg;
}

Exception.prototype.getMessage = function()
{
    return this.message;
}

function FlashTag(src, width, height)
{
    this.src       = src;
    this.width     = width;
    this.height    = height;
    this.version   = '7,0,14,0';
    this.id        = null;
    this.bgcolor   = 'ffffff';
    this.flashVars = null;
}

FlashTag.prototype.setVersion = function(v)
{
    this.version = v;
}

FlashTag.prototype.setId = function(id)
{
    this.id = id;
}

FlashTag.prototype.setBgcolor = function(bgc)
{
    this.bgcolor = bgc;
}

FlashTag.prototype.setFlashvars = function(fv)
{
    this.flashVars = fv;
}

FlashTag.prototype.toString = function()
{
    var ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0;
    var flashTag = new String();
    if (ie)
    {
        flashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        if (this.id != null)
        {
            flashTag += 'id="'+this.id+'" ';
        }
        flashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'">';
        flashTag += '<param name="movie" value="'+this.src+'"/>';
        flashTag += '<param name="quality" value="high"/>';
        flashTag += '<param name="bgcolor" value="#'+this.bgcolor+'"/>';
        if (this.flashVars != null)
        {
            flashTag += '<param name="flashvars" value="'+this.flashVars+'"/>';
        }
        flashTag += '</object>';
    }
    else
    {
        flashTag += '<embed src="'+this.src+'" ';
        flashTag += 'quality="high" ';
        flashTag += 'bgcolor="#'+this.bgcolor+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'" ';
        flashTag += 'type="application/x-shockwave-flash" ';
        if (this.flashVars != null)
        {
            flashTag += 'flashvars="'+this.flashVars+'" ';
        }
        if (this.id != null)
        {
            flashTag += 'name="'+this.id+'" ';
        }
        flashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        flashTag += '</embed>';
    }
    return flashTag;
}

FlashTag.prototype.write = function(doc)
{
    doc.write(this.toString());
}

function FlashSerializer(useCdata)
{
    this.useCdata = useCdata;
}

FlashSerializer.prototype.serialize = function(args)
{
    var qs = new String();

    for (var i = 0; i < args.length; ++i)
    {
        switch(typeof(args[i]))
        {
            case 'undefined':
                qs += 't'+(i)+'=undf';
                break;
            case 'string':
                qs += 't'+(i)+'=str&d'+(i)+'='+escape(args[i]);
                break;
            case 'number':
                qs += 't'+(i)+'=num&d'+(i)+'='+escape(args[i]);
                break;
            case 'boolean':
                qs += 't'+(i)+'=bool&d'+(i)+'='+escape(args[i]);
                break;
            case 'object':
                if (args[i] == null)
                {
                    qs += 't'+(i)+'=null';
                }
                else if (args[i] instanceof Date)
                {
                    qs += 't'+(i)+'=date&d'+(i)+'='+escape(args[i].getTime());
                }
                else // array or object
                {
                    try
                    {
                        qs += 't'+(i)+'=xser&d'+(i)+'='+escape(this._serializeXML(args[i]));
                    }
                    catch (exception)
                    {
                        throw new Exception("FlashSerializationException",
                                            "The following error occurred during complex object serialization: " + exception.getMessage());
                    }
                }
                break;
            default:
                throw new Exception("FlashSerializationException",
                                    "You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");
        }

        if (i != (args.length - 1))
        {
            qs += '&';
        }
    }

    return qs;
}

FlashSerializer.prototype._serializeXML = function(obj)
{
    var doc = new Object();
    doc.xml = '<fp>';
    this._serializeNode(obj, doc, null);
    doc.xml += '</fp>';
    return doc.xml;
}

FlashSerializer.prototype._serializeNode = function(obj, doc, name)
{
    switch(typeof(obj))
    {
        case 'undefined':
            doc.xml += '<undf'+this._addName(name)+'/>';
            break;
        case 'string':
            doc.xml += '<str'+this._addName(name)+'>'+this._escapeXml(obj)+'</str>';
            break;
        case 'number':
            doc.xml += '<num'+this._addName(name)+'>'+obj+'</num>';
            break;
        case 'boolean':
            doc.xml += '<bool'+this._addName(name)+' val="'+obj+'"/>';
            break;
        case 'object':
            if (obj == null)
            {
                doc.xml += '<null'+this._addName(name)+'/>';
            }
            else if (obj instanceof Date)
            {
                doc.xml += '<date'+this._addName(name)+'>'+obj.getTime()+'</date>';
            }
            else if (obj instanceof Array)
            {
                doc.xml += '<array'+this._addName(name)+'>';
                for (var i = 0; i < obj.length; ++i)
                {
                    this._serializeNode(obj[i], doc, null);
                }
                doc.xml += '</array>';
            }
            else
            {
                doc.xml += '<obj'+this._addName(name)+'>';
                for (var n in obj)
                {
                    if (typeof(obj[n]) == 'function')
                        continue;
                    this._serializeNode(obj[n], doc, n);
                }
                doc.xml += '</obj>';
            }
            break;
        default:
            throw new Exception("FlashSerializationException",
                                "You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");
            break;
    }
}

FlashSerializer.prototype._addName= function(name)
{
    if (name != null)
    {
        return ' name="'+name+'"';
    }
    return '';
}

FlashSerializer.prototype._escapeXml = function(str)
{
    if (this.useCdata)
        return '<![CDATA['+str+']]>';
    else
        return str.replace(/&/g,'&amp;').replace(/</g,'&lt;');
}

function FlashProxy(uid, proxySwfName)
{
    this.uid = uid;
    this.proxySwfName = proxySwfName;
    this.flashSerializer = new FlashSerializer(false);
}

FlashProxy.prototype.call = function()
{

    if (arguments.length == 0)
    {
        throw new Exception("Flash Proxy Exception",
                            "The first argument should be the function name followed by any number of additional arguments.");
    }

    var qs = 'lcId=' + escape(this.uid) + '&functionName=' + escape(arguments[0]);

    if (arguments.length > 1)
    {
        var justArgs = new Array();
        for (var i = 1; i < arguments.length; ++i)
        {
            justArgs.push(arguments[i]);
        }
        qs += ('&' + this.flashSerializer.serialize(justArgs));
    }

    var divName = '_flash_proxy_' + this.uid;
    if(!document.getElementById(divName))
    {
        var newTarget = document.createElement("div");
        newTarget.id = divName;
        document.body.appendChild(newTarget);
    }
    var target = document.getElementById(divName);
    var ft = new FlashTag(this.proxySwfName, 1, 1);
    ft.setVersion('6,0,65,0');
    ft.setFlashvars(qs);
    target.innerHTML = ft.toString();
}

FlashProxy.callJS = function()
{
    var functionToCall = eval(arguments[0]);
    var argArray = new Array();
    for (var i = 1; i < arguments.length; ++i)
    {
        argArray.push(arguments[i]);
    }
    functionToCall.apply(functionToCall, argArray);
}



/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

//embedplayer.js
//required variables
//var svp_clip_id = "78";
is_ie = typeof(window.innerWidth)!='number';
svp_multiple_players = is_ie!="undefined";
svp_site_root = "http://www.3bnexus.com/";
if(typeof svp_player_color=="undefined") svp_player_color = "";
if(typeof svp_player_color1=="undefined") svp_player_color1 = "";
if(typeof svp_player_color_ratio=="undefined") svp_player_color_ratio = "";
if(typeof svp_player_alpha=="undefined") svp_player_alpha = "";
if(typeof svp_player_height=="undefined") svp_player_height = 341;
if(typeof svp_player_width=="undefined") svp_player_width = 400;
if(typeof svp_transparent=="undefined") svp_transparent = true;
if(typeof svp_stretch_video=="undefined") svp_stretch_video = 0;
if(typeof svp_extra_buttons=="undefined") svp_extra_buttons = "";
if(svp_transparent=="false") svp_transparent = false;
if(typeof svp_pause=="undefined"||svp_pause =='0') svp_pause=false;
if(typeof svp_auto_hide=="undefined"||svp_auto_hide =='') svp_auto_hide='0';
if(typeof svp_brand_new_window=="undefined"||svp_brand_new_window =='') svp_brand_new_window='1';
svp_player_controls_height=19;
if(typeof svp_bg_color=="undefined") svp_bg_color='#a0a0a0';
if(typeof svp_no_fullscreen=="undefined"||svp_no_fullscreen =='0') svp_no_fullscreen = false;
if(typeof svp_skin=="undefined") svp_skin = 0;
if(typeof svp_no_controls=="undefined") svp_no_controls = 0;
if(typeof svp_start_img=="undefined") svp_start_img = 0;
if(typeof svp_start_volume=="undefined") svp_start_volume = '';
if(typeof nexus_user_id=="undefined") nexus_user_id = '';
svp_show_monitor = true;
svp_big_monitorW = 842;
svp_big_monitorH = 598;
svp_big_monitor_X = 21;
svp_big_monitor_Y = 26;
is_strict = is_ie && typeof(document.documentElement.clientWidth)!='undefined'&&document.documentElement.clientWidth!=0;
old_hscroll = 0;old_vscroll = 0;
svp_of_backup='';svp_of_backupS='';
if(typeof svp_use_div=="undefined") svp_use_div = false;
svp_true_fullscreen = (typeof svp_fs_mode=="undefined")?false:svp_fs_mode == '1';
svp_native_fullscreen = (typeof svp_fs_mode=="undefined")?false:svp_fs_mode == '2';
if(svp_true_fullscreen||svp_native_fullscreen){
   svp_show_monitor = false;
}
if(typeof svp_only_fs=="undefined") svp_only_fs = false;
if(svp_no_controls){
   svp_no_fullscreen = true;
   svp_only_fs = false;
   svp_show_monitor = false;
}

function MM_findObj(n, d){ //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length){
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for (i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers(){ //v3.0');
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null)
{ v=args[i+2];if (obj.style) { obj=obj.style; v=(v=="show")?"visible":(v="hide")?"hidden":v;}obj.visibility=v; }}
var LCuid = new Date().getTime();

function f_clientWidth(){return f_fRes(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0);}
function f_clientHeight(){return f_fRes(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0);}
function f_scrollLeft(){return f_fRes(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0);}
function f_scrollTop(){return f_fRes(window.pageYOffset ? window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0);}
function f_fRes(n_win, n_docel, n_body){var n_result=n_win?n_win:0;if (n_docel&&(!n_result||(n_result>n_docel)))n_result=n_docel;return n_body&&(!n_result||(n_result>n_body))?n_body:n_result;}
function f_setScrollOffs(it,oX,oY){itm=MM_findObj(it);if(itm){itm.style.top=oY+f_scrollTop()+'px';itm.style.left=oX+f_scrollLeft()+'px';}}
function f_setFillScreen(it,itm){itm=itm?itm:MM_findObj(it);if(itm){itm.style.width=f_clientWidth();itm.style.height=f_clientHeight();itm.style.top=f_scrollTop()+'px';itm.style.left=f_scrollLeft()+'px';}}

if(!svp_no_fullscreen && !svp_native_fullscreen){
  document.writeln('<SCRIPT LANGUAGE=JavaScript>');
  document.writeln('function f_showIFCurtain(){document.all.curtain_IF.style.display="block";document.all.curtain_IF.style.width=f_clientWidth();document.all.curtain_IF.style.height=f_clientHeight();document.all.curtain_IF.style.top=f_scrollTop()+"px";document.all.curtain_IF.style.left=f_scrollLeft()+"px";}');
  document.writeln('function f_hideIFCurtain(){document.all.curtain_IF.style.display="none";document.all.curtain_IF.style.width=f_clientWidth()-20;document.all.curtain_IF.style.height=f_clientHeight()-20;}');
  document.writeln('function player_DoFSCommand(command, args){');
  document.writeln('if(command=="OpenFullScreen"){OpenFullScreen(clip_id,args)}');
  document.writeln('}');//done fscommand
  //document.writeln('function CloseFullscreenWindow(){beplayer.HardStop();MM_showHideLayers("svp_bigplayer","","hide");}');
  document.write('function ClosePlayer(){');
  document.writeln('document.body.style.overflow=svp_of_backup;');
  if(typeof svp_on_close_fs!="undefined") document.write('eval("'+svp_on_close_fs+'");');
  if(is_strict) document.writeln('document.documentElement.style.overflow=svp_of_backupS;');
  if(is_ie) document.write('f_hideIFCurtain();');
  if(svp_show_monitor && typeof svp_bg_color!="undefined"){
    document.write('MM_showHideLayers("svp_bigplayer_bg","","hide");');
    if(is_ie) document.write('f_setFillScreen("svp_bigplayer_bg");');
  }
  if(svp_show_monitor) document.write('MM_showHideLayers("svp_bigmonitor","","hide");');
  if(is_ie && svp_true_fullscreen) document.write('f_setFillScreen("svp_bigplayer");');
  document.writeln('MM_showHideLayers("svp_bigplayer","","hide");}');

  document.write('function OpenFullScreen(ps){');
  if(typeof svp_on_open_fs!="undefined") document.write('eval("'+svp_on_open_fs+'");');
  document.write('old_hscroll = f_scrollLeft();old_vscroll = f_scrollTop();');
  document.write('svp_of_backup=document.body.style.overflow;document.body.style.overflow="hidden";');
  if(is_strict) document.write('svp_of_backupS=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";');
  if(svp_show_monitor && typeof svp_bg_color!="undefined"){
    if(is_ie) document.write('f_setFillScreen("svp_bigplayer_bg");');
    document.write('MM_showHideLayers("svp_bigplayer_bg","","show");');
  }
  if(is_ie && svp_show_monitor) document.write('f_setScrollOffs("svp_bigmonitor",bX,bY);');
  if(svp_show_monitor) document.write('MM_showHideLayers("svp_bigmonitor","","show");');
  if(is_ie) document.write('f_showIFCurtain();');
  if(is_ie && !svp_true_fullscreen) document.write('f_setScrollOffs("svp_bigplayer",aX,aY);');
  if(is_ie && svp_true_fullscreen) document.write('f_setFillScreen("svp_bigplayer");');
  document.writeln('MM_showHideLayers("svp_bigplayer","","show");');
  document.writeln('setTimeout("playBig("+ps+")",250);}');
  document.write('function playBig(ps){');
  if(is_ie) document.write('if(document.readyState!="complete"){setTimeout("playBig("+ps+")",250);return;}');
  document.write('var flashProxy = new FlashProxy("beplayer"+LCuid, "'+svp_site_root+'/js/JavaScriptFlashGateway.swf");');
  document.writeln('flashProxy.call("PlayFromPos", ""+ps);}');
  document.writeln('</SCRIPT><SCRIPT LANGUAGE="VBScript">');
  document.writeln("Sub player_FSCommand(ByVal command, ByVal args) call player_DoFSCommand(command, args) end sub");
  document.writeln('</SCRIPT>');
}
if(!svp_only_fs){
  if(!svp_use_div) document.write('<div id="svp_player" style="height: '+svp_player_height+'px; width: '+svp_player_width+'px;">EMBEDED PLAYER</div>');
  document.writeln('<script type="text/javascript" DEFER="true">');
  document.writeln('var m = new SWFObject("'+svp_site_root+'player'+svp_skin+'.swf", "eplayer", "'+svp_player_width+'", "'+svp_player_height+'", "8", "", true);');
  document.writeln('m.addParam("quality", "high");');
  if(svp_transparent) document.writeln('m.addParam("wmode", "transparent");');
  else if(svp_native_fullscreen)document.writeln('m.addParam("wmode", "window");');
  else document.writeln('m.addParam("wmode", "opaque");');
  if(svp_pause) document.writeln('m.addVariable("autoStart", "0");');
  if(svp_no_fullscreen) document.writeln('m.addVariable("no_fs", "1");');
  if(svp_stretch_video) document.writeln('m.addVariable("stretch_video", "1");');
  document.writeln('m.addVariable("clip_id", "'+svp_clip_id+'");');
  document.writeln('m.addVariable("color1", "'+svp_player_color1+'");');
  document.writeln('m.addVariable("color1alpha", "'+svp_player_alpha+'");');
  document.writeln('m.addVariable("color", "'+svp_player_color+'");');
  document.writeln('m.addVariable("b_buttons", "'+svp_extra_buttons+'");');
  document.writeln('m.addVariable("autoHide", "'+svp_auto_hide+'");');
  document.writeln('m.addVariable("nexusUser", "'+nexus_user_id+'");');
  document.writeln('m.addVariable("rid", "'+LCuid+'");');
  if(svp_no_controls)document.writeln('m.addVariable("noControls", "'+svp_no_controls+'");');
  if(svp_start_img)document.writeln('m.addVariable("start_img", "'+svp_start_img+'");');
  if(svp_start_volume)document.writeln('m.addVariable("start_volume", "'+svp_start_volume+'");');
  document.writeln('m.addVariable("brandNW", "'+svp_brand_new_window+'");');
  document.writeln('m.addVariable("color_ratio", "'+svp_player_color_ratio+'");');
  document.writeln('m.addVariable("page", "'+encodeURIComponent(location.href)+'");');
  if(typeof svp_ext!="undefined") document.writeln('m.addVariable("svpex", "'+svp_ext+'");');
  if(typeof svp_referer!="undefined") document.writeln('m.addVariable("referer", "'+encodeURIComponent(svp_referer)+'");');
  document.writeln('m.addParam("swLiveConnect", "true");');
  document.writeln('m.addParam("LOOP", "false");');
  document.writeln('m.addParam("allowScriptAccess", "always");');
  if(svp_native_fullscreen){
    document.writeln('m.addParam("allowFullScreen", "true");');
    document.writeln('m.addVariable("native_fs", "1");');
  }
  if(!svp_use_div) document.writeln('m.write("svp_player");');
  else document.writeln('m.write("'+svp_use_div+'");');
  document.writeln('</script>');
}

if(!svp_no_fullscreen){
var winW = 0, winH = 0;
if( typeof( window.innerWidth ) == 'number' ) {
  winW = window.innerWidth; winH = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
  winW = document.documentElement.clientWidth; winH = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
  winW = document.body.clientWidth; winH = document.body.clientHeight;
}

aH=awH=(winH>450)?450:winH;
aW=awW=(winW>800)?800:winW;

if(svp_show_monitor){aH=800;aH=450;}
/*else{ aspect correction
  if(awW/(awH-svp_player_controls_height) > 16/9){
    aH = awH; aW = Math.round((awH-svp_player_controls_height)*16/9);
  }else{
    aW = awW; aH = Math.round((awW)*9/16)+svp_player_controls_height;
  }
}*/
aX= Math.floor((winW-aW)/2);
aY= Math.floor((winH-aH)/2);
if(is_ie)document.write('<IFRAME id="curtain_IF" style="DISPLAY:none;LEFT:0px;POSITION:absolute;TOP:0px;filter:Alpha(Opacity=0);" src="javascript:false;" frameBorder="0" scrolling="no"></IFRAME>');
if(svp_show_monitor && typeof svp_bg_color!="undefined") document.writeln('<div id="svp_bigplayer_bg" style="position:absolute;width:'+winW+'px;height:'+winH+'px;z-index:100;left:0px;top:0px;background-color:'+svp_bg_color+';visibility: hidden;">&nbsp;</div>');
bX=0;bY=0;
if(svp_show_monitor){
  bX = aX-svp_big_monitor_X;
  bY = Math.floor((winH-aH-svp_big_monitor_Y*2)/2);
  document.writeln('<div id="svp_bigmonitor" style="position:absolute;left:'+bX+'px;top:'+bY+'px;width:'+svp_big_monitorW+'px; height:'+svp_big_monitorH+'px;z-index: 101; visibility: hidden; background-image: url('+svp_site_root+'img/monitor_big.png);background-repeat: no-repeat;">&nbsp;</div>');
}
if(svp_true_fullscreen){aX=0;aY=0;aW=winW;aH=winH;}
if(!svp_native_fullscreen){
document.writeln('<div id="svp_bigplayer" style="position:absolute;left:'+aX+'px;top:'+aY+'px;width:'+aW+'px;height:'+aH+'px; z-index: 102; visibility: hidden;">FULLSCREEN PLAYER LAYER<script type="text/javascript" DEFER="true">');
document.writeln('var bm = new SWFObject("'+svp_site_root+'player'+svp_skin+'.swf", "beplayer", "'+aW+'", "'+aH+'", "8", "", true);');
document.writeln('bm.addParam("quality", "high");');
if(svp_transparent) document.writeln('bm.addParam("wmode", "transparent");');
else document.writeln('bm.addParam("wmode", "opaque");');
document.writeln('bm.addVariable("autoStart", "0");');
document.writeln('bm.addVariable("fullscreen", "1");');
document.writeln('bm.addVariable("lcId", "beplayer"+LCuid);');
document.writeln('bm.addVariable("rid", "'+LCuid+'");');
document.writeln('bm.addVariable("clip_id", "'+svp_clip_id+'");');
document.writeln('bm.addVariable("color1", "'+svp_player_color1+'");');
document.writeln('bm.addVariable("color1alpha", "'+svp_player_alpha+'");');
document.writeln('bm.addVariable("color", "'+svp_player_color+'");');
document.writeln('bm.addVariable("autoHide", "'+svp_auto_hide+'");');
document.writeln('bm.addVariable("brandNW", "'+svp_brand_new_window+'");');
document.writeln('bm.addVariable("color_ratio", "'+svp_player_color_ratio+'");');
document.writeln('bm.addVariable("page", "'+encodeURIComponent(location.href)+'");');
if(typeof svp_ext!="undefined") document.writeln('bm.addVariable("svpex", "'+svp_ext+'");');
if(typeof svp_referer!="undefined") document.writeln('bm.addVariable("referer", "'+encodeURIComponent(svp_referer)+'");');
document.writeln('bm.addParam("swLiveConnect", "true");');
document.writeln('bm.addParam("bgcolor", "'+svp_bg_color+'");');
document.writeln('bm.addParam("LOOP", "false");');
document.writeln('bm.addParam("allowScriptAccess", "always");');
document.writeln('bm.write("svp_bigplayer");');
document.writeln('</script></div>');
}

}

