function FlashProxy(_1,_2,_3,_4){
if(_3.indexOf(".swf")==-1){
_3+="FlashJavascriptGatewayFs/JavaScriptFlashGateway.swf";
}
FlashProxy.fpmap[_1]=this;
this.uid=_1;
this.proxySwfName=_3;
this.callbackScope=_4;
this.flashSerializer=new FlashSerializer(false);
this.q=new Array();
if(navigator.appName.indexOf("Internet Explorer")!=-1&&navigator.platform.indexOf("Win")!=-1&&navigator.userAgent.indexOf("Opera")==-1){
setUpVBCallback(_2);
}
}
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.");
}
this.q.push(arguments);
if(this.q.length==1){
this._execute(arguments);
}
};
FlashProxy.prototype._execute=function(_5){
var ft=new FlashTag(this.proxySwfName,1,1,"6,0,65,0");
ft.addFlashVar("lcId",this.uid);
ft.addFlashVar("functionName",_5[0]);
if(_5.length>1){
var _7=new Array();
for(var i=1;i<_5.length;++i){
_7.push(_5[i]);
}
ft.addFlashVars(this.flashSerializer.serialize(_7));
}
var _9="_flash_proxy_"+this.uid;
if(!document.getElementById(_9)){
var _a=document.createElement("div");
_a.id=_9;
document.body.appendChild(_a);
}
var _b=document.getElementById(_9);
_b.innerHTML=ft.toString();
};
FlashProxy.callJS=function(_c,_d){
var _e=eval(_d);
var _f=FlashProxy.fpmap[_e.shift()].callbackScope;
if(_f&&(_c.indexOf(".")<0)){
var _10=_f[_c];
_10.apply(_f,_e);
}else{
var _11=eval(_c);
_11.apply(_11,_e);
}
};
FlashProxy.callComplete=function(uid){
var fp=FlashProxy.fpmap[uid];
if(fp!=null){
fp.q.shift();
if(fp.q.length>0){
fp._execute(fp.q[0]);
}
}
};
FlashProxy.fpmap=new Object();

function FlashSerializer(_1){
this.useCdata=_1;
}
FlashSerializer.prototype.serialize=function(_2){
var qs=new String();
for(var i=0;i<_2.length;++i){
switch(typeof (_2[i])){
case "undefined":
qs+="t"+(i)+"=undf";
break;
case "string":
qs+="t"+(i)+"=str&d"+(i)+"="+encodeURIComponent(_2[i]);
break;
case "number":
qs+="t"+(i)+"=num&d"+(i)+"="+escape(_2[i]);
break;
case "boolean":
qs+="t"+(i)+"=bool&d"+(i)+"="+escape(_2[i]);
break;
case "object":
if(_2[i]==null){
qs+="t"+(i)+"=null";
}else{
if(_2[i] instanceof Date){
qs+="t"+(i)+"=date&d"+(i)+"="+escape(_2[i].getTime());
}else{
try{
qs+="t"+(i)+"=xser&d"+(i)+"="+encodeURIComponent(this._serializeXML(_2[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!=(_2.length-1)){
qs+="&";
}
}
return qs;
};
FlashSerializer.prototype._serializeXML=function(_5){
var _6=new Object();
_6.xml="<fp>";
try{
this._serializeNode(_5,_6,null);
}
catch(exception){
if(exception.message){
throw new Exception("FlashSerializationException","Unable to serialize object because: "+exception.message);
}
throw exception;
}
_6.xml+="</fp>";
return _6.xml;
};
FlashSerializer.prototype._serializeNode=function(_7,_8,_9){
switch(typeof (_7)){
case "undefined":
_8.xml+="<undf"+this._addName(_9)+"/>";
break;
case "string":
_8.xml+="<str"+this._addName(_9)+">"+this._escapeXml(_7)+"</str>";
break;
case "number":
_8.xml+="<num"+this._addName(_9)+">"+_7+"</num>";
break;
case "boolean":
_8.xml+="<bool"+this._addName(_9)+" val=\""+_7+"\"/>";
break;
case "object":
if(_7==null){
_8.xml+="<null"+this._addName(_9)+"/>";
}else{
if(_7 instanceof Date){
_8.xml+="<date"+this._addName(_9)+">"+_7.getTime()+"</date>";
}else{
if(_7 instanceof Array){
_8.xml+="<array"+this._addName(_9)+">";
for(var i=0;i<_7.length;++i){
this._serializeNode(_7[i],_8,null);
}
_8.xml+="</array>";
}else{
_8.xml+="<obj"+this._addName(_9)+">";
for(var n in _7){
if(typeof (_7[n])=="function"){
continue;
}
this._serializeNode(_7[n],_8,n);
}
_8.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(_c){
if(_c!=null){
return " name=\""+_c+"\"";
}
return "";
};
FlashSerializer.prototype._escapeXml=function(_d){
if(this.useCdata){
return "<![CDATA["+_d+"]]>";
}else{
return _d.replace(/&/g,"&amp;").replace(/</g,"&lt;");
}
};

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;
};


