/*
 * javascript/GUI library
 *
 * Copyright (c) 2008 Robert Beach (fastcatsoftware.com)
 *
 * Date: 2008-07-15
 */

if (typeof jsGo != "undefined" || jsGo) throw Error("jsGo is allready defined.");
    
var jsGo = {};

jsGo.GUI = function() {
    var environment = '';
    var DRAGABLE_ELEMENT_PREFIX = "fc_draggable";
    var CLICKABLE_ELEMENT_PREFIX = "fc_clickable";
    var DRAG_SELECTOR_LENGTH = 2;
    var CLICK_SELECTOR_LENGTH = 2;
    var DRAG_TOP_TITLE_COVER = "tc";
    var DRAG_TOP_TITLE_NOBR = "tb";
    var DRAG_TOP_TITLE_IMG = "ti";
    var DRAG_TOP_MIDDLE = "tm";
    var DRAG_TOP_LEFT = "tl";
    var DRAG_TOP_RIGHT = "tr";
    var RESIZE_LEFT = "rl";
    var RESIZE_RIGHT = "rr";
    var RESIZE_BOTTOM_MIDDLE = "bm";
    var RESIZE_BOTTOM_LEFT = "bl";
    var RESIZE_BOTTOM_RIGHT = "br";
    var MINIMIZE = "mn";
    var MAXIMIZE = "mx";
    var CLOSE = "cl";
    var RESTORE = "rs";
    var ALTMINIMIZE = "b1";
    var ALTMAXIMIZE = "b2";
    var ALTCLOSE = "b3";
    var ALTRESTORE = "b0";
    var MAX_PRESET_WINDOW_CONTAINERS = 50;
    this.eTimestamp = 0;
    this.time1 = 0;
    this.time2 = 0;
    this.count = 0;
    this.eWL = 0;;
    this.eWT = 0;
    this.eWW = 0;
    this.eWH = 0;
    this.eCW = 0;
    this.eCH = 0;
    this.eCBL = 0;
    this.eMBL = 0;
    this.emBL = 0;
    this.eX = 0;
    this.eY = 0;
    this.eDraggingWindow = false;
    this.dragElement = null;
   
    var _this,
    widget = [],
    eventsEnabled = true;
    this.enableEvents = function(enabled) {
        eventsEnabled = enabled;
    };
    this.setEnvironment = function(env) {
        environment = env;
    };
    this.windows_open = 0;
    this.current_selected_window = null;
    var id = 0,
    c = [],
    bd,
    overlay;
    this.z_index_base = fc_zindex_base + 1000;
    this.setZIndex = function(zIndex) {
        this.z_index_base = zIndex;
    };
    var z_index_window = fc_zindex_base + 1000;
    this.setZIndexWindow = function(zIndex) {
        z_index_window = zIndex;
    };
    this.getWidget = function(id) {
        return widget[id];
    };
    this.returnElementCoordinates = function(el) {
        var coords = {};
        coords.x = coords.y = 0;
        if (el.offsetParent) {
            do {
                coords.x += el.offsetLeft;
                coords.y += el.offsetTop;
            }
            while (el = el.offsetParent);
        }
        return coords;
    };
    
    function onMouseMoveDrag(e) {
        if (e == null)
            var e = window.event;
        _this.dragWidget(e);
    };
    this.dragWidget = function(e) {
        var w = widget[id];
        if ( ! this.eDraggingWindow) {
            this.eDraggingWindow = true;
            if (w.shieldOnDrag) {
                w.raiseDragShield();
            }
        }
        w.onDrag(this, e);
    };
    function onMouseMoveResizeR(e) {
        if (e == null)
            var e = window.event;
        _this.resizeWidgetRight(e);
    };
    this.resizeWidgetRight = function(e) {
        var w = widget[id];
        w.resizeRight(this, (e.clientX - this.eX), false);
    };
    function onMouseMoveResizeL(e) {
        if (e == null)
            var e = window.event;
        _this.resizeWidgetLeft(e);
    };
    this.resizeWidgetLeft = function(e) {
        var w = widget[id];
        w.resizeLeft(this, (this.eX - e.clientX), false);
    };
    function onMouseMoveResizeB(e) {
        if (e == null)
            var e = window.event;
        _this.resizeWidgetBottom(e);
    };
    this.resizeWidgetBottom = function(e) {
        var w = widget[id];
        w.resizeBottom(this, (e.clientY - this.eY), false);
    };
    function onMouseMoveResizeBR(e) {
        if (e == null)
            var e = window.event;
        _this.resizeWidgetBottomRight(e);
    };
    this.resizeWidgetBottomRight = function(e) {
        var w = widget[id];
        w.resizeBottomRight(this, (e.clientX - this.eX), (e.clientY - this.eY), false);
    };
    function onMouseMoveResizeBL(e) {
        if (e == null)
            var e = window.event;
        _this.resizeWidgetBottomLeft(e);
    };
    this.resizeWidgetBottomLeft = function(e) {
        var w = widget[id];
        w.resizeBottomLeft(this, (this.eX - e.clientX), (e.clientY - this.eY), false);
    };
    this.mouseDown = function(e) {
        if (eventsEnabled) {
            if (e == null)
                e = window.event;
            var target = e.target != null ? e.target: e.srcElement;
            _this.handleMouseClick(e, target, false);
        }
        return false;
    };
    this.doubleClick = function(e) {
        if (eventsEnabled) {
            if (e == null)
                e = window.event;
            var target = e.target != null ? e.target: e.srcElement;
            _this.handleMouseClick(e, target, true);
        }
        return false;
    };
    this.handleMouseClick = function(e, target, doubleClick) {
        if (e.button == 1 && window.event != null || e.button == 0) {
            var target_id = target.getAttribute('id');
            if (target_id != null && target_id.substring(0, DRAGABLE_ELEMENT_PREFIX.length) == DRAGABLE_ELEMENT_PREFIX) {
                this.eX = e.clientX;
                this.eY = e.clientY;
                this.dragElement = target;
                var movement_selector = target_id.substr(DRAGABLE_ELEMENT_PREFIX.length, DRAG_SELECTOR_LENGTH);
                id = target_id.substr(DRAGABLE_ELEMENT_PREFIX.length + DRAG_SELECTOR_LENGTH);
                var w = widget[id];
                if (w.enabled) {
                    switch(movement_selector) {
                        case DRAG_TOP_MIDDLE: case DRAG_TOP_LEFT: case DRAG_TOP_RIGHT: case DRAG_TOP_TITLE_COVER: case DRAG_TOP_TITLE_NOBR: case DRAG_TOP_TITLE_IMG: w.onMouseDownTop(this);
                        if (doubleClick) {
                            w.onDoubleClickTop();
                        } else {
                           
                            this.events.add(document, 'mousemove', onMouseMoveDrag);
                        }
                        break;
                        case RESIZE_RIGHT: this.eCW = this.util.eN(w.cA.style.width);
                        this.eWW = this.util.eN(w.f.offsetWidth);
                        w.f.style.width = this.eWW;
                        this.eCBL = this.util.eN(w.cB.style.left);
                        this.eMBL = this.util.eN(w.MB.style.left);
                        this.emBL = this.util.eN(w.mB.style.left);
                        this.events.add(document, 'mousemove', onMouseMoveResizeR);
                        break;
                        case RESIZE_LEFT: this.eWL = this.util.eN(w.f.style.left);
                        this.eCW = this.util.eN(w.cA.style.width);
                        this.eWW = this.util.eN(w.f.offsetWidth);
                        w.f.style.width = this.eWW;
                        this.eCBL = this.util.eN(w.cB.style.left);
                        this.eMBL = this.util.eN(w.MB.style.left);
                        this.emBL = this.util.eN(w.mB.style.left);
                        this.events.add(document, 'mousemove', onMouseMoveResizeL);
                        break;
                        case RESIZE_BOTTOM_LEFT: this.eWL = this.util.eN(w.f.style.left);
                        this.eCW = this.util.eN(w.cA.style.width);
                        this.eWW = this.util.eN(w.f.offsetWidth);
                        w.f.style.width = this.eWW;
                        this.eCBL = this.util.eN(w.cB.style.left);
                        this.eMBL = this.util.eN(w.MB.style.left);
                        this.emBL = this.util.eN(w.mB.style.left);
                        this.eCH = this.util.eN(w.cA.style.height);
                        this.eWH = this.util.eN(w.f.offsetHeight);
                        w.f.style.height = this.eWH;
                        this.events.add(document, 'mousemove', onMouseMoveResizeBL);
                        break;
                        case RESIZE_BOTTOM_MIDDLE: this.eCH = this.util.eN(w.cA.style.height);
                        this.eWH = this.util.eN(w.f.offsetHeight);
                        w.f.style.height = this.eWH;
                        this.events.add(document, 'mousemove', onMouseMoveResizeB);
                        break;
                        case RESIZE_BOTTOM_RIGHT: this.eCW = this.util.eN(w.cA.style.width);
                        this.eWW = this.util.eN(w.f.offsetWidth);
                        w.f.style.width = this.eWW;
                        this.eCBL = this.util.eN(w.cB.style.left);
                        this.eMBL = this.util.eN(w.MB.style.left);
                        this.emBL = this.util.eN(w.mB.style.left);
                        this.eCH = this.util.eN(w.cA.style.height);
                        this.eWH = this.util.eN(w.f.offsetHeight);
                        w.f.style.height = this.eWH;
                        this.events.add(document, 'mousemove', onMouseMoveResizeBR);
                        break;
                        default: 
                    }
                }
                document.body.focus();
                document.onselectstart = function() {
                    return false;
                };
                return false;
            } else {
                if (target_id != null && target_id.substring(0, CLICKABLE_ELEMENT_PREFIX.length) == CLICKABLE_ELEMENT_PREFIX) {
                    var click_selector = target_id.substr(CLICKABLE_ELEMENT_PREFIX.length, CLICK_SELECTOR_LENGTH);
                    id = target_id.substr(CLICKABLE_ELEMENT_PREFIX.length + CLICK_SELECTOR_LENGTH);
                    var w = widget[id];
                    if (w.enabled) {
                        switch(click_selector) {
                            case MINIMIZE: case ALTMINIMIZE: w.minimize();
                            break;
                            case RESTORE: case ALTRESTORE: w.restore();
                            break;
                            case MAXIMIZE: case ALTMAXIMIZE: w.maximize();
                            break;
                            case CLOSE: case ALTCLOSE: this.closeWindow(w.id);
                            break;
                            default: 
                        }
                    }
                    document.body.focus();
                    return false;
                }
            }
        }
    };
    this.mouseUp = function(e) {
        if (_this.dragElement != null) {
            _this.events.remove(document, 'mousemove', onMouseMoveDrag);
            _this.events.remove(document, 'mousemove', onMouseMoveResizeR);
            _this.events.remove(document, 'mousemove', onMouseMoveResizeL);
            _this.events.remove(document, 'mousemove', onMouseMoveResizeB);
            _this.events.remove(document, 'mousemove', onMouseMoveResizeBR);
            _this.events.remove(document, 'mousemove', onMouseMoveResizeBL);
            document.onselectstart = null;
            _this.dragElement = null;
            if (_this.eDraggingWindow && widget[id].shieldOnDrag) {
                widget[id].lowerDragShield();
            }
            _this.eDraggingWindow = false;
        }
    };
    this.bind = function(obj, prop, method) {
        return function() {
            return method.call(obj, arguments[0], prop);
        };
    };
    this.widgetMousedown = function(e, id) {
       
        if (eventsEnabled) {
            this.widgetMousedownHandler(e, id);
        }
    };
    this.widgetMouseup = function(e, id) {
       
        
    };
    this.widgetDblclick = function(e, id) {
       
        
    };
    this.widgetMousedownHandler = function(e, id) {
        if (widget[id].enabled) {
            this.focusWidget(id)
            }
    };
    this.focusWidget = function(id) {
        if (id != this.current_selected_window) {
            for (var ent in widget) {
                if (Number(widget[ent].zpos) > Number(widget[id].zpos)) {
                    widget[ent].zpos -- ;
                    widget[ent].f.style.zIndex -=2 ;
                }
            }
            if (this.current_selected_window != null && widget[this.current_selected_window] != null)
                widget[this.current_selected_window].onDeselect();
            widget[id].onSelect(this);
            this.current_selected_window = id;
        }
    };
    this.closeWindow = function(id) {
        var w = widget[id];
        for (var ent in widget) {
            if (Number(widget[ent].zpos) > Number(w.zpos)) {
                widget[ent].zpos -- ;
                widget[ent].f.style.zIndex -=2 ;
            }
        }
        this.current_selected_window = null;
        if (w.onClose()) {
           this.windows_open -- ;
           delete widget[id];
           delete w;
        }
    };
    function getAvailableWidgetId() {
        var index = 0;
        while (true) {
            if (widget[index] == null) {
                return index;
            }
            index ++ ;
        }
    };
    this.createSimpleWindow = function(title, left, top, width, height, winstyle, color, opacity, borderStyle, _backgroundColor, _backgroundImage, contentType, content, menu, resizable) {
        var win_id = getAvailableWidgetId();
        var id_prefix = 'fc_draggable';
        var cursor_style = '';
        if ( ! resizable) {
            id_prefix = 'fc_fixed';
            cursor_style = 'cursor:default;';
        }
        var style = cursor_style + 'background-color:' + color + ' ;filter:alpha(opacity=' + opacity + ');-moz-opacity:.' + opacity + ';opacity:.' + opacity + ';';
        var w;
        if (win_id > MAX_PRESET_WINDOW_CONTAINERS) {
            return null;
        } else {
            if (this.current_selected_window != null && widget[this.current_selected_window] != null)
                widget[this.current_selected_window].onDeselect();
            w = new jsGo.DefaultWindow(win_id, this.util, this.dom);
            widget[win_id] = w;
            w.f = this.dom.$2('fc_win' + win_id);
        }
        this.windows_open ++ ;
        w.f.style.display = 'block';
        w.resizable = resizable;
        w.zpos = this.windows_open;
        w.f.style.width = (this.util.eN(width) + 10) + 'px';
        w.f.style.height = (this.util.eN(height) + 35) + 'px';
        this.defaultClientWidth = width;
        this.defaultClientHeight = height;
        var background = "background-color:#" + _backgroundColor + ";";
        if (_backgroundColor == '') {
            background = "background-image:url(" + _backgroundImage + ");";
        }
        this.dom.setStyle(w.f, 'style', 'zIndex', this.z_index_base + 2*this.windows_open, 'position', 'absolute', 'top', top + 'px', 'left', left + 'px');
        w.f.innerHTML = "<table id='fc_inner" + win_id + "' cellpadding=0 cellspacing=0 class='jGo_inner' >" +
        					"<tr>" +
        						"<td id='fc_draggabletl" + win_id + "' class='jGo_tl_" + winstyle + "' style='" + style + "'>" + c[0] + "</td>" +
        						"<td id='fc_draggabletm" + win_id + "' class='jGo_tm_" + winstyle + "' style='" + style + "'>" + c[1] + "</td>" +
        						"<td id='fc_draggabletr" + win_id + "' class='jGo_tr_" + winstyle + "' style='" + style + "'>" + c[2] + "</td>" +
        					"</tr>" +
        					"<tr>" +
        						"<td id='" + id_prefix + "rl" + win_id + "' class='jGo_rl_" + winstyle + "' style='" + style + "'>" + c[3] + "</td>" +
        						"<td>" +
        							"<div id='fc_content" + win_id + "' style='display:block;position:relative;width:" + width + "px;height:" + height + "px;overflow:hidden;" + background + "'></div>" +
        						"</td>" +
        						"<td id='" + id_prefix + "rr" + win_id + "' class='jGo_rr_" + winstyle + "' style='" + style + "'>" + c[4] + "</td>" +
        					"</tr>" +
        					"<tr>" +
        						"<td id='" + id_prefix + "bl" + win_id + "' class='jGo_bl_" + winstyle + "' style='" + style + "'>" + c[5] + "</td>" +
        						"<td id='" + id_prefix + "bm" + win_id + "' class='jGo_bm_" + winstyle + "' style='" + style + "'>" + c[6] + "</td>" +
        						"<td id='" + id_prefix + "br" + win_id + "' class='jGo_br_" + winstyle + "' style='" + style + "'>" + c[7] + "</td>" +
        					"</tr>" +
        				"</table>";
        if (environment == 'exp6') {
            w.f.style.background = '';
        }
        if (contentType == 'element') {
            w.cN = content;
            w.cA = this.dom.$2('fc_content' + win_id);
            //w.cA.appendChild(content);
        }
        if (contentType == 'html') {
            w.cA = this.dom.$2('fc_content' + win_id);
            w.cN = w.cA;
            w.cA.innerHTML = content;
        }
        var elements = [];
        elements.push(w.cB = document.createElement('div'));
        elements.push(w.MB = document.createElement('div'));
        elements.push(w.mB = document.createElement('div'));
        w.cB.setAttribute('id', 'fc_clickablecl' + win_id);
        w.MB.setAttribute('id', 'fc_clickablemx' + win_id);
        w.mB.setAttribute('id', 'fc_clickablemn' + win_id);
        this.dom.setStyle(elements, 'style', 'position', 'absolute', 'width', '21px', 'height', '21px', 'display', 'block', 'top', '-5px');
        w.cB.style.left = (w.f.offsetWidth - 40) + 'px';
        w.MB.style.left = (w.f.offsetWidth - 65) + 'px';
        w.mB.style.left = (w.f.offsetWidth - 90) + 'px';
        element = null;
        elements.push(w.tI = document.createElement('div'));
        elements.push(w.t = document.createElement('div'));
        elements.push(w.tC = document.createElement('div'));
        w.tI.setAttribute('id', 'fc_title' + win_id);
        w.t.setAttribute('id', 'fc_title' + win_id);
        w.tC.setAttribute('id', 'fc_draggabletc' + win_id);
        jQuery([w.tI,w.t,w.tC]).addClass("jGo_title_default");
        this.dom.setStyle(elements, 'style', 'position', 'absolute', 'height', '12px', 'display', 'block', 'top', '-5px', 'cursor', 'default');
        this.dom.setStyle(w.tI, 'style', 'width', '12px', 'background', 'url(' + fc_dir + 'Fastcat_Current_Skin/FastcatLogo.gif) no-repeat', 'left', '5px');
        w.t.style.width = '50px';
        w.t.style.left = '17px';
        this.dom.setStyle(w.tC, 'style', 'width', '100px', 'backgroundColor', 'transparent', 'left', '5px');
        w.f.appendChild(w.cB);
        w.f.appendChild(w.MB);
        w.f.appendChild(w.mB);
        w.f.appendChild(w.tI);
        w.f.appendChild(w.t);
        w.f.appendChild(w.tC);
        this.events.add(w.f, 'mousedown', this.bind(this, win_id, this.widgetMousedown));
        var maxTitle='Maximize';
        if(win_id==0){
        	maxTitle='Split-Screen';
        }
        w.cB.innerHTML = "<a href='javascript:void(0)' title='Close' id='fc_clickableb3" + win_id + "' class='jGo_closewindow_default'>&nbsp;</a>";
        w.MB.innerHTML = "<a href='javascript:void(0)' title='"+maxTitle+"' id='fc_clickableb2" + win_id + "' class='jGo_maxwindow_default'>&nbsp;</a>";
        w.mB.innerHTML = "<a href='javascript:void(0)' title='Minimize' id='fc_clickableb1" + win_id + "' class='jGo_minwindow_default'>&nbsp;</a>";
        w.t.innerHTML = "<nobr id='fc_draggabletb" + win_id + "'>&nbsp;" + title + "<a href='javascript:void(0)' style='visibility:hidden' class='jGo_restorewindow_default'>&nbsp;</a></nobr>";
        w.opacity = opacity;
        w.color = color;
        this.current_selected_window = win_id;
        return w;
    };
   
    this.initGUI = function() {
        _this = this;
       
        this.events.add(document, 'mousedown', this.mouseDown);
        this.events.add(document, 'mouseup', this.mouseUp);
        this.events.add(document, 'dblclick', this.doubleClick);
    };
   
    var _proto = this;
    this.getDefault = function() {
        return _proto;
    };
    c[0] = "";
    c[1] = "";
    c[2] = "";
    c[3] = "";
    c[4] = "";
    c[5] = "";
    c[6] = "";
    c[7] = "";
};

jsGo.RegisterWithGUI = function(a, b) {
    jsGo.GUI.prototype[a] = new b();
};
jsGo.Util = function() {};
jsGo.RegisterWithGUI('util', jsGo.Util);
jsGo.Util.prototype.eN = function(value) {
    var n = parseInt(value);
    return(n == null || isNaN(n) ? 0: n);
};
jsGo.Event = function() {};
jsGo.RegisterWithGUI('events', jsGo.Event);
jsGo.Event.prototype.add = function(obj, type, fn) {
    if (obj.addEventListener)
        obj.addEventListener(type, fn, false);
    else 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]);
    }
};

jsGo.DOM = function() {};
jsGo.RegisterWithGUI('dom', jsGo.DOM);
jsGo.DOM.prototype.$2 = function(id) {
    return document.getElementById(id);
};

jsGo.DOM.prototype.setStyle = function() {
    var elements = arguments[0];
    var property = arguments[1];
    if (property == 'style') {
        if (arguments[0].length != null) {
            for (var i = 0; i < arguments[0].length; i ++ ) {
                for (var j = 2; j < arguments.length - 1; j += 2) {
                    elements[i][property][arguments[j]] = arguments[j + 1];
                }
            }
        } else {
            for (var j = 2; j < arguments.length - 1; j += 2) {
                elements[property][arguments[j]] = arguments[j + 1];
            }
        }
    } else {
        if (arguments[0].length != null) {
            var j = 2;
            for (var i = 0; i < arguments[0].length; i ++ ) {
                elements[i][property] = arguments[j];
                if (arguments.length != 3) {
                    j ++ ;
                }
            }
        } else {
            elements[property] = arguments[2];
        }
    }
};
jsGo.DOM.prototype.getDimensions = function() {};
jsGo.Widget = function(id, util, dom) {
    this.id = id;
    this.util = util;
    this.dom = dom;
    this.getDefault = function() {
        return jsGo.Widget.prototype;
    };
};
jsGo.Window = function() {
    jsGo.Widget.apply(this, arguments);
    this.getDefault = function() {
        return jsGo.Window.prototype;
    };
    this.propertyNotFound = "Method not found. Please import jsGo.Window.js";
};
jsGo.Window.prototype = new jsGo.Widget();
jsGo.DefaultWindow = function() {
    jsGo.Widget.apply(this, arguments);
    this.type = 'window';
    this.enabled = true;
    this.resizable = true;
    this.shieldOnDrag = false;
    this.state = 1;
    this.f;
    this.t;
    this.tI;
    this.tC;
    this.cB;
    this.MB;
    this.mB;
    this.cA;
    this.cN;
    this.zpos;
    this.color;
    this.opacity;
    this.maxOpacity = 1;
    this.mW = 200;
    this.mH = 38;
    this.lW = 300;
    this.lH = 300;
    this.MW = 400;
    this.MH = 650;
    this.getDefault = function() {
        return jsGo.DefaultWindow.prototype;
    };
    this.err = function() {
        alert("Method not found. Please import jsGo.DefaultWindow.js");
    };
};
jsGo.DefaultWindow.prototype = new jsGo.Window();

jsGo.DefaultWindow.prototype.getDefault = function() {
    return Window.prototype;
};

function fastcatchat(){
	var tss='color:'+fc_timestamp_color+';';
	var stl1='padding-top:2px;padding-bottom:2px;border-bottom:1px solid '+fc_side_panel_divider_color+';';
	var stl2='padding-top:2px;padding-bottom:2px;border-bottom:1px solid '+fc_room_panel_divider_color+';';
	var rbgc=fc_room_panel_background_color;
	var rsty1='style="color:'+fc_room_panel_font_color+'"';
	var rsty2='color:'+fc_change_room_color+'"';
	var rsty3='style="color:'+fc_room_panel_font_color+'"';
	var rsty4='background-color:'+rbgc+';color:'+fc_room_panel_font_color+';';
	var spdc=fc_side_panel_divider_color;
	var sphc=fc_side_panel_highlight_color;
	var cpuc=fc_current_private_user_color;
	var idleStyle=';color:' + fc_idle_color + ';background-color:transparent;';
	var tys=';color:' + fc_typing_color + ';background-color:transparent;';
	var ouic=fc_online_user_icon_color;
	var bluic=fc_blocked_user_icon_color;
	var uibc=fc_user_icon_border_color;
	var fc_rmc=fc_auto_message_color;
	var oDBorder=fc_options_border_color;
	var uDBorder=fc_userbox_border_color;
	var ubshc=fc_userbox_shadow_color;
	var lbbc=fc_login_box_border_color;
	var guest = false;
	var passConnLost = false;
	var dontClose= false;
	var chN = false;
    var newScript;
    var log = true;
    var log2 = true;
    var procd = false;
    var nm;
    var ct;
    var lgin = 0;
    var logout = 'logout';
    var cgflag=false;
    var vidGuard = false;
    var intervalId=0;
    var streamCount = 0;
    var videoAccountID = "";
    var spCol = fc_sidePanelsColor;
    var bDH = fc_client_height;
    var wintop = 0;
    var winleft = 0;
    var fc_roomDiv;
    var fc_roomPass='0';
    var reg = new RegExp("[^A-Za-z0-9_]");
    var _b='block';
    var _n='none';
    var _er='An Error Occurred. Please Refresh';
    var _i='innerHTML';
    var _v="<a href='javascript:void' ";
    var moz;
    var ww;
    var online;
    var iDTemp;
    var disp = '';
    var elem_g;
    var z_b = fc_zindex_base;
    var ie = document.all;
    var root = document.documentElement || document.body;
    var _h = fc_dir + "Fastcat_Current_Skin/";
    var _r = fc_dir;
    var _s = fc_alt_dir;
    var _t = fc_images_dir;
    var _rTest = fc_prof_subdir;
    var px = fc_chat_window_font_size;
    var clr = fc_message_text_color;
    var imgs = 0;
    var img6;
    var img7;
    var q1;
    var frcD = 0;
    var iFM = 1;
    var img1C = 0;
    var img2C = 0;
    var rLn1;
    var rLn2;
    var fExt;
    var flt = 0;
    var ts = 'display:inline';
    var dtm = 1;
    var chatRooms;
    var lockedRooms;
    var rms;
    var lrms;
    var rmsl=[];
    var vrms;
    var rmsv=[];
    var drms;
    var rmsd=[];
    var oT = document.title;
    var pass = 0;
    var locked = 0;
    var l = false;
    var lKD = false;
    var icn = 0;
    var lD = 0;
    var hU = 1;
    var oO = false;
    var sO = false;
    var puC = false;
    var ev = '0';
    var m = 0;
    var f = (top == self ? this: window.parent.fc_chat);
    var g = (top == self ? 'fc_chat.': 'window.parent.fc_chat.');
    var h = (top == self ? 'document': 'window.parent.fc_chat.getIFrameDoc()');
    var dF = fc_default_font;
    var smls = [];
    var smlsHt = [];
    var interval = 1;
    var isHidden = false;
    var coCount = 0;
    var png = new Date().getTime();
    var png2 = new Date().getTime();
    var isMenu = false;
    var overpopupmenu = false;
    var posx = 0;
    var posy = 0;
    var uPosX = 0;
    var uPosy = 0;
    var oldPosx = 0;
    var oldPosy = 0;
    var offset = 15;
    var opBase = (fc_opBase == 'left' ? 'op2': 'op');
    var opBase2 = (fc_opBase == 'left' ? '2': '');
    var optionsLeft = (fc_opBase == 'left' ? 56: 432);
    var smXOffset = 35;
    var optionsTop = 331;
    var smYOffset = 350;
    
    var flash;
    var connection;
    var connectionString;
    var req;
    var a;
    var uL = '';
    var pL = '';
    var npL = '';
    var bL = {};
    var pvL = {};
    var pageKey = '0000001';
    var d1;
    var acT = '0';
    var aCTStyle='<span style="color:'+fc_mod_color+'"> &lt;';
    var dmn;
    var g1 = 'A';
    var tg = 0;
    var _do = 'dummy';
    var upL = '0';
    var cPU = '0';
    var cBlk = '0';
    var key = [];
    var k2 = [];
    var fgl = '0';
    var pmC = 0;
    var mA = 0;
    var gmC = 0;
    var curPg = [];
    var gMsgs = [];
    var pMsgs = [];
    var pgs = [];
    var dC = [];
    var rmC = [];
    var uDC = [];
    var bD;
    var i0;
    var i1;
    var i1a;
    var i2;
    var i2a;
    var i3;
    var i4;
    var i5;
    var i6;
    var i7;
    var itext;
    var it1div;
    var opdiv;
    var oD;
    var oD2;
    var sD;
    var sD2;
    var ediv;
    var rP1;
    var i1o;
    var i2o;
    var i3o;
    var i4o;
    var odiv;
    var IFrameObj;
    var IFrameDoc;
    var tempIFrame;
    var IFO;
    var oIF;
    var sIF;
    var bIF;
    var exp6 = false;
    var IFD;
    var tIF;
    var sH = [];
    var adScr = [];
    var t;
    var t2;
    var t3;
    var elem;
    var c2;
    var pAC = fc_private_chat_arrow_color;
    var _startX = 0;
    var _startY = 0;
    var _offsetX = 0;
    var _offsetY = 0;
    var _offsetBD = 0;
    var _offsetBDw = 0;
    var _offsetBDh = 0;
    var _offsetID0 = 0;
    var _offsetID1w = 0;
    var _offsetID2w = 0;
    var _offsetID3h;
    var _offsetID4t;
    var _offsetID4w;
    var _offsetElemGt;
    var _offsetID6w = 0;
    var _offsetID7w = 0;
    var _offsetTIFw = 0;
    var _offsetTIFh = 0;
    var _offsetIDtxtw = 0;
    var _offsetop = 0;
    var _offsetOptions = 0;
    var _dragElement;
    var _oldZIndex = 0;
    var _debug = $('debug');
    var _x = null;
    var _d = new Array();
    var _dr = 0;
    var tog;
    var noOverwrite = false;
    var alertText;
    var tglCount = [];
    tglCount[1] = 0;
    tglCount[2] = 0;
    tglCount[3] = 0;
    tglCount[6] = 0;
    tglCount[7] = 0;
    curPg[6] = 0;
    curPg[7] = 0;
    pgs[6] = 0;
    pgs[7] = 0;
    dC[0] = '0';
    dC[1] = '0';
    dC[2] = '0';
    dC[3] = '0';
    dC[4] = '0';
    dC[5] = '0';
    dC[6] = '0';
    var _bm = [];
    var bitmask = [];
    bitmask[0]=0;
    bitmask[1]=1;
    for(var i=2;i<28;i++){
    	bitmask[i]=bitmask[i-1]*2;
    }
    this.obtn = "fc_e fc_e_ofb" + fc_version;
    for (var i = 0; i < fc_smileys.length; i ++ ) {
        smls[fc_smileys[i][1]] = fc_smileys[i][0];
        smlsHt[fc_smileys[i][1]] = fc_smileys[i][2];
    }
    var vals = [];
    vals[0] = 'default';
    vals[1] = 'black';
    vals[2] = 'blue';
    vals[3] = 'red';
    vals[4] = 'purple';
    vals[5] = 'green';
    vals[6] = 'yellow';
    vals[7] = 'orange';
    vals[8] = 'white';
    for (var i = 0; i < 20; i ++ ) {
        rmC[i] = 0
    }
    uDC[1] = 0;
    uDC[2] = 0;
    uDC[3] = 0;
    uDC[4] = 0;
    uDC[5] = 0;
    uDC[6] = 0;
    this.cU = '0';
    this.uD;
    this.uDb;
    this.uIF;
    adScr[0] = 0;
    adScr[1] = 0;
    adScr[2] = 0;
    adScr[3] = 0;
    adScr[4] = 0;
    adScr[5] = 0;
    adScr[6] = 0;
    adScr[7] = 0;
    var stl5="onClick='fc_chat.show_hide_options(305,225);return false'><IMG SRC='";
	var stl6="<a href='' onClick='fc_chat.blk_ublk(false,document);return false'><IMG SRC='";
	var stl7="'fc_chat.sendChat(true,false,document);return false'><IMG SRC='";
	var stl8="<INPUT TYPE=checkbox id='fc_atpg' name='ATPG' VALUE='1' style='height:20px;width:20px;margin-right:0px' onclick=";
	var stl9='<div id="fc_groupType" style="display:block; width:250px;z-Index:' + (z_b + 202) + ';'+stl2+'background-color:'+rbgc+'">&nbsp;<b '+rsty1+'>Room:</b>&nbsp;&nbsp;&nbsp;<font style="'+rsty4+'">(</font><a href="javascript:void" onClick="fc_chat.show_hide_options(305,225);return false" style="font-family:' + dF + ';font-size:7pt;'+rsty2+'">change</a><font style="'+rsty4+'">)</font><br><b '+rsty3+'>&nbsp;<IMG SRC="' + _h + 'rmarrow.gif" style="display:inline" border=0> ';
    this.setInterval = function(n) {
        interval = n;
    };
    this.setOffset = function(n) {
        offset = n;
    };
    this.BrowserDetectInit = function() {
        fc_BrowserDetect.init();
    };
    this.BrowserDetectBrowser = function() {
        return fc_BrowserDetect.browser;
    };
    this.BrowserDetectVersion = function() {
        return fc_BrowserDetect.version;
    };
    this.leavingUser = function() {
        var menuName = "fc_uD";
        isMenu = false;
        if (overpopupmenu == false) {
            if (fc_BrowserDetect.browser == 'Firefox') {
                if (elem.disabled != true) {
                    elem.focus();
                } else {
                	if(tg==1){
                		$('fc_chat').focus();
                	}
                }
            }
            if (m == 1) {
                odiv.style.display = _n;
            }
            if (IFO != null) {
                it1div.style.display = _n;
            }
            $(menuName).style.display = _n;
            if (iDTemp != null) {
                iDTemp.style.overflow = 'auto'
            }
            if (exp6) {
                this.uIF.style.display = _n;
            }
        }
        return true;
    };
    this.changestatus = function() {
        overpopupmenu = false;
        clearTimeout(t2);
        t2 = setTimeout('fc_chat.leavingUser()', interval);
        return true;
    };
    this.changebackstatus = function() {
        overpopupmenu = true;
    };
    this.posx2;
    this.posy2;
    this.mtrack = function(e) {
        if (e == null)
            e = window.event;
        if (moz) {
            posx = e.pageX;
            posy = e.pageY;
        } else {
            posx = e.clientX;
            posy = e.clientY;
        }
        posx2 = e.clientX;
        posy2 = e.clientY;
        if (top == self) {
        	if (a != null && a.idl[fc_UID] == 1) {
	            fc_chat.chkIdl(posx, posy)
        	}
	    } else {
	    	if (window.parent.fc_chat.getIdl()) {
	            window.parent.fc_chat.markpos(posx, posy, posx2, posy2);
	            window.parent.fc_chat.chkIdl(posx, posy)
	        }
        }
    };
    this.markpos = function(p1, p2, p3, p4) {
        posx = p1;
        posy = p2;
        posx2 = p3;
        posy2 = p4;
    };
    this.chkIdl = function(px, py) {
    	var dt = new Date().getTime();
        if ((dt - png2) > 10000) {
            req = '00001R';
            oldPosx = px;
            oldPosy = py;
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
                png2 = new Date().getTime();
            }
            catch(err) {
                this.jsOnClose();
            }
        }
    };
    function EN(value) {
        var n = parseInt(value);
        return(n == null || isNaN(n) ? 0: n);
    };
    function $(id) {
        return document.getElementById(id);
    };
    function $2(id) {
        return IFrameDoc.getElementById(id);
    };
    this.get = function(id){
    	switch(id) {
	        case 'px': 
	        		return px;
	        case 'clr':
	        		return clr;
	        case 'g1':
        		return g1;
	        case 'cPU':
        		return cPU;
	        default: 
    	}
    };
    this.set = function(id,val){
    	switch(id) {
	        case 'clr':
	        		clr=val;
	        break;
	        default: 
    	}
    };
    function getSWidth() {
        var mW = 0;
        if (typeof(window.innerWidth) == 'number') {
            mW = window.innerWidth;
        } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
            mW = document.documentElement.clientWidth;
        } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
            mW = document.body.clientWidth;
        }
        return mW;
    };
    
    this.d_D = function() {
        if (tog == 1) {
            fc_SetCookie("fc_tglChat", "on", null, "/", fc_domain);
            $("fc_sChat")[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>" + fc_loadingText + "</div>";
            $('fc_flaToggle')[_i] = '';
            $('fc_flaToggle')[_i] = fc_tag.toString();
            if (locked == 1 || fc_getCookie(fc_timestamp_cookie)== null || fc_getCookie(fc_timestamp_cookie)=='-1') {
                lD = 1;
                this.opfxLoader();
            } else {
                this.loader();
            }
        } else if (tog == 0) {
            fc_SetCookie("fc_tglChat", "off", null, "/", fc_domain);
            l = true;
            flash.jsCloseConnection();
            $("fc_ob1")[_i] = (fc_version == '1_1_2' ? "<span class='fc_e fc_e_opb'></span>": "<span class='fc_openbutton_g'></span>");
            $("fc_ob")[_i] = _v+"title='Turn chat on' onClick='fc_chat.sendD();return false' class='fc_onbutton" + fc_version + "'>&nbsp;</a>";
            $("fc_sChat")[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>"+fc_offText+"</div>";
        }
    };
    this.sendD = function() {
        if (fc_getCookie("fc_tglChat") != "off") {
            tog = 0;
            $('fc_ob')[_i] = "<span class='fc_e fc_e_ofb" + fc_version + "'></span>";
        } else {
            tog = 1;
            $('fc_ob')[_i] = "<span class='fc_e fc_e_onb" + fc_version + "'></span>";
        }
        var url1 = _r + 'ToggleChat.asp';
        setTimeout("fc_chat.d_D()", 500);
        return false;
    };
    this.OnMouseDown = function(e) {
        if (e == null)
            e = window.event;
        var target = e.target != null ? e.target: e.srcElement;
        if ((e.button == 1 && window.event != null || e.button == 0) && target.getAttribute('id') == 'fc_dragger') {
            _startX = e.clientX;
            _startY = e.clientY;
            _offsetX = EN(target.style.left);
            _offsetY = EN(target.style.top);
            _offsetBD = EN(bD.style.left);
            _offsetBDw = EN(bD.style.width);
            _offsetID1w = EN(i1.style.width);
            _offsetID2w = EN(i2.style.width);
            _offsetID6w = EN(i6.style.width);
            _offsetID7w = EN(i7.style.width);
            _offsetIDtxtw = EN(itext.style.width);
            _offsetID0 = EN(i0.style.left);
            _offsetop = EN(opdiv.style.left);
            _offsetTIFw = EN(tempIFrame.style.width);
            if (IFO != null) {
                _offsetTIF2w = EN(tIF.style.width);
            }
            _oldZIndex = target.style.zIndex;
            target.style.zIndex = z_b + 700;
            if (fc_BrowserDetect.browser == 'Explorer') {
                odiv.style.backgroundColor = '#f0EfE5';
            }
            odiv.style.display = _b;
            _dragElement = target;
            document.onmousemove = fc_chat.OnMouseMove2;
            document.body.focus();
            document.onselectstart = function() {
                return false;
            };
            return false;
        } else if ((e.button == 1 && window.event != null || e.button == 0) && target.getAttribute('id') == 'fc_dragger2') {
            _startX = e.clientX;
            _startY = e.clientY;
            _offsetX = EN(target.style.left);
            _offsetY = EN(target.style.top);
            _offsetBD = EN(bD.style.left);
            _offsetBDh = EN(bD.style.height);
            _offsetTIFw = EN(tempIFrame.style.width);
            _offsetTIFh = EN(tempIFrame.style.height);
            if (oD != null) {
                _offsetOptions = EN(oD.style.left);
            } else {
                _offsetOptions = optionsLeft;
            }
            _oldZIndex = target.style.zIndex;
            target.style.zIndex = z_b + 700;
            _dragElement = target;
            document.onmousemove = fc_chat.OnMouseMove3;
            document.body.focus();
            document.onselectstart = function() {
                return false;
            };
            return false;
        } else if ((e.button == 1 && window.event != null || e.button == 0) && target.getAttribute('id') == 'fc_dragger3') {
            _startX = e.clientX;
            _startY = e.clientY;
            _offsetX = EN(target.style.left);
            _offsetY = EN(target.style.top);
            _offsetID3h = EN(i3.style.height);
            _offsetID4t = EN(i4.style.top);
            _offsetID4h = EN(i4.style.height);
            _offsetElemGt = EN(elem_g.style.top);
            target.style.zIndex = z_b + 700;
            _dragElement = target;
            document.onmousemove = fc_chat.OnMouseMove4;
            document.body.focus();
            document.onselectstart = function() {
                return false;
            };
            return false;
        }
    };
    this.OnMouseMove2 = function(e) {
        if (e == null)
            var e = window.event;
        if ((_offsetBDw - e.clientX + _startX) > 250 && (_offsetTIFw + e.clientX - _startX) > 0) {
            i1.style.width = (_offsetID1w - e.clientX + _startX) + 'px';
            i1a.style.width = (_offsetID1w - e.clientX + _startX) + 'px';
            i6.style.width = (_offsetID6w - e.clientX + _startX) + 'px';
            if (img1C == 1) {
                img6.style.width = (_offsetID1w - e.clientX + _startX + 11) + 'px';
            }
            if (IFO != null) {
                tIF.style.width = (_offsetTIF2w - e.clientX + _startX) + 'px';
            }
            i2.style.width = (_offsetID2w - e.clientX + _startX) + 'px';
            i2a.style.width = (_offsetID2w - e.clientX + _startX) + 'px';
            i7.style.width = (_offsetID7w - e.clientX + _startX) + 'px';
            if (img2C == 1) {
                img7.style.width = (_offsetID2w - e.clientX + _startX + 11) + 'px';
            }
            itext.style.width = (_offsetIDtxtw - e.clientX + _startX) + 'px';
            i0.style.left = (_offsetID0 - e.clientX + _startX) + 'px';
            opdiv.style.left = (_offsetop - e.clientX + _startX) + 'px';
            bD.style.width = (_offsetBDw - e.clientX + _startX) + 'px';
            bD.style.left = (_offsetBD + e.clientX - _startX) + 'px';
            tempIFrame.style.width = (_offsetTIFw + e.clientX - _startX) + 'px';
            odiv.style.width = (_offsetTIFw + e.clientX - _startX) + 'px';
        }
    };
    this.OnMouseMove3 = function(e) {
        if (e == null)
            var e = window.event;
        if ((_offsetTIFw + e.clientX - _startX) > 0) {
            bD.style.left = (_offsetBD + e.clientX - _startX) + 'px';
            tempIFrame.style.width = (_offsetTIFw + e.clientX - _startX) + 'px';
            optionsLeft = (_offsetOptions + e.clientX - _startX);
            if (oD != null) {
                oD.style.left = optionsLeft + 'px';
            }
            if (exp6) {
                oIF.style.left = (_offsetOptions + e.clientX - _startX) + 'px';
            }
            optionsLeft = _offsetOptions + e.clientX - _startX;
        }
        if ((_offsetBDh + e.clientY - _startY) > bDH) {
            bD.style.height = (_offsetBDh + e.clientY - _startY) + 'px';
            tempIFrame.style.height = (_offsetTIFh + e.clientY - _startY) + 'px';
            odiv.style.height = (_offsetTIFh + e.clientY - _startY) + 'px';
            _dragElement.style.top = (_offsetY + e.clientY - _startY) + 'px';
        }
    };
    this.OnMouseMove4 = function(e) {
        if (e == null)
            var e = window.event;
        if ((_offsetID3h + e.clientY - _startY) > 35 && (_offsetID3h + e.clientY - _startY) < 242) {
            i3.style.height = (_offsetID3h + e.clientY - _startY) + 'px';
            i4.style.height = (_offsetID4h - e.clientY + _startY) + 'px';
            i4.style.top = (_offsetID4t + e.clientY - _startY) + 'px';
            elem_g.style.top = (_offsetElemGt + e.clientY - _startY) + 'px';
            _dragElement.style.top = (_offsetY + e.clientY - _startY) + 'px';
        }
    };
    this.OnMouseUp = function(e) {
        if (_dragElement != null) {
            _dragElement.style.zIndex = _oldZIndex;
            if (odiv != null) {
                if (fc_BrowserDetect.browser == 'Explorer') {
                    odiv.style.backgroundColor = 'transparent';
                }
                odiv.style.display = _n;
            }
            document.onmousemove = fc_chat.mtrack;
            document.onselectstart = null;
            _dragElement = null;
        }
    };
    this.InitDragDrop = function() {
        document.onmousedown = fc_chat.OnMouseDown;
        document.onmouseup = fc_chat.OnMouseUp;
    };
    function processUpdate(msg) {
        var data = msg.substr(19),
        m = msg.substr(4, 7),
        q = data.split('<'),
        count = 0;
        var intbm = parseInt(m, 16);
        for (var i = 1; i < 4; i ++ ) {
        	if((intbm & bitmask[i]) == bitmask[i]){
        		_bm[i] = '1';
        	}else{
        		_bm[i] = '0';
        	}
        }
        for (var i = 4; i < 28; i ++ ) {
        	if((intbm & bitmask[i]) == bitmask[i]){
            	_bm[i] = '1';
                k2[i] = count;
                if (i == 16 || i == 17) {
                    count ++ ;
                }
                count ++ ;
            }else{
            	_bm[i]='0';
            }
        }
        upL = msg.charAt(0);
        acT = msg.charAt(11);
        if (msg.charAt(0) == key[0]) {
            key[0] = '0';
        }
        if (msg.charAt(2) == key[2]) {
        	cgflag=true;
            key[2] = '0';
        }
        if (_bm[1] == key[4]) {
            key[4] = '0';
        }
        if (_bm[2] == key[5]) {
            key[5] = '0';
            g1 = msg.charAt(2);
        }
        if (_bm[3] == key[6]) {
            key[6] = '0';
        }
        if (_bm[18] == '1') {
            uUS(q[k2[18]], 18);
        }
        if (_bm[6] == '1') {
            uUS(q[k2[6]], 6);
        }
        if (_bm[7] == '1') {
            uUS(q[k2[7]], 7);
        }
        if (_bm[8] == '1') {
            uUS(q[k2[8]], 8);
        }
        if (_bm[5] == '1') {
            if (fc_UID == '-1') {
                fID(q[k2[5]], 5)
                }
            uUS(q[k2[5]], 5);
        }
        if (_bm[4] == '1') {
            uUS(q[k2[4]], 4);
        }
        if (_bm[15] == '1') {
            uUS(q[k2[15]], 15);
        }
        if (_bm[10] == '1') {
            uUS(q[k2[10]], 10);
        }
        if (_bm[13] == '1') {
            uUS(q[k2[13]], 13);
        }
        if (_bm[16] == '1') {
            key[19] = '0';
            uUS(q[k2[16] + 1], 16);
        }
        if (_bm[17] == '1') {
            key[20] = '0';
            uUS(q[k2[17] + 1], 17);
        }
        updateDom(_bm[2]);
        if (_bm[9] == '1') {
            var fpl = _bm[2];
            if (_bm[26] == '1') {
                dC[2] = 0;
                uDC[2] = 0;
                for (var ent in a.pe) {
                    delete a.pe[ent];
                }
                i2[_i] = '';
                fpl = '1';
            }
            var complete = 1;
            if (_bm[11] == '1') {
                pmC = q[k2[11]];
                complete = 0;
            }
            var _mA = 0;
            if (_bm[1] != '1' && tg == 0) {
                _mA = 1;
            }
            applyPrivMsgs(q[k2[9]], _bm[10], fpl, complete, _mA);
        } else {
            if (icn == 1) {
                disp = "style='display:none'";
                if (fc_show_online_count == true) {
                    disp = ""
                }
                online = q[k2[10]];
                $('fc_sChat')[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>" + fc_readyText + "<b id='fc_online' " + disp + ">(" + q[k2[10]] + " online)</b></div>";
            }
        }
        icn = 0;
        if (key[2] == '0') {
            if (_bm[12] == '1') {
                if (_bm[27] == '1') {
                    dC[1] = 0;
                    uDC[1] = 0;
                    for (var ent in a.ge) {
                        delete a.ge[ent];
                    }
                    i1[_i] = '';
                    fgl = '1';
                }
                var complete = 1;
                if (fgl == '0') {
                    fgl = _bm[2];
                }
                if (_bm[14] == '1') {
                    gmC = q[k2[14]];
                    complete = 0;
                }
                applyGrpMsgs(q[k2[12]], _bm[13], fgl, complete);
            } else {
            	if (cgflag || _bm[2] == '1') {
            		i1[_i] = "<IMG id='img6' SRC='" + _r + "trans.gif' height=1 width=30 style='background-color: transparent;'><div id='fc_aG' style='display:block;background-color:transparent;width:390px;z-Index:" + (z_b + 202) + ";margin-left:5px;color:"+fc_rmc+"'><b>You are currently chatting in: " + rms[g1.charCodeAt(0)-65] + ".</b>" + ( fc_autoGreet != "" && ! cgflag? "<br>" + fc_autoGreet : "" ) + "</div>";
            		img6=$('img6');
            		setTimeout("fc_chat.showdiv(1)",150);
            	}
            }
            fgl = '0';
        }
        cgflag=false;
        if (_bm[16] == '1') {
            applyPageMsgs(q[k2[16]], 'fc_p', 7, i7);
        }
        if (_bm[17] == '1') {
            applyPageMsgs(q[k2[17]], 'fc_g', 6, i6);
        }
        if (_bm[19] == '1') {
        	var sMsg=q[k2[19]].split('>');
        	if(sMsg[0]!=''){
        		returnBroadcastParams(q[k2[19]]);
        	}
        	if(sMsg[1]=='2'){
        		setTimeout("fc_chat.c_g2()", 50);
        		setTimeout("fc_chat.cancel_rpass_box()", 60);
        	}else if(sMsg[1]=='1'){
        		fc_chat.eS2(2);
        	}else if(sMsg[1]=='3'){
        		i1[_i] = _er;
        	}
        }
        if (_bm[20] == '1') {
            streamCount = q[k2[20]];
        }
        if (_bm[21] == '1') {
            videoAccountID = q[k2[21]];
        }
        uL = "";
        if (_bm[4] == '1') {
            var q2 = q[k2[4]].split('>');
            for (var i = 0; i < q2.length - 1; i = i + 2) {
                a.of[q2[i]] = '0';
            }
        }
        if (oO) {
            disRmC();
        }
        if ($('fc_online') != null && disp == '') {
            $('fc_online')[_i] = "(" + online + " online)";
        }
        unLockDom();
        if (mA != 0) {
            document.title = "Chat (" + mA + ")";
        }
    };
    function uUS(data, typeD) {
        var q = data.split('>');
        switch(typeD) {
            case 18: for (var i = 2; i < q.length; i = i + 2) {
                a.o[q[i]] = q[i - 1];
                if (a.u[q[i]] == '0') {
                    uL += q[i] + '&';
                    a.u[q[i]] = '1';
                }
            }
            break;
            case 8: for (var i = 0; i < q.length - 1; i = i + 3) {
                if (a.nm[q[i]] == null) {
                    createURec(q[i]);
                }
                a.nm[q[i]] = q[i + 1];
                a.b[q[i]] = q[i + 2];
                bL[q[i]] = '1';
                if (a.u[q[i]] == '0') {
                    uL += q[i] + '&';
                    a.u[q[i]] = '1';
                }
            }
            break;
            case 6: case 7: for (var i = 0; i < q.length - 1; i = i + 2) {
                if (a.nm[q[i]] == null) {
                    createURec(q[i]);
                }
                a.bg[q[i]] = q[i + 1];
                if (a.u[q[i]] == '0') {
                    uL += q[i] + '&';
                    a.u[q[i]] = '1';
                }
            }
            break;
            case 5: for (var i = 0; i < q.length - 1; i = i + 10) {
                if (a.nm[q[i]] == null) {
                    createURec(q[i]);
                }
                a.o[q[i]] = '1';
                a.nm[q[i]] = q[i + 1];
                a.ac[q[i]] = q[i + 2];
                a.d[q[i]] = q[i + 3];
                a.g[q[i]] = q[i + 4];
                a.t[q[i]] = q[i + 5];
                a.ty[q[i]] = q[i + 6];
                a.idl[q[i]] = q[i + 7];
                a.av[q[i]] = q[i + 8];
                a.vs[q[i]] = q[i + 9];
                if (a.u[q[i]] == '0') {
                    uL += q[i] + '&';
                    a.u[q[i]] = '1';
                }
            }
            break;
            case 4: for (var i = 0; i < q.length - 1; i = i + 2) {
                if (a.nm[q[i]] == null) {
                    createURec(q[i]);
                }
                a.o[q[i]] = q[i + 1];
                a.of[q[i]] = '1';
                if (q[i + 1] == '0') {
                    a.d[q[i]] = '0';
                    a.g[q[i]] = 'A';
                    a.t[q[i]] = '0';
                    online -- ;
                } else {
                    online ++ ;
                }
                if (a.u[q[i]] == '0') {
                    uL += q[i] + '&';
                    a.u[q[i]] = '1';
                }
            }
            break;
            case 15: for (var i = 0; i < q.length - 1; i = i + 9) {
                if (a.nm[q[i]] == null) {
                    createURec(q[i]);
                }
                a.o[q[i]] = '1';
                a.d[q[i]] = d1;
                a.nm[q[i]] = q[i + 1];
                a.ac[q[i]] = q[i + 2];
                a.g[q[i]] = q[i + 3];
                a.t[q[i]] = q[i + 4];
                a.ty[q[i]] = q[i + 5];
                a.idl[q[i]] = q[i + 6];
                a.av[q[i]] = q[i + 7];
                a.vs[q[i]] = q[i + 8];
                if (a.u[q[i]] == '0') {
                    uL += q[i] + '&';
                    a.u[q[i]] = '1';
                }
            }
            break;
            case 10: case 13: case 16: case 17: for (var i = 0; i < q.length - 1; i = i + 5) {
                if (a.nm[q[i]] == null) {
                    createURec(q[i]);
                }
                a.o[q[i]] = q[i + 1];
                a.d[q[i]] = q[i + 2];
                a.g[q[i]] = q[i + 3];
                a.t[q[i]] = q[i + 4];
                if (a.u[q[i]] == '0') {
                    uL += q[i] + '&';
                    a.u[q[i]] = '1';
                }
            }
            break;
            default: alert('bad case');
        }
    };
    function createURec(u) {
        a.id[u] = u;
        a.nm[u] = '';
        a.o[u] = '0';
        a.ac[u] = '0';
        a.d[u] = '0';
        a.g[u] = 'A';
        a.t[u] = '0';
        a.ty[u] = '0';
        a.idl[u] = '0';
        a.av[u] = '';
        a.avo[u] = '';
        a.vs[u] = '';
        a.vso[u] = '';
        a.vsw[u] = '';
        a.wl[u] = '0';
        a.vsw2[u] = '';
        a.wl2[u] = '0';
        a.b[u] = '0';
        a.bg[u] = '0';
        a.tce[u] = '';
        a.gre[u] = '';
        a.pve[u] = '';
        a.pge[u] = '';
        a.s[u] = '00A0000';
        a.u[u] = '0';
        a.of[u] = '0';
    };
    this.toggleAlerts = function(){
    	if(!l){
    		fc_ex.toggleAlerts();
    	}
    };
    function applyPrivMsgs(data, uMsgs, fcl, complete, _mA) {
        var v;
        var v2;
        var z;
        var brk = '';
        var wdt = '30px';
        var bck = ' style="display:inline;background-color:transparent;"';
        var val = ((fcl == '1' && pmC > 50) ? '<div id="fc_pPg" style="display:block; width:100%; z-Index:' + (z_b + 202) + ';background-color:transparent;margin-left:10px"><a href="javascript:void" onclick="fc_chat.cP(1,7);return false">&laquo;&laquo; Prev 50</a></div>': '');
        var scrTop2;
        var msg = data.split('>');
        if (m == 1) {
            if (EN(i2.style.width) <= 240) {
                brk = '<br>'
            }
        }
        for (var i = msg.length - 6; i > 0; i = i - 6) {
            if (msg[i + 1] == msg[i + 2]) {
                msg[i] = fc_UID;
            }
            if (uMsgs == '0') {
                if (a.nm[msg[i]] == null) {
                    createURec(msg[i]);
                }
                if (a.of[msg[i]] == '0') {
                    a.o[msg[i]] = '1';
                    a.s[msg[i]][0] = '1';
                }
            }
            a.nm[msg[i]] = msg[i + 1];
            
            if (_mA == 1 && msg[i] != fc_UID) {
                mA ++ ;
            }
            if (i == 1 && tg == '0') {
            	z = c_i(msg[i], 1, 0);
                var uOld = $('fc_t1').className.substr(3);
                if (uOld != '0') {
                    a.tce[uOld] = '';
                }
                v = $('fc_sChat');
                if (msg[i + 1] == msg[i + 2]) {
                    v[_i] = '<div style="background-color:transparent;margin-left:2px;"><font style="' + ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_0" id=fc_t1 style="display: inline;">SYSTEM</div>:</b> ' + myUn2(myUn(msg[i + 4], 1)) + '</div>';
                } else if (msg[i] == fc_UID) {
                	a.tce[msg[i]] = 'fc_t1';
                    v[_i] = '<div style="background-color:transparent;display:inline;margin-left:2px"><font style=" '+ ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_' + msg[i] + '" id=fc_t1 style="display: inline;">' + z + '</div>:</b> [to ' + msg[i + 2] + '] ' + brk + myUn(msg[i + 4], 1) + '</div>';
                } else {
                	a.tce[msg[i]] = 'fc_t1';
                    v[_i] = '<div style="background-color:transparent;display:inline;margin-left:2px"><font style=" '+ ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_' + msg[i] + '" id=fc_t1 style="display: inline;">' + z + '</div>:</b> ' + myUn(msg[i + 4], 1) + '</div>';
                }
            }
            if (upL != '0' && key[5] == '0') {
            	 z = c_i(msg[i], 1, 2);
                if (fcl == '0' && ev != 2) {
                    if (dC[2] != '0') {
                        v2 = $('fc_pmo' + (dC[2] - 1));
                    }
                    v = document.createElement('div');
                    v.setAttribute('id', 'fc_pmo' + dC[2]);
                    v.style.display = _b;
                    v.style.marginLeft = '5px';
                    v.style.backgroundColor = 'transparent';
                    v.style.align = 'top';
                    v.style.width = '390px';
                    v.style.zIndex = z_b + 202;
                    if (a.pe[msg[i]] != null) {
                        a.pe[msg[i]] += 'fc_pm' + dC[2] + '&';
                    } else {
                        a.pe[msg[i]] = 'fc_pm' + dC[2] + '&';
                    }
                    if (msg[i + 1] == msg[i + 2]) {
                        if (msg[i + 5] != '0') {
                            var sMsg = msg[i + 5].split('/');
                            censor(sMsg[0], sMsg[1]);
                        }
                        v[_i] = '<font style="'+ tss + ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_0" id=fc_pm' + dC[2] + bck + '>SYSTEM</div>:</b> ' + brk + myUn2(myUn(msg[i + 4]), img2C);
                    } else if (msg[i] == fc_UID) {
                        v[_i] = '<font style="'+ tss + ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_' + msg[i] + '" id=fc_pm' + dC[2] + bck + '>' + z + '</div>:</b> [to ' + msg[i + 2] + '] ' + brk + myUn(msg[i + 4], img2C);
                    } else {
                        v[_i] = '<font style="'+ tss + ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_' + msg[i] + '" id=fc_pm' + dC[2] + bck + '>' + z + '</div>:</b> ' + brk + myUn(msg[i + 4], img2C);
                    }
                    if (img2C == 0 && imgs == 1) {
                        if (fc_BrowserDetect.browser == 'Opera') {
                            adScr[2] = fc_ex.getScrollerWidth();
                        }
                        frcD = 1;
                    }
                    scr(i2, 2, v, v2, 1);
                    if (img2C == 0 && imgs == 1) {
                        img7.style.width = (EN(i2.style.width) + 11) + 'px';
                        img2C = 1;
                    }
                    imgs = 0;
                    frcD = 0;
                    dC[2] ++ ;
                    uDC[2] ++ ;
                    pmC ++ ;
                } else {
                    if (a.pe[msg[i]] != null) {
                        a.pe[msg[i]] += 'fc_pm' + dC[2] + '&';
                    } else {
                        a.pe[msg[i]] = 'fc_pm' + dC[2] + '&';
                    }
                    val = val + '<div id="fc_pmo' + dC[2] + '" style="display:block;margin-left:5px;background-color:transparent;width:390px; z-Index:' + (z_b + 202) + '">';
                    var stl1pr='<font style="'+ tss + ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_';
                    if (msg[i + 1] == msg[i + 2]) {
                        val = val + stl1pr+'0" id=fc_pm' + dC[2] + bck + '>SYSTEM</div>:</b> ' + brk + myUn2(myUn(msg[i + 4], 1)) + '</div>';
                    } else if (msg[i] == fc_UID) {
                        val = val + stl1pr + msg[i] + '" id=fc_pm' + dC[2] + bck + '>' + z + '</div>:</b> [to ' + msg[i + 2] + '] ' + brk + myUn(msg[i + 4], 1) + '</div>';
                    } else {
                        val = val + stl1pr + msg[i] + '" id=fc_pm' + dC[2] + bck + '>' + z + '</div>:</b> ' + brk + myUn(msg[i + 4], 1) + '</div>';
                    }
                    dC[2] ++ ;
                    uDC[2] ++ ;
                    if (complete == '1') {
                        pmC ++ ;
                    }
                }
            }
        }
        if (fcl == '1') {
            curPg[7] = 0;
            pgs[7] = Math.floor((pmC * 1 - 1) / 50) + 1;
            sH[2] = i2.scrollHeight;
            if (imgs == 1) {
                if (fc_BrowserDetect.browser == 'Opera') {
                    adScr[2] = fc_ex.getScrollerWidth();
                }
                img2C = 1;
                imgs = 0;
                wdt = (EN(i2.style.width) + 11) + 'px';
            }
            val = "<IMG id='img7' SRC='" + _r + "trans.gif' height=1 width=" + wdt + " style='background-color: transparent;'>" + val;
            i2.style.display=_n;
            i2[_i] = val + "<input type='checkbox' id='scrbot2'>";
		    if(px){
		    	fc_chat.c_px(null, px);
		    }
		    if(clr){
		    	jQuery("div.fc_d1 div:not(#fc_aG)").css({color:(clr!='default'?clr:fc_message_text_color)});
		    }
            img7 = $('img7');
            setTimeout("fc_chat.showdiv(2)",150);
        } else {
            if (ev == 2 && upL != '0') {
                if (img2C == 0 && imgs == 1) {
                    if (fc_BrowserDetect.browser == 'Opera') {
                        adScr[2] = fc_ex.getScrollerWidth();
                    }
                    frcD = 1;
                }
                scr2(i2, 2, val);
                if (img2C == 0 && imgs == 1) {
                    img7.style.width = (EN(i2.style.width) + 11) + 'px';
                    img2C = 1;
                }
                imgs = 0;
                frcD = 0;
            }
        }
    };
    function applyGrpMsgs(data, uMsgs, fcl, complete) {
        var v;
        var v2;
        var z;
        var brk = '';
        var bck = ' style="display:inline;background-color:transparent;"';
        var wdt = '30px';
        var val = ((fcl == '1' && gmC > 50) ? '<div id="fc_gPg" style="display:block; width:100%; z-Index:' + (z_b + 202) + ';background-color:transparent;margin-left:10px"><a href="javascript:void" onclick="fc_chat.cP(1,6);return false">&laquo;&laquo; Prev 50</a></div>': '');
        if (m == 1) {
            if (EN(i1.style.width) <= 240) {
                brk = '<br>'
            }
        }
        var msg = data.split('>');
        for (var i = msg.length - 4; i > 0; i = i - 4) {
            if (uMsgs == '0') {
                if (a.of[msg[i]] == '0') {
                    a.o[msg[i]] = '1';
                    a.s[msg[i]][0] = '1';
                }
            }
            a.nm[msg[i]] = msg[i + 1];
            z = c_i(msg[i], 1, 1);
            if (fcl == '0' && ev != 2) {
                if (a.ge[msg[i]] != null) {
                    a.ge[msg[i]] += 'fc_gm' + dC[1] + '&';
                } else {
                    a.ge[msg[i]] = 'fc_gm' + dC[1] + '&';
                }
                if (dC[1] != '0') {
                    v2 = $('fc_gmo' + (dC[1] - 1));
                }
                v = document.createElement('div');
                v.setAttribute('id', 'fc_gmo' + dC[1]);
                v.style.display = _b;
                v.style.marginLeft = '5px';
                v.style.backgroundColor = 'transparent';
                v.style.align = 'top';
                v.style.width = '390px';
                v.style.zIndex = z_b + 202;
                v[_i] = '<font style="'+ tss + ts + '">' + cdt(msg[i + 2]) + '</font> <b><div class="fc_' + msg[i] + '" id=fc_gm' + dC[1] + bck + '>' + z + '</div>:</b> ' + brk + myUn(msg[i + 3], img1C);
                if (img1C == 0 && imgs == 1) {
                    if (fc_BrowserDetect.browser == 'Opera') {
                        adScr[1] = fc_ex.getScrollerWidth();
                    }
                    frcD = 1;
                }
                scr(i1, 1, v, v2, 1);
                if (img1C == 0 && imgs == 1) {
                    img6.style.width = (EN(i1.style.width) + 11) + 'px';
                    img1C = 1;
                }
                imgs = 0;
                frcD = 0;
                dC[1] ++ ;
                uDC[1] ++ ;
                gmC ++ ;
            } else {
                if (a.ge[msg[i]] != null) {
                    a.ge[msg[i]] += 'fc_gm' + dC[1] + '&';
                } else {
                    a.ge[msg[i]] = 'fc_gm' + dC[1] + '&';
                }
                val = val + '<div id="fc_gmo' + dC[1] + '" style="display:block;background-color:transparent;width:390px;z-Index:' + (z_b + 202) + ';margin-left:5px"><font style="'+ tss + ts + '">' + cdt(msg[i + 2]) + '</font> <b><div class="fc_' + msg[i] + '" id=fc_gm' + dC[1] + bck + '>' + z + '</div>:</b> ' + brk + myUn(msg[i + 3], 1) + '</div>';
                dC[1] ++ ;
                uDC[1] ++ ;
                if (complete == '1') {
                    gmC ++ ;
                }
            }
        }
        if (fcl == '1') {
            val = val + '<div id="fc_aG" style="display:block;background-color:transparent;width:390px;z-Index:' + (z_b + 202) + ';margin-left:5px;color:'+fc_rmc+'"><b>You are currently chatting in: ' + rms[g1.charCodeAt(0)-65] + '.</b>' + ( fc_autoGreet != '' && !cgflag? '<br>' + fc_autoGreet : '' ) + '</div>';
            curPg[6] = 0;
            pgs[6] = Math.floor((gmC * 1 - 1) / 50) + 1;
            sH[1] = i1.scrollHeight;
            if (imgs == 1) {
                if (fc_BrowserDetect.browser == 'Opera') {
                    adScr[1] = fc_ex.getScrollerWidth();
                }
                img1C = 1;
                imgs = 0;
                wdt = (EN(i1.style.width) + 11) + 'px';
            }
            val = "<IMG id='img6' SRC='" + _r + "trans.gif' height='1px' width=" + wdt + " style='background-color: transparent;'>" + val;
            i1.style.display=_n;
            i1[_i] = val + "<input type='checkbox' id='scrbot1'>";
		    if(px){
				fc_chat.c_px(null, px);
			}
		    if(clr){
		    	jQuery("div.fc_d1 div:not(#fc_aG)").css({color:(clr!='default'?clr:fc_message_text_color)});
		    }
            img6 = $('img6');
            setTimeout("fc_chat.showdiv(1)",150);
        } else {
            if (ev == 2) {
                if (img1C == 0 && imgs == 1) {
                    if (fc_BrowserDetect.browser == 'Opera') {
                        adScr[1] = fc_ex.getScrollerWidth();
                    }
                    frcD = 1;
                }
                scr2(i1, 1, val);
                if (img1C == 0 && imgs == 1) {
                    img6.style.width = (EN(i1.style.width) + 11) + 'px';
                    img1C = 1;
                }
                imgs = 0;
                frcD = 0;
            }
        }
    };
    function aRA(u, io) {
        if (upL == 2 && fc_ex.getRmAl() && u != fc_UID) {
            var v;
            var v2;
            var typ;
            if (io == 0) {
                typ = 'left';
            } else {
                typ = 'entered';
            }
            if (dC[1] != '0') {
                v2 = $('fc_gmo' + (dC[1] - 1));
            }
            v = document.createElement('div');
            v.style.display = _b;
            v.style.marginLeft = '5px';
            v.style.backgroundColor = 'transparent';
            v.style.align = 'top';
            v.style.width = '390px';
            v.style.zIndex = z_b + 202;
            v.style.color = fc_rmc;
            v[_i] = a.nm[u] + ' has ' + typ + ' the room.';
            scr(i1, 1, v, v2, 1);
        }
    };
    
    this.clearMsgs = function(n) {
    	if(!l){
    		var iD = (n == 6 ? i1: i2);
	        if (uDC[n - 5] > 0) {
	            dC[n - 5] = 0;
	            uDC[n - 5] = 0;
	            var ad;
	            if (n == 6) {
	                delete gMsgs;
	                gMsgs = [];
	                ad = 'g';
	                adScr[1] = 0;
	                img1C = 0;
	                pgs[6] = Math.floor((gmC * 1 - 1) / 50) + 2;
	            } else {
	                delete pMsgs;
	                pMsgs = [];
	                ad = 'p';
	                adScr[2] = 0;
	                img2C = 0;
	                pgs[7] = Math.floor((pmC * 1 - 1) / 50) + 2;
	            }
	            iD[_i] = '<div id="fc_' + ad + 'Pg" style="display:block; width:100%; z-Index:' + (z_b + 202) + ';background-color:transparent;margin-left:10px"><a href="javascript:void" onclick="fc_chat.cP(1,' + n + ');return false">&laquo;&laquo; Previous</a></div><IMG id="img' + n + '" SRC="' + _r + 'trans.gif" height=1 width="30px" style="background-color: transparent;">';
	            if (n == 6) {
	                img6 = $('img6');
	            } else {
	                img7 = $('img7');
	            }
	        }else{
	        	if((n==6&&gmC*1>0)||(n==7&&pmC*1>0)){
	        		iD[_i] = '<div id="fc_' + ad + 'Pg" style="display:block; width:100%; z-Index:' + (z_b + 202) + ';background-color:transparent;margin-left:10px"><a href="javascript:void" onclick="fc_chat.cP(1,' + n + ');return false">&laquo;&laquo; Previous</a></div><IMG id="img' + n + '" SRC="' + _r + 'trans.gif" height=1 width="30px" style="background-color: transparent;">';
	        	}else{
	        		iD[_i] = '<IMG id="img' + n + '" SRC="' + _r + 'trans.gif" height=1 width="30px" style="background-color: transparent;">';
	        	}
	        }
    	}
    };
    
    function applyPageMsgs(data, tag2, k, iD) {
        var count = 0;
        var z;
        var val = '';
        var c2 = '';
        var c = '';
        var dec = 4;
        var brk = '';
        var bck = ' style="display:inline;background-color:transparent;"';
        if (m == 1) {
            if (EN(iD.style.width) <= 240) {
                brk = '<br>'
            }
        }
        if (k == 6) {
            if (gMsgs[curPg[k]] == null) {
                gMsgs[curPg[k]] = data;
            }
        } else {
            if (pMsgs[curPg[k]] == null) {
                pMsgs[curPg[k]] = data;
            }
            dec = 6;
        }
        if (curPg[k] < (pgs[k] - 1)) {
            c = '<a href="javascript:void" onclick="fc_chat.cP(1,' + k + ');return false">&laquo;&laquo; Prev 50</a>&nbsp;&nbsp;&nbsp;';
        }
        if (curPg[k] != 1) {
            c2 = '<a href="javascript:void" onclick="fc_chat.cP(-1,' + k + ');return false">Next 50 &raquo;&raquo;</a>&nbsp;&nbsp;&nbsp;';
        }
        var msg = data.split('>');
        if (msg.length - 4 > 80) {
            val = '<div id="' + tag2 + 'Pg3" style="display:block; width:100%; z-Index:' + (z_b + 202) + ';background-color:transparent;margin-left:10px">' + c + c2 + '<a href="javascript:void" onclick="fc_chat.cP(0,' + k + ');return false">Current Chat &raquo;&raquo;&raquo;</a></div>';
        }
        for (var i = msg.length - dec; i > 0; i = i - dec) {
            if (msg[i + 1] != msg[i + 2]) {
                a.nm[msg[i]] = msg[i + 1];
                z = c_i(msg[i], 1, k);
            }
            var stl2g='" style="display:block;margin-left:5px;background-color:transparent;width:390px; z-Index:' + (z_b + 202) + '">';
            if (k == 6) {
                if (a.gpe[msg[i]] != null) {
                    a.gpe[msg[i]] += 'fc_gpm' + count + '&';
                } else {
                    a.gpe[msg[i]] = 'fc_gpm' + count + '&';
                }
                val = val + '<div id="' + tag2 + 'pmo' + count + stl2g + '<font style="'+ tss + ts + '">' + cdt(msg[i + 2]) + '</font> <b><div class="fc_' + msg[i] + '" id=' + tag2 + 'pm' + count + '"' + bck + '>' + z + '</div>:</b> ' + brk + myUn(msg[i + 3], 1) + '</div>';
            } else {
                if (a.ppe[msg[i]] != null) {
                    a.ppe[msg[i]] += 'fc_ppm' + count + '&';
                } else {
                    a.ppe[msg[i]] = 'fc_ppm' + count + '&';
                }
                val = val + '<div id="' + tag2 + 'pmo' + count + stl2g;
                var stl1g='<font style="'+ tss + ts + '">' + cdt(msg[i + 3]) + '</font> <b><div class="fc_';
                if (msg[i + 1] == msg[i + 2]) {
                    val = val + stl1g + '0" id="' + tag2 + 'pm' + count + '"' + bck + '>SYSTEM</div>:</b> ' + brk + myUn2(myUn(msg[i + 4], 1)) + '</div>';
                } else if (msg[i] == fc_UID) {
                    val = val + stl1g + msg[i] + '" id="' + tag2 + 'pm' + count + '"' + bck + '>' + z + '</div>:</b> [to ' + msg[i + 2] + '] ' + brk + myUn(msg[i + 4], 1) + '</div>';
                } else {
                    val = val + stl1g + msg[i] + '" id="' + tag2 + 'pm' + count + '"' + bck + '>' + z + '</div>:</b> ' + brk + myUn(msg[i + 4], 1) + '</div>';
                }
            }
            count ++ ;
        }
        val = val + '<br><div id="' + tag2 + 'Pg3" style="display:block; width:100%; z-Index:' + (z_b + 202) + ';background-color:transparent;height:27px;margin-left:10px">' + c + c2 + '<a href="javascript:void" onclick="fc_chat.cP(0,' + k + ');return false">Current Chat &raquo;&raquo;&raquo;</a></div>';
        sH[k] = iD.scrollHeight;
        iD[_i] = val;
        if(px){
        	fc_chat.c_px(null, px);
        }
        if(clr){
        	jQuery("div.fc_d1 div:not(#fc_aG)").css({color:(clr!='default'?clr:fc_message_text_color)});
        }
        if(k==6){
        	setTimeout("fc_chat.showdiv(6)",150);
        }else{
        	setTimeout("fc_chat.showdiv(7)",150);
        }
    };
    this.showdiv = function(n){
    	if(n==1){
    		i1.style.display='block';
			if($('scrbot1')){
    			setTimeout('fc_ex.fcs1()', 10);
			}
    	}else if(n==2){
    		i2.style.display='block';
    		if($('scrbot2')){
    			setTimeout('fc_ex.fcs2()', 10);
			}
    	}else if(n==3){
    		i3.style.display='block';
    	}else if(n==4){
    		i4.style.display='block';
    	}else if(n==5){
    		i5.style.display='block';
    	}else if(n==6){
    		i6.style.display='block';
    		i6.style.visibility = "visible";
    	}else{
    		i7.style.display='block';
    		i7.style.visibility = "visible";
    	}
    };
    this.cP = function(pg, k) {
        var xCl = '0';
        var yCl = '70';
        var b = '';
        var iTemp;
        if (k == 6) {
            iD = i6;
            imgs = 0;
            iTemp = i1;
        } else {
            iD = i7;
            imgs = 0;
            iTemp = i2;
            xCl = '349';
            yCl = '77';
            b = 'b';
        };
        if ( ! l) {
        	iD.style.display = _n;
        	iTemp.style.display = _n;
        	if (curPg[k] == 0 && k == 7 && flt == 1) {
                fc_chat.filt(0)
                } else {
                if (k == 7 && flt == 1) {
                    flt = 0;
                    $('fc_flt')[_i] = "<a href='javascript:fc_chat.filt(1);'><span class='fc_e fc_e_flt'></span></a>";
                }
            }
            l = true;
            if ((curPg[k] == 1 && pg ==- 1) || pg == 0) {
                iD.style.display = _n;
                iTemp.style.display = _b;
                $('fc_cl' + k)[_i] = "<a id='fc_cli" + k + "' href='javascript:fc_chat.clearMsgs(" + k + ");' onmouseover='getElementById(\"fc_e_cl" + k + "\").className=\"fc_e fc_e_cl2" + b + "\"' onmouseout='getElementById(\"fc_e_cl" + k + "\").className=\"fc_e fc_e_cl" + b + "\"'><span class='fc_e fc_e_cl" + b + "' id='fc_e_cl" + k + "' title='Clear' style='display:block;position:absolute;top:" + xCl + "px;left:" + yCl + "px;'></span></a>";
                curPg[k] = 0;
                l = false;
                return false;
            }
            if (k == 6) {
                for (var ent in a.gpe) {
                    delete a.gpe[ent];
                }
            } else {
                for (var ent in a.ppe) {
                    delete a.ppe[ent];
                }
            }
            iD[_i] = '';
            if (curPg[k] == 0) {
                $('fc_cl' + k)[_i] = "<span style='position:absolute;top:" + xCl + "px;left:" + yCl + "px;' class='fc_e fc_e_cld" + b + "'></span>"
            }
            curPg[k] += pg;
            var pgReq;
            if (k == 6) {
                if (gMsgs[curPg[k]] != null) {
                    applyPageMsgs(gMsgs[curPg[k]], 'fc_g', k, iD);
                    l = false;
                    return false;
                }
                key[20] == 1;
                pgReq = (gmC - uDC[1]) - (curPg[k] - 1) * 50;
            } else {
                if (pMsgs[curPg[k]] != null) {
                    applyPageMsgs(pMsgs[curPg[k]], 'fc_p', k, iD);
                    l = false;
                    return false;
                }
                key[19] == 1;
                pgReq = (pmC - uDC[2]) - (curPg[k] - 1) * 50;
            }
            tCL('0');
            ev = '4';
            var pgStr;
            if (pgReq < 10) {
                pgStr = '000' + pgReq;
            } else if (pgReq < 100) {
                pgStr = '00' + pgReq;
            } else if (pgReq < 1000) {
                pgStr = '0' + pgReq;
            } else {
                pgStr = pgReq;
            }
            if (k == 6) {
                req = "0000650" + pgStr;
            } else {
                req = "0000651" + pgStr;
            }
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
            }
            catch(err) {
                i1[_i] = _er;
            }
        }
        return false;
    };
    function updateDom(fcl) {
        var dL = '';
        var gL = '';
        var u = uL.split('&');
        for (var i = 0; i < u.length - 1; i ++ ) {
            var dsp = _n;
            var dsp2 = _n;
            if (a.idl[u[i]] == '1') {
                dsp2 = 'inline';
            }
            if (a.ty[u[i]] == '1') {
                dsp = 'inline';
            }
            if (fcl == '1') {
                if (a.s[u[i]].charAt(0) != a.o[u[i]] || a.s[u[i]].charAt(4) != a.b[u[i]] || a.s[u[i]].charAt(5) != a.bg[u[i]]) {
                    if (a.tce[u[i]] != '') {
                        uE(u[i], a.tce[u[i]], 1, 0);
                    }
                    if (a.pge[u[i]] != '') {
                        var pge = a.pge[u[i]].split('&');
                        for (var j = 0; j < pge.length - 1; j ++ ) {
                            uE(u[i], pge[j], 2, 0);
                        }
                    }
                    if (a.ife[u[i]] != null) {
                        var ife = a.ife[u[i]].split('&');
                        for (var j = 0; j < ife.length - 1; j ++ ) {
                            uE(u[i], ife[j], 3, 0);
                        }
                    }
                    if (u[i] == this.cU) {
                        cUB(u[i]);
                    }
                }
                if (a.o[u[i]] == '1') {
                    if (a.d[u[i]] == d1) {
                        var z2 = '';
                        var z4 = '';
                        if (a.ac[u[i]] == '1') {
                            z2 = aCTStyle+'mod&gt;</span>';
                        }
                        if (a.ac[u[i]] == '2') {
                            z2 = aCTStyle+'admin&gt;</span>';
                        };
                        var icoVis = _n;
                        var camVis = _n;
                        var avVis = _n;
                        var avImg = 'fastcat_0.jpg';
                        var margin_left = '15';
                        if (a.vs[u[i]] != '') {
                        	icoVis = _b;
                            camVis = 'inline';
                            margin_left = '5';
                        }
                        if (a.av[u[i]] != '') {
                        	icoVis = _b;
                        	avImg = a.av[u[i]];
                        	avVis = 'inline';
                            if (a.vs[u[i]] != '') {
                                camVis = 'inline';
                            }
                        } 
                        var z= c_i(u[i], 0, 3);
                        z4 = '<a href="' + fc_avatars_dir + avImg + '" id="fc_dl' + dC[3] + 'av" style="display:'+avVis+';margin-left:' + margin_left + 'px;" target=_blank><img id="fc_dl' + dC[3] + 'avimg" src="' + fc_avatars_dir + avImg + '" border=0 height=' + fc_avatar_sz + 'px ></a>';
                        a.de[u[i]] = 'fc_dl' + dC[3];
                        dL += '<div class="fc_' + u[i] + '" id=fc_dl' + dC[3] + ' style="display:block;font-weight:bold;width:250px;z-Index:' + (z_b + 202) + ';'+stl1+'" onMouseOver="this.style.backgroundColor=\''+sphc+'\';" onMouseOut="this.style.backgroundColor=\'' + spCol + '\';">' + z + '<font id="fc_dl' + dC[3] + 'id" style="display:' + dsp2 + idleStyle + '"> idle...</font><font id="fc_dl' + dC[3] + 'ty" style="display:' + dsp + tys + '"> typing...</font>' + z2 + '<div id="fc_dl' +  dC[3] + 'ico" style="display:'+icoVis+';padding-top:3px;padding-bottom:3px"><a href="javascript:fc_chat.subscribe(' + u[i] + ');" id="fc_dl' + dC[3] + 'cam" style="display:' + camVis + ';margin-left:3px;width:27px" title="Webcam"><img SRC="' + _h + 'video.gif" border=0></a>' + z4 + '</div></div>';
                        dC[3] ++ ;
                        uDC[3] ++ ;
                        if (a.g[u[i]] == g1 && a.t[u[i]] == '1') {
                            z = c_i(u[i], 0, 4);
                            z4 = '<a href="' + fc_avatars_dir + avImg + '" id="fc_gl' + dC[4] + 'av" style="display:' + avVis + ';margin-left:' + margin_left + 'px;" target=_blank><img id="fc_gl' + dC[4] + 'avimg" src="' + fc_avatars_dir + avImg + '" border=0 height=' + fc_avatar_sz + 'p"></a>';
                            a.gre[u[i]] = 'fc_gl' + dC[4];
                            gL += '<div class="fc_' + u[i] + '" id=fc_gl' + dC[4] + ' style="display:block; font-weight:bold; width:250px; z-Index:' + (z_b + 202) + ';'+stl1+'" onMouseOver="this.style.backgroundColor=\''+sphc+'\';" onMouseOut="this.style.backgroundColor=\'' + spCol + '\';">' + z + '<font id="fc_gl' + dC[4] + 'id" style="display:' + dsp2 + idleStyle + '"> idle...</font><font id="fc_gl' + dC[4] + 'ty" style="display:' + dsp + tys + '"> typing...</font>' + z2 + '<div id="fc_gl' +  dC[4] + 'ico" style="display:'+icoVis+';padding-top:3px;padding-bottom:3px"><a href="javascript:fc_chat.subscribe(' + u[i] + ');" id="fc_gl' + dC[4] + 'cam" style="display:' + camVis + ';margin-left:3px;width:27px" title="Webcam"><img SRC="' + _h + 'video.gif" border=0></a>' + z4 + '</div></div>';
                            dC[4] ++ ;
                            uDC[4] ++ ;
                        }
                    }
                }
            } else {
                if (a.s[u[i]].charAt(0) != a.o[u[i]] || a.s[u[i]].charAt(4) != a.b[u[i]] || a.s[u[i]].charAt(5) != a.bg[u[i]]) {
                    if (a.tce[u[i]] != '') {
                        uE(u[i], a.tce[u[i]], 1, 0);
                    }
                    if (a.pge[u[i]] != '') {
                        var pge = a.pge[u[i]].split('&');
                        for (var j = 0; j < pge.length - 1; j ++ ) {
                            uE(u[i], pge[j], 2, 0);
                        }
                    }
                    if (a.ife[u[i]] != null) {
                        var ife = a.ife[u[i]].split('&');
                        for (var j = 0; j < ife.length - 1; j ++ ) {
                            uE(u[i], ife[j], 3, 0);
                        }
                    }
                    if (u[i] == this.cU) {
                        cUB(u[i]);
                    }
                    if (upL != '0') {
                        if (a.pe[u[i]] != null) {
                            var pe = a.pe[u[i]].split('&');
                            for (var j = 0; j < pe.length - 1; j ++ ) {
                                uE(u[i], pe[j], 1, 2);
                            }
                        }
                        if (curPg[7] != 0) {
                            if (a.ppe[u[i]] != null) {
                                var ppe = a.ppe[u[i]].split('&');
                                for (var j = 0; j < ppe.length - 1; j ++ ) {
                                    uE(u[i], ppe[j], 1, 7);
                                }
                            }
                        }
                        if (a.ge[u[i]] != null) {
                            var ge = a.ge[u[i]].split('&');
                            for (var j = 0; j < ge.length - 1; j ++ ) {
                                uE(u[i], ge[j], 1, 1);
                            }
                        }
                        if (curPg[6] != 0) {
                            if (a.gpe[u[i]] != null) {
                                var gpe = a.gpe[u[i]].split('&');
                                for (var j = 0; j < gpe.length - 1; j ++ ) {
                                    uE(u[i], gpe[j], 1, 6);
                                }
                            }
                        }
                        if (a.o[u[i]] == '1') {
                            if (a.d[u[i]] == d1) {
                                if (a.de[u[i]] == null) {
                                    aTC(u[i], 3, 'fc_dl');
                                } else {
                                    uE(u[i], a.de[u[i]], 0, 3);
                                }
                                if (a.g[u[i]] == g1 && a.t[u[i]] == '1') {
                                    if (a.gre[u[i]] == '') {
                                        aTC(u[i], 4, 'fc_gl');
                                        aRA(u[i], 1);
                                    } else {
                                        uE(u[i], a.gre[u[i]], 0, 4);
                                    }
                                } else {
                                    if (a.gre[u[i]] != '') {
                                        r_e('i4', 4, a.gre[u[i]], u[i]);
                                        aRA(u[i], 0);
                                    }
                                }
                            } else {
                                if (a.de[u[i]] != null) {
                                    r_e('i3', 3, a.de[u[i]], u[i]);
                                    if (a.gre[u[i]] != '') {
                                        r_e('i4', 4, a.gre[u[i]], u[i]);
                                        aRA(u[i], 0);
                                    }
                                }
                            }
                            if (a.bg[u[i]] == '1' && a.pve[u[i]] != '') {
                                if (cPU == u[i]) {
                                    cPU = '0';
                                    $('fc_sp1')[_i] = "<span class='fc_e fc_e_sp'></span>";
                                }
                                r_e('i5', 5, a.pve[u[i]], u[i]);
                            }
                        } else {
                            if (a.de[u[i]] != null) {
                                r_e('i3', 3, a.de[u[i]], u[i]);
                                if (a.gre[u[i]] != '') {
                                    r_e('i4', 4, a.gre[u[i]], u[i]);
                                    aRA(u[i], 0);
                                }
                            }
                            if (a.pve[u[i]] != '') {
                                if (cPU == u[i]) {
                                    cPU = '0';
                                    $('fc_sp1')[_i] = "<span class='fc_e fc_e_sp'></span>";
                                }
                                r_e('i5', 5, a.pve[u[i]], u[i]);
                            }
                        }
                    } else {
                        if (a.o[u[i]] == '0' || a.bg[u[i]] == '1') {
                            if (pvL[u[i]] != null) {
                                delete pvL[u[i]];
                            }
                        }
                    }
                } else {
                    if ((a.s[u[i]].charAt(0) != a.o[u[i]] || a.s[u[i]].charAt(1) != a.d[u[i]] || a.s[u[i]].charAt(2) != a.g[u[i]] || a.s[u[i]].charAt(3) != a.t[u[i]]) && upL != '0') {
                        if (a.o[u[i]] == '1') {
                            if (a.d[u[i]] == d1) {
                                if (a.de[u[i]] == null) {
                                    aTC(u[i], 3, 'fc_dl');
                                }
                                if (a.g[u[i]] == g1 && a.t[u[i]] == '1') {
                                    if (a.gre[u[i]] == '') {
                                        aTC(u[i], 4, 'fc_gl');
                                        aRA(u[i], 1);
                                    }
                                } else {
                                    if (a.gre[u[i]] != '') {
                                        r_e('i4', 4, a.gre[u[i]], u[i]);
                                        aRA(u[i], 0);
                                    }
                                }
                            } else {
                                if (a.de[u[i]] != null) {
                                    r_e('i3', 3, a.de[u[i]], u[i]);
                                    if (a.gre[u[i]] != '') {
                                        r_e('i4', 4, a.gre[u[i]], u[i]);
                                        aRA(u[i], 0);
                                    }
                                }
                            }
                        } else {
                            if (a.de[u[i]] != null) {
                                r_e('i3', 3, a.de[u[i]], u[i]);
                                if (a.gre[u[i]] != '') {
                                    r_e('i4', 4, a.gre[u[i]], u[i]);
                                    aRA(u[i], 0);
                                }
                            }
                            if (a.pve[u[i]] != '') {
                                if (cPU == u[i]) {
                                    cPU = '0';
                                    $('fc_sp1')[_i] = "<span class='fc_e fc_e_sp'></span>";
                                }
                                r_e('i5', 5, a.pve[u[i]], u[i]);
                            }
                        }
                    }
                }
            }
            if (a.idl[u[i]] != a.s[u[i]].charAt(7) && fcl == '0') {
                remID(u[i], dsp2, 'id');
            }
            if (a.ty[u[i]] != a.s[u[i]].charAt(6) && fcl == '0') {
            	remID(u[i], dsp, 'ty');
            }
            if (a.av[u[i]] != a.avo[u[i]] && fcl == '0') {
            	fc_ex.c_Av(u[i]);
            }
            if (a.vs[u[i]] != a.vso[u[i]] && fcl == '0') {
                fc_ex.c_Vs(u[i]);
            }
            uRmC(u[i]);
            a.avo[u[i]]=a.av[u[i]];
            a.vso[u[i]] = a.vs[u[i]];
            a.s[u[i]] = a.o[u[i]] + a.d[u[i]] + a.g[u[i]] + a.t[u[i]] + a.b[u[i]] + a.bg[u[i]] + a.ty[u[i]] + a.idl[u[i]];
            a.u[u[i]] = 0;
        }
        if (fcl == '1') {
            gL = stl9 + rms[g1.charCodeAt(0) - 65] + '</b></div>' + gL;
            
            sH[3] = i3.scrollHeight;
            i3[_i] = dL;
            sH[4] = i4.scrollHeight;
            
            i4[_i] = gL;
            var count = 0;
            var privL = '';
            var bck = cpuc;
            puC = true;
            for (var ent in pvL) {
                if (a.o[ent] == '1' && a.bg[ent] == '0') {
                    if (count != 0) {
                        bck = spCol;
                        pAC = spCol;
                    } else {
                        cPU = ent;
                    }
                    count ++ ;
                    a.pve[ent] = 'fc_pl' + dC[5];
                    privL += '<div class="fc_' + ent + '" id=fc_pl' + dC[5] + ' style="display:block; font-weight:bold; width:250px; z-Index:' + (z_b + 202) + ';'+stl1+'background-color:' + bck + '" onMouseOver="fc_ex.overPriv2(this)" onMouseOut="fc_ex.offPriv2(this)" onclick="fc_chat.clickPriv2(this)">' + aTC(ent, 5, 'fc_pl') + '</div>';
                    dC[5] ++ ;
                    uDC[5] ++ ;
                }
                delete pvL[ent];
            }
            if (cPU != '0') {
                v = $('fc_sp1');
                v[_i] = _v+"onClick="+stl7 + _h + "sendpriv.gif' border=0></a>";
            }
            sH[5] = i5.scrollHeight;
            i5[_i] = privL;
            puC = false;
            pAC = fc_private_chat_arrow_color;
        }
    };
    function remID(u, dsp2, id) {
        if (a.de[u] != null) {
            $(a.de[u] + id).style.display = dsp2;
        }
        if (a.gre[u] != '') {
            $(a.gre[u] + id).style.display = dsp2;
        }
        if (a.pve[u] != '') {
            $(a.pve[u] + id).style.display = dsp2;
        }
    };
    function uRmC(i) {
        if (a.t[i] == a.s[i].charAt(3)) {
            if (a.g[i] != a.s[i].charAt(2) && a.t[i] == '1') {
                rmC[a.g[i].charCodeAt(0) - 65] ++ ;
                rmC[a.s[i].charAt(2).charCodeAt(0) - 65] -- ;
            }
        } else {
            if (a.t[i] == '1') {
                rmC[a.g[i].charCodeAt(0) - 65] ++ ;
            } else {
                rmC[a.s[i].charAt(2).charCodeAt(0) - 65] -- ;
            }
        }
    };
    function disRmC() {
        for (var j = 0; j <= rms.length - 1; j ++ ) {
            var rmID = 'fc_rms' + j;
            $(rmID)[_i] = "&nbsp;(" + rmC[j] + ")";
        }
    };
    function unLockDom() {
        var count = 0;
        for (var i = 0; i < 22; i ++ ) {
            count += key[i];
        }
        if (count == 0) {
            l = false;
            if (ev != '0') {
                if (ev == '1') {
                    tTC('fc_ob1', '1');
                } else if (ev == '2') {
                    tCL('1');
                } else if (ev == '3') {
                    rCG();
                } else if (ev == '4') {
                    tCL('1');
                }
                ev = '0';
            }
        }
    };
    function uE(u, e1, pt, k) {
        var v;
        var extrav = '';
        if (pt < 3) {
            v = $(e1);
        } else {
            try {
                v = $2(e1);
                $2(e1 + 'img').style.display = _n;
                if (v.className.substr(3) != u) {
                    return true;
                }
            }
            catch(err) {}
        }
        var val = c_i(u, pt, k);
        if (pt == 2) {
            $(e1 + 'img').style.display = _n;
        }
        try {
            extrav = v[_i].toLowerCase().split('</a>');
            if (extrav.length == 2) {
                v[_i] = val + extrav[1];
            } else if (extrav.length >= 3) {
                v[_i] = val + extrav[1] + '</a>' + extrav[2] + '</a>';
            } else {
                v[_i] = val;
            }
        }
        catch(err) {}
    };
    function updatePrivElement(u, e1) {
        var v = $(e1);
        var extrav = '';
        var z = c_i(u, 0, 5);
        pAC = (u != cPU ? spCol: fc_private_chat_arrow_color);
        z = '<span id="fc_tlk' + e1 + '" style="display:inline;color:' + pAC + '">=>&nbsp;</span>' + z;
        try {
            extrav = v[_i].toLowerCase().split('</a>');
            if (extrav.length == 2) {
                v[_i] = z + extrav[1];
            } else if (extrav.length >= 3) {
                v[_i] = z + extrav[1] + '</a>' + extrav[2] + '</a>';
            } else {
                v[_i] = z;
            }
        }
        catch(err) {}
    };
    function aTC(u, k, p) {
        var z;
        var z2 = '';
        if (k == 3) {
            z = c_i(u, 0, k);
            if (a.ac[u] == '1') {
                z2 = aCTStyle+'mod&gt;</span>';
            }
            if (a.ac[u] == '2') {
                z2 = aCTStyle+'admin&gt;</span>';
            };
            a.de[u] = p + dC[k];
            nC(i3, k, p, u, z, z2, 0);
        } else if (k == 4) {
            z = c_i(u, 0, k);
            if (a.ac[u] == '1') {
                z2 = aCTStyle+'mod&gt;</span>';
            }
            if (a.ac[u] == '2') {
                z2 = aCTStyle+'admin&gt;</span>';
            };
            a.gre[u] = p + dC[k];
            nC(i4, k, p, u, z, z2, 0);
        } else if (k == 5) {
            z = c_i(u, 0, k);
            z = '<span id="fc_tlk' + p + dC[k] + '" style="display:inline;color:' + pAC + '">=>&nbsp;</span>' + z;
            a.pve[u] = p + dC[k];
            if (puC) {
                return z;
            } else {
                nC(i5, k, p, u, z, z2, 0);
            }
        } else {
            bL[u] = p + dC[k];
            nC(i1o, k, p, u, a.nm[u], z2, 0);
        }
    };
    function nC(iD, k, p, u, z, z2, i) {
        var c;
        var c2;
        if (uDC[k] != '0' && i == 1) {
            c2 = $(p + (dC[k] - 1));
        }
        c = document.createElement('div');
        c.className = 'fc_' + u;
        c.setAttribute('id', p + dC[k]);
        c.style.display = _b;
        if (k > 2) {
            c.style.fontWeight = 'bold';
        }
        c.style.align = 'top';
		c.style.textAlign = 'left';
        c.style.width = '250px';
        c.style.zIndex = z_b + 202;
        c.style.paddingTop = '2px';
        c.style.paddingBottom = '2px';
        c.style.borderBottom = '1px solid '+spdc;
        if (k == 5) {
            c.style.backgroundColor = cpuc;
            c.onmouseover = fc_ex.overPriv;
            c.onmouseout = fc_ex.offPriv;
            c.onclick = fc_chat.clickPriv;
        } else if (k == 6) {
            c.onmouseover = fc_chat.overBlk;
            c.onmouseout = fc_chat.offBlk;
            c.onclick = fc_chat.clickBlk;
        } else {
            c.onmouseover = fc_chat.overDG;
            c.onmouseout = fc_chat.offDG;
        }
        if (k > 2 && k < 6) {
        	
            z += '<font id="' + p + dC[k] + 'id" style="display:none'+idleStyle+'"> idle...</font><font id="' + p + dC[k] + 'ty" style="display:none' + tys + '"> typing...</font>';
        }
        c[_i] = z + z2;
        if (k > 2 && k < 5) {
            var z4 = '';
            var icoVis = _n;
            var camVis = _n;
            var avVis = _n;
            var avImg = 'fastcat_0.jpg';
            var margin_left = '15';
            if (a.vs[u] != '') {
            	icoVis = _b;
                camVis = 'inline';
                margin_left = '5';
            }
            if (a.av[u] != '') {
            	icoVis =  _b;
            	avImg = a.av[u];
            	avVis = 'inline';
                if (a.vs[u] != '') {
                    camVis = 'inline';
                }
               }
            z4 = '<a href="' + fc_avatars_dir + avImg + '" id="' + p + dC[k] + 'av" style="display:' + avVis + ';margin-left:' + margin_left + 'px;" target=_blank><img id="' + p + dC[k] + 'avimg" src="' + fc_avatars_dir + avImg + '" border=0 height=' + fc_avatar_sz + 'px></a>';
            c[_i] += '<div id="' + p + dC[k] + 'ico" style="display:'+icoVis+';padding-top:3px;padding-bottom:3px"><a href="javascript:fc_chat.subscribe(' + u + ');" id="' + p + dC[k] + 'cam" style="display:' + camVis + ';margin-left:3px;width:27px" title="Webcam"><img SRC="' + _h + 'video.gif" border=0></a>' + z4 + '</div>';
        }
        scr(iD, k, c, c2, i);
        dC[k] ++ ;
        uDC[k] ++ ;
    };
    function c_i(u, pt, k) {
        var val;
        var beg = '&nbsp;';
        var dim = (k > 2 ? 'class="fc_onlinesp"':'class="fc_online"');
        var mE = '';
        var oc = 'return fc_chat.loadUP(' + u + ');';
        var style = 'fc_u';
        var typ=(pt == 1 ? '2': '');
        if(k==0){
        	typ='3';
        }
        var bkC = '';
        var href = _rTest + u;
        if ( ! fc_useProfiles) {
            href = 'javascript:void';
        }
        if (a.o[u] == '1') {
            if (pt == 3) {
                oc = 'return window.parent.fc_chat.loadUP(' + u + ');';
            }
            mE = (fc_userbox_mode == 1 ? 'onMouseOver="clearTimeout(fc_chat.t2);setTimeout(\'fc_chat.show_user_chat(this,400,80,' + u + ',' + k + ')\',2);" onmouseout="setTimeout(\'fc_chat.leavingUser()\',10);"': 'onClick="clearTimeout(fc_chat.t2);setTimeout(\'fc_chat.show_user_chat(this,400,80,' + u + ',' + k + ')\',2);return false;" ');
            style += 'o';
            if (a.bg[u] == '1') {
                bkC = 'background-color:'+bluic;
            } else {
                bkC = 'background-color:'+ouic;
            }
            if (a.b[u] == '1') {
                style = 'fc_ublko';
            }
        } else {
            if (a.b[u] == '1') {
                style = 'fc_ublk';
            }
        }
        style+=typ;
        if (pt > 1 || u == fc_UID) {
            bkC = 'margin-left:.3em;' + bkC;
            dim = (k > 2 ? 'class="fc_onlinesp2"':'class="fc_online2"');
            beg = '';
        } else {
            style += (pt == 1 ? ' fc_a1': ' fc_a2');
        }
        var sm = (u == fc_UID && pt < 2 ? '<small class="'+style+'">': '');
        var sm2 = (u == fc_UID && pt < 2 ? '</small>': '');
        val = beg + '<IMG SRC="' + _r + 'trans.gif" style="border:1px solid '+uibc+';margin-right:.3em;' + bkC + '" ' + dim + '><a HREF="' + href + '" ' + mE + ' class="'+ style +'" onclick="' + oc + '">' + sm + a.nm[u] + sm2 +'</a>';
        return val;
    };
    function scr(iD, k, c, c2, i) {
        var s = iD.scrollTop;
        sH[k] = iD.scrollHeight - adScr[k];
        if ((i == 1 && sH[k] - iD.scrollTop < iD.clientHeight + 3) || (i == 0 && iD.scrollTop != 0)) {
            iD.appendChild(c);
	    if(px!=fc_chat_window_font_size){
	    	fc_chat.c_px(null, px);
	    }
	    if(clr!=fc_message_text_color&&clr!='default'){
	    	jQuery("div.fc_d1 div:not(#fc_aG)").css({color:clr});
	    }
            if (i == 1) {
                if (ie) {
                    iD.scrollTop += iD.scrollHeight - sH[k];
                } else {
                    iD.scrollTop = s + iD.scrollHeight - sH[k];
                }
                if (frcD) {
                    iD.scrollTop += 50;
                }
            }
        } else {
            iD.appendChild(c);
            if(px!=fc_chat_window_font_size){
            	fc_chat.c_px(null, px);
            }
            if(clr!=fc_message_text_color&&clr!='default'){
            	jQuery("div.fc_d1 div:not(#fc_aG)").css({color:clr});
            }
        }
    };
    function scr2(iD, k, c) {
        var s = iD.scrollTop;
        sH[k] = iD.scrollHeight - adScr[k];
        if (sH[k] - iD.scrollTop < iD.clientHeight + 3) {
            iD[_i] += c;
            if(px!=fc_chat_window_font_size){
            	fc_chat.c_px(null, px);
            }
            if(clr!=fc_message_text_color&&clr!='default'){
            	jQuery("div.fc_d1 div:not(#fc_aG)").css({color:clr});
            }
            if (ie) {
                iD.scrollTop += iD.scrollHeight - sH[k];
            } else {
                iD.scrollTop = s + iD.scrollHeight - sH[k];
            }
            if (frcD) {
                iD.scrollTop += 50;
            }
        } else {
            iD[_i] += c;
            if(px!=fc_chat_window_font_size){
            	fc_chat.c_px(null, px);
            }
            if(clr!=fc_message_text_color&&clr!='default'){
            	jQuery("div.fc_d1 div:not(#fc_aG)").css({color:clr});
            }
        }
    };
    function r_e(iD, k, p, u) {
        var s;
        var v = $(p);
        s = iD.scrollTop;
        sH[k] = iD.scrollHeight;
        if (iD.scrollTop != '0') {
            v.parentNode.removeChild(v);
            if (ie) {
                iD.scrollTop -= iD.scrollHeight - sH[k];
            } else {
                iD.scrollTop = s - (iD.scrollHeight - sH[k]);
            }
        } else {
            v.parentNode.removeChild(v);
        }
        uDC[k] -- ;
        if (k == 3) {
            delete a.de[u];
        } else if (k == 4) {
            a.gre[u] = '';
        } else if (k == 5) {
            a.pve[u] = '';
        }
    };
    this.change_Border_oD = function(topB) {
    	if (fc_allow_web&&m==1) {
        	fc_ex.toggleWeb(_v);
        }
        oD2.style.border = '1px solid '+oDBorder;
        oD2.style.borderTop = '0px';
        if ( ! topB) {
            oD2.style.borderTop = '1px solid '+oDBorder;
        }
    };
    this.change_Border_sD = function(topB) {
        sD2.style.border = '1px solid '+fc_smileys_border_color;
        sD2.style.borderTop = '0px';
        if ( ! topB) {
            sD2.style.borderTop = '1px solid '+fc_smileys_border_color;
        }
    };
    function move_box(box, cleft, ctop) {
        box.style.left = cleft + 'px';
        box.style.top = ctop + 'px';
    };
    function s_d_s(iD, bl, t, l, w, h, borderStyle, bC, fS, cls) {
        iD.className = cls;
        iD.style.display = bl;
        iD.style.position = 'absolute';
        iD.style.top = t + 'px';
        iD.style.left = l + 'px';
        iD.style.width = w + 'px';
        iD.style.height = h + 'px';
        iD.style.border = borderStyle;
        iD.style.backgroundColor = bC;
        iD.style.fontSize = fS;
        iD.style.fontFamily = dF;
        iD.style.overflow = 'auto';
    };
    function censor(group, msgNum) {
        if (group == g1) {
            var n1;
            var p;
            if (msgNum >= gmC - uDC[1]) {
                n1 = msgNum - (gmC - uDC[1]);
                p = $('fc_gmo' + n1);
            } else if ((msgNum >= gmC - uDC[1] - curPg[6] * 50) && (msgNum < gmC - uDC[1] - curPg[6] * 50 + 50)) {
                n1 = msgNum - (gmC - uDC[1] - curPg[6] * 50);
                if ((gmC - uDC[1] - curPg[6] * 50) < 0) {
                    n1 = msgNum;
                }
                p = $('fc_gpmo' + n1);
                delete gMsgs;
                gMsgs = [];
            } else {
                delete gMsgs;
                gMsgs = [];
                return true;
            }
            var v = p[_i];
            var msgi = v.substring(0, (v.indexOf('>:<') + 6));
            v = msgi + ' **COMMENT DELETED**';
            p[_i] = v;
        }
    };
    this.filt = function(w) {
        if ( ! l) {
        	flt=fc_ex.filt(w,curPg,cPU,fc_UID)
        }
    };
    this.imgFWrapper = function() {
        if (fc_use_images &&! l) {
            var locImg = _s + "Upload." + fc_upload_suffix + "?id=" + fc_UID + "&dummy=true";
            fc_chat.createTopIFrame(locImg, 2, 0);
            return false;
        } else {
            return false;
        }
    };
    this.avaFWrapper = function() {
        if (fc_use_avatars &&! l) {
            var locAva = _s + "Avatars." + fc_upload_suffix + "?id=" + fc_UID + "&dummy=true";
            fc_chat.createTopIFrame(locAva, 3, 0);
            return false;
        } else {
            return false;
        }
    };
    this.t5 = null;
    this.t6 = null;
    this.scriptLoaded = function(){
    	fc_ex.init(a);
    	try {
            flash.jsSendData(req);
            png = new Date().getTime();
        }
        catch(err) {
            alert(_er);
        }
        if (fc_open_in_room != 0) {
            g1 = String.fromCharCode(fc_open_in_room + 65);
            req = '000024' + g1;
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
            }
            catch(err) {
                i1[_i] = _er;
            }
        }
    };
    
    this.show_hide_chat_box = function(width, height, borderStyle) {
        var imgT = (fc_use_images ? 'Upload Images': 'Images Disabled');
        var imgC = (fc_use_images ? 'fc_e fc_e_imgu': 'fc_e fc_e_imgud');
        var avaT = (fc_use_avatars ? 'Create Avatar': 'Avatars Disabled');
        var avaC = (fc_use_avatars ? 'fc_e fc_e_avu': 'fc_e fc_e_avud');
        var vidT = (fc_video_enabled ? 'Video Chat': 'Video Chat Disabled');
        var vidC = (fc_video_enabled ? 'fc_e fc_e_vid': 'fc_e fc_e_vidd');
        var borderStyle2 = fc_lowerPanelsBorder;
        var href = 'fc_bD';
        var imgF = (fc_use_images ? "return fc_chat.createTopIFrame('" + _s + "Upload." + fc_upload_suffix + "?id=" + fc_UID + "&dummy=true',2,0);": "");
        var avaF = (fc_use_avatars ? "return fc_chat.createTopIFrame('" + _s + "Avatars." + fc_upload_suffix + "?id=" + fc_UID + "&dummy=true',3,0);": "");
        var offst;
        var cBW = 560;
        if (fc_version != '1_1_1') {
            offst = (fc_width_offset - (cBW - 413) - fc_toolbar_mode * (413 - 134));
        } else {
            cBW = 550;
            offst = (fc_width_offset - fc_toolbar_mode * (cBW - 128));
        }
        var w = getSWidth();
        var coords;
        if ( ! fc_absolute && $('fastcatchatentry') != null) {
            coords = this.returnElementCoordinates($('fastcatchatentry'));
            if (((w - coords.x) < cBW) && ((cBW - $('fastcatchatentry').offsetWidth) < coords.x)) {
                winleft = coords.x + offst;
            } else {
                winleft = coords.x;
            }
            wintop = coords.y;
        } else {
            coords = this.returnElementCoordinates(ediv);
            if (((w - coords.x) < cBW) && ((cBW - ediv.offsetWidth) < coords.x)) {
                winleft = (offst + fc_right);
            } else {
                winleft = fc_right;
            }
            wintop = fc_top;
        }
        bD = $(href);
        mA = 0;
        if (ww != null) {
            if (ww.f.style.display == _n || dontClose) {
                tTC('fc_ob1', '0');
                bD.style.display= _b;
                ww.f.style.display = _b;
                if(!dontClose){
                	move_box(ww.f, winleft, wintop);
                	bD.style.left=(EN(ww.f.style.left)+5)+'px';
                	bD.style.top=(EN(ww.f.style.top)+30)+'px';
                }
                if (exp6) {
                    bIF.style.display = _b;
                }
                document.title = oT;
                key[0] = '2';
                tg = '1';
                req = "0000231";
                ev = '2';
            } else {
                tCL('0');
                $('fc_sChat')[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>" + fc_readyText + "<b id='fc_online' " + disp + ">(" + online + " online)</b></div>";
                bD.style.display= _n;
                ww.f.style.display = _n;
                fc_chat.closeVid();
                if (exp6) {
                    bIF.style.display = _n;
                }
                key[0] = '1';
                tg = '0';
                req = "0000230";
                ev = '1';
            }
            return false;
        } else {
            tTC('fc_ob1', '0');
            key[5] = '1';
            key[0] = '2';
            tg = '1';
            document.title = oT;
            req = "0000231";
            ev = '2';
        }
        bD = document.createElement('div');
        bD.setAttribute('id', href);
        bD.className = "jGo_app jGo_myapp";
        bD.style.backgroundImage = 'url(' + _h + 'tc2.gif)';
        bD.style.display = _b;
        bD.style.position = 'absolute';
        bD.style.textAlign = 'left';
        if ( ! fc_absolute && $('fastcatchatentry') != null) {
            if (((w - coords.x) < cBW) && ((cBW - $('fastcatchatentry').offsetWidth) < coords.x)) {
                bD.style.left = offst + 'px';
            } else {
                bD.style.left = '0px';
            }
            wintop = coords.y;
        } else {
            if (((w - coords.x) < cBW) && ((cBW - ediv.offsetWidth) < coords.x)) {
                bD.style.left = (offst + fc_right) + 'px';
            } else {
                bD.style.left = fc_right + 'px';
            }
            bD.style.top = fc_top + 'px';
        }
        bD.style.width = width + 'px';
        bD.style.height = height + 'px';
        bD.style.zIndex = z_b + 1003;
        bD.style.backgroundColor = '#000000';
        bD[_i] = "<div id='fc_gc' style='position:absolute;top:1px;left:5px;'>" +
        			"<span class='fc_e fc_e_tf1'></span>" +
        		"</div>" +
        		"<div id='fc_cl6'>" +
        			"<a id='fc_cli6' href='javascript:fc_chat.clearMsgs(6);' onmouseover='getElementById(\"fc_e_cl6\").className=\"fc_e fc_e_cl2\"' onmouseout='getElementById(\"fc_e_cl6\").className=\"fc_e fc_e_cl\"'>" +
        				"<span class='fc_e fc_e_cl' id='fc_e_cl6' title='Clear' style='display: block;position:absolute;top:0px;left:70px;'></span>" +
        			"</a>" +
        		"</div>" +
        		"<div id='fc_plmn6'>" +
        			"<a id='fc_plmni6' href='javascript:fc_chat.toggleAlerts();'>" +
        				"<span class='fc_e fc_e_pl' id='fc_e_pl6' title='Room Alerts On' style='display: block;position:absolute;top:0px;left:85px;'></span>" +
        			"</a>" +
        		"</div>" +
        		"<div id='fc_bck' style='position:absolute;top:0px;left:60px;'></div>" +
        		"<span class='fc_e fc_e_pc' style='position:absolute;top:350px;left:5px;'></span>" +
        		"<div id='fc_cl7'>" +
        			"<a id='fc_cli7' href='javascript:fc_chat.clearMsgs(7);' onmouseover='getElementById(\"fc_e_cl7\").className=\"fc_e fc_e_cl2b\"' onmouseout='getElementById(\"fc_e_cl7\").className=\"fc_e fc_e_clb\"'>" +
        				"<span class='fc_e fc_e_clb' id='fc_e_cl7' title='Clear' style='display: block;position:absolute;top:349px;left:77px;'></span>" +
        			"</a>" +
        		"</div>" +
        		"<div id='fc_flt' style='position:absolute;top:349px;left:92px;'>" +
        			"<a href='javascript:fc_chat.filt(1);'>" +
        				"<span title='Filter Conversations' class='fc_e fc_e_flt'></span>" +
        			"</a>" +
        		"</div>" +
        		"<IMG SRC='" + _h + "Fastcatlogo.gif' id='fc_logo' border=0 style='position: absolute; top: 329px; left: 240px;filter:alpha(opacity=60); -moz-opacity:.60; opacity:.60;'>" +
        		"<div id='fc_mic' style='position:absolute;top:335px;left:258px;'>" +
        			"<span class='fc_t fc_t_mic'></span>" +
        		"</div>" +
        		"<div id='fc_op1' style='display: block; position: absolute;top: 331px; left: 365px;'>" +
        			"<span class='fc_e fc_e_" + opBase + "'></span>" +
        		"</div>" +
        		"<div id='fc_dragger' class='fc_drag' style='display: none; position: absolute;top: 333px;left: 5px;z-Index:" + (z_b + 600) + "; background-image: url(" + _h + "chatelems1.gif); background-repeat: no-repeat; FONT-SIZE: 1pt; width: 16px; height:13px; background-position: -51px -35px;cursor:e-resize;'></div>" +
        		"<a id='fc_bld' href=\"javascript:fc_ex.insertTags(\'=b=\',\'=b=\',\' bold text \',1);\" border=0  onmouseover='getElementById(\"fc_e_bld\").className=\"fc_e fc_e_bld2\"' onmouseout='getElementById(\"fc_e_bld\").className=\"fc_e fc_e_bld\"'>" +
        			"<span title='Bold Text' style='display: block; position: absolute;top: 508px;left:5px;' class='fc_e fc_e_bld' id='fc_e_bld'></span>" +
        		"</a>" +
        		"<a id='fc_it'  href=\"javascript:fc_ex.insertTags(\'=i=\',\'=i=\',\' italic text \',1);\" border=0  onmouseover='getElementById(\"fc_e_it\").className=\"fc_e fc_e_it2\"' onmouseout='getElementById(\"fc_e_it\").className=\"fc_e fc_e_it\"'>" +
        			"<span title='Italic Text' style='display: block; position: absolute;top: 508px;left:19px;' class='fc_e fc_e_it' id='fc_e_it'></span>" +
        		"</a>" +
        		"<a id='fc_uln' href=\"javascript:fc_ex.insertTags(\'=u=\',\'=u=\',\' underline text \',1);\" border=0  onmouseover='getElementById(\"fc_e_uln\").className=\"fc_e fc_e_uln2\"' onmouseout='getElementById(\"fc_e_uln\").className=\"fc_e fc_e_uln\"'>" +
        			"<span title='Underline Text' style='display: block; position: absolute;top: 508px;left:33px;' class='fc_e fc_e_uln' id='fc_e_uln'></span>" +
        		"</a>" +
        		"<a id='fc_img'  href=\"javascript:fc_ex.insertTags(\'[[\',\']]\',\'image name\',1);\" border=0 onmouseover='getElementById(\"fc_e_img\").className=\"fc_e fc_e_img2\"' onmouseout='getElementById(\"fc_e_img\").className=\"fc_e fc_e_img\"'>" +
        			"<span title='Insert Image Tag' style='display: block; position: absolute;top: 508px;left:47px;' class='fc_e fc_e_img' id='fc_e_img'></span>" +
        		"</a>" +
        		"<a id='fc_imgu' href=\"javascript:void\" onclick=\"return fc_chat.imgFWrapper()\" onmouseover='getElementById(\"fc_e_imgu\").className=\""+imgC+"2\"' onmouseout='getElementById(\"fc_e_imgu\").className=\""+imgC+"\"'>" +
        				"<span title='" + imgT + "' style='display: block; position: absolute;top: 508px;left:61px;' class='"+imgC+"' id='fc_e_imgu'></span>" +
        		"</a>" +
        		"<a id='fc_avu' href=\"javascript:void\" onclick=\"return fc_chat.avaFWrapper();\" onmouseover='getElementById(\"fc_e_avu\").style.display=\"none\"' onmouseout='getElementById(\"fc_e_avu\").style.display=\"block\"'>" +
        			"<span title='" + avaT + "' style='display: block; position: absolute;top: 508px;left:81px;' class='"+avaC+"2'></span>" +
        			"<span style='display: block; position: absolute;top: 508px;left:81px;' class='"+avaC+"' id='fc_e_avu'></span>" +
        		"</a>" +
        		"<a id='fc_sml' href=\"javascript:void\" onclick=\"return fc_chat.show_hide_smileys(150,150)\" onmouseover='getElementById(\"fc_e_sml\").style.display=\"none\"' onmouseout='getElementById(\"fc_e_sml\").style.display=\"block\"'>" +
        			"<span title='Add Smiley' style='display: block; position: absolute;top: 508px;left:101px;' class='fc_e fc_e_sml2'></span>" +
        			"<span style='display: block; position: absolute;top: 508px;left:101px;' class='fc_e fc_e_sml' id='fc_e_sml'></span>" +
        		"</a>" +
        		"<a id='fc_vid' href=\"javascript:void\" onclick=\"return fc_chat.launchVideoChat(0);\" onmouseover='getElementById(\"fc_e_vid\").style.display=\"none\"' onmouseout='getElementById(\"fc_e_vid\").style.display=\"block\"'>" +
        			"<span title='" + vidT + "' style='display: block; position: absolute;top: 508px;left:115px;' class='"+vidC+"2'></span>" +
        			"<span style='display: block; position: absolute;top: 508px;left:115px;' class='"+vidC+"' id='fc_e_vid'></span>" +
        		"</a><br><br>";
        i0 = document.createElement('div');
        i0.setAttribute('id', 'fc_bD0');
        i0.style.backgroundImage = 'url(' + _h + 'tc2.gif)';
        i0.style.display = _b;
        i0.style.position = 'absolute';
        i0.style.width = 119 + 'px';
        i0.style.height = 558 + 'px';
        i0.style.zIndex = z_b + 200;
        i0.style.top = '0px';
        i0.style.left = '428px';
        i0.style.backgroundColor = '#F0EFE5';
        i0[_i] = "<span id='fc_ce_ci' class='fc_e fc_e_ci' style='position:absolute;top:2px;left:3px;'></span>" +
        		"<div id='fc_dragger3' class='fc_drag' style='display: block; position: absolute;top: 163px;left: 82px;z-Index:" + (z_b + 600) + "; background-image: url(" + _h + "chatelems1.gif); background-repeat: no-repeat; FONT-SIZE: 1pt; width: 30px; height:4px; background-position: -72px -205px;cursor:s-resize;'></div>" +
				"<span id='fc_ce_g' class='fc_e fc_e_g' style='position:absolute;top:167px;left:3px;'></span>" +
				"<span id='fc_ce_pg' class='fc_e fc_e_pg' style='position:absolute;top:353px;left:3px;'></span>" +
				"<a href=\"javascript:void\" onclick=\"return fc_chat.createTopIFrame('" + _r + "ChatHelp.html?',5,0);\"'>" +
					"<span title='Help' style='display: block; position: absolute;top: 333px;left:5px;' class='fc_e fc_e_hlp'></span>" +
				"</a>" +
				"<div id='fc_tgl1' style=' position: absolute; top:331px; left: 62px;'>" +
					"<span class='fc_e fc_e_tgl'></span>" +
				"</div>" +
				"<div id='fc_sg1' style='display: block; position: absolute;top: 520px; left: 4px;'>" +
					"<span id='fc_ce_sg'  class='fc_e fc_e_sg'></span>" +
				"</div>" +
				"<div id='fc_sp1' style='display: block; position: absolute;top: 539px; left: 4px;'>" +
					"<span class='fc_e fc_e_sp'></span>" +
				"</div>" +
				"<div id='fc_dragger2' class='fc_drag' style='display: none; position: absolute;top: 537px;left: 99px;z-Index:" + (z_b + 600) + "; background-image: url(" + _h + "chatelems1.gif); background-repeat: no-repeat; FONT-SIZE: 1pt; width: 16px; height: 16px; background-position: -68px -35px;'></div>" +
				"<br><br>";
        i1 = document.createElement('div');
        s_d_s(i1, _b, '15', '5', '418', '310', borderStyle, 'transparent', '8pt', 'fc_d1');
        i1a = document.createElement('div');
        s_d_s(i1a, _b, '15', '5', '418', '310', borderStyle, fc_chat_window_color, '8pt', 'fc_d1');
        if(fc_chat_room_background!=""){
        	i1a.style.background = "url(" + _h + fc_chat_room_background + ")";
        }
        i1[_i]='<b><font style="margin-left:10px;font-family:'+dF+';font-size:12pt;color:'+fc_chat_window_font_color+'">&nbsp;Loading Room...</font></b>';
        it1div = document.createElement('div');
        it1div.setAttribute('id', 'fc_it1');
        it1div.style.display = _n;
        it1div.style.position = 'absolute';
        it1div.style.width = 418 + 'px';
        it1div.style.height = 310 + 'px';
        it1div.style.zIndex = z_b + 503;
        it1div.style.top = '15px';
        it1div.style.left = '5px';
        i2 = document.createElement('div');
        s_d_s(i2, _b, '365', '5', '418', '140', borderStyle2, 'transparent', '8pt', 'fc_d1');
        i2a = document.createElement('div');
        s_d_s(i2a, _b, '365', '5', '418', '140', borderStyle2, fc_chat_window_color, '8pt', 'fc_d1');
        if(fc_private_chat_background!=""){
        	i2a.style.background = "url(" + _h + fc_private_chat_background + ")";
        }
        i2[_i] = "<IMG id='img7' SRC='" + _r + "trans.gif' height=1 width=30 style='background-color: transparent;'>";
        i3 = document.createElement('div');
        s_d_s(i3, _b, '15', '3', '110', '145', borderStyle, spCol, '7pt', 'fc_d2');
        i3[_i] = "";
        i4 = document.createElement('div');
        s_d_s(i4, _b, '180', '3', '110', '145', borderStyle, spCol, '7pt', 'fc_d2');
        i4[_i] = "";
        i5 = document.createElement('div');
        s_d_s(i5, _b, '365', '3', '110', '140', borderStyle2, spCol, '7pt', 'fc_d2');
        i5[_i] = "";
        i6 = document.createElement('div');
        i6.setAttribute('id', 'i6');
        s_d_s(i6, _n, '15', '5', '418', '310', borderStyle, 'transparent', '8pt', 'fc_d1');
        i6.style.zIndex = z_b + 201;
        i6[_i] = "";
        i7 = document.createElement('div');
        i7.setAttribute('id', 'i7');
        s_d_s(i7, _n, '365', '5', '418', '140', borderStyle, 'transparent', '8pt', 'fc_d1');
        i7.style.zIndex = z_b + 201;
        i7[_i] = "";
        itext = document.createElement('textarea');
        itext.className = 'fc_txt';
        itext.setAttribute('id', 'fc_chat');
        itext.style.display = _b;
        itext.style.position = 'absolute';
        itext.style.top = '522px';
        itext.style.left = '5px';
        itext.style.width = '418px';
        itext.style.height = '35px';
        itext.style.border = borderStyle2;
        itext.onkeydown = fc_chat.oKD;
        bD.appendChild(i1a);
        bD.appendChild(i1);
        bD.appendChild(it1div);
        bD.appendChild(i2a);
        bD.appendChild(i2);
        i0.appendChild(i3);
        i0.appendChild(i4);
        i0.appendChild(i5);
        bD.appendChild(i6);
        bD.appendChild(i7);
        bD.appendChild(itext);
        bD.appendChild(i0);
        if (fc_version != '1_1_2') {
            if ( ! fc_absolute && $('fastcatchatentry') != null) {
                $('fastcatchatentry').appendChild(bD)
                } else {
                document.body.appendChild(bD);
            }
        } else {
            bD.style.left = '0px';
            bD.style.top = '0px';
            var borderstyle = '1px solid #444444';
            if (exp6) {
                this.setEnvironment('exp6');
            }
            ww = this.createSimpleWindow('Chat Window', winleft, wintop, '550', bDH, 'default', fc_windowColor, 75, borderstyle, 'e3e3e3', '', 'element', bD, false, false);
            ww.MH = 650;
            ww.shieldOnDrag = true;
            if(fc_BrowserDetect.browser=='Firefox'){
            	ww.maxOpacity=.9999;
            	ww.cA.style.opacity = .9999;
            }
        	document.body.appendChild(bD);
        	bD.style.left=(EN(ww.f.style.left)+5)+'px';
        	bD.style.top=(EN(ww.f.style.top)+30)+'px';
        	           
            ww.raiseDragShield = function() {
            	if(!l){
	                this.getDefault().raiseDragShield.call(this);
	                if (oO) {
	                    oD.style.display = _n;
	                    if (exp6) {
	                        oIF.style.display = _n;
	                    }
	                }
	                oO = false;
	                if (exp6) {
	                    bIF.style.display = _n;
	                }
            	}
            };
            ww.lowerDragShield = function() {
            	if(!l){
	                this.getDefault().lowerDragShield.call(this);
	                if (exp6) {
	                    bIF.style.display = _b;
	                }
	                bD.style.left=(EN(ww.f.style.left)+5)+'px';
                	bD.style.top=(EN(ww.f.style.top)+30)+'px';
            	}
            };
            ww.minimize = function() {
            	if(!l){
            		this.getDefault().minimize.call(this);
            		bD.style.visibility = "hidden";
            	}
            };
            ww.restore = function() {
            	if(!l){
            		this.getDefault().restore.call(this);
            		bD.style.visibility = "visible";
            	}
            };
            ww.moveWindow = function() {
            	if(!l){
            		this.getDefault().moveWindow.call(this,arguments[0],arguments[1]);
            	}
            };
            ww.maximize = function() {
            	if(!l){
            		fc_chat.toggleHide();
            	}
            };
            ww.onClose = function() {
                fc_chat.open_chat_box();
                return false;
            };
        }
        opdiv = $('fc_op1');
        img7 = $('img7');
        elem_g = $('fc_ce_g');
        if (exp6) {
            bIF = document.createElement("IFRAME");
            bIF.className = "jGo_app jGo_myapp";
            bIF.style.position = 'absolute';
            bIF.style.scrolling = 'no';
            bIF.style.zIndex = z_b + 99;
            bIF.style.width = bD.style.width;
            bIF.style.height = bD.style.height;
            bIF.style.backgroundColor = 'transparent';
            bIF.style.display = _b;
            if (fc_version != '1_1_2') {
                if ( ! fc_absolute && $('fastcatchatentry') != null) {
                    $('fastcatchatentry').appendChild(bIF)
                    } else {
                    document.body.appendChild(bIF);
                    move_box(bIF, fc_right, fc_top);
                }
            } else {
                bIF.style.top = '0px';
                bIF.style.left = '0px';
                ww.cA.appendChild(bIF);
            }
        }
        sH[1] = i1.scrollHeight;
        return false;
    };
    
    this.show_hide_options = function(width, height) {
        var href = "fc_oD";
        var chk1 = (m == 0 ? 'checked': '');
        var chk2 = (m == 1 ? 'checked': '');
        var chk3 = (dtm == 1 ? 'checked': '');
        var chk4 = (dtm == 0 ? 'checked': '');
        oD = $(href);
        var opList = '';
        if (sD != null) {
            sD.style.display = _n;
            if (exp6) {
                sIF.style.display = _n;
            }
        }
        sO = false;
        if (oD != null) {
            if (oD.style.display == _n) {
                if(m==0){
            		move_box(oD, jQuery(ww.f).offset().left+optionsLeft, jQuery(ww.f).offset().top+optionsTop);
            	}else{
            		move_box(oD,optionsLeft,optionsTop);
            	}
            	oD.style.display = _b;
                var oGrp = 'fc_grp' + g1;
                $(oGrp).style.backgroundColor = '#CBF6B6';
                if (exp6) {
                	if(m==0){
                		move_box(oIF, jQuery(ww.f).offset().left+optionsLeft, jQuery(ww.f).offset().top+optionsTop);
                	}else{
                		move_box(oIF,optionsLeft,optionsTop);
                	}
                	oIF.style.display = _b;
                }
                uDC[6] = 0;
                for (var ent in bL) {
                    opList += '<div class="fc_' + ent + '" id=fc_bl' + dC[6] + ' style="display:block; text-align:left; font-weight:bold; width:250px; z-Index:' + (z_b + 202) + ';padding-top:2px;padding-bottom:2px;border-bottom:1px solid #ffffff;" onMouseOver="this.style.backgroundColor=\'#f9f9f9\';" onMouseOut="fc_chat.offBlk2(this)" onCLick="fc_chat.clickBlk2(this)">' + a.nm[ent] + '</div>';
                    bL[ent] = 'fc_bl' + dC[6];
                    dC[6] ++ ;
                    uDC[6] ++ ;
                }
                disRmC();
                sH[6] = i1o.scrollHeight;
                i1o[_i] = opList;
                oO = true;
                if (fc_BrowserDetect.browser == 'Explorer') {
                    setTimeout("fc_chat.change_Border_oD(false)", 200);
                }
            } else {
                oO = false;
                var oGrp = 'fc_grp' + g1;
                $(oGrp).style.backgroundColor = '#F0EFE5';
                if (cBlk != '0') {
                    var v2 = $('fc_r');
                    v2[_i] = "<span class='fc_e fc_e_r'></span>";
                }
                cBlk = '0';
                oD.style.display = _n;
                if (exp6) {
                    oIF.style.display = _n;
                }
            }
            return false;
        }
        var _oD=fc_ex.oD(href,width,height,z_b,oDBorder,chk1,chk2,chk3,chk4,exp6);
        oD=_oD[0];
        oD2=_oD[1];
        i4o = document.createElement('div');
        s_d_s(i4o, _b, '155', '170', '40', '60', '1px solid #aaaaaa', '#F0EFE5', '7pt', 'fc_d3');
        oD2.appendChild(i4o);
        i4o[_i] = fc_ex.i4o(px,z_b);
        i3o = document.createElement('div');
        s_d_s(i3o, _b, '155', '220', '60', '60', '1px solid #aaaaaa', '#F0EFE5', '7pt', 'fc_d3');
        oD2.appendChild(i3o);
        i3o[_i] = fc_ex.i3o(clr,vals,z_b);
        i2o = document.createElement('div');
        s_d_s(i2o, _b, '22', '20', '110', '85', '1px solid #aaaaaa', '#F0EFE5', '7pt', 'fc_d3');
        oD2.appendChild(i2o);
        i1o = document.createElement('div');
        s_d_s(i1o, _b, '22', '170', '110', '85', '1px solid #aaaaaa', '#F0EFE5', '7pt', 'fc_d2');
        i1o[_i] = "";
        oD2.appendChild(i1o);
        if (m == 0) {
            if (fc_version != '1_1_2') {
                bD.appendChild(oD);
            } else {
                optionsTop += 20;
                optionsLeft -= 5;
                document.body.appendChild(oD);
           }
           move_box(oD, jQuery(ww.f).offset().left+optionsLeft, jQuery(ww.f).offset().top+optionsTop);
        } else {
            document.body.appendChild(oD);
            move_box(oD, optionsLeft, optionsTop);
        }
        if (exp6) {
            oIF=fc_ex.oIF(z_b,oD2);
            if (m == 0) {
                if (fc_version != '1_1_2') {
                    bD.appendChild(oIF);
                } else {
                	document.body.appendChild(oIF);
                }
                move_box(oIF, jQuery(ww.f).offset().left+optionsLeft, jQuery(ww.f).offset().top+optionsTop);
            } else {
                document.body.appendChild(oIF);
                move_box(oIF, optionsLeft, optionsTop);
            }
        }
        sH[7] = i2o.scrollHeight;
        i2o[_i] = fc_ex.i2o(g1,clr,rms,rmsl,rmsv,rmsd,lrms,rmC,z_b,_h);
        uDC[6] = 0;
        for (var ent in bL) {
            opList += '<div class="fc_' + ent + '" id=fc_bl' + dC[6] + ' style="display:block; text-align:left; font-weight:bold; width:250px; z-Index:' + (z_b + 202) + ';padding-top:2px;padding-bottom:2px;border-bottom:1px solid #ffffff;" onMouseOver="this.style.backgroundColor=\'#f9f9f9\';" onMouseOut="fc_chat.offBlk2(this)" onCLick="fc_chat.clickBlk2(this)">' + a.nm[ent] + '</div>';
            bL[ent] = 'fc_bl' + dC[6];
            dC[6] ++ ;
            uDC[6] ++ ;
        }
        sH[6] = i1o.scrollHeight;
        i1o[_i] = opList;
        oO = true;
        setTimeout("fc_chat.change_Border_oD(false)", 200);
        return false;
    };
    this.show_hide_smileys = function(width, height) {
        var href = "fc_sD";
        sD = $(href);
        if (sD != null) {
            if (sD.style.display == _n) {
                move_box(sD, smXOffset, smYOffset);
                sD.style.display = _b;
                if (exp6) {
                    move_box(sIF, smXOffset, smYOffset);
                    sIF.style.display = _b;
                }
                sO = true;
            } else {
                sO = false;
                sD.style.display = _n;
                if (exp6) {
                    sIF.style.display = _n;
                }
            }
            return false;
        }
        var sDArray=fc_ex.sD(href,width,height,z_b,exp6);
        sD = sDArray[0];
        sD2 = sDArray[1];
        bD.appendChild(sD);
        move_box(sD, smXOffset, smYOffset);
        if (exp6) {
            sIF=fc_ex.sIF(z_b,sD);
            bD.appendChild(sIF);
            move_box(sIF, smXOffset, smYOffset);
        }
        sO = true;
        setTimeout("fc_chat.change_Border_sD(false)", 200);
        return false;
    };
    this.loadChatRooms = function(v,x) {
        chatRooms = v;
        lockedRooms = x;
        rms = chatRooms.split(',');
        if(lockedRooms==''){
        	lockedRooms='-1';
        }
        if(fc_disallow_video_in_rooms==''){
        	fc_disallow_video_in_rooms='-1';
        }
        if(fc_disabled_rooms==''){
        	fc_disabled_rooms='-1';
        }
        lrms = lockedRooms.split(',');
        vrms = fc_disallow_video_in_rooms.split(',');
        drms = fc_disabled_rooms.split(',');
        for (var j = 0; j < rms.length; j ++ ) {
            rmsl[j]=0;
            rmsv[j]=0;
            rmsd[j]=0;
            for (var k = 0; k < lrms.length; k ++ ) {
            	if(lrms[k]==j){
            		rmsl[j]=1;
            	}
            }
            for (var k = 0; k < vrms.length; k ++ ) {
            	if(vrms[k]==j){
            		rmsv[j]=1;
            	}
            }
            for (var k = 0; k < drms.length; k ++ ) {
            	if(drms[k]==j){
            		rmsd[j]=1;
            	}
            }
        }
    };
    this.getPvL = function(u) {
        return pvL[u];
    };
    this.getPve = function(u) {
        return a.pve[u];
    };
    this.getB = function(u) {
        return a.b[u];
    };
    this.getBg = function(u) {
        return a.bg[u];
    };
    this.getO = function(u) {
        return a.o[u];
    };
    this.getNm = function(u) {
        return a.nm[u];
    };
    this.getAc = function(u) {
        return a.ac[u];
    };
    this.getIdl = function() {
    	if (a != null && a.idl[fc_UID] == 1) {
            return true;
    	}
        return false;
    };
    this.show_user_chat = function(an, width, height, u, k) {
        var href = "fc_uD";
        var nie = '';
        var aC = '';
        var bC = '';
        var uAc = '0';
        var fl = false;
        var uTx;
        var bTx;
        var bM = _b;
        var bkTx = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b style="color:blue;">Block</b>';
        var btTx = '';
        var prof = '';
        var sty = "style='font-family:" + dF + ";font-size:7pt;'";
        this.uD = $(href);
        f.cU = u;
        if (u == fc_UID) {
            bM = _n;
            bkTx = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b style="color:#F0EFE5;">Block</b>&nbsp;&nbsp;&nbsp;&nbsp;';
            btTx = "*Hey, it's me!";
            fl = true;
        }
        if (f.getPvL(u) != null || f.getPve(u) != '') {
            aC = 'checked';
        }
        if (f.getB(u) == '1') {
            bC = 'checked';
        }
        if (f.getBg(u) == '1') {
            btTx = '*This user has blocked you.';
            fl = true;
        }
        if (f.getO(u) == '0') {
            btTx = '*This user is offline.';
            fl = true;
        }
        if (fl) {
            uTx = "<span class='fc_e fc_e_spu'></span>";
            bTx = "<IMG SRC='" + _r + "trans.gif' height=11 width=11 style='border: 1px solid #cccccc;background-color: #ffffff;margin-left:6px;margin-top:3px;margin-bottom:2px'>";
        } else {
            uTx = _v+"onClick='" + g + "sendChat(false,false," + h + ");return false'><IMG SRC='" + _h + "sendprivu.gif' border=0 ></a>";
            bTx = "<INPUT TYPE=checkbox id='fc_atpg' name='ATPG' VALUE='1' style='height:20px;width:20px;margin-right:5px;margin-top:3px;margin-bottom:2px' onclick='" + g + "a_r_pr(" + h + ");' " + aC + ">";
        }
        if (top != self) {
            uAc = window.parent.fc_chat.getAc(u);
        } else {
            uAc = a.ac[u];
        }
        if (top != self) {
            if (window.parent.fc_chat.uD != null) {
                window.parent.fc_chat.uD.style.display = _n;
                if (exp6) {
                    window.parent.fc_chat.uIF.style.display = _n;
                }
            }
        } else if (m == 1) {
            odiv.style.display = _b;
        }
        var modStr="";
        if (u == fc_UID && (uAc == '1' || uAc == '2')) {
        	modStr="<a " + sty + " HREF='" + _s + "Mod.html'>Mod</a>&nbsp;&nbsp;";
        }
        var profStr="<a " + sty + " HREF='" + _rTest + u + "' onclick='return " + g + "loadUP(" + u + ")'>Profile</a>&nbsp;&nbsp;";
        var statusStr="<a " + sty + " HREF='javascript:void' onclick='return " + g + "showStatus(" + u + "," + h + ")'>Status</a>";
        var _sho = (!exp6)?'jGo_ydsf':'';
        var _shoi = (!exp6)?'jGo_inner':'';
        if (this.uD != null) {
            isMenu = true;
            this.uD.className = 'jGo_app jGo_myapp '+_sho+' fc_' + u;
            $('fc_uName')[_i] = f.getNm(u);
            if (fc_useProfiles) {
                if (u == fc_UID) {
                    $('fc_profile')[_i] = profStr+modStr+statusStr;
                } else {
                    $('fc_profile')[_i] = profStr+statusStr;
                }
            } else {
                if (u == fc_UID) {
                    $('fc_profile')[_i] = modStr+statusStr;
                } else {
                    $('fc_profile')[_i] = statusStr;
                }
            }
            $('fc_usp')[_i] = uTx;
            $('fc_cbtd')[_i] = bTx;
            $('fc_btm')[_i] = btTx;
            elem.style.display = bM;
            $('fc_btxt')[_i] = bkTx;
            $('fc_status').style.display = _n;
            if (f.getB(u) == '1') {
                $('fc_blk').checked = true;
            } else {
                $('fc_blk').checked = false;
            }
            this.uD.style.top = '-200px';
            this.uD.style.display = _b;
            if (exp6) {
                this.uIF.style.width = this.uD.offsetWidth;
                this.uIF.style.height = this.uD.offsetHeight;
                this.uIF.style.display = _b;
            }
            uPosX = posx - 5;
            uPosY = posy - 5;
            q1 = 0;
            var w = getSWidth();
            if (((w - uPosX) < this.uD.offsetWidth && uPosX > this.uD.offsetWidth) || m == 1) {
                q1 = 1;
            }
            if ( ! moz) {
                if ( ! document.documentElement.scrollTop) {
                    root = document.body;
                }
                uPosX += root.scrollLeft;
                uPosY += root.scrollTop;
            }
            if (fc_BrowserDetect.browser != 'Explorer') {
                if (q1 == 0) {
                    this.uD.style.right = '';
                    this.uD.style.left = uPosX + 'px';
                } else {
                    this.uD.style.left = 'auto';
                    if (IFO != null) {
                        it1div.style.width = tIF.style.width;
                        it1div.style.display = _b;
                    }
                    this.uD.style.right = (w - uPosX - offset) + 'px';
                }
                this.uD.style.top = uPosY + 'px';
                if (fc_BrowserDetect.browser == 'Opera') {
                    if (k > 0) {
                        disableScroll(k);
                    }
                }
            } else {
                if (q1 == 0) {
                    this.uD.style.pixelLeft = uPosX;
                    if (exp6) {
                        this.uIF.style.pixelLeft = uPosX;
                    }
                } else {
                    this.uD.style.pixelLeft = uPosX + offset - this.uD.offsetWidth;
                    if (exp6) {
                        this.uIF.style.pixelLeft = uPosX + offset - this.uD.offsetWidth;
                    }
                }
                this.uD.style.pixelTop = uPosY;
                if (exp6) {
                    this.uIF.style.pixelTop = uPosY;
                }
            }
            if (exp6) {
                this.uIF.style.width = this.uD.offsetWidth;
                this.uIF.style.height = this.uD.offsetHeight;
            }
            return false;
        }
        if (fc_BrowserDetect.browser != 'Explorer') {
            nie = ';width:300px';
        }
        if (fc_useProfiles) {
            if (u == fc_UID) {
                prof = profStr+modStr;
            } else {
                prof = profStr;
            }
        } else {
            if (u == fc_UID) {
                prof = modStr;
            }
        }
        this.uD = document.createElement('div');
        this.uD.className = 'jGo_app jGo_myapp '+_sho+' fc_' + u;
        this.uD.setAttribute('id', href);
        this.uD.style.position = 'absolute';
        this.uD.style.left = '0px';
        this.uD.style.top = '-200px';
        this.uD.style.display = _b;
        this.uD.style.zIndex = z_b + 2005;
        this.uD[_i] = "<table border=0 class='"+_shoi+" fc_table'  id='fc_table' style='vertical-align:middle;background-Color:#F0EFE5;border:3px solid "+uDBorder+"'>" +
        				"<tr>" +
        					"<td>" +
        						"&nbsp;&nbsp;<b><div id='fc_uName' style='display:inline;font-weight:bold;font-size:7pt'>" + f.getNm(u) + "</div>:&nbsp;</b>" +
        						"&nbsp;<div id='fc_profile' style='display:inline'>" + prof + "<a " + sty + " HREF='javascript:void' onclick='return " + g + "showStatus(" + u + "," + h + ")'>Status</a></div>" +
        					"</td>" +
        					"<td id='fc_atxt' style='text-align:right'>" +
        						"<nobr>&nbsp;&nbsp;&nbsp;<b style='color:blue;'>Add to private group</b>" +
        					"</td>" +
        					"<td id='fc_cbtd' style='text-align:left'>" + bTx + "</td>" +
        					"<td id='fc_btxt' style='text-align:right'>" +
        						"<b style='color:blue;'>Block</b>" +
        					"</td>" +
        					"<td style='text-align:left'>" +
        						"<INPUT TYPE=checkbox onclick='" + g + "blk_ublk(true," + h + ")' id='fc_blk' name='BLK' VALUE='1' style='height:20px;width:20px;margin-right:15px' " + bC + ">" +
        					"</td>" +
        				"</tr>" +
        				"<tr>" +
        					"<td colspan=5>" +
        						"<div id='fc_status' style='display:none;margin-left:5px'>" +
        							"<font color=red>Retrieving...</font>" +
        						"</div>" +
        						"<table width='30px' cellpadding=0 cellspacing=1 style='margin-left:5px;padding:2px'>" +
        							"<tr>" +
        								"<td>" +
        									"<a id='fc_blda' href=\"javascript:fc_ex.insertTags(\'=b=\',\'=b=\',\' bold text \',2);\" border=0 onmouseout='getElementById(\"fc_e_blda\").className=\"fc_e fc_e_bld\"' onmouseover='getElementById(\"fc_e_blda\").className=\"fc_e fc_e_bld2\"'>" +
        										"<span class='fc_e fc_e_bld' id='fc_e_blda' title='Bold Text'></span>" +
        									"</a>" +
        								"</td>" +
        								"<td>" +
        									"<a id='fc_ita' href=\"javascript:fc_ex.insertTags(\'=i=\',\'=i=\',\' italic text \',2);\" border=0 onmouseout='getElementById(\"fc_e_ita\").className=\"fc_e fc_e_it\"' onmouseover='getElementById(\"fc_e_ita\").className=\"fc_e fc_e_it2\"'>" +
        										"<span class='fc_e fc_e_it' id='fc_e_ita' title='Italic Text'></span>" +
        									"</a>" +
        								"</td>" +
        								"<td>" +
        									"<a id='fc_ulna' href=\"javascript:fc_ex.insertTags(\'=u=\',\'=u=\',\' underline text \',2);\" border=0 onmouseout='getElementById(\"fc_e_ulna\").className=\"fc_e fc_e_uln\"' onmouseover='getElementById(\"fc_e_ulna\").className=\"fc_e fc_e_uln2\"'>" +
        										"<span class='fc_e fc_e_uln' id='fc_e_ulna' title='Underline Text'></span>" +
        									"</a>" +
        								"</td>" +
        								"<td>" +
        									"<a id='fc_imga' href=\"javascript:fc_ex.insertTags(\'[[\',\']]\',\'image name\',2);\" border=0 onmouseout='getElementById(\"fc_e_imga\").className=\"fc_e fc_e_img\"' onmouseover='getElementById(\"fc_e_imga\").className=\"fc_e fc_e_img2\"'>" +
        										"<span class='fc_e fc_e_img' id='fc_e_imga' title='Insert Image Tag'></span>" +
        									"</a>" +
        								"</td>" +
        							"</tr>" +
        						"</table>" +
        					"</td>" +
        				"</tr>" +
        				"<tr>" +
        					"<td colspan=5>" +
        						"<div style='overflow:auto;margin-left:5px;margin-right:5px" + nie + "'>" +
        							"<textarea id='fc_uChat' onKeyDown='" + g + "oKD()' cols=40 style='width:298px;border: 1px solid "+fc_userbox_sendchat_border_color+"'></textarea>" +
        						"</div>" +
        					"</td>" +
        				"</tr>" +
        				"<tr>" +
        					"<td colspan=1>" +
        						"<div id='fc_usp' style='margin-left:4px;padding:3px;font-size:7pt'>" + uTx + "</div>" +
        					"</td>" +
        					"<td id='fc_btm' colspan=4 style='font-size:7pt'>" + btTx + "</td>" +
        				"</tr>" +
        			"</table>";
        this.uD.onmouseout = fc_chat.changestatus;
        this.uD.onmouseover = fc_chat.changebackstatus;
        document.body.appendChild(this.uD);
        if (exp6) {
            this.uIF = document.createElement("IFRAME");
            this.uIF.className = "jGo_app jGo_myapp";
            this.uIF.style.position = 'absolute';
            this.uIF.style.scrolling = 'no';
            this.uIF.style.width = this.uD.offsetWidth - 20;
            this.uIF.style.height = this.uD.offsetHeight - 20;
            this.uIF.style.zIndex = z_b + 2003;
            this.uIF.style.backgroundColor = 'transparent';
            document.body.appendChild(this.uIF);
        }
        setTimeout('fc_chat.bckUsr()', 40);
        uPosX = posx - 5;
        uPosY = posy - 5;
        q1 = 0;
        var w = getSWidth();
        if (((getSWidth() - uPosX) < this.uD.offsetWidth && uPosX > this.uD.offsetWidth) || m == 1) {
            q1 = 1;
        }
        if ( ! moz) {
            if ( ! document.documentElement.scrollTop) {
                root = document.body;
            }
            uPosX += root.scrollLeft;
            uPosY += root.scrollTop;
        }
        if (fc_BrowserDetect.browser != 'Explorer') {
            if (q1 == 0) {
                this.uD.style.right = '';
                this.uD.style.left = uPosX + 'px';
            } else {
                this.uD.style.left = 'auto';
                if (IFO != null) {
                    it1div.style.width = tIF.style.width;
                    it1div.style.display = _b;
                }
                this.uD.style.right = (w - uPosX - offset) + 'px';
            }
            this.uD.style.top = uPosY + 'px';
            if (fc_BrowserDetect.browser == 'Opera') {
                if (k > 0) {
                    disableScroll(k);
                }
            }
        } else {
            if (q1 == 0) {
                this.uD.style.pixelLeft = uPosX;
                if (exp6) {
                    this.uIF.style.pixelLeft = uPosX;
                }
            } else {
                this.uD.style.pixelLeft = uPosX + offset - this.uD.offsetWidth;
                if (exp6) {
                    this.uIF.style.pixelLeft = uPosX + offset - this.uD.offsetWidth;
                }
            }
            this.uD.style.pixelTop = uPosY;
            if (exp6) {
                this.uIF.style.pixelTop = uPosY;
            }
        }
        if (exp6) {
            this.uIF.style.width = this.uD.offsetWidth;
            this.uIF.style.height = this.uD.offsetHeight - 4;
        }
        isMenu = true;
        elem = $('fc_blk');
        if (u == fc_UID) {
            elem.style.display = _n;
            $('fc_btxt')[_i] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b style="color:#F0EFE5">Block</b>&nbsp;&nbsp;&nbsp;&nbsp;';
        }
        return false;
    };
    function disableScroll(k) {
        if (k == 1) {
            iDTemp = i1;
        } else if (k == 2) {
            iDTemp = i2;
        } else if (k == 3) {
            iDTemp = i3;
        } else if (k == 4) {
            iDTemp = i4;
        } else if (k == 5) {
            iDTemp = i5;
        } else if (k == 6) {
            iDTemp = i6;
        } else if (k == 7) {
            iDTemp = i7;
        }
        iDTemp.style.overflow = 'hidden';
    };
    this.bckUsr = function() {
        if (exp6) {
            this.uIF.style.width = this.uD.offsetWidth;
            this.uIF.style.height = this.uD.offsetHeight - 4;
            this.uIF.style.display = _b;
        }
    };
    function cUB(u) {
        var href = "fc_uD";
        var aC = '';
        var fl = false;
        var uTx;
        var bTx;
        var btTx = '';
        var boxdiv = $(href);
        if (boxdiv != null) {
            if (a.pve[u] != '') {
                aC = 'checked';
            }
            if (a.bg[u] == '1') {
                btTx = '*This user has blocked you.';
                fl = true;
            }
            if (a.o[u] == '0') {
                btTx = '*This user is offline.';
                fl = true;
            }
            if (fl) {
                uTx = "<span class='fc_e fc_e_spu'></span>";
                bTx = "<IMG SRC='" + _r + "trans.gif' height=11 width=11 style='border: 1px solid #cccccc;background-color: #ffffff;margin-left:6px' >";
            } else {
                uTx = _v+"onClick='fc_chat.sendChat(false,false,document);return false'><IMG SRC='" + _h + "sendprivu.gif' border=0 ></a>";
                bTx = stl8+"'fc_chat.a_r_pr(document);' " + aC + ">";
            }
            $('fc_usp')[_i] = uTx;
            $('fc_cbtd')[_i] = bTx;
            $('fc_btm')[_i] = btTx;
        }
        if (m == 1) {
            var boxdiv2 = $2(href);
            if (boxdiv2 != null) {
                if (a.pve[u] != '') {
                    aC = 'checked';
                }
                if (a.bg[u] == '1') {
                    btTx = '*This user has blocked you.';
                    fl = true;
                }
                if (a.o[u] == '0') {
                    btTx = '*This user is offline.';
                    fl = true;
                }
                if (fl) {
                    uTx = "<span class='fc_e fc_e_spu'></span>";
                    bTx = "<IMG SRC='" + _r + "trans.gif' height=11 width=11 style='border: 1px solid #cccccc;background-color: #ffffff;margin-left:6px' >";
                } else {
                    uTx = _v+"onClick='window.parent.fc_chat.sendChat(false,false,window.parent.fc_chat.getIFrameDoc());return false'><IMG SRC='" + _h + "sendprivu.gif' border=0 ></a>";
                    bTx = stl8+"'window.parent.fc_chat.a_r_pr(window.parent.fc_chat.getIFrameDoc());' " + aC + ">";
                }
                $2('fc_usp')[_i] = uTx;
                $2('fc_cbtd')[_i] = bTx;
                $2('fc_btm')[_i] = btTx;
            }
        }
        return false;
    };
    this.a_r_pr = function(d) {
        var v = d.getElementById('fc_atpg');
        if ( ! l) {
            if (a.o[this.cU] == '1' && a.bg[this.cU] == '0') {
                d.getElementById('fc_atxt').style.color = '#aaaaaa';
                if (v.checked == true) {
                    if (upL != 0) {
                        if (cPU != '0') {
                            var v2 = $(a.pve[cPU]);
                            v2.style.backgroundColor = spCol;
                            $('fc_tlk' + v2.id).style.color = spCol;
                        }
                        cPU = this.cU;
                        aTC(this.cU, 5, 'fc_pl');
                        if (cPU != 0) {
                            v2 = $('fc_sp1');
                            v2[_i] = _v+"onClick=" + stl7 + _h + "sendpriv.gif' border=0></a>";
                        }
                    } else {
                        pvL[this.cU] = '1';
                    }
                } else {
                    if (upL != 0) {
                        if (cPU == this.cU) {
                            cPU = '0';
                        }
                        r_e(i5, 5, a.pve[this.cU], this.cU);
                        if (cPU == '0') {
                            var v2 = $('fc_sp1');
                            v2[_i] = "<span class='fc_e fc_e_sp'></span>";
                        }
                    } else {
                        delete pvL[this.cU];
                    }
                }
                v.disabled = true;
                if (flt == 1) {
                    this.filt(1)
                    }
                if (d == document) {
                    setTimeout('fc_chat.releaseATPG(document)', 500);
                } else {
                    setTimeout('fc_chat.releaseATPG(fc_chat.getIFrameDoc())', 500);
                }
            }
        } else {
            v.checked = (v.checked == true ? false: true);
        }
        return false;
    };
    this.blk_ublk = function(typ, d) {
        var elements;
        var uStr;
        var u;
        var chkd;
        var v = d.getElementById('fc_blk');
        if ( ! l) {
            if (typ) {
                d.getElementById('fc_btxt').style.color = '#aaaaaa';
                uStr = this.cU.toString();
                u = this.cU;
                v.disabled = true;
                if (d == document) {
                    setTimeout('fc_chat.releaseBLK(document)', 500);
                } else {
                    setTimeout('fc_chat.releaseBLK(fc_chat.getIFrameDoc())', 500);
                }
                chkd = v.checked;
            } else {
                uStr = cBlk.toString();
                u = cBlk;
            }
            if (typ && chkd) {
                req = "0001171" + uStr.length + uStr;
                a.b[u] = '1';
                a.s[u][3] = '1';
                bL[u] = '1';
                if (oO) {
                    aTC(u, 6, 'fc_bl');
                }
            } else {
                req = "0001170" + uStr.length + uStr;
                a.b[u] = '0';
                a.s[u][3] = '0';
                if (oO) {
                    r_e(i1o, 6, bL[u], u);
                    cBlk = '0';
                    var v2 = $('fc_r');
                    v2[_i] = "<span class='fc_e fc_e_r'></span>";
                }
                if (bL[u] != null) {
                    delete bL[u];
                }
            }
            for (var i = 0; i < 8 - uStr.length; i ++ ) {
                req = req + '0';
            }
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
            }
            catch(err) {
                alert(_er);
                return false;
            }
            if (a.tce[u] != '') {
                uE(u, a.tce[u], 1, 0);
            }
            if (a.ge[u] != null) {
                elements = a.ge[u].split('&');
                for (var j = 0; j < elements.length - 1; j ++ ) {
                    uE(u, elements[j], 1, 1);
                }
            }
            if (curPg[6] != 0) {
                if (a.gpe[u] != null) {
                    elements = a.gpe[u].split('&');
                    for (var j = 0; j < elements.length - 1; j ++ ) {
                        uE(u, elements[j], 1, 6);
                    }
                }
            }
            if (a.pe[u] != null) {
                elements = a.pe[u].split('&');
                for (var j = 0; j < elements.length - 1; j ++ ) {
                    uE(u, elements[j], 1, 2);
                }
            }
            if (curPg[7] != 0) {
                if (a.ppe[u] != null) {
                    elements = a.ppe[u].split('&');
                    for (var j = 0; j < elements.length - 1; j ++ ) {
                        uE(u, elements[j], 1, 7);
                    }
                }
            }
            if (a.de[u] != null) {
                uE(u, a.de[u], 0, 3);
            }
            if (a.gre[u] != '') {
                uE(u, a.gre[u], 0, 4);
            }
            if (a.pve[u] != '') {
                updatePrivElement(u, a.pve[u]);
            }
            if (a.pge[u] != '') {
                elements = a.pge[u].split('&');
                for (var j = 0; j < elements.length - 1; j ++ ) {
                    uE(u, elements[j], 2, 0);
                }
            }
            if (a.ife[u] != null) {
                elements = a.ife[u].split('&');
                for (var j = 0; j < elements.length - 1; j ++ ) {
                    uE(u, elements[j], 3, 0);
                }
            }
        } else {
            if (typ) {
                v.checked = (v.checked == true ? false: true);
            }
        }
        return false;
    };
    this.releaseATPG = function(d) {
        d.getElementById('fc_atxt').style.color = 'black';
        d.getElementById('fc_atpg').disabled = false;
    };
    this.releaseBLK = function(d) {
        d.getElementById('fc_btxt').style.color = 'black';
        d.getElementById('fc_blk').disabled = false;
    };
    this.c_px = function(v, j) {
        px=fc_ex.c_px(v,j,px);
    };
    this.c_clr = function(v, j) {
    	clr=fc_ex.c_clr(v,j,vals,clr);
    };
    this.clickPriv2 = function(v) {
    	cPU=fc_ex.clickPriv2(v,cPU,_v,stl7,_h,flt);
    	if (flt == 1) {
        	fc_chat.filt(1)
    	}
        return false;
    };
    this.clickPriv = function() {
    	cPU=fc_ex.clickPriv2(this,cPU,_v,stl7,_h,flt);
    	if (flt == 1) {
        	fc_chat.filt(1)
    	}
        return false;
    };
    this.offBlk = function() {
        this.style.backgroundColor = (this.className.substr(3) == cBlk ? '#FA6565': '#F0EFE5');
    };
    this.offBlk2 = function(v) {
        v.style.backgroundColor = (v.className.substr(3) == cBlk ? '#FA6565': '#F0EFE5');
    };
    this.overBlk = function() {
    	this.style.backgroundColor = "#f9f9f9";
    };
    this.clickBlk = function() {
    	cBlk=fc_ex.clickBlk(this,cBlk,bL,stl6,_h)
    };
    this.clickBlk2 = function(v) {
        cBlk=fc_ex.clickBlk(v,cBlk,bL,stl6,_h);
    };
    this.toggle = function(i, e, e1) {
        if ( ! l) {
            if ($('fc_' + e + e1).style.border == 'red 1px solid') {
                if (tglCount[i] != 2) {
                    $('fc_' + e + e1)[_i] = "<span class='fc_e fc_e_it2'></span>";
                    tglCount[i] = 1;
                }
            }
        }
    };
    this.toggle2 = function(i, e, e1) {
        if ( ! l) {
            if ($('fc_' + e + e1).style.border == '#aaaaaa 1px solid') {
                if (tglCount[i] != 2) {
                    $('fc_' + e + e1)[_i] = "<span class='fc_e fc_e_" + e + "'></span>";
                    tglCount[i] = 0;
                }
            }
        }
    };
    this.toggleco = function() {
        if ( ! l) {
            if (coCount == 0) {
                $('fc_co')[_i] = "<span class='fc_e fc_e_co2'></span>";
                coCount = 1;
            }
        }
    };
    this.toggleco2 = function() {
        if ( ! l) {
            if (coCount == 1) {
                $('fc_co')[_i] = "<span class='fc_e fc_e_co'></span>";
                coCount = 0;
            }
        }
    };
    
    this.c_g = function(v){
    	if(!l){
	    	fc_roomDiv=v;
	    	var grp = v.className.substr(13);
	    	var grp2=grp.charCodeAt(0) - 65;
	    	if (grp != g1) {
	    		if(rmsd[grp2]==1){
	    			alert(fc_disabled_roomText);
	    		}else{
		    		if(rmsl[grp2]==0){
		    			fc_chat.c_g2('0');
		    		}else{
		    			fc_chat.r_P(grp);
		    		}
	    		}
	    	}
    	}
    };
    this.c_g2 = function(pass) {
    	v = fc_roomDiv;
    	var grp = v.className.substr(13);
        if (grp != g1) {
            l = true;
            var oGrp = 'fc_grp' + g1;
            $(oGrp).style.backgroundColor = '#F0EFE5';
            v.style.backgroundColor = '#CBF6B6';
            if (m == 0) {
                $('fc_op1')[_i] = "<span class='fc_e fc_e_" + opBase + "'></span>";
            } else {
                $('fc_op1')[_i] = "<span class='fc_e fc_e_op2'></span>";
            }
            $('fc_co')[_i] = "<span class='fc_e fc_e_co3'></span>";
            var gt = $('fc_groupType');
            gt[_i] = "";
            ev = '3';
            var gL = '';
            fgl = '1';
            key[2] = grp;
            dC[1] = 0;
            uDC[1] = 0;
            gmC = 0;
            dC[4] = 0;
            uDC[4] = 0;
            for (var ent in a.ge) {
                delete a.ge[ent];
            }
            for (var ent in a.de) {
                if (a.g[ent] == g1) {
                    a.gre[ent] = '';
                }
                if (a.g[ent] == grp && a.o[ent] == '1' && a.t[ent] == '1') {
                    var z = c_i(ent, 0, 4);
                    z += '<font id="fc_gl' + dC[4] + 'id" style="display:none'+ idleStyle + '"> idle...</font><font id="fc_gl' + dC[4] + 'ty" style="display:none' + tys + '"> typing...</font>';
                    var z2 = '';
                    var z4 = '';
                    var icoVis = _n;
                    var camVis = _n;
                    var avVis = _n;
                    var avImg = 'fastcat_0.jpg';
                    var margin_left = '15';
                    if (a.ac[ent] == '1') {
                        z2 = aCTStyle+'mod&gt;</span>';
                    }
                    if (a.ac[ent] == '2') {
                        z2 = aCTStyle+'admin&gt;</span>';
                    };
                    if (a.vs[ent] != '') {
                    	icoVis = _b;
                        camVis = 'inline';
                        margin_left = '5';
                    }
                    if (a.av[ent] != '') {
                    	icoVis = _b;
                    	avImg = a.av[ent];
                    	avVis = 'inline';
                        if (a.vs[ent] != '') {
                            camVis = 'inline';
                        }
                    }
                    z4 = '<a href="' + fc_avatars_dir + avImg + '" id=fc_gl' + dC[4] + 'av" style="display:' + avVis + ';margin-left:' + margin_left + 'px;" target=_blank><img id="fc_gl' + dC[4] + 'avimg" src="' + fc_avatars_dir + avImg + '" border=0 height=' + fc_avatar_sz + 'px></a>';
                    a.gre[ent] = 'fc_gl' + dC[4];
                    gL += '<div class="fc_' + ent + '" id=fc_gl' + dC[4] + ' style="display:block; font-weight:bold; width:250px; z-Index:' + (z_b + 202) + ';'+stl1+'" onMouseOver="this.style.backgroundColor=\''+sphc+'\';" onMouseOut="this.style.backgroundColor=\''+spCol+'\';">' + z + z2 + '<div id="fc_gl' + dC[4] + 'ico" style="display:'+icoVis+';padding-top:3px;padding-bottom:3px"><a href="javascript:fc_chat.subscribe(' + ent + ');" id=fc_gl' + dC[4] + 'cam" style="display:' + camVis + ';margin-left:3px;width:27px" title="Webcam"><img SRC="' + _h + 'video.gif" border=0></a>' + z4 + '</div></div>';
                    dC[4] ++ ;
                    uDC[4] ++ ;
                }
            }
            i1.style.display=_n;
            adScr[1] = 0;
            img1C = 0;
            $('fc_cl6')[_i] = "<a id='fc_cli6' href='javascript:fc_chat.clearMsgs(6);' onmouseover='getElementById(\"fc_e_cl6\").className=\"fc_e fc_e_cl2\"' onmouseout='getElementById(\"fc_e_cl6\").className=\"fc_e fc_e_cl\"'><span class='fc_e fc_e_cl' id='fc_e_cl6' title='Clear' style='display: block;position:absolute;top:0px;left:70px;'></span></a>";
            if (curPg[6] != 0) {
                i6.style.display = _n;
                i1.style.display = _b;
            }
            for (var ent in gMsgs) {
                delete gMsgs[ent];
            }
            gL = stl9 + rms[grp.charCodeAt(0) - 65] + '</b></div>' + gL;
            i4[_i] = gL;
            g1 = grp;
            req = '000344' + grp + fc_md5.hex_md5(fc_roomPass);
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
            }
            catch(err) {
                i1[_i] = _er;
            }
        }
    };
    this.r_P = function(grp){
        rP1=fc_ex.r_P(grp,dF,z_b,_h);
        oD2.appendChild(rP1);
    };
    this.c_gL = function(grp){
    	l=true;
    	$('fc_passtxt')[_i] = "Please wait.";
    	$('fc_renter').disabled = true;
        $('fc_rexit').disabled = true;
        v = $('fc_rpass');
        var ps = v.value;
        v.value = '';
        if(v2(ps)){
        	req = '00034\\' + grp + fc_md5.hex_md5(fc_roomPass);
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
            }
            catch(err) {
                i1[_i] = _er;
            }
        }
    };
    function v2(rr) {
        if (rr.length > 2 && rr.length < 16) {
            if (!reg.test(rr)) {
            	fc_roomPass=rr;
                return true;
            }
        }
        setTimeout("fc_chat.eS2(1)", 500);
        return false;
    };
    this.eS2 = function(i) {
    	fc_ex.eS2(i);
        l=false;
        return true;
    };
    this.cancel_rpass_box = function(){
    	if(rP1!=null){
    		rP1.parentNode.removeChild(rP1);
    		rP1 = null
    	}
    };
    function rCG() {
        if (m == 0) {
            $('fc_op1')[_i] = _v+stl5 + _h + "options" + opBase2 + ".gif' border=0></a>";
        } else {
            $('fc_op1')[_i] = _v+stl5 + _h + "options2.gif' border=0></a>";
        }
        $('fc_co')[_i] = "<span class='fc_e fc_e_co'></span>";
    };
    function tTC(divID, tgl) {
        var v = $(divID);
        var v2 = $('fc_ob');
        if (tgl == '1') {
            v[_i] = _v+"title='Enter chat' onClick='i=0; fc_chat.open_chat_box();return false' class='fc_openbutton" + fc_version + "'>&nbsp;</a>";
            v2[_i] = _v+"title='Turn chat off' onClick='fc_chat.sendD();return false' class='fc_offbutton" + fc_version + "'>&nbsp;</a>";
        } else {
            v[_i] = (fc_version == '1_1_2' ? "<span class='fc_e fc_e_opb'></span>": "<span class='fc_openbutton_g'></span>");
            v2[_i] = "<span class='fc_e fc_e_ofb" + fc_version + "'></span>";
        }
    };
    function tCL(tgl) {
        var v = $('fc_op1');
        if (tgl == '1') {
            if (m == 0) {
                v[_i] = _v+stl5 + _h + "options" + opBase2 + ".gif' border=0></a>";
            } else {
                v[_i] = _v+stl5 + _h + "options2.gif' border=0></a>";
            }
            v = $('fc_tgl1');
            v[_i] = _v+"onClick='fc_chat.open_chat_box();return false'><IMG SRC='" + _h + "closebutton.gif' border=0 ></a>";
            v = $('fc_sg1');
            v[_i] = _v+"onClick='fc_chat.sendChat(true,true,document);return false'><IMG SRC='" + _h + "sendgroup.gif' border=0></a>";
            if (cPU != 0) {
                v = $('fc_sp1');
                v[_i] = _v+"onClick="+stl7 + _h + "sendpriv.gif' border=0></a>";
            }
        } else {
            if (m == 0) {
                v[_i] = "<span class='fc_e fc_e_" + opBase + "'></span>";
            } else {
                v[_i] = "<span class='fc_e fc_e_op2'></span>";
            }
            v = $('fc_tgl1');
            v[_i] = "<span class='fc_e fc_e_tgl'></span>";
            v = $('fc_sg1');
            v[_i] = "<span class='fc_e fc_e_sg'></span>";
            v = $('fc_sp1');
            v[_i] = "<span class='fc_e fc_e_sp'></span>";
        }
    };
    this.open_chat_box = function() {
        if ( ! l) {
            if (m == 1) {
                if (oD != null) {
                    $('fc_m1').checked = true;
                }
                vidGuard=true;
                this.toggleHide();
                vidGuard=false;
            } else if (fc_opBase == 'left') {
                if (oD != null) {
                    oD.style.display = _n;
                    if (exp6) {
                        oIF.style.display = _n;
                    }
                }
            }
            if (sD != null) {
                sD.style.display = _n;
                if (exp6) {
                    sIF.style.display = _n;
                }
            }
            if(upL == '0'){
            	this.show_hide_chat_box(550, bDH, fc_upperPanelsBorder);
            	var headID = document.getElementsByTagName("head")[0];         
            	newScript = document.createElement('script');
            	newScript.type = 'text/javascript';
            	newScript.src = _r + 'Fastcat_Js/FastcatEx.js';
            	headID.appendChild(newScript);
            }else{
            	this.show_hide_chat_box(550, bDH, fc_upperPanelsBorder);
	            try {
	                flash.jsSendData(req);
	                png = new Date().getTime();
	            }
	            catch(err) {
	                alert(_er);
	            }
            }
        }
        return false;
    };
    String.prototype.trim = function() {
        return this.replace(/^\s+|\s+$/g, '');
    };
    function cdt(d) {
        d = d - 0;
        var theDate = new Date(d);
        var ap = "AM";
        var hour = theDate.getHours();
        if (hour > 11) {
            ap = "PM";
        }
        if (hour > 12) {
            hour = hour - 12;
        }
        if (hour == 0) {
            hour = 12;
        }
        if (theDate.getMinutes() >= 10) {
            return((theDate.getMonth() + 1) + '/' + theDate.getDate() + ' ' + hour + ':' + theDate.getMinutes() + ap);
        } else {
            return((theDate.getMonth() + 1) + '/' + theDate.getDate() + ' ' + hour + ':0' + theDate.getMinutes() + ap);
        }
    };
    function myUn2(msg){
    	var mPO;
    	var mP = msg.indexOf('{{');
        if (mP !=- 1) {
            mPO = msg.indexOf('}}');
            if (mPO >= mP) {
            	var _room = rms[EN(msg.substring(mP + 2, mPO))-65];
                msg=msg.substring(0,mP)+_room+msg.substring(mPO+2,msg.length-1);
            }
        }
        return msg;
    };
    function myUn(msg, im) {
        msg = msg.replace(/%26/g, '&');
        msg = msg.replace(/%25/g, '%');
        var tx = [];
        tx[0] = "=b=";
        tx[1] = "=i=";
        tx[2] = "=u=";
        var tx1 = [];
        tx1[0] = "span";
        tx1[1] = "i";
        tx1[2] = "u";
        for (var j = 0; j < 3; j ++ ) {
            var m1 = msg.split(tx[j]);
            if (m1.length > 1) {
                msg = '';
                var m2 = '</' + tx1[j] + '>';
                for (var i = m1.length - 1; i >= 0; i -- ) {
                    msg = m2 + m1[i] + msg;
                    m2 = (m2 == '</' + tx1[j] + '>' ? '<' + tx1[j] + ((j==0)?' style="font-size:larger"':'') + '>': '</' + tx1[j] + '>');
                }
            }
        }
        var mP = 0;
        var mPO = 0;
        var mPN = 0;
        var mPN2 = 0;
        var imgC = 0;
        var wdt = '';
        var dsp = 'display:inline;';
        var fbr = '<br>';
        var jxt = false;
        if (im == 0) {
            wdt = 'width:' + (EN(i2.style.width) + 11) + 'px';
            dsp = ''
        }
        while (true) {
            mP = msg.indexOf('[[');
            if (mP !=- 1 && mP >= mPO) {
                mPO = mP;
                mP = msg.indexOf(']]');
                if (mP !=- 1 && mP >= mPO) {
                    var img = msg.substring(mPO + 2, mP);
                    var img2 = img.replace(/'/g, '\\\'');
                    if (smls[img2] != null) {
                        msg = msg.replace('[[' + img + ']]', '<div style="display:inline;background-color:transparent;height:' + smlsHt[img2] + 'px;"><img border="0" height="' + smlsHt[img2] + 'px" src="' + _r + 'images/' + smls[img2] + '">&nbsp;</div>');
                    } else if (imgC < 3 && fc_use_images) {
                        var img2 = img;
                        img = img.replace(/%/g, '%25');
                        if ( ! jxt) {
                            msg = msg.replace('[[', fbr + '<div style="'+dsp+'background-color:transparent;height:82px;' + wdt + '"><a href="' + _t + img + '" target="_blank"><img style="margin-top:2px" border="0" height="80px" src="' + _t);
                            mPN = msg.indexOf(']]');
                            mPN2 = msg.indexOf('[[');
                            msg = msg.replace(img2 + ']]', img + '"></a></div>');
                        }
                        imgs = 1;
                        dsp = 'display:inline;';
                        wdt = '';
                        fbr = '';
                        imgC ++ ;
                    }
                    mPO = mP;
                } else {
                    break;
                }
            } else {
                break;
            }
        }
        return msg;
    };
    this.showStatus = function(uID, d) {
        if ( ! l) {
            fc_ex.showStatus(uID,d,flash,_er);
        }
        return false;
    };
    this.releaseStatus = function(divID, d) {
        var v = d.getElementById(divID);
        v.style.display = _n;
    };
    this.newAvatar = function(ava, mode, flExt, rspLn1, rspLn2) {
        fExt = flExt;
        rLn1 = rspLn1;
        rLn2 = rspLn2;
        getNewTopIFrameDoc();
        if ( ! l) {
            fc_ex.newAvatar(ava,mode,IFD,flash,_er);
        }
    };
    this.avatarSuccess = function(mode, opt) {
        getNewTopIFrameDoc();
        fc_ex.avatarSuccess(mode,opt,IFD,dF,fExt,fc_UID,rLn1,rLn2);
        
    };
    this.oKD = function() {
        if ( ! l &&! lKD && fc_showTyping) {
            req = '00001S';
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
            }
            catch(err) {
                alert(_er);
            }
            lKD = true;
            setTimeout('fc_chat.releaseOKD()', 1000);
        }
    };
    this.releaseOKD = function() {
        lKD = false;
    };
    this.sendChat = function(typ, g, d) {
        var msg;
        var v = (typ ? $('fc_chat'): d.getElementById('fc_uChat'));
        if ( ! l) {
            msg = v.value;
            msg = msg.replace(/%/g, '%25');
            msg = msg.replace(/&/g, '%26amp;');
            msg = msg.replace(/</g, '%26lt;');
            msg = msg.replace(/>/g, '%26gt;');
            if (fc_use_images) {
                msg = msg.replace(/\[\[/g, '[[' + fc_UID + '_');
            }
            var mP = 0;
            var mPO = 0;
            while (true) {
                mP = msg.indexOf('{{');
                if (mP !=- 1 && mP >= mPO) {
                    mPO = mP;
                    mP = msg.indexOf('}}');
                    if (mP !=- 1 && mP >= mPO) {
                        var img = msg.substring(mPO + 2, mP);
                        var img2 = img.replace(/'/g, '\\\'');
                        if (smls[img2] != null) {
                            msg = msg.replace('{{' + img + '}}', '[[' + img + ']]');
                        }
                        mPO = mP;
                    } else {
                        break;
                    }
                } else {
                    break;
                }
            }
            if (msg.length > 0) {
                if (msg.length < fc_max_chat_size) {
                    if ((msg.length + 10) < 100) {
                        req = '000' + (msg.length + 10);
                    } else if ((msg.length + 10) < 1000) {
                        req = '00' + (msg.length + 10);
                    } else if ((msg.length + 10) < 10000) {
                        req = '0' + (msg.length + 10);
                    } else {
                        req = msg.length + 10;
                    }
                    if ( ! g) {
                        var uStr = (typ ? cPU.toString(): this.cU.toString());
                        req += '8' + uStr.length + uStr;
                        for (var i = 0; i < 8 - uStr.length; i ++ ) {
                            req += '0';
                        }
                    } else {
                        req += '8000000000';
                    }
                    req += msg;
                    try {
                        flash.jsSendData(req);
                        png = new Date().getTime();
                    }
                    catch(err) {
                        alert(_er);
                    }
                    var v2;
                    if ( ! g) {
                        v2 = (typ ? $('fc_sp1'): d.getElementById('fc_usp'));
                        var vv='';
                        if(!typ){
                        	vv='u';
                        }
                        v2[_i] = "<span class='fc_e fc_e_sp"+vv+"'></span>";
                        if (d == document) {
                            setTimeout('fc_chat.releaseChat(' + typ + ',document)', 500);
                        } else {
                            setTimeout('fc_chat.releaseChat(' + typ + ',fc_chat.getIFrameDoc())', 500);
                        }
                    } else {
                        v2 = $('fc_sg1');
                        v2[_i] = "<span class='fc_e fc_e_sg'></span>";
                        setTimeout('fc_chat.releaseChat2()', 500);
                    }
                } else {
                    alert('Message is too big (' + fc_max_chat_size + ' chars max).');
                }
            } else {
                alert('Please enter a message!');
            }
            v.value = '';
            v.focus();
        }
    };
    this.releaseChat = function(typ, d) {
        var v = (typ ? $('fc_sp1'): d.getElementById('fc_usp'));
        var vv='';
        if(!typ){
        	vv='u';
        }
        if (d == document) {
            v[_i] = _v+"onClick='fc_chat.sendChat(" + typ + ",false,document);return false'><IMG SRC='" + _h + "sendpriv"+vv+".gif' border=0 ></a>";
        } else {
            v[_i] = _v+"onClick='window.parent.fc_chat.sendChat(" + typ + ",false,window.parent.fc_chat.getIFrameDoc());return false'><IMG SRC='" + _h + "sendpriv"+vv+".gif' border=0 ></a>";
        }
    };
    this.releaseChat2 = function() {
        var v = $('fc_sg1');
        v[_i] = _v+"onClick='fc_chat.sendChat(true,true,document);return false'><IMG SRC='" + _h + "sendgroup.gif' border=0 ></a>";
    };
    function returnBroadcastParams(data) {
        fc_ex.returnBroadcastParams(data,fc_UID);
    };
    this.setPng = function(){
    	png = new Date().getTime();
    };
    this.setL = function(id){
    	l = id;
    };
    this.jsB = function() {
        fc_ex.jsB(flash,_er)
    };
    this.jsW = function(id, uri, add) {
    	fc_ex.jsW(id, uri, add)
    };
    this.jsW2 = function(id, uri, add) {
    	fc_ex.jsW2(id, uri, add)
    };
    this.jsSt = function(id, uri) {
    	fc_ex.jsSt(id, uri, flash,_er)
    };
    this.jsStp = function(id) {
    	fc_ex.jsStp(id,flash,_er)
    };
    this.jsV = function() {
        $('vidchat1').style.backgroundImage = '';
    };
    this.jsA = function(msg) {
        alert(msg);
    };
    this.removeAllStreams = function() {
    	fc_ex.removeAllStreams(flash, _er)
    };
    this.subscribe = function(u) {
    	fc_ex.subscribe(u,fc_UID,streamCount,rmsl,rmsd,rmsv,rms,g1)
    };
    this.launchVideoChat = function(u) {
    	fc_ex.launchVideoChat(u,l,_h,ww,streamCount,videoAccountID,rmsv,g1);
    	return false;
    };
    this.jsLV2 = function(u) {
    	fc_ex.jsLV2(u,l,ww,videoAccountID)
    };
    this.closeVid = function() {
    	try{
    		fc_ex.closeVid();
    	}catch(err){}
    };
    this.jsR = function(num) {
        fc_ex.jsR(num);
    };
    this.overDG = function() {
        this.style.backgroundColor = sphc;
    };
    this.offDG = function() {
        this.style.backgroundColor = spCol;
    };
    function getPageData() {
        var x;
        try {
            x = $("fc_p1");
        }
        catch(err) {
            hU = 0;
        }
        if (x == null) {
            hU = 0;
        }
        dmn = $("fc_domain")[_i];
        return true;
    };
    function getPageUsers() {
        var p;
        var pa;
        var pC = 0;
        var n = 1;
        while (true) {
            try {
                p = $('fc_p' + n);
                pa = $('fc_pa' + n);
            }
            catch(err) {
                p = null;
            }
            if (p != null) {
                var u = p.className.substr(3);
                if (a.nm[u] == null) {
                    createURec(u);
                    a.nm[u] = pa[_i];
                    a.pge[u] = 'fc_p' + n + '&';
                    pL += u.length + u;
                    for (var i = 0; i < 8 - u.length; i ++ ) {
                        pL += '0';
                    }
                    pC ++ ;
                } else {
                    a.pge[u] += 'fc_p' + n + '&';
                }
                n ++ ;
            } else {
                break;
            }
        }
        if (pC < 10) {
            pL = '000' + pC + pL;
        } else if (pC < 100) {
            pL = '00' + pC + pL;
        } else if (pC < 1000) {
            pL = '0' + pC + pL;
        } else {
            pL = pC + pL;
        }
    };
    function getNewPageUsers() {
        var p;
        var pa;
        var pC = 0;
        var n = 1;
        npL = '';
        while (true) {
            try {
                p = $2('fc_p' + n);
                pa = $2('fc_pa' + n);
            }
            catch(err) {
                p = null;
            }
            if (p != null) {
                var u = p.className.substr(3);
                if (a.nm[u] == null) {
                    createURec(u);
                    a.nm[u] = pa[_i];
                    a.ife[u] = 'fc_p' + n + '&';
                    npL += u.length + u;
                    for (vari = 0; i < 8 - u.length; i ++ ) {
                        npL += '0';
                    }
                    pC ++ ;
                } else {
                    if (a.ife[u] == null) {
                        a.ife[u] = 'fc_p' + n + '&';
                    } else {
                        a.ife[u] += 'fc_p' + n + '&';
                    }
                    if (a.o[u] == '1' || a.b[u] == '1' || a.bg[u] == '1') {
                        uE(u, 'fc_p' + n, 3, 0);
                    }
                }
                n ++ ;
            } else {
                break;
            }
        }
        if (pC < 10) {
            npL = '000' + pC + npL;
        } else if (pC < 100) {
            npL = '00' + pC + npL;
        } else if (pC < 1000) {
            npL = '0' + pC + npL;
        } else {
            npL = pC + npL;
        }
    };
    this.sendNewPageReq = function() {
        for (var ent in a.ife) {
            delete a.ife[ent];
        }
        getNewIFrameDoc();
        getNewPageUsers();
        if (npL != '0000') {
            key[6] = '1';
            var strLen = 9 + npL.length;
            var len;
            if (strLen < 10) {
                len = '0000' + strLen;
            } else if (strLen < 100) {
                len = '000' + strLen;
            } else if (strLen < 1000) {
                len = '00' + strLen;
            } else if (strLen < 10000) {
                len = '0' + strLen;
            } else {
                len = strLen;
            }
            req = len + '2' + d1 + pageKey + npL;
            try {
                flash.jsSendData(req);
                png = new Date().getTime();
            }
            catch(err) {
                i1[_i] = _er;
            }
        }
    };
    function userRecord() {
        this.id = [];
        this.nm = [];
        this.o = [];
        this.ac = [];
        this.d = [];
        this.g = [];
        this.t = [];
        this.ty = [];
        this.idl = [];
        this.av = [];
        this.avo = [];
        this.vs = [];
        this.vso = [];
        this.vsw = [];
        this.wl = [];
        this.vsw2 = [];
        this.wl2 = [];
        this.b = [];
        this.bg = [];
        this.tce = [];
        this.ge = [];
        this.gpe = [];
        this.pe = [];
        this.ppe = [];
        this.de = [];
        this.gre = [];
        this.pve = [];
        this.pge = [];
        this.ife = [];
        this.s = [];
        this.u = [];
        this.of = [];
    };
    this.jsTestConnection = function() {
        try {
            connection = flash.jsGetConnect();
            if (connection == '1') {
                var dt = new Date().getTime();
                if ((dt - png) > 30000) {
                    if (oldPosx == posx && oldPosy == posy) {
                        req = '000016';
                    } else {
                        req = '00001R';
                    }
                    oldPosx = posx;
                    oldPosy = posy;
                    try {
                        flash.jsSendData(req);
                        png = new Date().getTime();
                    }
                    catch(err) {
                        this.jsOnClose();
                    }
                }
                t3 = setTimeout('fc_chat.jsTestConnection()', 3000);
            } else {
                l = true;
                connLost();
            }
        }
        catch(err) {
            document.getElementById("fc_sChat")[_i] = '<div id="fc_t1" class="fc_0" style="margin-left: 2px"><b><font color="red">Connection lost.</b></font></div>';
            pass = 1;
            this.opfxLoader();
        }
    };
    this.jsOnSuccess = function() {
        icn = 1;
        t3 = setTimeout('fc_chat.jsTestConnection()', 3000);
    };
    this.jsOnFailure = function() {
        $("fc_sChat")[_i] = '<div id="fc_t1" class="fc_0" style="margin-left: 2px">'+fc_connectionLostText+'</div>';
    };
    this.jsOnClose = function() {
        l = true;
        if ( ! procd) {
            fc_SetCookie(fc_timestamp_cookie, '-1', null, '/', fc_domain)
        }
        connLost();
    };
    function connLost() {
        fc_chat.closeVid();
        $("fc_sChat")[_i] = '<div id="fc_t1" class="fc_0" style="margin-left: 2px">'+fc_connectionLostText+'</div>';
	    if (tg == 1) {
	        i1[_i] = '&nbsp;'+fc_connectionLostText;
	        i2[_i] = '&nbsp;'+fc_connectionLostText;
	    }
    };
    this.jsOnData = function(data) {
        if (oldPosx == posx && oldPosy == posy) {
            png = new Date().getTime();
        }
        l = true;
        processUpdate(data);
        if ( ! procd) {
            fc_SetCookie(fc_timestamp_cookie, Math.round(new Date().getTime()/1000), null, '/', fc_domain)
        }
        procd = true;
    };
    function getID(swfID) {
        if (navigator.appName.indexOf("Microsoft") >- 1) {
            flash = window[swfID];
        } else {
            flash = document[swfID];
        }
    };
    this.beginConnect = function() {
        try {
            if (!flash.beginConnect) {
                $('fc_flaToggle')[_i] = '';
                $('fc_flaToggle')[_i] = fc_tag.toString();
                getID('fc_movie');
                $('fc_opimg')[_i] = '<img src="javascript:location.href=\'javascript:fc_chat.opfxLoader();\';" style="position:absolute;left:-100px">';
                setTimeout('fc_chat.beginConnect()', 2500);
                return false;
            }
            flash.beginConnect(connectionString, fc_host, fc_port, 1);
        }
        catch(err) {
            $("fc_sChat")[_i] = '&nbsp;Sorry, could not connect.';
        }
    };
    this.loadUP = function(u) {
        if (fc_useProfiles) {
            if (tg == '1' || m == 1) {
                this.createTopIFrame(_rTest + u + '&dummy=true', 4, 0);
                return false;
            } else {
                return true;
            }
        } else if (m == 1) {
            getNewIFrameDoc();
            IFrameDoc.location.replace(_rTest + u);
            return false;
        } else {
            return true;
        }
    };
    this.toggleDTM = function() {
        if ( ! l) {
            if (dtm == 1) {
                fc_SetCookie("fc_DTM", _n, null, "/", fc_domain);
                dtm = 0;
                ts = 'display:'+_n;
            } else {
                fc_SetCookie("fc_DTM", "inline", null, "/", fc_domain);
                dtm = 1;
                ts = 'display:inline';
            }
        }
    };

    this.toggleHide = function() {
        if ( ! l) {
        	if(!vidGuard){
        		fc_chat.closeVid();
        	}
            if ( ! isHidden) {
                m = 1;
                var scrWidth = fc_ex.getScrollerWidth();
                var sWidth = getSWidth();
                var sHeight = fc_ex.getSHeight();
                if (sHeight > bDH) {
                    scrWidth = 0;
                }
                if ( ! fc_absolute && $('fastcatchatentry') != null || fc_version != '1_1_1') {
                   // document.body.appendChild(bD);
                }
                if (fc_version != '1_1_1') {
                    ww.f.style.display = _n;
                }
		
                $('fc_hideContent').style.display = _n;
                this.createMainIFrame(sWidth-371-scrWidth);
                $('fc_topchat').style.display = _n;
                $('fc_sChat').style.display = _n;
                $('fc_ob').style.display = _n;
                $('fc_ob1').style.display = _n;
                $('fc_lg').style.display = _n;
                if (oD != null) {
                    if (fc_allow_web) {
                    	fc_ex.toggleWeb(_v);
                    }
                    document.body.appendChild(oD);
                    $('fc_m2').checked = true;
                    $('fc_oD').style.display = _n;
                    oO = false;
                }
                if (exp6) {
                    bIF.style.display = _n;
                    if (oIF != null) {
                        oIF.style.display = _n;
                        document.body.appendChild(oIF);
                    }
                }
                if (sD != null) {
                    sD.parentNode.removeChild(sD);
                    if (exp6) {
                        sIF.parentNode.removeChild(sIF);
                    }
                }
                sD = null;
                if (this.uD != null) {
                    this.uD.parentNode.removeChild(this.uD);
                    if (exp6) {
                        this.uIF.parentNode.removeChild(this.uIF);
                    }
                }
                this.uD = null;
                if (IFO != null) {
                    this.rem();
                }
		
                $('fc_op1')[_i] = _v+stl5 + _h + "options2.gif' border=0></a>";
                isHidden = true;
                if (oD != null) {
                    oD.style.left = (moz ? (sWidth - 496 - scrWidth) + 'px': sWidth - 496 - scrWidth);
                    if (exp6) {
                        oIF.style.left = sWidth - 496 - scrWidth;
                    }
                }
                optionsLeft = sWidth - 496 - scrWidth;
                optionsTop = 331;
                fc_chat.c_w(sWidth, scrWidth);
                i1.scrollTop += 25;
                i2.scrollTop += 25;
                
            } else if (isHidden) {
                m = 0;
                clearTimeout(this.t);

                tempIFrame.style.display = _n;
                for (var ent in a.ife) {
                    delete a.ife[ent];
                }
                if ($('fastcatchatentry') != null &&! fc_absolute && fc_version == '1_1_1') {
                    $('fastcatchatentry').appendChild(bD);
                }
                $('fc_sChat').style.display = _b;
                $('fc_ob').style.display = _b;
                $('fc_ob1').style.display = _b;
                $('fc_lg').style.display = _b;
                $('fc_topchat').style.display = _b;
                $('fc_hideContent').style.display = _b;
                if (fc_version != '1_1_1') {
                    ww.f.style.display = _b;
                }
                if (oD != null) {
                    $('fc_web1')[_i] = "<span class='fc_t fc_t_web2'></span>";
                    $('fc_hm1')[_i] = "<span class='fc_t fc_t_hm2'></span>";
                    $('fc_oD').style.display = _n;
                    if (fc_version != '1_1_1') {
                        document.body.appendChild(oD);
                    } else {
                        bD.appendChild(oD);
                    }
                    oO = false;
                }
                if (exp6) {
                    bIF.style.display = _b;
                    if (oIF != null) {
                        oIF.style.display = _n;
                        document.body.appendChild(oIF);
                    }
                }
                if (sD != null) {
                    sD.parentNode.removeChild(sD);
                    if (exp6) {
                        sIF.parentNode.removeChild(sIF);
                    }
                }
                sD = null;
                if (this.uD != null) {
                    this.uD.parentNode.removeChild(this.uD);
                    if (exp6) {
                        this.uIF.parentNode.removeChild(this.uIF);
                    }
                }
                this.uD = null;
                if (IFO != null) {
                    this.rem();
                }
		if (IFrameObj != null) {
                    $('fc_RSIFrame').parentNode.removeChild($('fc_RSIFrame'));
                    IFrameObj = null;
                }
                $('fc_op1')[_i] = _v+stl5 + _h + "options" + opBase2 + ".gif' border=0></a>";
                optionsLeft = (fc_opBase == 'left' ? 56: 432);
                optionsTop = 331;
                if (fc_version != '1_1_1' && oD != null) {
                    optionsLeft -= 5;
                    optionsTop += 20;
                }
                fc_chat.c_w2();
                isHidden = false;
            }
        } else {
            if (m == 0) {
                $('fc_m1').checked = true;
            } else {
                $('fc_m2').checked = true;
            }
        }
    };
    this.elimBar = function() {
        if (IFO == null) {
            fc_chat.createTopIFrame(_r + 'Dummy.html', 6, 0);
            this.rem();
        }
    };
    this.c_w =function(s, s1) {
        img6.style.width = (img1C == 0 ? '30px': '251px');
        img7.style.width = (img2C == 0 ? '30px': '251px');
        i1.style.width = '240px';
        i1a.style.width = '240px';
        i2.style.width = '240px';
        i2a.style.width = '240px';
        i6.style.width = '240px';
        i7.style.width = '240px';
        itext.style.width = '240px';
        $('fc_dragger').style.display = _b;
        $('fc_dragger2').style.top = "537px";
        $('fc_dragger2').style.display = _b;
        $('fc_mic')[_i] = '';
        $('fc_logo').style.display = _n;
        opdiv.style.left = '185px';
        i0.style.left = '248px';
        bD.style.width = '370px';
        bD.style.borderTop = '0px';
        bD.style.borderBottom = fc_bottom_border_style;
        bD.style.top = '0px';
        bD.style.left = (moz ? (s - 370 - s1) + 'px': s - 370 - s1);
        return false;
    };
    this.c_w2 = function() {
        bD.style.borderTop = fc_top_border_style;
        var offst = (fc_width_offset - fc_toolbar_mode * (550 - 128)),
        w = getSWidth();
        if (fc_version != '1_1_2') {
            if ( ! fc_absolute && $('fastcatchatentry') != null) {
                var coords = this.returnElementCoordinates($('fastcatchatentry'));
                if (((w - coords.x) < 550) && ((550 - $('fastcatchatentry').offsetWidth) < coords.x)) {
                    bD.style.left = offst + 'px';
                } else {
                    bD.style.left = '0px';
                }
                bD.style.top = '0px';
            } else {
                var coords = this.returnElementCoordinates(ediv);
                if (((w - coords.x) < 550) && ((550 - ediv.offsetWidth) < coords.x)) {
                    bD.style.left = (offst + fc_right) + 'px';
                } else {
                    bD.style.left = fc_right + 'px';
                }
                bD.style.top = fc_top + 'px';
            }
        } else {
        	bD.style.left=(EN(ww.f.style.left)+5)+'px';
        	bD.style.top=(EN(ww.f.style.top)+30)+'px';
        }
        bD.style.width = '550px';
        bD.style.height = bDH + 'px';
        bD.style.borderBottom = '0px';
        i0.style.left = 428 + 'px';
        opdiv.style.left = '365px';
        img6.style.width = (img1C == 0 ? '30px': '431px');
        img7.style.width = (img2C == 0 ? '30px': '431px');
        i1.style.width = '418px';
        i1a.style.width = '418px';
        i2.style.width = '418px';
        i2a.style.width = '418px';
        i6.style.width = '418px';
        i7.style.width = '418px';
        itext.style.width = '418px';
        $('fc_mic')[_i] = "<span class='fc_t fc_t_mic'></span>";
        $('fc_logo').style.display = _b;
        $('fc_dragger').style.display = _n;
        $('fc_dragger2').style.display = _n;
        return false;
    };
    this.createTopIFrame = function(URL, ifm, typ) {
        if ( ! document.createElement) {
            return true
        };
        if (ifm == iFM) {
            iFM = 1;
            this.rem();
            return false;
        }
        iFM = ifm;
        if (m == 1 && typ == 0) {
            URL += '&target=1';
        }
        if ( ! IFO && document.createElement) {
            tIF = document.createElement('iframe');
            tIF.className = "jGo_app jGo_myapp";
            tIF.setAttribute('id', 'fc_UPIFrame');
            tIF.setAttribute('name', 'fc_UPIFrame');
            tIF.style.position = 'absolute';
            tIF.style.top = '16px';
            tIF.style.left = '6px';
            tIF.style.border = '0px';
            tIF.style.width = EN(i1.style.width) + 'px';
            tIF.style.height = '310px';
            tIF.style.zIndex = z_b + 202;
            if (typ == 1) {
                tIF.style.display = _n;
            }
            IFO = bD.appendChild(tIF);
            if (document.frames) {
                IFO = document.frames['fc_UPIFrame'];
            }
        } else {
            if (typ == 0) {
                tIF.style.display = _b;
            }
        }
        if (navigator.userAgent.indexOf('Gecko') !=- 1 &&! IFO.contentDocument) {
            setTimeout('fc_chat.createTopIFrame(' + URL + ',' + ifm + ',' + typ + ')', 10);
            return false;
        }
        if (IFO.contentDocument) {
            IFD = IFO.contentDocument;
        } else if (IFO.contentWindow) {
            IFD = IFO.contentWindow.document;
        } else if (IFO.document) {
            IFD = IFO.document;
        } else {
            return true;
        }
        IFD.location.replace(URL);
        if (typ == 0) {
            $('fc_gc')[_i] = "<span class='fc_e fc_e_tf" + ifm + "'></span>";
            $('fc_bck')[_i] = "<a href='javascript:fc_chat.rem();'><span class='fc_e fc_e_bck'></span></a>";
        }
        return false;
    };
    this.createMainIFrame = function(w) {
        if ( ! document.createElement) {
            return true
        };
        var URL = window.location.href;
        if (URL.indexOf('?') >= 1) {
            URL += '&dummy=true';
        } else {
            URL += '?dummy=true';
        }
        var _bDH = EN(bD.style.height);
        if ( ! IFrameObj && document.createElement) {
            tempIFrame = document.createElement('iframe');
            tempIFrame.className = "jGo_app jGo_myapp";
            tempIFrame.setAttribute('id', 'fc_RSIFrame');
            tempIFrame.setAttribute('name', 'fc_RSIFrame');
            tempIFrame.style.position = 'absolute';
            tempIFrame.style.top = '0px';
            tempIFrame.style.left = '0px';
            tempIFrame.style.border = '0px solid';
            tempIFrame.style.borderTop = '0px';
            tempIFrame.style.borderLeft = '1px solid #aaaaaa';
            tempIFrame.style.borderBottom = '1px solid #aaaaaa';
            if (moz) {
                tempIFrame.style.width = w + 'px';
                tempIFrame.style.height = _bDH + 'px';
            } else {
                tempIFrame.style.width = w;
                tempIFrame.style.height = _bDH;
            }
            tempIFrame.style.zIndex = z_b + 500;
            IFrameObj = document.body.appendChild(tempIFrame);
            odiv = document.createElement('div');
            odiv.className = "jGo_app jGo_myapp";
            if (moz) {
                odiv.style.width = w + 'px';
                odiv.style.height = _bDH + 'px';
            } else {
                odiv.style.width = w;
                odiv.style.height = _bDH;
            }
            odiv.style.position = 'absolute';
            odiv.style.top = '0px';
            odiv.style.left = '0px';
            odiv.style.zIndex = z_b + 600;
            odiv.style.display = _n;
            document.body.appendChild(odiv);
            if (document.frames) {
                IFrameObj = document.frames['fc_RSIFrame'];
            }
        } else {
            if (moz) {
                tempIFrame.style.width = w + 'px';
                odiv.style.width = w + 'px';
                tempIFrame.style.height = _bDH + 'px';
                odiv.style.height = _bDH + 'px';
            } else {
                tempIFrame.style.width = w;
                odiv.style.width = w;
                tempIFrame.style.height = _bDH;
                odiv.style.height = _bDH;
            }
        }
        tempIFrame.style.display = _b;
        if (navigator.userAgent.indexOf('Gecko') !=- 1 &&! IFrameObj.contentDocument) {
            setTimeout('fc_chat.createMainIFrame(' + w + ')', 10);
            return false;
        }
        if (IFrameObj.contentDocument) {
            IFrameDoc = IFrameObj.contentDocument;
        } else if (IFrameObj.contentWindow) {
            IFrameDoc = IFrameObj.contentWindow.document;
        } else if (IFrameObj.document) {
            IFrameDoc = IFrameObj.document;
        } else {
            return true;
        }
        IFrameDoc.location.replace(URL);
        return false;
    };
    this.getIFrameDoc = function() {
        return IFrameDoc;
    };
    function getNewTopIFrameDoc() {
        try {
            if (IFO.contentDocument) {
                IFD = IFO.contentDocument;
            } else if (IFO.contentWindow) {
                IFD = IFO.contentWindow.document;
            } else if (IFO.document) {
                IFD = IFO.document;
            } else {
                IFD = null;
                return false;
            }
        }
        catch(err) {
            IFD = null;
            return false;
        }
        return false;
    };
    function getNewIFrameDoc() {
        try {
            if (IFrameObj.contentDocument) {
                IFrameDoc = IFrameObj.contentDocument;
            } else if (IFrameObj.contentWindow) {
                IFrameDoc = IFrameObj.contentWindow.document;
            } else if (IFrameObj.document) {
                IFrameDoc = IFrameObj.document;
            } else {
                IFrameDoc = null;
                return false;
            }
        }
        catch(err) {
            IFrameDoc = null;
            return false;
        }
        return false;
    };
    this.breakOut = function() {
        if ( ! l) {
            for (var ent in a.ife) {
                delete a.ife[ent];
            }
            getNewIFrameDoc();
            var lc = _r + "BreakOut.html";
            IFrameDoc.location.replace(lc);
        }
        return false;
    };
    this.home = function() {
        if ( ! l) {
            var v = $('fc_RSIFrame');
            v.parentNode.removeChild(v);
            IFrameObj = null;
            var sW = getSWidth();
            this.createMainIFrame(EN(bD.style.left)-1);
        }
        return false;
    };
    this.rem = function() {
        var v = $('fc_UPIFrame');
        iFM = 1;
        $('fc_gc')[_i] = "<span class='fc_e fc_e_tf1'></span>";
        $('fc_bck')[_i] = "";
        v.parentNode.removeChild(v);
        IFO = null;
        if (ie) {
            itext.focus()
            }
    };
    this.getTagString = function() {
        return fc_tag.toString();
    };
    this.getMode = function() {
        return m;
    };
    
    this.setExp6 = function() {
        exp6 = true;
    };
    this.setMoz = function() {
        moz = true;
    };
    this.writeBox = function() {
        var inbox = '';
        var fwo = fc_width_offset;
        var flb = fc_loginBase;
        var px1 = [];
        if (this.obtn != 'fc_e fc_e_ofb' + fc_version) {
            this.obtn = 'fc_e fc_e_onb' + fc_version;
        }
        if (fc_version != '1_1_2') {} else {
            var ie_offset = 1;
            logout = 'logout' + fc_version;
            if (fc_BrowserDetect.browser == "Explorer") {
                ie_offset = fc_ie_shadow_offset;
            }
            var opacity = "filter:alpha(opacity=" + fc_opacity * 100 + ");-moz-opacity:" + fc_opacity + ";opacity:" + fc_opacity + ";";
            var background_image = "background-image:url(\"" + _h + "tc1.1.2.gif\");";
            if (fc_toolbar_mode == 0) {
                alt = "";
                px1[1] = 413 + fwo;
                px1[2] = 41;
                px1[3] = 300 + fwo;
                px1[4] = 29;
                px1[5] =- 3;
                px1[6] = 360 + fwo;
                px1[7] = 17;
                px1[8] = 375;
                px1[9] =- 3;
                px1[10] = 335 + fwo;
                px1[11] = 13;
                px1[12] = 310 + fwo;
                px1[13] =- 3;
                px1[14] = 302 + fwo;
                px1[15] = 28;
                if (flb == 'right') {
                    px1[16] = 369 + fwo;
                    
                } else {
                    px1[16] = 157 + fwo;
                    
                }
            } else {
                background_image = "background-image:url(\"" + _h + "tcalt1.1.2.gif\");";
                px1[1] = 134 + fwo;
                px1[2] = 110;
                px1[3] = 120 + fwo;
                px1[4] = 69;
                px1[5] = 75;
                px1[6] = 80 + fwo;
                px1[7] = 17;
                px1[8] = 375;
                px1[9] = 75;
                px1[10] = 55 + fwo;
                px1[11] = 82;
                px1[12] = 17;
                px1[13] = 75;
                px1[14] = 0;
                px1[15] = 105;
                if (flb == 'right') {
                    px1[16] = 89 + fwo;
                    
                } else {
                    px1[16] =- 123 + fwo;
                    
                    
                }
            }
            if ( ! fc_use_background_image) {
                background_image = "";
            }
            inbox = "<div id='fc_topchat' class='jGo_ydsf' style='display: block;position:absolute;width: " + px1[1] + "px;height: " + px1[2] + "px; top:0px; left:0px;z-index: " + (z_b + 99) + "' >" +
            			"<div class='jGo_inner' style='" + background_image + " width: " + (px1[1]) + "px; height: " + (px1[2] - ie_offset) + "px; background-color: " + fc_tbackgroundColor + "; " + opacity + " cursor: default;" + fc_toolbar_border_style + "'>&nbsp;</div>" +
            			"<div class='fc_d4' id='fc_sChat' style='position: absolute;display: block; text-align:left;width: " + px1[3] + "px;height: " + px1[4] + "px; top: -3px; left: -2px;  " + fc_alertbox_borderstyle + " background-image: url(" + _h + "fade.gif); background-repeat:repeat-y;background-color:#ffffff; z-index: " + (z_b + 101) + ";font-size: 8pt; font-family:arial;overflow:hidden;'>" +
            				"<div id='fc_t1' style='margin-left: 3px;background-color: transparent;'></div>" +
            			"</div>" +
            			"<div id='fc_ob1' class='fc_title_default' style='position: absolute; width: 39px; height: 21px; display: block; top: " + px1[5] + "px; left: " + px1[6] + "px; cursor: default;z-index: " + (z_b + 102) + ";' >" +
            				"<span class='fc_e fc_e_opb'></span>" +
            			"</div>" +
            			"<div class='fc_title_default' style='position: absolute; width: 21px; height: 12px; display: block; top: " + px1[9] + "px; left: " + px1[10] + "px; cursor: default;z-index: " + (z_b + 102) + ";'id='fc_ob'>" +
            				"<span class='" + this.obtn + "'>&nbsp;</span>" +
            			"</div>" +
            			"<div class='fc_title_default' style='position: absolute; width: 9px; height: 12px; display: block; top: " + px1[11] + "px; left: " + px1[12] + "px; cursor: default;z-index: " + (z_b + 199) + ";'id='fc_lgo'></div>" +
            			"<img src='" + _h + "fastcattoplogo.gif' style='position: absolute; height: 12px; width: 12px; display: block; top: " + px1[13] + "px; left: " + px1[14] + "px; " + opacity + " z-index: " + (z_b + 102) + ";' id='fc_lg'>" +
            		"</div>";
        }
        if ( ! fc_absolute) {
            $('fastcatchatentry')[_i] = inbox;
        } else {
            ediv = document.createElement('div');
            ediv.setAttribute('id', 'jGo_app');
            ediv.className = 'jGo_myapp';
            ediv.style.display = _b;
            ediv.style.position = 'absolute';
            ediv.style.width = px1[1] + 'px';
            ediv.style.height = px1[2] + 'px';
            ediv.style.top = fc_top + 'px';
            ediv.style.left = fc_right + 'px';
            ediv.style.zIndex = z_b + 200;
            ediv[_i] = inbox;
            document.body.appendChild(ediv);
        }
        if (exp6) {
            $('fc_topchat').style.background = '';
        }
    };
    function getLoginDetails(){
    	jQuery.get(fc_forum_proxy, {},
    		function(loginPackage){
    			var packageLength = '000';
    			if(loginPackage==''){  //offline
                	fc_SetCookie(fc_timestamp_cookie, '-1', null, '/', fc_domain);
                	$("fc_sChat")[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>" + fc_startText + "</div>";
                	return false;
                }
    			$("fc_sChat")[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>" + fc_loadingText + "</div>";
    			var data = loginPackage.split('&');
    			fc_UID=data[0];
    			ct=data[1];
    			fc_SetCookie(fc_user_cookie, fc_UID, null, "/", fc_domain);
    			loginPackage=loginPackage.substr(fc_UID.length+ct.length+2);
            	var timestamp = fc_getCookie(fc_timestamp_cookie);
            	if (timestamp != null && timestamp!='-1' && (Math.round(new Date().getTime()/1000)-timestamp<3600)){
            		loginPackage=''
            	}else{
            		packageLength=loginPackage.length;
            		if (packageLength < 100) {
                        packageLength = '0' + packageLength;
                    }
            	}
    			if (dmn == _n) {
                    d1 = "1"
                }
                for (var i = 0; i < 22; i ++ ) {
                    key[i] = '0';
                }
                if (hU == '1') {
                    getPageUsers();
                    key[6] = '1';
                } else {
                    pL = '0000';
                }
                var fc_dtm = fc_getCookie('fc_DTM');
                if (fc_dtm == _n) {
                    ts = 'display:'+_n;
                    dtm = 0;
                }
                if (d1 != '0') {
                    fc_SetCookie(fc_Mod_cookie, ct, null, "/", fc_domain);
                    var initLen = 13 + ct.length + loginPackage.length;
                    if (initLen < 100) {
                        initLen = '0' + initLen;
                    }
                    var str = '00' + initLen + '1' + packageLength + fc_UID.length + fc_UID;
                    for (var i = 0; i < 8 - fc_UID.length; i ++ ) {
                        str = str + '0';
                    }
                    str += ct + loginPackage + String.fromCharCode(10);
                    var strLen = 9 + pL.length;
                    var len;
                    if (strLen < 10) {
                        len = '0000' + strLen;
                    } else if (strLen < 100) {
                        len = '000' + strLen;
                    } else if (strLen < 1000) {
                        len = '00' + strLen;
                    } else if (strLen < 10000) {
                        len = '0' + strLen;
                    } else {
                        len = strLen;
                    }
                    str += len + '2' + d1 + pageKey + pL;
                    connectionString = str;
                    procd = false;
                    this.t = setTimeout("fc_chat.beginConnect()", 2500);
                }
    		}
    	);
    	return false;
    };
    function resetVars(){
    	hU = 1;
        oO = false;
        puC = false;
        coCount = 0;
        bldCount = 0;
        itCount = 0;
        uCount = 0;
        i = 0;
        delete a;
        uL = '';
        pL = '';
        npL = '';
        delete bL;
        bL = {};
        delete pvL;
        pvL = {};
        tg = 0;
        upL = '0';
        this.cU = '0';
        cPU = '0';
        cBlk = '0';
        fgl = '0';
        pmC = 0;
        gmC = 0;
        curPg[6] = 0;
        curPg[7] = 0;
        pgs[6] = 0;
        pgs[7] = 0;
        dC[0] = '0';
        dC[1] = '0';
        dC[2] = '0';
        dC[3] = '0';
        dC[4] = '0';
        dC[5] = '0';
        dC[6] = '0';
        for (var i = 0; i < 20; i ++ ) {
            rmC[i] = 0
        }
        uDC[1] = 0;
        uDC[2] = 0;
        uDC[3] = 0;
        uDC[4] = 0;
        uDC[5] = 0;
        uDC[6] = 0;
        delete gMsgs;
        gMsgs = [];
        delete pMsgs;
        pMsgs = [];
        sO = false;
        _startX = 0;
        _startY = 0;
        _offsetX = 0;
        _offsetY = 0;
        _offsetBD = 0;
        _offsetBDw = 0;
        _offsetBDh = 0;
        _offsetID0 = 0;
        _offsetID1w = 0;
        _offsetID2w = 0;
        _offsetTIFw = 0;
        _offsetTIFh = 0;
        _offsetIDtxtw = 0;
        _offsetop = 0;
        _oldZIndex = 0;
    };
    function resetDom(){
    	if (m == 1) {
            isHidden = true;
            this.toggleHide();
            oD.parentNode.removeChild(this.oD);
            oD = null;
            if (exp6) {
                oIF.parentNode.removeChild(oIF);
            }
        }
        m = 0;
        if (bD != null) {
        	bD.style.display=_n;
        }
        if (ww != null) {
            ww.f.style.display = _n;
            i1[_i] = '';
            i2[_i] = '';
            i3[_i] = '';
            i4[_i] = '';
            i5[_i] = '';
            i6[_i] = '';
            i7[_i] = '';
        }
        if (oD != null) {
            oD.style.display = _n;
            if (exp6) {
                oIF.style.display = _n;
            }
        }
        if (sD != null) {
            sD.parentNode.removeChild(this.sD);
            sD = null;
            if (exp6) {
                sIF.parentNode.removeChild(sIF);
            }
        }
    };
    this.opfxLoader = function() {
        if (fc_getCookie("fc_tglChat") != "off" && fc_getCookie(fc_timestamp_cookie)!= null && fc_getCookie(fc_timestamp_cookie)!='-1' ) {
            if ((lD == 1 && locked == 1) || pass == 1) {
            	clearTimeout(t2);
                if (top == self) {
                	clearTimeout(this.t);
                    clearTimeout(t3);
                    $('fc_flaToggle')[_i] = '';
                    $('fc_flaToggle')[_i] = fc_tag.toString();
                    resetVars();
                    resetDom();
                    tTC('fc_ob1', 0);
                    this.loader();
                } else {
                    hU = 1;
                    this.loader();
                }
            } else {
                lD = 1;
            }
        } else {
            clearTimeout(this.t);
            clearTimeout(t2);
            clearTimeout(t3);
            if ($('fc_flaToggle') != null) {
                $('fc_flaToggle')[_i] = ''
            }
            resetDom();
            if ($("fc_ob1") != null) {
                $("fc_ob1")[_i] = (fc_version == '1_1_2' ? "<span class='fc_e fc_e_opb'></span>": "<span class='fc_openbutton_g'></span>");
                if (fc_getCookie("fc_tglChat") == "off") {
                    $("fc_ob")[_i] = _v+"title='Turn chat on' onClick='fc_chat.sendD();return false'class='fc_onbutton" + fc_version + "'>&nbsp;</a>";
                    $("fc_sChat")[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>"+fc_offText+"</div>";
                } else {
                    if (lD == 1) {
                        $("fc_ob")[_i] = "<span class='fc_e fc_e_ofb" + fc_version + "'></span>";
                        $("fc_sChat")[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>" + fc_startText + "</div>";
                    }
                }
            }
            lD = 1;
            locked = 1;
        }
    };
    this.loader = function() {
        if (top == self) {
		    if(!$("fc_install")){
		    	var el = document.createElement('div');
		    	el.setAttribute('id','fc_hideContent');
		    	document.body.insertBefore(el,document.body.firstChild);
		    	var el2 = document.createElement('div');
		    	el2.setAttribute('id','fc_install');
		    	document.body.insertBefore(el2,document.body.firstChild);
		    	el2.appendChild($("fc_package"));
		    	jQuery(document.body).contents().each(function (i) {
	        	    if(!this.getAttribute||(this.getAttribute('id') != 'fc_install'&&this.getAttribute('id') != 'fc_hideContent')){
			    	el.appendChild(this);
			    }});
		    }
	        if ( ! fc_absolute &&! fc_noshow && $('fastcatchatentry') != null) {
	                fc_chat.writeBox();
	        }
	        var x = null;
	        try {
	            x = $('fc_sChat');
	        }catch(err) {}
	        if (fc_getCookie("fc_tglChat") != "off" && x != null) {
	        	$('fc_flaToggle')[_i] = '';
	            $('fc_flaToggle')[_i] = fc_tag.toString();
	            getID('fc_movie');
	            if (document.getElementById && document.getElementsByTagName && document.createElement) {
	                l = true;
	                ev = '1';
	                a = new userRecord();
	                getPageData();
	                if (! fc_noshow && (fc_absolute || $('fastcatchatentry') != null)) {
	                	locked = 1;
	                	getLoginDetails();
	                }
	            }
	        } else {
	            if (x != null) {
	                $('fc_ob')[_i] = _v+"title='Turn chat on' onclick='fc_chat.sendD();return false' class='fc_onbutton" + fc_version + "'>&nbsp;</a>";
	                $("fc_sChat")[_i] = "<div id='fc_t1' class='fc_0' style='margin-left: 2px'>"+fc_offText+"</div>";
	            }
	        }
        } else {
            getPageData();
            if (hU == '1' && window.parent.fc_chat.getMode() == 1) {
                clearTimeout(window.parent.fc_chat.t);
                window.parent.fc_chat.t = setTimeout("window.parent.fc_chat.sendNewPageReq()", 1500);
            }
        }
    };
    window['jsOnSuccess'] = this.jsOnSuccess;
    window['jsOnFailure'] = this.jsOnFailure;
    window['jsOnClose'] = this.jsOnClose;
    window['jsOnData'] = this.jsOnData;
};


