if (typeof(gViewer) == 'undefined')
	gViewer = new Object();
gVWRcfg = new Object();

var gs_protocol 			= document.location.protocol+"//";
var gs_viewHost 			= "view.admission.net";
var gs_admissionURL 		= gs_protocol+"view.admission.net/admission/";
var gs_admissionServerURL 	= "http://apps.admission.net/rimfire/admission";
var gDebugLevel 			= 0;
var gs_uniqueID 			= "49aef24927221f64eea9cfbdb2f79d93";
var gs_vskin	 			= "classified";
var gMM_contentVersion 		= gVWRcfg['minFlashVersion'];
gVWRcfg['debugLevel'] = '0';
gVWRcfg['cacheStaticCode'] = '1';
gVWRcfg['maxLoggingLevel'] = '4';
gVWRcfg['compressionLevel'] = '5';
if (!gVWRcfg.servers)
	gVWRcfg.servers = new Object();
gVWRcfg.servers['viewServer'] = 'view.admission.net';
gVWRcfg.servers['movieServer'] = 'view.admission.net';
gVWRcfg.servers['AdMissionServerHost'] = 'apps.admission.net';
if (!gVWRcfg.headers)
	gVWRcfg.headers = new Object();
gVWRcfg.headers['Cache-Control'] = 'private';
gVWRcfg.headers['Accept-Ranges'] = 'none';
gVWRcfg.headers['Expires'] = 'Tue, 09 Feb 10 18:37:45 +0000';
gVWRcfg['PayPalURL'] = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
gVWRcfg['minFlashVersion'] = '7';
gVWRcfg['reflectorInterval'] = '300';
gVWRcfg['reflectorRetries'] = '10';
gVWRcfg['reflectorDoneDelay'] = '100';
gVWRcfg['reflectorDoneDelayMacIE'] = '1000';
if (!gVWRcfg.userAgentOverrides)
	gVWRcfg.userAgentOverrides = new Object();
if (!gVWRcfg.userAgentOverrides.AOL)
	gVWRcfg.userAgentOverrides.AOL = new Object();
if (!gVWRcfg.userAgentOverrides.AOL._Attribs)
	gVWRcfg.userAgentOverrides.AOL._Attribs = new Object();
gVWRcfg.userAgentOverrides.AOL._Attribs['match'] = '/AOL/';
gVWRcfg.userAgentOverrides.AOL['compressionLevel'] = '0';
if (!gVWRcfg.userAgentOverrides.Win98)
	gVWRcfg.userAgentOverrides.Win98 = new Object();
if (!gVWRcfg.userAgentOverrides.Win98._Attribs)
	gVWRcfg.userAgentOverrides.Win98._Attribs = new Object();
gVWRcfg.userAgentOverrides.Win98._Attribs['match'] = '/Windows 98/';
gVWRcfg.userAgentOverrides.Win98['compressionLevel'] = '0';
if (!gVWRcfg.userAgentOverrides.Win2K)
	gVWRcfg.userAgentOverrides.Win2K = new Object();
if (!gVWRcfg.userAgentOverrides.Win2K._Attribs)
	gVWRcfg.userAgentOverrides.Win2K._Attribs = new Object();
gVWRcfg.userAgentOverrides.Win2K._Attribs['match'] = '/Windows NT 5.0/';
gVWRcfg.userAgentOverrides.Win2K['compressionLevel'] = '0';


if (typeof(glib) == 'undefined')
{
var glib = new Object();
glib.DBUG_OFF = 0;
glib.DBUG_ERR = 1;
glib.DBUG_WARN = 2;
glib.DBUG_VERBOSE = 3;
glib.gDebugWin = null;
glib.gDebugLevel = glib.DBUG_OFF;
glib.gStampDebug = true;
glib.gMaxDumpLevels = 2;

glib.setDebugLevel = function(level)
{
glib.gDebugLevel = level;
if (glib.gDebugLevel > 0)
{
if (level > glib.DBUG_VERBOSE)
glib.ckDbgLvl = function(level){return (level == glib.gDebugLevel);};
else
glib.ckDbgLvl = function(level){return (level <= glib.gDebugLevel);};

glib.trace = function(level, message) 
{ 
var colors = ['black', 'red', '#ff5500', 'black'];
if (glib.ckDbgLvl(level))
{
if (glib.gDebugWin == null ) 
{
var winName = "trace";
glib.gDebugWin = window.open("",winName,"resizable=yes,scrollbars=yes,width=400,height=400");
if (!glib.gDebugWin)
return;
glib.gDebugWin.document.write("<font face='verdana' size='1'><BR>");
}
var stamp = "";
if (glib.gStampDebug)
{
var d = new Date();
stamp = d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()+":"+d.getMilliseconds() + " - ";
}
message = message.replace(/</g, "&lt;");
var result = message.match(/http[s]*:\/\/[^\s'"]*/g);
if (result)
{
for (var i = 0; i < result.length; i++)
message = message.replace(result[i], "<a href="+result[i]+" target=_new>"+result[i]+"</a>");
}
message = stamp + message;
if (!glib.gDebugWin.closed)
{
 glib.gDebugWin.document.write("<font color="+colors[level]+">"+message + "</font><BR>");
 glib.gDebugWin.scrollBy(0,1000);
}
}
}

glib.dumpProps = function(obj, msg, nestingLevel, traceLevel) 
{
var stampState = glib.gStampDebug;
glib.gStampDebug = false;
if (typeof(nestingLevel) == 'undefined')
nestingLevel = 1;
if (typeof(traceLevel) == 'undefined')
traceLevel = glib.DBUG_VERBOSE;
var indent = "";
if (typeof(msg) != 'undefined' && msg)
glib.trace(traceLevel, indent+msg);
for (var i=0; i < nestingLevel; i++)
indent += "&nbsp;&nbsp;&nbsp;";
for (var prop in obj)
{
if (typeof(obj[prop]) != 'function')
glib.trace(traceLevel, indent+prop+" = "+obj[prop]);
if (typeof(obj[prop]) == 'object' && nestingLevel < glib.gMaxDumpLevels)
{
try
{
glib.dumpProps(obj[prop], null, ++nestingLevel, traceLevel);
}
catch(e)
{
glib.trace(1,"DUMP ERR: "+e.message);
}
nestingLevel--;
}
}
glib.gStampDebug = stampState;
}

glib.assert = function(expr, msg) 
{ 
if (!expr) 
{
var txt = "Assertion failed! "+ (msg ? msg : "");
if (arguments && arguments.callee && arguments.callee.caller)
 var func = arguments.callee.caller.toString();
else if (glib.assert.caller)
 var func = glib.assert.caller.toString();
 if (typeof(func) != 'undefined')
 {
var result = (func.match(/function\s+(\w+)/))
if (result)
txt += " in function " + result[1];
else
txt += " called from \n" + func;
}
this.trace(1, txt);
var dbug = confirm(txt + ".\nWould you like to try debugging?"); 
if (dbug)
eval("debugger;");
} 
}
}
else
{
glib.trace = function(){};
glib.dumpProps = function(){};
glib.assert = function(){};
glib.gDebugWin = null;
}
};
glib.setDebugLevel(glib.gDebugLevel);

glib.isSet = function(avar)
{
var bSet = (typeof(avar) != 'undefined' && avar != null);
if (bSet && typeof(avar) == 'string')
bSet = (avar != "");
return (bSet);
}

glib.isPropSet = function(prop, obj)
{
if (!obj) 
var obj = window;
var bSet = (typeof(obj[prop]) != 'undefined' && obj[prop] != null);
if (bSet && typeof(obj[prop]) == 'string')
bSet = (obj[prop] != "");
return bSet;
}

glib.isFunction = function(a) 
{
 return (typeof(a) == 'function');
}

glib.isString = function(a) 
{
 return (typeof(a) == 'string' || (this.isObject(a) && a.constructor == String));
}

glib.isObject = function(a) 
{
 return (typeof(a) == 'object');
}

glib.isArray = function(obj) 
{
 return (this.isObject(obj) && obj.constructor == Array);
}
if (typeof(Array.prototype.push) == 'undefined') 
{
Array.prototype.push = function() 
{
var len = this.length;
for (var i = 0; i < arguments.length; i++)
this[len + i] = arguments[i];
return this.length;
}
}
if (typeof(Array.prototype.pop) == 'undefined') 
{
Array.prototype.pop = function() 
{
var lastEl = this[this.length-1];
this.length = Math.max(this.length-1,0);
return lastEl;
}
}
if (typeof(Array.prototype.shift) == 'undefined') 
{
Array.prototype.shift = function()
{
var firstEl = this[0];
this.reverse();
this.length = Math.max(this.length-1,0);
this.reverse();
return firstEl;
}
}
if (typeof(Array.prototype.unshift) == 'undefined') 
{ 
Array.prototype.unshift = function()
{
this.reverse(); 
for(var i=arguments.length-1;i>=0;i--)
this[this.length]=arguments[i]
this.reverse();
return this.length;
}
}
if (typeof(Function.prototype.apply) == 'undefined')
{
Function.prototype.apply = function(obj, parameters) 
{
var parms = new Array();
if (typeof(obj) == 'undefined' || obj == null)
obj = window;
if (typeof(parameters) == 'undefined' || parameters == null)
parameters = new Array();
for (var i = 0; i < parameters.length; i++)
parms[i] = 'parameters[' + i + ']';
obj.__apply__ = this;
var result = eval('obj.__apply__(' + parms.join(', ') + ')');
delete obj.__apply__;
obj.__apply__ = null;
return result;
}
}
if (typeof Function.prototype.call == 'undefined') 
{
Function.prototype.call = function(scope) 
{
var args = new Array(Math.max(arguments.length-1, 0));
for (var i = 1; i < arguments.length; i++)
args[i-1] = arguments[i];
return this.apply(scope, args);
}
}

glib.argstr = function(args)
{
args.join = Array.prototype.join;
return args.join(",");
}

glib.parseQueryString = function(queryString) 
{
 var qsObj = new Object();
 var pair;
 
 queryString = queryString.replace(/^.*\?(.+)$/,'$1');
 
 while ((pair = queryString.match(/([^=]+)=\'?([^\&\']*)\'?\&?/)) && pair[0].length) 
 { 
 queryString = queryString.substring( pair[0].length );
 
var val = pair[2];
if (/^\-?\d+$/.test(val)) 
{
var iVal = parseInt(val);
if (iVal.toString().length == val.length)
pair[2] = iVal;
}
 else if (/^\-?\d+\.\d+$/.test(val)) 
{
var fVal = parseFloat(val);
if (fVal.toString().length == val.length)
pair[2] = fVal;
 }
 else 
 pair[2] = val;
 
 qsObj[pair[1]] = pair[2];
 }
 
 return qsObj;
}

glib.formToQS = function(theFormName) 
{
var theForm = document.forms[theFormName];
var qs = '';
for (var e=0; e < theForm.elements.length; e++) 
{
if (theForm.elements[e].name != '') 
{
qs += (qs=='') ? '?' : '&';
qs += theForm.elements[e].name+'='+escape(theForm.elements[e].value);
}
}
return qs;
}

glib.elByID = function(objID)
{
var theEl = document.getElementById(objID);
if ((theEl == null) && (typeof(findElementInIframe) != 'undefined'))
theEl = findElementInIframe(objID);
return theEl;
}

glib.findDoc = function(domObj)
{
var doc = null;
if (domObj)
{
if (glib.gClientInfo.bMac && glib.gClientInfo.bIE) 
{
if ((typeof(domObj.document) != 'undefined') && domObj.document)
doc = domObj.document;
}
else
{
if (typeof(domObj.contentDocument) != 'undefined')
doc = domObj.contentDocument;
else if (typeof(domObj.contentWindow) != 'undefined')
doc = domObj.contentWindow.document;
else if (typeof(domObj.document) != 'undefined')
{
if (typeof(domObj.id) != 'undefined')
doc = eval(domObj.id+".document");
else
doc = domObj.document;
}
}
}
return doc;
}

glib.camelCaseStyle = function(styleName)
{
for (var exp = this.camelCaseStyle.exp; exp.test(styleName); )
styleName = styleName.replace(exp, RegExp.$1.toUpperCase());
return styleName;
}
glib.camelCaseStyle.exp = /-([a-z])/;

glib.getStyle = function(domObj, property) 
{
var value = null;
var ccStyle = glib.camelCaseStyle(property);
if (typeof(domObj.style[ccStyle]) != 'undefined')
value = domObj.style[ccStyle]; 
if (!value)
{
if (document.defaultView)
value = document.defaultView.getComputedStyle(domObj, "").getPropertyValue(property); 
else if (domObj.currentStyle)
value = domObj.currentStyle[ccStyle];
} 
return value;
}

glib.getObjBox = function(domObj)
{
var box = {t:0,l:0,w:0,h:0};
if(!domObj)
return box;
box.l = domObj.offsetLeft;
box.t = domObj.offsetTop;
var shnoid = domObj.offsetParent;
if (shnoid != domObj)
{
while(shnoid != null)
{
box.l += shnoid.offsetLeft;
box.t += shnoid.offsetTop;
shnoid = shnoid.offsetParent;
} 
}
if (glib.gClientInfo.bSaf && glib.getStyle(domObj, "position") == "absolute")
{
box.l -= document.body.offsetLeft;
box.t -= document.body.offsetTop;
}
if (glib.gClientInfo.bMac && glib.gClientInfo.bIE)
box.l += parseInt(document.body.leftMargin);
else
{
shnoid = domObj.parentNode ? domObj.parentNode : null;
while (shnoid && shnoid.tagName != 'BODY' && shnoid.tagName != 'HTML')
{
box.l -= shnoid.scrollLeft;
box.t -= shnoid.scrollTop;
shnoid = shnoid.parentNode ? shnoid.parentNode : null;
}
}
box.h = (domObj.height) ? domObj.height : domObj.offsetHeight;
box.w = (domObj.width) ? domObj.width : domObj.offsetWidth;
return box;
}

glib.urlDecode = function(str)
{
return unescape(str.replace(/\+/g, " "));
}

glib.xmlEncode = function(str)
{
var outstr = new String(str);
outstr = outstr.replace(/&/g,"&amp;");
outstr = outstr.replace(/</g,"&lt;");
outstr = outstr.replace(/>/g,"&gt;");
outstr = outstr.replace(/\"/g,"&quot;");
return outstr;
}

glib.ellipsify = function(str, maxLength)
{
if (str.length > maxLength)
str = str.substr(0,maxLength-3)+"...";
return str;
}

glib.getScreenMidPt = function()
{
var midPt = {x:0, y:0};
var db = document.body;
if (typeof(db) != 'undefined' && typeof(db.clientWidth) != 'undefined' && typeof(db.clientHeight) != 'undefined')
{
if (glib.gClientInfo.bSaf)
{
midPt.x = Math.floor(db.scrollLeft + (window.innerWidth / 2));
midPt.y = Math.floor(db.scrollTop + (window.innerHeight/2));
}
else
{
midPt.x = db.scrollLeft + (db.clientWidth / 2);
midPt.y = db.scrollTop + (db.clientHeight / 2);
}
} 
else 
{
var de = document.documentElement;
if (typeof(de) != 'undefined' && typeof(de.offsetHeight) != 'undefined')
{
midPt.x = Math.floor(de.offsetLeft + (de.offsetWidth / 2));
midPt.y = Math.floor(de.offsetTop + (de.offsetHeight / 2));
}
else 
{
midPt.x = window.pageXOffset + (window.innerWidth / 2);
midPt.y = window.pageYOffset + (window.innerHeight / 2);
}
}
return midPt;
}

glib.copyObject = function(srcObj, destObj)
{ 
for (var o in srcObj)
{
var theType = typeof(srcObj[o]);
if (theType == 'object')
{
if (typeof(destObj[o]) == 'undefined')
{
if (this.isArray(srcObj[o]))
destObj[o] = new Array();
else
destObj[o] = new Object();
}
glib.copyObject(srcObj[o], destObj[o]);
}
else if (theType != 'function')
destObj[o] = srcObj[o];
}
}
glib.trimLeft = function(str)
{
var i = 0;
var maxLen = str.length;
while ((str.charCodeAt(i) <= 32) && (i < maxLen))
i++;
return(str.slice(i));
}
glib.trimRight = function(str)
{
var i = str.length-1;
while ((str.charCodeAt(i) <= 32) && (i >= 0))
i--;
if (i == str.length-1)
return str;
else
return(str.slice(0,i+1));
}
glib.trim = function(str)
{
if (typeof(str) != 'undefined')
return (this.trimRight(this.trimLeft(str)));
return "";
}
glib.formatURL = function(inStr) 
{
 var outStr = "";
 if (typeof(inStr) != 'undefined')
 {
 outStr = this.trim(inStr);
 var lcStr = outStr.toLowerCase();
 if (outStr.length > 0)
 {
 var PROTOCOLS = ['http://','https://','telnet://','ftp://','mailto:'];
 var i = 0;
 while (i < PROTOCOLS.length)
 {
 var pos = lcStr.indexOf(PROTOCOLS[i++]);
 if (pos == 0) 
 return outStr;
 }
 
 var pos = lcStr.indexOf('ftp.');
 if (pos != -1)
 outStr = "ftp://"+outStr;
 else
 outStr = "http://"+outStr;
 }
 }
 return outStr;
}

glib.appendJS = function(doc, jsCode) 
{
if (this.gClientInfo.bMac && this.gClientInfo.bIE)
doc.body.insertAdjacentHTML('beforeEnd', '<SCR'+'IPT langauge="javascript">'+jsCode+'</SCR'+'IPT>' );
else
{
var scr = doc.createElement("script");
scr.setAttribute("type", "text/javascript");
if (this.gClientInfo.bSaf)
scr.innerHTML = jsCode;
else
scr.text = jsCode;
var el = doc.getElementsByTagName('head')[0];
if (!el)
el = doc.getElementsByTagName('body')[0];
if (el)
el.appendChild(scr);
}
}

function ClientInfo()
{
this.bAgent = navigator.userAgent;
var lcAgent = this.bAgent.toLowerCase();
this.bWin = (lcAgent.indexOf("win") != -1);
this.bMac = (lcAgent.indexOf("mac") != -1);
var result = lcAgent.match(/mozilla\/(.*)/);
var verStr = result[1];
this.browserVer = verStr;
result = verStr.match(/netscape..?(\d[0-9\.]+)/);
this.bNS = (result != null);
if (this.bNS)
{
this.browserStr = "NS";
this.browserVer = result[1];
var intVer = parseInt(result[1]);
this.bNS6 = (intVer == 6);
this.bNS7 = (intVer == 7);
this.bNS8 = (intVer == 8);
this.bNS7up = (intVer >= 7);
}
result = verStr.match(/msie (\d[0-9\.]+)/);
this.bIE = (result != null);
if (!this.bNS)
{
if (this.bIE)
{
this.browserStr = "IE";
this.browserVer = result[1];
var intVer = parseInt(result[1]);
this.bIE4 = (intVer == 4);
this.bIE5 = (intVer == 5);
this.bIE6 = (intVer == 6);
this.bIE7 = (intVer == 7);
this.bIE5up = (intVer >= 5);
}
}
this.bSaf = ((lcAgent.indexOf("applewebkit") != -1) && (lcAgent.indexOf("gecko") != -1) && !this.bNS);
this.bMOZ = ((lcAgent.indexOf("gecko") != -1) && !this.bNS6 && !this.bNS7 && !this.bSaf);
this.bAOL = (lcAgent.indexOf("aol") != -1);
this.bNS4 = (!this.bIE && !this.bIE4 && !this.bNS && !this.bMOZ && !this.bSaf);
this.browserStr = "Other";
if (this.bMOZ && !this.bNS8)
{
result = this.browserVer.match(/rv\:(\d[0-9\.]+)\s?/);
this.browserVer = result[1];
}
if (this.bSaf)
{
this.browserStr = "Safari";
result = this.browserVer.match(/safari\/(\d[0-9\.]+)/i);
this.browserVer = result[1];
}
if (this.bAOL)
this.browserStr = "AOL";
this.browserMajorVer = '0';
this.browserMinorVer = '0';
this.browserSubVer = '0';
var chunks = this.browserVer.split(".");
if (chunks)
{
if (typeof(chunks[0]) != 'undefined')
this.browserMajorVer = chunks[0];
if (typeof(chunks[1]) != 'undefined')
this.browserMinorVer = chunks[1];
if (typeof(chunks[2]) != 'undefined')
this.browserSubVer = chunks[2];
}
}
ClientInfo.prototype.bIE4 = false;
ClientInfo.prototype.bIE5 = false;
ClientInfo.prototype.bIE6 = false;
ClientInfo.prototype.bIE7 = false;
ClientInfo.prototype.bIE5up = false;
ClientInfo.prototype.bNS4 = false;
ClientInfo.prototype.bNS6 = false;
ClientInfo.prototype.bNS7 = false;
ClientInfo.prototype.bNS8 = false;
ClientInfo.prototype.bNS7up = false;
glib.gClientInfo = new ClientInfo();
glib.gClientInfo.dump = function(){glib.dumpProps(this, "Dump glib.gClientInfo:");};
}
function CBroadcaster()
{
};
CBroadcaster.initialize = function(obj)
{
obj._listeners = new Array();
obj.broadcast = this._broadcast;
obj.addListener = this._addListener;
obj.removeListener = this._removeListener;
}
CBroadcaster._broadcast = function() 
{
var eventName = arguments[0];
var args = new Array();
for (var i = 1; i < arguments.length; i++)
args[i-1] = arguments[i];
var list = this._listeners;
var max = list.length;
for (var i = 0; i < max; ++i) 
{
if (typeof(list[i][eventName]) != 'undefined')
{
var result = list[i][eventName].apply(list[i], args);
if (typeof(result) != 'undefined')
var retval = result;
}
}
if (typeof(retval) != 'undefined')
return retval;
}
CBroadcaster._addListener = function(obj)
{
this.removeListener(obj);
this._listeners.push(obj);
return (true);
}
CBroadcaster._removeListener = function(obj) 
{
var list = this._listeners;
var newListeners = new Array();
var len = list.length;
for (var i = 0; i < list.length; i++)
{
if (list[i] != obj)
newListeners.push(list[i]);
}
if (len != newListeners.length)
this._listeners = newListeners;
return (len != newListeners.length);
}
CBroadcaster.prototype.dump = function(msg)
{
glib.dumpProps(this, msg);
}
function CNativeBroadcaster()
{
CBroadcaster.initialize(this);
this.events = {};
}
CNativeBroadcaster.prototype.addEventListener = function(obj, eventName, listener, methodName)
{
if (typeof(this.events[eventName]) == 'undefined')
{
if (typeof(methodName) == 'undefined')
methodName = eventName;
var functionBody = "var args = new Array();\
args[0] = '"+methodName+"';\
for (var i = 0; i < arguments.length; i++)\
args[i+1] = arguments[i];\
var retval = gNativeBroadcaster.broadcast.apply(gNativeBroadcaster, args);\
if (typeof(retval) != 'undefined')\
return retval;\r"
if (obj[eventName])
{
var oldFunction = obj[eventName].toString();
functionBody += oldFunction.substring(oldFunction.indexOf("{")+1,oldFunction.lastIndexOf("}"))+"\r;";
} 
obj[eventName] = new Function(functionBody);
this.events[methodName] = obj[eventName];
} 
this.addListener(listener);
}
if (!glib.isSet(gNativeBroadcaster))
var gNativeBroadcaster = new CNativeBroadcaster();
if (typeof(glib) == 'undefined')
alert("CLayer.js - requires lib.js");
if (typeof(CBroadcaster) == 'undefined')
alert("CLayer.js - requires CBroadcaster.js");
function CLayer(domID, box, clientObj)
{
this.tagName = "";
this.domID = domID;
this.box = box;
this.clientObj = clientObj;
this.parentDoc = document;
this.attributes = new Object();
this.styleAttr = new Object();
this.styleAttr.position = "absolute";
this.styleAttr.visibility = "visible";
this.styleAttr["background-color"] = "#FFFFFF";
CBroadcaster.initialize(this);
}
CLayer.prototype.setAttribute = function(name, value)
{
this.attributes[name] = value;
}
CLayer.prototype.styleObj = function()
{
var domObj = this.getDomObj();
var obj = null;
if (glib.isSet(domObj) && glib.isSet(domObj.style))
obj = domObj.style;
return obj;
}
CLayer.prototype.setStyleAttribute = function(name, value)
{
this.styleAttr[name] = value;
var theStyle = this.styleObj();
if (theStyle)
theStyle[name] = value;
}
CLayer.prototype.constructHTML = function(content)
{
var attrStr = " ";
for (var a in this.attributes)
attrStr += a+'="'+this.attributes[a]+'" ';
var styleStr = 'style="';
for (var s in this.styleAttr)
styleStr += s+':'+this.styleAttr[s]+'; ';
styleStr += 'left:'+this.box.l+'px; top:'+this.box.t+'px; width:'+this.box.w+'px; height:'+this.box.h+'px;';
styleStr += '"';
var theHTML = '<' + this.tagName + ' name="'+this.domID+'" id="'+this.domID+'"' + attrStr + styleStr + '>'
if (glib.isSet(content))
theHTML += content;
theHTML += '</'+this.tagName+'>';
glib.trace(glib.DBUG_VERBOSE, this.tagName+" "+this.domID+" html "+theHTML);
return theHTML;
}
CLayer.prototype.docWrite = function(theDoc, content)
{
this.parentDoc = theDoc;
theDoc.write(this.constructHTML(content));
return this.getDomObj();
}
CLayer.prototype.appendToBody = function(theDoc, content)
{
this.parentDoc = theDoc;
if (this.clientObj.bIE)
{
theDoc.body.insertAdjacentHTML('beforeEnd', this.constructHTML(content));
}
else
{
var el = theDoc.createElement(this.tagName);
var theHTML = "";
if (typeof(content) != 'undefined')
theHTML = content;
el.innerHTML = theHTML;
for (var a in this.attributes)
el.setAttribute(a, this.attributes[a]);
el.id = this.domID;
el.name = this.domID;
theDoc.body.appendChild(el);
for (var s in this.styleAttr)
el.style[s] = this.styleAttr[s];
el.style.top = this.box.t+"px";
el.style.left = this.box.l+"px";
el.style.width = this.box.w+"px";
el.style.height = this.box.h+"px";
}
return this.getDomObj();
}
CLayer.prototype.writeContent = function(content)
{
var domObj = this.getDomObj();
if (glib.isSet(domObj) && (typeof(domObj.innerHTML) != 'undefined'))
domObj.innerHTML = content;
}
CLayer.prototype.appendContent = function(content)
{
var domObj = this.getDomObj();
if (glib.isSet(domObj) && (typeof(this.domObj.innerHTML) != 'undefined'))
this.domObj.innerHTML += content;
}
CLayer.prototype.moveTo = function(left, top)
{
try
{
if (this.clientObj.bIE)
{
eval("this.parentDoc.all['"+this.domID+"'].style.pixelTop="+top)
eval("this.parentDoc.all['"+this.domID+"'].style.pixelLeft="+left);
}
else
{
var domObj = this.getDomObj();
domObj.style.left = left+"px";
domObj.style.top = top+"px";
}
this.broadcast("onMove", this);
}
catch (e)
{
glib.dumpProps(e,"CLayer.prototype.moveTo catch "+this.domID);
}
}
CLayer.prototype.moveBy = function(x, y)
{
var pos = this.getPos();
this.moveTo(pos.l+x, pos.t+y);
}
CLayer.prototype.hideOffscreen = function()
{
this.moveTo(-4000, 10);
}
CLayer.prototype.centerOnScreen = function()
{
var midPt = glib.getScreenMidPt();
var size = this.getSize();
this.moveTo(midPt.x - Math.round(size.w/2), midPt.y - Math.round(size.h/2));
}
CLayer.prototype.findDoc = function()
{
return glib.findDoc(this.getDomObj());
}
CLayer.prototype.getDomObj = function()
{
var domObj = this.parentDoc.getElementById(this.domID);
if (glib.isSet(domObj) && !glib.isSet(domObj.lyr))
domObj.lyr = this;
return domObj;
}
CLayer.prototype.getPos = function()
{
var pos = {};
glib.trace(glib.DBUG_VERBOSE, "getPos this.parentDoc "+this.parentDoc+" this.domID "+this.domID);
var theStyle = this.styleObj();
if (theStyle)
{
if (this.clientObj.bIE)
{
pos.l = theStyle.pixelLeft;
pos.t = theStyle.pixelTop;
}
else
{
pos.l = parseInt(theStyle.left);
pos.t = parseInt(theStyle.top);
}
}
return pos;
}
CLayer.prototype.getSize = function()
{
var size = {};
var theStyle = this.styleObj();
if (theStyle)
{
if (this.clientObj.bIE)
{
size.w = theStyle.pixelWidth;
size.h = theStyle.pixelHeight;
}
else
{
size.w = parseInt(theStyle.width);
size.h = parseInt(theStyle.height);
}
}
return size;
}
CLayer.prototype.resize = function(w,h)
{
var theStyle = this.styleObj();
if (theStyle)
{
if (this.clientObj.bIE) 
{
theStyle.pixelWidth = w;
theStyle.pixelHeight = h;
}
else
{
theStyle.width = w+"px";
theStyle.height = h+"px";
}
this.broadcast("onResize", this);
}
}
CLayer.prototype.show = function()
{
var theStyle = this.styleObj();
if (theStyle)
{
theStyle.display = "block";
this.broadcast("onShow", this);
}
}
CLayer.prototype.hide = function()
{
var theStyle = this.styleObj();
if (theStyle)
{
theStyle.display = "none";
this.broadcast("onHide", this);
}
}
CLayer.prototype.dump = function(msg)
{
glib.dumpProps(this, msg);
}
if (typeof(CLayer) == 'undefined')
alert("CDiv.js - requires CLayer.js");
function CDiv(domID, box, clientObj)
{
this.inheritFrom = CLayer;
this.inheritFrom(domID, box, clientObj);
this.tagName = "div";
}
CDiv.prototype = new CLayer;
CDiv.prototype.superclass = CLayer.prototype;
if (typeof(CLayer) == 'undefined')
alert("CIframe.js - requires CLayer.js");
function CIframe(objID, box, clientObj)
{
this.inheritFrom = CLayer;
this.inheritFrom(objID, box, clientObj);
this.tagName = "iframe";
if (this.attributes)
{
this.attributes.marginwidth = 0;
this.attributes.marginheight = 0;
this.attributes.frameborder = "NO";
this.attributes.border = 0;
this.attributes.scrolling = "auto";
this.attributes.src = CIframe.prototype.defaultSrc;
}
CIframe.prototype.gIframes.push(this);
}
CIframe.prototype = new CLayer;
CIframe.prototype.superclass = CLayer.prototype;
if (typeof (CIframe.prototype.gIframes) == 'undefined')
{
CIframe.prototype.defaultSrc = (glib.gClientInfo.bMac && glib.gClientInfo.bIE) ? "sp.gif" : ((glib.gClientInfo.bSaf) ? (document.location.protocol+"//"+document.location.host+"/ghostsrc.html") : "about:blank");
CIframe.prototype.gIframes = new Array();
}
CIframe.prototype.writeContent = function(theHTML)
{
var domObj = this.getDomObj();
var doc = this.findDoc();
if (glib.isSet(doc))
{
doc.open();
doc.write(theHTML);
doc.close();
}
}
CIframe.prototype.appendContent = function(theHTML)
{
var doc = this.findDoc();
if (glib.isSet(doc))
doc.write(theHTML);
}
CIframe.prototype.getDomObj = function()
{
var domObj = null;
if (this.clientObj.bMac && this.clientObj.bIE && typeof(document.frames) != 'undefined')
domObj = document.frames[this.domID];
if (!glib.isSet(domObj))
domObj = this.superclass.getDomObj.call(this);
return domObj;
}
CIframe.prototype.elByID = function(objID, retry)
{
var theEl = null;
var doc = this.findDoc();
try
{
if (glib.isSet(doc))
theEl = doc.getElementById(objID);
}
catch (e)
{
glib.trace(1, "ERROR: CIframe.prototype.elByID "+objID +" doc "+doc+" theEl "+theEl);
}
return theEl;
}
function findElementInIframe(objID)
{
var theEl = null;
var ary = CIframe.prototype.gIframes;
for (var i=0; i < ary.length; i++)
{
theEl = ary[i].elByID(objID);
if (typeof(theEl) != 'undefined' && theEl != null)
break;
}
return theEl;
}
if (typeof(glib) == 'undefined')
alert("CReflector.js - requires lib.js");
if (typeof(CIframe) == 'undefined')
alert("CReflector.js - requires CIframe.js");
function reflectorNeeded(clientObj)
{
return ((clientObj.bMac && clientObj.bIE) || (clientObj.bMac && clientObj.bNS7 && clientObj.browserVer >= 7.1) || clientObj.bSaf || clientObj.bMOZ || (clientObj.bNS7 && clientObj.browserVer < 7.1));
}
function CReflector(id, url, debugLevel, clientObj)
{
try
{
eval("var obj=g"+id+";");
if (typeof(obj) != 'undefined')
return obj;
} 
catch (e){}
this.id = id;
this.url = url;
this.debugLevel = debugLevel;
this.clientObj = clientObj;
this.frameID = this.id + "frame";
this.refFrame = null;
eval("g"+id+"=this;");
}
CReflector.prototype.interval = 0;
CReflector.prototype.id = "";
CReflector.prototype.url = "";
CReflector.prototype.debugLevel = 0;
CReflector.prototype.clientObj = null;
CReflector.prototype.frameID = "reflectframe";
CReflector.prototype.refFrame = null;
CReflector.prototype.cmd = "";
CReflector.prototype.setvar = "";
CReflector.prototype.bCmdComplete = false;
CReflector.prototype.timeout = 50;
CReflector.prototype.maxRetries = 10;
CReflector.prototype.doneDelay = 100;
CReflector.prototype.constructFlashObjHTML = function(cmdStr)
{
var theHTML = '<embed src="'+this.url+'" ';
theHTML += 'width="0" height="0" allowScriptAccess="always" base="." ';
theHTML += 'flashvars="js=1&domcontext=parent.&pagedomain='+document.location.host+'&gdebuglevel='+this.debugLevel+'&reflectorid='+this.id+'&maxretries='+this.maxRetries+'&doneDelay='+this.doneDelay+'&'+cmdStr+'" ';
theHTML += 'TYPE="application/x-shockwave-flash"></embed>';
return theHTML;
}
CReflector.prototype.reflectorDone = function()
{
glib.trace(glib.DBUG_VERBOSE, this.id+" REFLECTOR DONE ");
this.bCmdComplete = true;
}
CReflector.prototype.reflectorFailed = function(cmdStr)
{
glib.trace(glib.DBUG_ERR, this.id+" REFLECTOR FAILED! "+cmdStr);
this.bCmdComplete = true;
}
CReflector.prototype.reflect = function(cmdStr)
{
glib.trace(glib.DBUG_VERBOSE, this.id+" reflect "+cmdStr);
this.refFrame.writeContent('<html><body>'+this.constructFlashObjHTML(cmdStr)+'<br></body></html>');
}
CReflector.prototype.doNextCmd = function()
{
if (this.bCmdComplete)
{
this.killTimer();
this.bCmdComplete = false;
var theCmd = (this.cmd != "") ? "cmd=" + escape(this.cmd):"";
if (this.setvar != "")
{
if (theCmd != "")
theCmd += "&";
theCmd += "setvar=" + escape(this.setvar);
}
this.cmd = "";
this.setvar = "";
if (theCmd)
this.reflect(theCmd);
}
}
CReflector.prototype.createIframe = function()
{
this.refFrame = new CIframe(this.frameID, {l:-2000, t:-2000, w:20, h:20}, glib.gClientInfo);
this.refFrame.appendToBody(document);
return this.refFrame;
}
CReflector.prototype.queueCmd = function()
{
if (this.refFrame == null)
{
this.createIframe();
this.bCmdComplete = true;
setTimeout("g"+this.id+".queueCmd()", this.timeout);
return;
}
this.killTimer();
this.interval = window.setInterval("g"+this.id+".doNextCmd()", this.timeout);
}
CReflector.prototype.sendCommand = function(cmdQS)
{
if (this.cmd != "")
this.cmd += "&";
this.cmd += cmdQS;
this.queueCmd();
}
CReflector.prototype.setVariable = function(varName, value)
{
var qs = varName+"="+value;
if (this.setvar != "")
this.setvar += "&";
this.setvar += qs;
this.queueCmd();
}
CReflector.prototype.killTimer = function()
{
if (this.interval != 0)
{
window.clearInterval(this.interval);
this.interval = 0;
}
}
CReflector.prototype.dump = function(msg)
{
glib.dumpProps(this, msg);
}
function CQEvent(initObj, timeoutHandler)
{
this.obj = null;
this.method = "";
this.strCallback = "";
this.interval = CQEvent.prototype.defaultInterval;
this.timeout = 0;
this.maxRetries = 0;
this.retryCt = 0; 
this.timeoutHandler = timeoutHandler;
if (typeof(initObj) == 'object')
{
for (var prop in initObj)
this[prop] = initObj[prop];
}
else
this.strCallback = initObj;
this.interval = Math.max(this.interval, 50);
if (this.timeout > 0)
this.ckDone = this.ckTimeout0;
else if (this.maxRetries > 0)
this.ckDone = this.ckRetries;
else 
this.ckDone = function(){return false;};
}
CQEvent.prototype.defaultInterval = 50;
CQEvent.prototype.getName = function()
{
return ((this.obj != null) ? this.method : this.strCallback);
}
CQEvent.prototype.doIt = function()
{
var handled = false;
if (glib.isSet(this.obj))
handled = this.obj[this.method].call(this.obj);
else
handled = eval(this.strCallback);
this.retryCt++;
return handled;
}
CQEvent.prototype.ckTimeout0 = function()
{
this.endTime = parseInt((new Date()).getTime()) + parseInt(this.timeout);
this.ckDone = this.ckTimeout;
return this.ckTimeout();
}
CQEvent.prototype.ckTimeout = function()
{
return (parseInt((new Date()).getTime()) >= this.endTime);
}
CQEvent.prototype.ckRetries = function()
{
return (this.retryCt >= this.maxRetries);
}
function CEventQueue()
{
this.eventList = new Array();
this.processing = false;
}
CEventQueue.prototype.addEvent = function(evt, timeoutHandler)
{
var qEvt = new CQEvent(evt, timeoutHandler);
this.eventList[this.eventList.length] = qEvt;
 glib.trace(3,"CEventQueue addEvent "+this.eventName(qEvt)+" ("+this.eventList.length+")");
 this.start();
}
CEventQueue.prototype.start = function()
{
if (!this.processing)
{
this.processing = true;
var evt = this.eventList[0];
if (typeof(evt) != 'undefined' && evt)
setTimeout("gEvtQueue.doNext()",evt.interval);
}
}
CEventQueue.prototype.doNext = function()
{
if (this.eventList.length > 0)
{
var evt = this.eventList[0];
var interval = evt.interval;
 glib.trace(3,"CEventQueue doNext "+this.eventName(evt)+" ("+this.eventList.length+")"+" retries "+evt.retryCt);
 if (evt.ckDone())
 {
 glib.trace(1,"CEventQueue retries exceeded! "+this.eventName(evt)+" calling "+(evt.timeoutHandler?evt.timeoutHandler.method:"no handler"));
this.eventList = this.eventList.slice(1);
with(evt.timeoutHandler)
{
obj[method].call(obj);
}
 }
else
{
var handled = evt.doIt();
if (typeof(handled) == 'undefined' || handled)
{
this.eventList = this.eventList.slice(1);
 glib.trace(3,"CEventQueue handled "+this.eventName(evt)+" ("+this.eventList.length+")");
if (this.eventList.length > 0)
interval = this.eventList[0].interval; 
}
}
setTimeout("gEvtQueue.doNext()",interval);
}
else
this.processing = false;
}
CEventQueue.prototype.dump = function()
{
glib.trace(3,"CEventQueue events "+this.eventList.length);
for (var i=0; i < this.eventList.length; i++)
glib.trace(3,this.eventName(this.eventList[i]));
}
CEventQueue.prototype.eventName = function(evt)
{
return evt.getName();
}
CEventQueue.prototype.clear = function()
{
for (var i=0; i < this.eventList.length; i++)
delete this.eventList[i];
this.eventList.length = 0;
}
if (!glib.isSet(gEvtQueue))
var gEvtQueue = new CEventQueue();
if (typeof(gMM_contentVersion) == 'undefined')
var gMM_contentVersion = 7;
if (typeof(gMaxFlashVersion) == 'undefined')
var gMaxFlashVersion = 12;
var gFlashPlayerVersion = 0;
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
if (isIE && isWin && !isOpera) 
{
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
document.write('Function VBGetSwfVer(i) \n');
document.write('on error resume next\n');
document.write('Dim swControl, swVersion\n');
document.write('swVersion = 0\n');
document.write('set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
document.write('if (IsObject(swControl)) then\n');
document.write('swVersion = swControl.GetVariable("$version")\n');
document.write('end if\n');
document.write('VBGetSwfVer = swVersion\n');
document.write('End Function\n');
document.write('</SCR' + 'IPT\> \n');
}
function JSGetSwfVer(i)
{
if (navigator.plugins != null && navigator.plugins.length > 0) 
{
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) 
{
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
descArray = flashDescription.split(" ");
tempArrayMajor = descArray[2].split(".");
versionMajor = tempArrayMajor[0];
if ( descArray[3] != "" ) 
tempArrayMinor = descArray[3].split("r");
else 
tempArrayMinor = descArray[4].split("r");
versionMinor = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
flashVer = parseFloat(versionMajor + "." + versionMinor);
} 
else 
flashVer = -1;
}
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) 
flashVer = 4;
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) 
flashVer = 3;
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) 
flashVer = 2;
else 
{
flashVer = -1;
}
return flashVer;
}
function ckFlashVer(reqMajorVer, reqMinorVer, versStr) 
{
var reqVer = parseFloat(reqMajorVer + "." + reqMinorVer);
if (versStr == -1)
return false;
else if (versStr != 0) 
{
if(isIE && isWin && !isOpera) 
{
var tempArray = versStr.split(" ");
var tempString = tempArray[1];
var versionArray = tempString .split(",");
var versionMajor = versionArray[0];
var versionMinor = versionArray[2];
var versionString = versionMajor + "." + versionMinor;
var versionNum = parseFloat(versionString);
}
else 
var versionNum = versStr;
if (!isNaN(reqVer))
return (versionNum >= reqVer ? true : false );
else
return versionNum; 
}
return (reqVer ? false : 0.0);
}
function DetectFlashVer(reqMajorVer, reqMinorVer) 
{
var reqVer = parseFloat(reqMajorVer + "." + reqMinorVer);
for (i=gMaxFlashVersion;i>0;i--) 
{ 
if (isIE && isWin && !isOpera) 
gFlashPlayerVersion = VBGetSwfVer(i);
else 
gFlashPlayerVersion = JSGetSwfVer(i);
if (gFlashPlayerVersion == -1)
return false;
else if (gFlashPlayerVersion != 0) 
return ckFlashVer(reqMajorVer, reqMinorVer, gFlashPlayerVersion);
}
return (reqVer ? false : 0.0);
}
if (typeof(gFlashOverride) != 'undefined')
{
overrideFlashDetect = function()
{
gFlashPlayerVersion = gFlashOverride;
gFlashVersionInstalled = (gFlashPlayerVersion > gMM_contentVersion);
};
}
else
overrideFlashDetect = function(){};
glib.doFlashCk = function()
{
gFlashVersionInstalled = DetectFlashVer(gMM_contentVersion, 0);
gMM_FlashCanPlay = (isIE && isWin) ? true : gFlashVersionInstalled;
overrideFlashDetect();
}
glib.doFlashCk();
var gFlashCkCB = null;
glib.flashCkCB = function(flashvers)
{
gFlashPlayerVersion = flashvers;
gFlashVersionInstalled = ckFlashVer(gMM_contentVersion, 0, flashvers);
overrideFlashDetect();
gMM_FlashCanPlay = (isIE && isWin) ? true : gFlashVersionInstalled;
if (glib.isSet(gFlashCkCB) && glib.isSet(gFlashCkCB.obj[gFlashCkCB.method]))
gFlashCkCB.obj[gFlashCkCB.method].call(gFlashCkCB.obj, flashvers);
}
function ckInstalledFlashVersion(moviePath, callback) 
{ 
gFlashCkCB = callback;
var htmlCode = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+document.location.protocol+'//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,49,0" width="1" height="1" id="flashck" align="middle">';
htmlCode += '<param name="allowScriptAccess" value="always" />';
htmlCode += '<param name="movie" value="'+moviePath+'/flashck.swf" />';
htmlCode += '<param name="quality" value="high" />';
htmlCode += '<param name="bgcolor" value="#ffffff" />';
htmlCode += '<param name="flashvars" value="callback=glib.flashCkCB&pagedomain='+document.location.hostname+'" />';
htmlCode += '<embed src="'+moviePath+'/flashck.swf" quality="high" bgcolor="#ffffff" width="1" height="1" NAME="flashck" flashvars="callback=glib.flashCkCB&pagedomain='+document.location.hostname+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="'+document.location.protocol+'//www.macromedia.com/go/getflashplayer" />';
htmlCode += '</object>';
var ckDiv = new CDiv("ckdiv", {l:-10,t:0,w:1,h:1}, glib.gClientInfo);
ckDiv.appendToBody(document, htmlCode);
return true;
}
function getNumericFlashVersion() 
{
var flashVersNum = parseFloat(gFlashPlayerVersion);
if (isNaN(flashVersNum))
{
var versStr = gFlashPlayerVersion.replace(/[a-z ]/ig, "");
var result = versStr.match(/[.]*(\d+.*)/);
if (result)
flashVersNum = parseFloat(result[1]);
}
return flashVersNum;
}
if (typeof(glib) == 'undefined')
alert("CFlashObj.js - requires lib.js");
if (typeof(CReflector) == 'undefined')
alert("CFlashObj.js - requires CReflector.js");
if (typeof(CEventQueue) == 'undefined')
alert("CFlashObj.js - requires CEventQueue.js");
function CFlashObj(id, src, width, height, reflectorid)
{
try
{
eval("var obj=gFO"+id+";");
if (typeof(obj) != 'undefined')
{
glib.trace(glib.DBUG_VERBOSE,"CFlashObj return prior instance "+id);
obj.setAttribute("width", width);
obj.setAttribute("height", height);
obj.setParm("src", src);
obj.setParm("movie", src);
return obj;
}
} catch (e)
{
}
eval("gFO"+id+"=this;");
this.attributes = {};
this.parms = {};
this.flashvars = {};
this.pendingVars = {};
this.version = '7,0,14,0';
if (typeof(reflectorid) == 'undefined' || reflectorid == null)
{
var val = Math.round(Math.random()*10000);
this.setFlashVar("reflectorid", "reflector"+val);
}
else
this.setFlashVar("reflectorid", reflectorid);
this.setAttribute("width", width);
this.setAttribute("height", height);
this.setAttribute("id", id);
this.setAttribute("name", id);
this.setParm("src", src);
this.setParm("movie", src);
this.setParm("quality", "high");
this.setParm("bgcolor", "#ffffff");
this.setParm("base", ".");
this.setParm("wmode", "window");
this.setParm("menu", "false");
this.setParm("allowScriptAccess", "always");
this.reflector = null; 
this.createReflector();
this.varsPending = false;
}
CFlashObj.prototype.reflectorURI = document.location.protocol+"//"+document.location.host+"/reflector.swf";
CFlashObj.prototype.setParm = function(parmName, value)
{
 this.parms[parmName] = value;
}
CFlashObj.prototype.setAttribute = function(attr, value)
{
 this.attributes[attr] = value;
}
CFlashObj.prototype.getAttribute = function(attr)
{
 return this.attributes[attr];
}
CFlashObj.prototype.setVersion = function(version)
{
 this.version = version;
}
CFlashObj.prototype.constructTag = function()
{
 var flashTag = new String();
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length)
{
flashTag += '<embed ';
for (var p in this.attributes)
flashTag += p + '="' + this.attributes[p] + '" ';
for (var p in this.parms)
flashTag += p + '="' + this.parms[p] + '" ';
flashTag += 'swLiveConnect="true" ';
flashTag += 'flashvars="'+this.getFlashVarQS()+'" ';
flashTag += 'pluginspage="'+document.location.protocol+'//www.macromedia.com/go/getflashplayer">';
flashTag += '</embed>';
}
 else
 {
 flashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
 flashTag += 'codebase="'+document.location.protocol+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';
 for (var p in this.attributes)
flashTag += p + '="' + this.attributes[p] + '" ';
 flashTag += '>';
for (var p in this.parms)
flashTag += '<param name="' + p + '" value="' + this.parms[p] + '" />';
 flashTag += '<param name="flashvars" value="'+this.getFlashVarQS()+'"/>';
 flashTag += '</object>';
 }
glib.trace(glib.DBUG_VERBOSE, "flashTag "+flashTag);
 return flashTag;
}
CFlashObj.prototype.createReflector = function()
{
if (this.reflector == null && reflectorNeeded(glib.gClientInfo))
{
var reflectorid = this.flashvars['reflectorid'];
this.reflector = new CReflector(reflectorid, CFlashObj.prototype.reflectorURI, glib.gDebugLevel, glib.gClientInfo);
glib.trace(glib.DBUG_VERBOSE, "createReflector "+this.getAttribute("id")+" reflectorid "+reflectorid+" this.reflector "+this.reflector);
}
return true;
}
CFlashObj.prototype.movieLoaded = function()
{
var ctrl = this.getCtrl();
var bLoaded = glib.isSet(ctrl);
if (bLoaded && (typeof(ctrl.PercentLoaded) != 'undefined'))
bLoaded = bLoaded && (ctrl.PercentLoaded() == 100);
if (bLoaded)
{
this.movieLoaded = function()
{
return true;
}
}
return bLoaded;
}
CFlashObj.prototype._reflectVar = function(varName, val)
{
if (varName == "cmd")
this.reflector.sendCommand(val);
else
this.reflector.setVariable(varName, val);
}
CFlashObj.prototype._reflectVars = function(varObj)
{
for (var v in varObj)
this._reflectVar(v, varObj[v]);
}
CFlashObj.prototype._setCtrlVar = function(varName, val)
{
var ctrl = this.getCtrl();
if ((typeof(ctrl) != 'undefined') && (ctrl != null))
ctrl.SetVariable(varName, val);
}
CFlashObj.prototype._setCtrlVars = function(ctrl, varObj)
{
if (glib.isSet(ctrl))
{
for (var v in varObj)
ctrl.SetVariable(v, varObj[v]);
}
}
CFlashObj.prototype.sendPendingVars = function()
{
if (this.movieLoaded() && this.varsPending)
{
this.varsPending = false;
if (this.reflector != null)
this._reflectVars(this.pendingVars);
else
this._setCtrlVars(this.getCtrl(), this.pendingVars);
this.pendingVars = {};
return true;
}
return !this.varsPending;
}
CFlashObj.prototype.setFlashVar = function(varName, value)
{
if (this.movieLoaded())
{
glib.trace(glib.DBUG_VERBOSE, "CFlashObj "+this.attributes["id"]+" SET setFlashVar "+varName+"="+value);
if (this.reflector != null)
this._reflectVar(varName, value);
else
this._setCtrlVar(varName, value);
}
else
{
var ctrl = this.getCtrl();
if ((typeof(ctrl) != 'undefined') && (ctrl != null))
{
glib.trace(glib.DBUG_VERBOSE, "CFlashObj "+this.attributes["id"]+" PENDING setFlashVar "+varName+"="+value+" PercentLoaded() "+ctrl.PercentLoaded());
if (!this.varsPending)
{
gEvtQueue.addEvent({obj:this,method:"sendPendingVars"});
this.varsPending = true;
}
 this.pendingVars[varName] = value;
 }
else
glib.trace(glib.DBUG_VERBOSE, "CFlashObj "+this.attributes["id"]+" STORE setFlashVar "+varName+"="+value);
}
 this.flashvars[varName] = value;
}
CFlashObj.prototype.getFlashVar = function(varName)
{
var flashObj = this.getCtrl();
var val = "";
if ((typeof(flashObj) != 'undefined') && (flashObj != null))
{
if (this.reflector == null)
{
try
{
val = flashObj.GetVariable(varName.toLowerCase());
} 
catch (e)
{
glib.trace(1,"ERROR: getFlashVar "+varName +" on "+this.attributes["id"]);
}
}
}
 if ((!val || val == "") && (typeof(this.flashvars[varName]) != 'undefined'))
 val = this.flashvars[varName];
glib.trace(glib.DBUG_VERBOSE, "CFlashObj "+this.attributes["id"]+" getFlashVar "+varName+" val "+val);
 return val;
}
CFlashObj.prototype.sendCommand = function(cmdQS)
{
this.setFlashVar("cmd", escape(cmdQS));
}
CFlashObj.prototype.getFlashVarQS = function()
{ 
var qs = "";
for (var key in this.flashvars) 
{
qs += '&'+key +'='+ this.flashvars[key];
}
qs = qs.substr(1);
return qs;
}
CFlashObj.prototype.dump = function(msg)
{
glib.dumpProps(this, msg);
}
CFlashObj.prototype.getCtrl = function()
{
return glib.elByID(this.attributes["id"]);
}

CFlashObj.prototype.callInternal = function(internalCall)
{
this.setFlashVar("invoke", internalCall);
}
var gClient = glib.gClientInfo;
var gImgCount = 0;
function imgLoaded() 
{
gImgCount--;
if (gImgCount <= 0)
gViewer.pageLoadComplete = true;
}
function reloadImages() 
{
gImgCount = document.images.length;
for(var x = 0, y; y = document.images[x]; x++)
{
y.onload = imgLoaded;
y.src = y.src; 
}
}
function getPageSize() 
{
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) 
{
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} 
else if( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
{
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} 
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
{
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
return {w:myWidth, h:myHeight};
}
var gViewer = null;
function ViewerParms()
{
}
ViewerParms.prototype.pageDomain = document.location.hostname;
ViewerParms.prototype.themeColor = "0xC8DAA9";
ViewerParms.prototype.uiStyle = "floating";
ViewerParms.prototype.gDebugLevel = 0;
ViewerParms.prototype.transparent = 0;
ViewerParms.prototype.showcaption = 1;
ViewerParms.prototype.onLoadHandler = "javascript:gViewer.onLoad";
ViewerParms.prototype.onMediaLoadedHandler = "javascript:gViewer.onMediaLoaded";
ViewerParms.prototype.openCompleteHandler = "javascript:gViewer.openComplete";
ViewerParms.prototype.closeCompleteHandler = "javascript:gViewer.closeComplete";
ViewerParms.prototype.onCloseHandler = "javascript:gViewer.onClose";
ViewerParms.prototype.onErrorHandler = "javascript:gViewer.onError";
ViewerParms.prototype.sizeHandler = "javascript:gViewer.onSize";
ViewerParms.prototype.adserverurl = gs_admissionServerURL;
ViewerParms.prototype.paypalurl = gVWRcfg['PayPalURL'];
ViewerParms.prototype.preview = 0;
ViewerParms.prototype.ipixdomain = gs_viewHost;
ViewerParms.prototype.localitycode = "en";
ViewerParms.prototype.bannerid = "";
ViewerParms.prototype.pageid = "";
ViewerParms.prototype.pageurl = escape(document.URL);
ViewerParms.prototype.eventlog = 1;
ViewerParms.prototype.trackinginfo = gs_uniqueID;
ViewerParms.prototype.showsellerinfo = 1;
ViewerParms.prototype.trackingredirecturl = "";
ViewerParms.prototype.vskin = gs_vskin;
var tmp = Math.round(Math.random()*10000);
ViewerParms.prototype.reflectorid = "vwrref"+tmp;
ViewerParms.prototype.buildFlashVars = function()
{
var flashvars = "";
for (prop in this)
{
if (prop != null && typeof(this[prop]) != 'function')
flashvars += prop.toLowerCase()+"="+this[prop];
flashvars += "&";
}
if (flashvars.lastIndexOf("&") == flashvars.length-1)
flashvars = flashvars.substring(0,flashvars.length-1);
return flashvars;
}
function Viewer(cfg)
{
this.cfg = cfg;
CFlashObj.prototype.reflectorURI = gs_protocol + this.cfg.servers.movieServer + "/admission/classified/viewer/swf/reflector.swf";
CReflector.prototype.timeout = this.cfg.reflectorInterval;
CReflector.prototype.maxRetries = this.cfg.reflectorRetries;
CReflector.prototype.doneDelay = this.cfg.reflectorDoneDelay;
if (glib.gClientInfo.bMac && glib.gClientInfo.bIE)
CReflector.prototype.doneDelay = this.cfg.reflectorDoneDelayMacIE;
}
Viewer.prototype.errorCode = 0;
Viewer.prototype.errorHandler = null;
Viewer.prototype.loadHandler = null;
Viewer.prototype.mediaLoadHandler = null;
Viewer.prototype.closeHandler = null;
Viewer.prototype.viewerDiv = null;
Viewer.prototype.reflectorDiv = null;
Viewer.prototype.pos = {l:0,t:0};
Viewer.prototype.size = {w:0,h:0};
Viewer.prototype.bOpen = false;
Viewer.prototype.parms = new ViewerParms();
Viewer.prototype.interval = 0;
Viewer.prototype.pendingCmd = null;
Viewer.prototype.imgOffset = {x:0,y:0};
Viewer.prototype.imgID = "viewerloc";
Viewer.prototype.pageLoadComplete = false;
Viewer.prototype.reflector = null;
Viewer.prototype.bReady = false;
Viewer.prototype.cfg = null;
Viewer.prototype.setProp = function(propName, value)
{
this[propName] = value;
}
Viewer.prototype.getProp = function(propName)
{
return this[propName];
}
Viewer.prototype.setParm = function(parmName, value)
{
this.parms[parmName] = value;
}
Viewer.prototype.getParm = function(parmName)
{
return this.parms[parmName];
}
Viewer.prototype.writeDivContent = function(content)
{ 
if (this.viewerDiv)
{
var w = this.parms.uiWidth;
var h = this.parms.uiHeight;
if (glib.gClientInfo.bIE5up && !glib.gClientInfo.bMac)
{
w = "100%";
h = "100%";
}
this.flashObj = new CFlashObj("viewer", gs_admissionURL+"classified/viewer/classified/viewer.swf", w, h, this.parms.reflectorid);
if ((glib.gClientInfo.bNS6 || glib.gClientInfo.bNS7 || glib.gClientInfo.bMOZ) && glib.gClientInfo.bWin)
this.parms.transparent = 0;
this.flashObj.setParm("wmode", (this.parms.transparent == 1) ? "transparent" : "window");
var parms = this.parms;
for (var prop in parms)
{
if (typeof(parms[prop]) != 'function')
this.flashObj.setFlashVar(prop.toLowerCase(), parms[prop]);
}
var content = this.flashObj.constructTag();
this.viewerDiv.writeContent(content);
}
}
Viewer.prototype.createMovie = function(moviePath, l, t, w, h, imgID, groupHandle, descriptionText)
{
this.imgID = imgID;
var movieSize = {w:w, h:h};
if (glib.gClientInfo.bIE5up && !glib.gClientInfo.bMac)
{
w = "100%";
h = "100%";
}
var testDiv = new CDiv("vwrDiv", {l:l,t:t,w:movieSize.w,h:movieSize.h}, gClient);
if (glib.gClientInfo.bIE5up && this.parms.transparent == 1)
testDiv.setStyleAttribute("background-color", "transparent");
testDiv.appendToBody(document);
this.viewerDiv = testDiv;
setTimeout("gViewer.writeDivContent()", 50);
}
Viewer.prototype.createInlineMovie = function(moviePath, imgID, groupHandle, descriptionText)
{
this.imgID = imgID;
var oData = glib.getObjBox(document.images[imgID]); 
if ((typeof(descriptionText) == 'undefined') || (descriptionText == null))
{
var descriptionText = this.textFromDiv(imgID+"txt");
this.setParm("description", escape(descriptionText));
}
this.createMovie(moviePath,oData.l,oData.t,oData.w,oData.h, imgID, groupHandle, descriptionText);
}
Viewer.prototype.textFromDiv = function(divID)
{
var descriptionText = "";
var txtDiv = null;
if (glib.gClientInfo.bIE5up)
{
txtDiv = document.getElementById(divID);
}
else if (glib.gClientInfo.bNS6 || glib.gClientInfo.bNS7 || glib.gClientInfo.bSaf || glib.gClientInfo.bMOZ)
{
txtDiv = document.getElementById(divID);
}
if (txtDiv != null && typeof(txtDiv) != 'undefined' && typeof(txtDiv.childNodes) != 'undefined' && txtDiv.childNodes.length > 0)
{
descriptionText = txtDiv.childNodes[0].nodeValue;
descriptionText = descriptionText.replace(/\r\n/g," ");
descriptionText = descriptionText.replace(/\r/g," ");
descriptionText = descriptionText.replace(/\n/g," ");
}
return descriptionText;
}
Viewer.prototype.getViewerCtrl = function()
{
return this.flashObj.getCtrl();
}
Viewer.prototype.sendCommand = function(cmdQS)
{ 
if (gViewer.bReady) 
{
if (glib.isSet(this.flashObj))
this.flashObj.sendCommand(cmdQS);
}
else
setTimeout("gViewer.sendCommand('"+cmdQS+"')",100); 
}
Viewer.prototype.doPendingCmd = function()
{
if (this.pendingCmd != null)
{
this.sendCommand(this.pendingCmd);
this.pendingCmd = null;
}
}
Viewer.prototype.isFloatStyle = function()
{
return (this.parms.uiStyle == "floating");
}
Viewer.prototype.calcPos = function(imgID)
{
var oData = glib.getObjBox(document.images[imgID]); 
this.pos.l = oData.l + this.imgOffset.x;
this.pos.t = oData.t-1 + this.imgOffset.y;
}
Viewer.prototype.privateLoadMedia = function(cmdStr, imgID, descriptionText)
{
if (this.viewerDiv == null)
this.loadViewer();
this.imgID = imgID;
this.calcPos(imgID);
if ((typeof(descriptionText) != 'undefined') && (descriptionText != null))
{
cmdStr += "&description="+escape(descriptionText);
}
else 
{
var descriptionText = this.textFromDiv(imgID+"txt");
cmdStr += "&description="+escape(descriptionText);
}
if (!this.bOpen)
{
this.moveTo(this.pos.l, this.pos.t);
cmdStr += "&displayAction=open";
}
cmdStr += "&adserverurl="+this.parms["adserverurl"];
if (this.isFloatStyle() && this.bOpen)
{
this.pendingCmd = cmdStr;
cmdStr = "action=closeAndNotify";
}
setTimeout("gViewer.sendCommand('"+cmdStr+"')",100);
}
Viewer.prototype.loadMedia = function(mediasetPath, imgID, descriptionText)
{
var cmdStr = "action=viewMediaset&mediasetPath="+mediasetPath;
this.privateLoadMedia(cmdStr, imgID, descriptionText); 
}
Viewer.prototype.viewAd = function(acct, adID, imgID, descriptionText)
{
var cmdStr = "action=viewAd&adid="+adID+"&account="+acct;
this.privateLoadMedia(cmdStr, imgID, descriptionText); 
}
Viewer.prototype.close = function()
{
this.sendCommand("action=close");
}
Viewer.prototype.hide = function()
{
if (this.viewerDiv)
this.viewerDiv.moveTo(-1024, -1024);
}
Viewer.prototype.onError = function(errorCode)
{
this.setProp("errorCode",errorCode);
if (this.errorHandler)
{
eval(this.errorHandler+"('"+errorCode+"')");
}
}
Viewer.prototype.onLoad = function()
{
this.bReady = true;
if (this.loadHandler)
eval(this.loadHandler+"()");
if (this.pageLoadComplete == false)
setTimeout("reloadImages()",200);
}
Viewer.prototype.doOpenViewer = function()
{
this.sendCommand("action=open");
}
Viewer.prototype.onMediaLoaded = function()
{
if (this.mediaLoadHandler)
eval(this.mediaLoadHandler+"()");
if (this.pageLoadComplete == false)
setTimeout("reloadImages()",200);
}
Viewer.prototype.onClose = function()
{
this.bOpen = false;
this.hide();
if (this.closeHandler)
eval(this.closeHandler+"()");
if (this.pageLoadComplete == false)
setTimeout("reloadImages()",200);
}
Viewer.prototype.openComplete = function()
{
this.bOpen = true;
}
Viewer.prototype.closeComplete = function()
{
this.moveTo(this.pos.l, this.pos.t);
this.bOpen = false;
setTimeout("gViewer.doPendingCmd()",100);
}
Viewer.prototype.loadViewer = function()
{
if (this.viewerDiv == null)
{
if (bLoadEmbedded)
{
gViewer.parms['cmd'] = "open";
gViewer.createInlineMovie(gs_admissionURL+"classified/viewer/classified/viewer.swf", "viewerloc", this.parms['mediasetPath'], this.parms['description']);
}
else
{
var l = -1000;
var t = l;
gViewer.createMovie(gs_admissionURL+"classified/viewer/classified/viewer.swf", l, t,this.parms['uiWidth'],this.parms['uiHeight']);
}
}
}
Viewer.prototype.onPageLoad = function()
{
this.pageLoadComplete = true;
if (this.viewerDiv == null)
setTimeout("gViewer.loadViewer()",500);
}
Viewer.prototype.onResize = function()
{
if (this.bOpen)
{
this.calcPos(this.imgID);
if (this.viewerDiv)
this.viewerDiv.moveTo(this.pos.l, this.pos.t);
}
}
Viewer.prototype.isReady = function()
{
var ctrl = this.getViewerCtrl();
return (this.bReady && this.viewerDiv && ctrl && ((typeof(ctrl.SetVariable) != 'undefined') || (typeof(ctrl.movie) != 'undefined') || (typeof(ctrl.src) != 'undefined')));
}
Viewer.prototype.moveTo = function(l, t)
{
if (this.viewerDiv)
{
this.viewerDiv.moveTo(l, t);
if (t < document.body.scrollTop)
window.scrollTo(l, t);
else 
{
var pageSize = getPageSize();
var bScrollIt = false;
if (t + this.parms['uiHeight'] > document.body.scrollTop + pageSize.h)
{
t = t + this.parms['uiHeight'] - pageSize.h;
bScrollIt = true;
}
if (l + this.parms['uiWidth'] > document.body.scrollLeft + pageSize.w)
{
l = l + this.parms['uiWidth'] - pageSize.w;
bScrollIt = true;
}
if (bScrollIt)
window.setTimeout(function() {window.scrollTo(l, t);}, 100);
}
}
}
if (document.all && !document.getElementById) 
{
resizeDOMObj = function(obj, w, h)
{
obj.style.pixelWidth = w;
obj.style.pixelHeight = h;
}
}
else
{
resizeDOMObj = function(obj, w, h)
{
obj.style.width = w+"px";
obj.style.height = h+"px";
}
}
Viewer.prototype.applySize = function()
{
var ctrl = this.getViewerCtrl();
if (ctrl)
{
if (bLoadEmbedded == true)
{
var placeholderImg = document.images[this.imgID]; 
resizeDOMObj(placeholderImg, this.size.w, this.size.h);
}
this.viewerDiv.resize(this.size.w, this.size.h);
resizeDOMObj(ctrl, this.size.w, this.size.h);
}
}
Viewer.prototype.onSize = function(w,h)
{
this.size.w = w;
this.size.h = h;
gViewer.applySize();
}
gViewer = new Viewer(gVWRcfg);
Viewer.prototype.setWindowHandlers = function()
{
var wO = window.onload;
if(wO)
{
var OL = window.onload.toString();
if (OL.indexOf("gViewer.onPageLoad") == -1)
{
OL = "gViewer.onPageLoad();\r"+OL.substring(OL.indexOf("{")+1,OL.lastIndexOf("}"))+"\r;";
window.onload = new Function(OL);
}
}
else
{
window.onload = new Function("gViewer.onPageLoad();");
}
var saveOnResize = window.onresize;
if(saveOnResize)
{
var newOnResize = window.onresize.toString();
if (newOnResize.indexOf("gViewer.onResize") == -1)
{
newOnResize = "gViewer.onResize();\r"+newOnResize.substring(newOnResize.indexOf("{")+1,newOnResize.lastIndexOf("}"))+"\r;";
window.onresize = new Function(newOnResize);
}
}
else
{
window.onresize = new Function("gViewer.onResize();");
}
}
Viewer.prototype.loadQSParms = function(qs) 
{ 
var qsObj = glib.parseQueryString(qs);
if (glib.gDebugLevel >= glib.DBUG_VERBOSE && qsParms)
glib.dumpProps(qsObj,"QS PARMS:");
for(var p in qsObj)
gViewer.parms[p]= qsObj[p];
}
function duringPageLoad()
{
bLoadEmbedded = false;
gViewer.parms['uiWidth'] = 1;
gViewer.parms['uiHeight'] = 1;
gViewer.parms['adserverurl'] = gs_admissionServerURL;
if(document.images['viewerloc'] && document.images['viewerloc'].src.indexOf("?")>-1)
{
var parms = glib.parseQueryString(document.images['viewerloc'].src);
for(a in parms)
{
gViewer.parms[a] = parms[a];
}
bLoadEmbedded = true;
}
if (typeof(qsParms) != 'undefined')
{
if (glib.gDebugLevel >= glib.DBUG_VERBOSE && qsParms)
glib.dumpProps(qsParms,"JS PARMS:");
for(var p in qsParms)
gViewer.parms[p]= qsParms[p];
gViewer.parms.gdebuglevel = gDebugLevel;
gViewer.parms.vskin = gs_vskin; 
}
gViewer.loadQSParms(document.location.search);
gViewer.setWindowHandlers();
}
glib.setDebugLevel(0);
var qsParms = new Object();
qsParms['localitycode'] = 'en';
qsParms['vwStyle'] = 'classified';
qsParms['uiStyle'] = 'floating';
qsParms['slideShowState'] = '1';
qsParms['slideShowDelay'] = '2000';
qsParms['pa'] = 'renogazette';
duringPageLoad();
