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.push(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")+"\"";_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")+"\">";_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){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);}if(Array.prototype.push==null){Array.prototype.push=function(_32){this[this.length]=_32;return this.length;};}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;


// liveCam
function viewCam(join)
{
    var camurl = 'http://members-access.com/console/live_cams/index.html?link=' + escape(join);
    var camwindow = window.open(camurl,"","width=909,height=500");
}

// Gototop implimentation
function findTop(obj) {
   var curtop = 0;
   if (obj.offsetParent) {
     curtop = obj.offsetTop;
     while (obj = obj.offsetParent) {
       curtop += obj.offsetTop;
     }
   }
   return curtop;
}
function gotoTop(objID) {
   window.scrollTo(0, findTop(document.getElementById(objID)));
}

// Bookmarking 
function bookmarksite(){
    var title = document.title;
    var url   = 'http://' + window.location.hostname + '/'; //+ window.location.pathname;
    var msg = "Sorry! Your browser doesn't support this function. Please bookmark this page manually.";
    if (window.sidebar){ // firefox
       //window.sidebar.addPanel(title, url, "");
       alert(msg);
    }
    else if(window.opera && window.print){ // opera
       alert(msg);
    }
    else if(document.all){// ie
        window.external.AddFavorite(url, title);
    }
    else {alert(msg);}
}

function scrollToTop() {
    // to the top
    window.scrollTo(0, 0);

    // then to the right if necessary
    scrollToRight();
}

// horizontal auto-scroll
function scrollToRight(){
    if (getWindowWidth() < 1030)
	window.scrollTo(30, getScrollTop() );
}
addEvent(window, "load", scrollToRight);

// event for onclick
function addEvent(obj, evType, fn){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, false);
    return true;
  }
  else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
  }
  else {
    return false;
  }
}

// add exit false event to all anchor tags
function anchorEventExit() {exit=false;}//
function addAnchorEvents(element) {
  if (element.nodeName == 'A' && element.href) {
    addEvent(element, "click", anchorEventExit);
  }
  for (var iter = 0; iter < element.childNodes.length; ++iter) {
    addAnchorEvents(element.childNodes[iter]);
  }
}
function addAnchorEventsWrapper() {addAnchorEvents(document.body);}
addEvent(window, 'load', addAnchorEventsWrapper);


// Trailer rating

function rateTrailer(rating)
{
    showAlertBox('thankYouBox');
}

var timeout; // tracks time-out
var lastAlertBox;   // tracks last box, for hiding
    
// for the little popups in ajax responses:
function showAlertBox(boxId) {
    // first, hide any previous alert box
    hideLastAlertBox();

    // find object
    var obj = document.getElementById(boxId);
    
    // move and show object
    obj.style.top = (getBoxTop() - (parseInt(obj.style.height) / 2)) + "px";
    obj.style.left = (getBoxLeft() - (parseInt(obj.style.width) / 2)) + "px";
    obj.style.display = 'block';

    // conceal the rest of the screen
    showVeil();

    // cancel any timeout
    clearTimeout(timeout);
    
    // now set the timeout to end the popup
    timeout = setTimeout("hideAlertBox('" + boxId + "')", 1000);

    // record for posterity
    lastAlertBox = boxId;
}   
    
function hideAlertBox(boxId) {
    obj = document.getElementById(boxId);

    obj.style.display = 'none';

    hideVeil();
        
    // clear any timeout
    clearTimeout(timeout);
}       
    
function hideLastAlertBox() {
    if (lastAlertBox) {
        hideAlertBox(lastAlertBox);
    }
}       
    
function showVeil() {
    var veil = document.getElementById('boxVeil');
    
    if (document.all) {
        veil.style.height = document.body.offsetHeight + "px";
        veil.style.width = document.body.offsetWidth + "px";
    }
    else {
        veil.style.height = document.height + "px";
        veil.style.width = document.width + "px";
    }   
    veil.style.top = "0px";
    veil.style.left = "0px";

    veil.style.display = 'block';
}

function hideVeil() {
    var veil = document.getElementById('boxVeil');
    veil.style.display = 'none';
}

function getBoxTop() {
    return getScrollTop() + (getWindowHeight() / 2);
}   

function getBoxLeft() {
    return getScrollLeft() + (getWindowWidth() / 2);
}   

function getWindowHeight() {
    if (document.all) {
        return document.documentElement.clientHeight;
    }
    else {  
        return window.innerHeight;
    }       
}               
            
function getWindowWidth() {
    if (document.all) {
        return document.documentElement.clientWidth;
    }   
    else {
        return window.innerWidth;
    }
}   

function getScrollTop() {
    if (document.all) {
        return document.documentElement.scrollTop;
    }
    else {
        return window.pageYOffset;
    }       
}
            
function getScrollLeft() {
    if (document.all) {
        return document.documentElement.scrollLeft;
    }           
    else {      
        return window.pageXOffset;
    }       
}



/*  BLRollOver and BLPopup
    Author: Mikael Ramirez

    This library is meant to supersede the DreamWeaver mouse over library and works with
    PNG fixes applied for IE 6.

    Credits: 
    http://events in IE 5
*/

if (typeof Array.prototype.push != "function") {
    Array.prototype.push = ArrayPush;
    function ArrayPush(value) {
        this[this.length] = value;
    }
}

if (typeof blurri == "undefined")
    var blurri = {};
if (typeof blurri.blRollOver == "undefined")
    blurri.blRollOver = {};
if (typeof blurri.blPopup == "undefined")
    blurri.blPopup = {};
if (typeof blurri.lib == "undefined")
    blurri.lib = {};

blurri.timerID  = 0;
blurri.TIME_OUT_LEN = 800;
blurri.offX = 0;
blurri.offY = 0;
blurri.ieFix = false;
blurri.callbackData = null;
blurri.callbackClear = null;

if (!window.opera) {
    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
     var iever = new Number(RegExp.$1) // capture x.x portion and store as a number
     if (iever >= 5)
        blurri.ieFix = true;
    }
}
/* START POPUP CODE */ 
blurri.blPopup = function(_cs, _id, _callbackData, _callbackClear) {
    if (typeof _callbackData != 'undefined')
        blurri.callbackData = _callbackData;
    if (typeof _callbackClear != 'undefined')
        blurri.callbackClear = _callbackClear;
    blurri.blPopup.s = {classname: _cs, popup: _id};
    blurri.lib.addEvent(window, "load", blurri.lib.setupPopup);
}
blurri.lib.setupPopup = function() {
    var cs = blurri.blPopup.s.classname;
    if (!cs.length)
        return;
    if (!(blurri.blPopup.popup = document.getElementById(blurri.blPopup.s['popup'])))
        return;

    /*  in ie6 and 5.5 the popup will not cover form controls even if the z-index is higher than them
        so the only fix is to use an iframe underneath it in these browsers */
    if (blurri.ieFix) {
        var shim = document.createElement('iframe');
        shim.id = 'popupShim';
        shim.name = 'popupShim';
        shim.style.position = 'absolute';
        shim.style.visibility = 'hidden';
        shim.style.left = 0;
        shim.style.top = 0;
        shim.width = 2;
        shim.height = 2;
        shim.src = 'about:blank';
        shim.frameBorder = 0;
        shim.scrolling = 'no';
        blurri.blPopup.shim = shim;
        var bodyRef = document.getElementsByTagName("body").item(0);
        bodyRef.appendChild(shim);
    }

    var b = blurri.lib.getElementsByClassName(null, "a", cs);
    if (b.length) {
        for (var i=0, len=b.length; i<len; i++) {
            blurri.lib.addEvent(b[i], 'mouseover', blurri.lib.popupOver);
            blurri.lib.addEvent(b[i], 'mouseout', blurri.lib.popupOut);
        }
    }
    delete blurri.blPopup.s;
}
blurri.lib.popupShow = function(sh) {
    var popup = blurri.blPopup.popup;
    var shim = blurri.blPopup.shim;
    popup.style.visibility = sh;

    if (blurri.ieFix && (typeof shim != undefined)) {
        shim.style.visibility = sh;
        shim.style.left  = popup.style.left;
        shim.style.top = popup.style.top;
        shim.style.width = popup.clientWidth;   
        shim.style.height = popup.clientHeight;
    }
}
blurri.lib.popupOver = function() {
    blurri.timerID = window.setTimeout ("blurri.lib.popupShow('visible')", blurri.TIME_OUT_LEN);
    blurri.lib.addEvent(this, 'mousemove', blurri.lib.popupMove);
    if (blurri.callbackData)
        blurri.callbackData(blurri.blPopup.popup, this.id);
}
blurri.lib.popupOut = function() {
    if (blurri.timerID) {
        window.clearTimeout (blurri.timerID);
        blurri.timerID = 0;
    }
    blurri.lib.popupShow('hidden');
    blurri.lib.removeEvent(this, 'mousemove', blurri.lib.popupMove);
    if (blurri.callbackClear)
        blurri.callbackClear(blurri.blPopup.popup);
}
blurri.lib.popupMove = function(e) {
    blurri.lib.movePopup(blurri.blPopup.popup, e);
}
blurri.lib.movePopup = function(obj, e) {
    var p = blurri.lib;
    var shim = blurri.blPopup.shim;
    var off = 10;
    var objx = parseInt(p.mx(e))+off;
    var objy = parseInt(p.my(e))+off;

    if (objx + obj.clientWidth >= (p.getViewportWidth()-15))
        objx -= (obj.clientWidth+(off*2));
    if (objy + obj.clientHeight >= (p.getViewportHeight()+p.getVerticalScroll()-15))
        objy -= (obj.clientHeight+(off*2));

    obj.style.left = (objx.toString() + 'px');
    obj.style.top = (objy.toString() + 'px');

    if (blurri.ieFix && (typeof shim != undefined)) {
        shim.style.left  = obj.style.left;
        shim.style.top = obj.style.top;
    }
    
}
/* END POPUP CODE */

/* START ROLLOVER CODE */
blurri.blRollOver = function (_array) {
    blurri.blRollOver.s = _array;
    blurri.lib.addEvent(window, "load", blurri.lib.setupButtons);
}
blurri.lib.setupButtons = function() {
    var da = blurri.blRollOver.s;
    if (!da)
        return;
    for (var c in da) {
        var pi1 = new Image();
        var pi2 = new Image();
        pi1.src = da[c][0];
        pi2.src = da[c][1];
        var b = blurri.lib.getElementsByClassName(null, "a", c);
        if (!b.length || da[c].length != 2)
            continue;
        for (var i=0, len=b.length; i<len; i++) {
            var img = b[i].getElementsByTagName("img");
            if (img.length) {
                b[i].outSrc = da[c][0];
                b[i].overSrc = da[c][1];
                blurri.lib.addEvent(b[i], 'mouseover', blurri.lib.buttonOver);
                blurri.lib.addEvent(b[i], 'mouseout', blurri.lib.buttonOut)
            }
        }
    }
    delete blurri.blRollOver.s;
}
blurri.lib.buttonOver = function() {
    var img = this.getElementsByTagName("img");
    img[0].src = this.overSrc;
}
blurri.lib.buttonOut = function() {
    var img = this.getElementsByTagName("img");
    img[0].src = this.outSrc;
}
/* END ROLLOVER CODE */

/* COMMON LIBRARY CODE */
blurri.lib.addEvent = function(obj, type, fn) {
    if (obj.attachEvent) {
        obj['e'+type+fn] = fn;
        obj[type+fn] = function() { obj['e'+type+fn](window.event); }
        obj.attachEvent('on'+type, obj[type+fn]);
    }
    else
        obj.addEventListener(type, fn, false);
}
blurri.lib.removeEvent = function(obj, type, fn) {
    if (obj.detachEvent) {
        obj.detachEvent( 'on'+type, obj[type+fn] );
        obj[type+fn] = null;
    }
    else
        obj.removeEventListener(type, fn, false);
}
blurri.lib.getElementsByClassName = function (oElm, strTagName, strClassName) {
    if (oElm == null)
        oElm = document;
    else
        oElm = document.getElementById(oElm);
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++) {
        oElement = arrElements[i];
        if(oRegExp.test(oElement.className))
            arrReturnElements.push(oElement);
    }
    return (arrReturnElements);
}
// get the mouse x position
blurri.lib.mx = function(e) { 
    if (!e)
        var e = window.event;
    if (e && e.pageX)
        return e.pageX;
    else if (e && e.clientX) {
        return e.clientX + (
            document.documentElement.scrollLeft ?
            document.documentElement.scrollLeft :
            document.body.scrollLeft);
    }
    else
        return 0;
}
// get the mouse y position
blurri.lib.my = function(e) {
    if (!e)
        var e = window.event;
    if (e && e.pageY)
        return e.pageY;
    else if (e && e.clientY) {
        return e.clientY + (
            document.documentElement.scrollTop ?
            document.documentElement.scrollTop :
            document.body.scrollTop);
    }
    else
        return 0;
}
// initialize this lib
blurri.init = function () {
    var p = blurri.lib;
    // All browsers but IE
    if (window.innerWidth) { 
        p.getViewportWidth = function()     { return window.innerWidth; };
        p.getViewportHeight = function()    { return window.innerHeight; };
        p.getHorizontalScroll = function()  { return window.pageXOffset; };
        p.getVerticalScroll = function()    { return window.pageYOffset; };
    }
    else if (document.documentElement && document.documentElement.clientWidth) {
        // These functions are for IE 6 when there is a DOCTYPE
        p.getViewportWidth = function()     { return document.documentElement.clientWidth; };
        p.getViewportHeight = function()    { return document.documentElement.clientHeight; };
        p.getHorizontalScroll = function()  { return document.documentElement.scrollLeft; };
        p.getVerticalScroll = function()    { return document.documentElement.scrollTop; };
    }
    else if (document.body.clientWidth) {
        // These are for IE4, IE5, and IE6 without a DOCTYPE
        p.getViewportWidth = function()     { return document.body.clientWidth; };
        p.getViewportHeight = function()    { return document.body.clientHeight; };
        p.getHorizontalScroll = function()  { return document.body.scrollLeft; };
        p.getVerticalScroll = function()    { return document.body.scrollTop; }
    }
    blurri.lib.addEvent (window, "load", blurri.init);
    delete blurri.init;
};
blurri.lib.addEvent (window, "load", blurri.init);

var BLRollOver = blurri.blRollOver;
var BLPopup = blurri.blPopup;
