/**
* Copyright © 2004-2010 Chat software by www.flashcoms.com
*/
var projectRootUrl = 'http://www.ustillup.com/modules/flashcoms/flashcoms_chat/';
function Z5Chat()
{
this.uid = null;
this.roomID = null;
this.roomPassword = null;
this.logoURL = null;
this.preloaderBgColor = null;
this.bgColor = null;
this.rtmp = null;
this.langID = null;
this.build = '13114';
this.flashVersion = '10.1.82'; // required flash player version
this.ShowChat = function ()
{
var flashvars = { data:document.location };
var self = this;
var add = function(name)
{
if(self[name] != null) flashvars[name] = encodeURIComponent(self[name]);
}
add('uid');
add('roomID');
add('roomPassword');
add('logoURL');
add('preloaderBgColor');
add('bgColor');
add('rtmp');
add('langID');
document.write(this.MakeSwfHolder("z5_chat_swf"));
var params = {allowscriptaccess:'always'};
var attributes = {};
swfobject.embedSWF(projectRootUrl + "swf/preloader.swf?build=" + this.build,
"z5_chat_swf", "100%", "100%", this.flashVersion, null,
flashvars, params, attributes);
}
this.MakeSwfHolder = function(swfID, style)
{
var res = '';
if(style) res += '
';
res += '
';
res += '
You need to install or upgrade Adobe Flash Player.
';
res += '
Version ' + this.flashVersion + ' or higher is required.
';
res += '
Get Adobe Flash player
';
res += '
';
if(style) res += '
';
return res;
}
this.OpenPopup = function()
{
var url = this.MakeChatUrl();
var name = this.MakeWinName('videochat_' + this.uid);
this.OpenWindow(url, name, 765, 560, true);
}
this.OpenFullscreen = function()
{
var url = this.MakeChatUrl();
var name = this.MakeWinName('videochat_fullscreen_' + this.uid);
var styleStr = this.MakeStyle(0, 0, screen.width, screen.height, true);
window.open(url, name, styleStr);
}
this.MakeChatUrl = function()
{
var params = new Array();
var self = this;
var add = function(name)
{
if(self[name] != null) params.push(name + '=' + encodeURIComponent(self[name]));
};
add('uid');
add('roomID');
add('roomPassword');
add('logoURL');
add('preloaderBgColor');
add('bgColor');
add('rtmp');
add('langID');
if(params.length) return projectRootUrl + 'chat.htm?' + params.join('&');
return projectRootUrl + 'chat.htm' + params;
}
this.MakeWinName = function(name)
{
name = name.replace(/[^\w\d]/, '_');
name = name.replace(/undefined/, '_');
name = name.replace(/\./, '_');
return name;
}
this.MakeStyle = function(left, top, width, height, isResizeAble)
{
var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no';
styleStr += ',resizable=' + (isResizeAble ? 'yes' : 'no');
styleStr += ',width=' + width + ',height=' + height;
styleStr += ',left=' + left + ',top=' + top;
styleStr += ',screenX=' + left + ',screenY=' + top;
return styleStr;
}
this.OpenWindow = function(url, name, width, height, isResizeAble)
{
var left = Math.round((screen.width - width) / 2);
var top = Math.round((screen.height - height) / 2);
var styleStr = this.MakeStyle(left, top, width, height, isResizeAble);
var res = window.open(url, name, styleStr);
return res;
}
}
var z5chat = new Z5Chat();
if(swfobject == undefined)
{
// include swfobject
/* SWFObject v2.1
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License
*/
var swfobject = function()
{
var b = "undefined",Q = "object",n = "Shockwave Flash",p = "ShockwaveFlash.ShockwaveFlash",P = "application/x-shockwave-flash",m = "SWFObjectExprInst",j = window,K = document,T = navigator,o = [],N = [],i = [],d = [],J,Z = null,M = null,l = null,e = false,A = false;
var h = function()
{
var v = typeof K.getElementById != b && typeof K.getElementsByTagName != b && typeof K.createElement != b,AC = [0,0,0],x = null;
if(typeof T.plugins != b && typeof T.plugins[n] == Q)
{
x = T.plugins[n].description;
if(x && !(typeof T.mimeTypes != b && T.mimeTypes[P] && !T.mimeTypes[P].enabledPlugin))
{
x = x.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
AC[0] = parseInt(x.replace(/^(.*)\..*$/, "$1"), 10);
AC[1] = parseInt(x.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
AC[2] = /r/.test(x) ? parseInt(x.replace(/^.*r(.*)$/, "$1"), 10) : 0
}
}
else
{
if(typeof j.ActiveXObject != b)
{
var y = null,AB = false;
try
{y = new ActiveXObject(p + ".7")}
catch(t)
{
try
{
y = new ActiveXObject(p + ".6");
AC = [6,0,21];
y.AllowScriptAccess = "always"
}
catch(t)
{
if(AC[0] == 6)
{AB = true}
}
if(!AB)
{
try
{y = new ActiveXObject(p)}
catch(t)
{}
}
}
if(!AB && y)
{
try
{
x = y.GetVariable("$version");
if(x)
{
x = x.split(" ")[1].split(",");
AC = [parseInt(x[0], 10),parseInt(x[1], 10),parseInt(x[2], 10)]
}
}
catch(t)
{}
}
}
}
var AD = T.userAgent.toLowerCase(),r = T.platform.toLowerCase(),AA = /webkit/.test(AD) ? parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,q = false,z = r ? /win/.test(r) : /win/.test(AD),w = r ? /mac/.test(r) : /mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}
}();
var L = function()
{
if(!h.w3cdom)
{return }
f(H);
if(h.ie && h.win)
{
try
{
K.write("