function Exception(_1,_2){
if(_1){
this.name=_1;
}
if(_2){
this.message=_2;
}
};
Exception.prototype.setName=function(_3){
this.name=_3;
};
Exception.prototype.getName=function(){
return this.name;
};
Exception.prototype.setMessage=function(_4){
this.message=_4;
};
Exception.prototype.getMessage=function(){
return this.message;
};
function FlashTag(_5,_6,_7){
this.src=_5;
this.width=_6;
this.height=_7;
this.version="7,0,14,0";
this.id=null;
this.bgcolor="ffffff";
this.flashVars=null;
};
FlashTag.prototype.setMediaId=function(id){
this.setFlashvars("mediaid="+id);
};
FlashTag.prototype.setVersion=function(v){
this.version=v;
};
FlashTag.prototype.setId=function(id){
this.id=id;
};
FlashTag.prototype.setBgcolor=function(_b){
this.bgcolor=_b;
};
FlashTag.prototype.setFlashvars=function(fv){
this.flashVars=fv;
};
FlashTag.prototype.toString=function(){
var ie=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
var _e=new String();
if(ie){
_e+="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
if(this.id!=null){
_e+="id=\""+this.id+"\" ";
}
_e+="codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+this.version+"\" ";
_e+="width=\""+this.width+"\" ";
_e+="height=\""+this.height+"\">";
_e+="<param name=\"movie\" value=\""+this.src+"\"/>";
_e+="<param name=\"quality\" value=\"high\"/>";
if(this.width>1){
_e+="<param name=\"wmode\" value=\"transparent\"/>";
}
_e+="<param name=\"bgcolor\" value=\"#"+this.bgcolor+"\"/>";
_e+="<param name=\"allowScriptAccess\" value=\"always\"/>";
if(this.flashVars!=null){
_e+="<param name=\"flashvars\" value=\""+this.flashVars+"\"/>";
}
_e+="</object>";
}else{
_e+="<embed src=\""+this.src+"\" ";
_e+="quality=\"high\" ";
if(this.width>1){
_e+="wmode=\"transparent\" ";
}
_e+="bgcolor=\"#"+this.bgcolor+"\" ";
_e+="width=\""+this.width+"\" ";
_e+="height=\""+this.height+"\" ";
_e+="allowScriptAccess=\"always\" ";
_e+="cache=\"true\" ";
_e+="type=\"application/x-shockwave-flash\" ";
if(this.flashVars!=null){
_e+="flashvars=\""+this.flashVars+"\" ";
}
if(this.id!=null){
_e+="name=\""+this.id+"\" ";
}
_e+="pluginspage=\"http://www.macromedia.com/go/getflashplayer\">";
_e+="</embed>";
}
return _e;
};
FlashTag.prototype.write=function(_f){
_f.write(this.toString());
};
function FlashSerializer(_10){
this.useCdata=_10;
};
FlashSerializer.prototype.serialize=function(_11){
var qs=new String();
for(var i=0;i<_11.length;++i){
switch(typeof (_11[i])){
case "undefined":
qs+="t"+(i)+"=undf";
break;
case "string":
qs+="t"+(i)+"=str&d"+(i)+"="+escape(_11[i]);
break;
case "number":
qs+="t"+(i)+"=num&d"+(i)+"="+escape(_11[i]);
break;
case "boolean":
qs+="t"+(i)+"=bool&d"+(i)+"="+escape(_11[i]);
break;
case "object":
if(_11[i]==null){
qs+="t"+(i)+"=null";
}else{
if(_11[i] instanceof Date){
qs+="t"+(i)+"=date&d"+(i)+"="+escape(_11[i].getTime());
}else{
try{
qs+="t"+(i)+"=xser&d"+(i)+"="+escape(this._serializeXML(_11[i]));
}
catch(exception){
throw new Exception("FlashSerializationException","The following error occurred during complex object serialization: "+exception.getMessage());
}
}
}
break;
default:
throw new Exception("FlashSerializationException","You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");
}
if(i!=(_11.length-1)){
qs+="&";
}
}
return qs;
};
FlashSerializer.prototype._serializeXML=function(obj){
var doc=new Object();
doc.xml="<fp>";
this._serializeNode(obj,doc,null);
doc.xml+="</fp>";
return doc.xml;
};
FlashSerializer.prototype._serializeNode=function(obj,doc,_18){
switch(typeof (obj)){
case "undefined":
doc.xml+="<undf"+this._addName(_18)+"/>";
break;
case "string":
doc.xml+="<str"+this._addName(_18)+">"+this._escapeXml(obj)+"</str>";
break;
case "number":
doc.xml+="<num"+this._addName(_18)+">"+obj+"</num>";
break;
case "boolean":
doc.xml+="<bool"+this._addName(_18)+" val=\""+obj+"\"/>";
break;
case "object":
if(obj==null){
doc.xml+="<null"+this._addName(_18)+"/>";
}else{
if(obj instanceof Date){
doc.xml+="<date"+this._addName(_18)+">"+obj.getTime()+"</date>";
}else{
if(obj instanceof Array){
doc.xml+="<array"+this._addName(_18)+">";
for(var i=0;i<obj.length;++i){
this._serializeNode(obj[i],doc,null);
}
doc.xml+="</array>";
}else{
doc.xml+="<obj"+this._addName(_18)+">";
for(var n in obj){
if(typeof (obj[n])=="function"){
continue;
}
this._serializeNode(obj[n],doc,n);
}
doc.xml+="</obj>";
}
}
}
break;
default:
throw new Exception("FlashSerializationException","You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");
break;
}
};
FlashSerializer.prototype._addName=function(_1b){
if(_1b!=null){
return " name=\""+_1b+"\"";
}
return "";
};
FlashSerializer.prototype._escapeXml=function(str){
if(this.useCdata){
return "<![CDATA["+str+"]]>";
}else{
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;");
}
};
function FlashProxy(uid,_1e){
this.uid=uid;
this.proxySwfName=_1e;
this.flashSerializer=new FlashSerializer(false);
};
FlashProxy.prototype.call=function(){
if(arguments.length==0){
throw new Exception("Flash Proxy Exception","The first argument should be the function name followed by any number of additional arguments.");
}
var qs="lcId="+escape(this.uid)+"&functionName="+escape(arguments[0]);
if(arguments.length>1){
var _20=new Array();
for(var i=1;i<arguments.length;++i){
_20.push(arguments[i]);
}
qs+=("&"+this.flashSerializer.serialize(_20));
}
var _22="_flash_proxy_"+this.uid;
if(!document.getElementById(_22)){
var _23=document.createElement("div");
_23.id=_22;
document.body.appendChild(_23);
}
var _24=document.getElementById(_22);
var ft=new FlashTag(this.proxySwfName,1,1);
ft.setVersion("6,0,65,0");
ft.setFlashvars(qs);
_24.innerHTML=ft.toString();
};
FlashProxy.callJS=function(){
var _26=eval(arguments[0]);
var _27=new Array();
for(var i=1;i<arguments.length;++i){
_27.push(arguments[i]);
}
_26.apply(_26,_27);
};

