function Exception(b,a){if(b)this.name=b;if(a)this.message=a}Exception.prototype.setName=function(b){this.name=b};Exception.prototype.getName=function(){return this.name};Exception.prototype.setMessage=function(b){this.message=b};Exception.prototype.getMessage=function(){return this.message};function FlashTag(b,a,c){this.src=b;this.width=a;this.height=c;this.version="7,0,14,0";this.id=null;this.bgcolor="ffffff";this.flashVars=null;this.genericParam={}}
FlashTag.prototype.setVersion=function(b){this.version=b};FlashTag.prototype.setId=function(b){this.id=b};FlashTag.prototype.setBgcolor=function(b){this.bgcolor=b};FlashTag.prototype.setFlashvars=function(b){this.flashVars=b};FlashTag.prototype.setWmode=function(b){if(b!="window"&&b!="opaque"&&b!="transparent")throw new Exception("UnsupportedValueException",'Supported values are "window", "opaque", and "transparent".');this.genericParam.wmode=b};
FlashTag.prototype.toString=function(){var b=navigator.appName.indexOf("Microsoft")!=-1?1:0,a=new String;if(b){a+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';if(this.id!=null)a+='id="'+this.id+'" ';a+='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';a+='width="'+this.width+'" ';a+='height="'+this.height+'">';a+='<param name="movie" value="'+this.src+'"/>';a+='<param name="quality" value="high"/>';a+='<param name="bgcolor" value="#'+
this.bgcolor+'"/>';for(var c in this.genericParam)if(this.genericParam[c]!=null)a+='<param name="'+c+'" value="'+this.genericParam[c]+'"/>';if(this.flashVars!=null)a+='<param name="flashvars" value="'+this.flashVars+'"/>';a+="</object>"}else{a+='<embed src="'+this.src+'" ';a+='quality="high" ';a+='bgcolor="#'+this.bgcolor+'" ';a+='width="'+this.width+'" ';a+='height="'+this.height+'" ';a+='type="application/x-shockwave-flash" ';a+='WMode="opaque" ';a+='allowScriptAccess="sameDomain" ';if(this.flashVars!=
null)a+='flashvars="'+this.flashVars+'" ';if(this.id!=null)a+='name="'+this.id+'" ';a+='pluginspage="http://www.macromedia.com/go/getflashplayer">';a+="</embed>"}return a};FlashTag.prototype.write=function(b){b.write(this.toString())};function FlashSerializer(b){this.useCdata=b}
FlashSerializer.prototype.serialize=function(b){for(var a=new String,c=0;c<b.length;++c){switch(typeof b[c]){case "undefined":a+="t"+c+"=undf";break;case "string":a+="t"+c+"=str&d"+c+"="+escape(b[c]);break;case "number":a+="t"+c+"=num&d"+c+"="+escape(b[c]);break;case "boolean":a+="t"+c+"=bool&d"+c+"="+escape(b[c]);break;case "object":if(b[c]==null)a+="t"+c+"=null";else if(b[c]instanceof Date)a+="t"+c+"=date&d"+c+"="+escape(b[c].getTime());else try{a+="t"+c+"=xser&d"+c+"="+escape(this._serializeXML(b[c]))}catch(d){throw new Exception("FlashSerializationException",
"The following error occurred during complex object serialization: "+d.getMessage());}break;default:throw new Exception("FlashSerializationException","You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");}if(c!=b.length-1)a+="&"}return a};FlashSerializer.prototype._serializeXML=function(b){var a={};a.xml="<fp>";this._serializeNode(b,a,null);a.xml+="</fp>";return a.xml};
FlashSerializer.prototype._serializeNode=function(b,a,c){switch(typeof b){case "undefined":a.xml+="<undf"+this._addName(c)+"/>";break;case "string":a.xml+="<str"+this._addName(c)+">"+this._escapeXml(b)+"</str>";break;case "number":a.xml+="<num"+this._addName(c)+">"+b+"</num>";break;case "boolean":a.xml+="<bool"+this._addName(c)+' val="'+b+'"/>';break;case "object":if(b==null)a.xml+="<null"+this._addName(c)+"/>";else if(b instanceof Date)a.xml+="<date"+this._addName(c)+">"+b.getTime()+"</date>";else if(b instanceof
Array){a.xml+="<array"+this._addName(c)+">";for(c=0;c<b.length;++c)this._serializeNode(b[c],a,null);a.xml+="</array>"}else{a.xml+="<obj"+this._addName(c)+">";for(var d in b)typeof b[d]!="function"&&this._serializeNode(b[d],a,d);a.xml+="</obj>"}break;default:throw new Exception("FlashSerializationException","You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");}};FlashSerializer.prototype._addName=function(b){if(b!=null)return' name="'+b+'"';return""};
FlashSerializer.prototype._escapeXml=function(b){return this.useCdata?"<![CDATA["+b+"]]\>":b.replace(/&/g,"&amp;").replace(/</g,"&lt;")};function FlashProxy(b,a){this.uid=b;this.proxySwfName=a;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 b="lcId="+escape(this.uid)+"&functionName="+escape(arguments[0]);if(arguments.length>1){for(var a=[],c=1;c<arguments.length;++c)a.push(arguments[c]);b+="&"+this.flashSerializer.serialize(a)}a="_flash_proxy_"+this.uid;if(!document.getElementById(a)){c=document.createElement("div");c.id=a;document.body.appendChild(c)}a=
document.getElementById(a);c=new FlashTag(this.proxySwfName,1,1);c.setVersion("6,0,65,0");c.setFlashvars(b);a.innerHTML=c.toString()};FlashProxy.callJS=function(){for(var b=eval(arguments[0]),a=[],c=1;c<arguments.length;++c)a.push(arguments[c]);manufac!="Netscape"&&b.apply(b,a)};
