if(typeof(sina)!="object"){var sina=new Object();}sina.$=function(objId){if(!objId){throw new Error("sina.$(String objId)²ÎÊý±ØÐë");}if(document.getElementById){return eval('document.getElementById("'+objId+'")');}else if(document.layers){return eval("document.layers['"+objId+"']");}else{return eval('document.all.'+objId);}}
sinaFlash=function(swf,id,w,h,ver,c,useExpressInstall,quality,xiRedirectUrl,redirectUrl,detectKey){if(!document.createElement||!document.getElementById){return;}this.id=id?id:"";this.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";this.codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+(ver?ver:"7")+",0,0,0";this.width=w;this.height=h;this.movie=swf;this.quality=quality?quality:"high";this.src=this.movie;this.pluginspage="http://www.macromedia.com/go/getflashplayer";this.type="application/x-shockwave-flash";this.useExpressInstall=useExpressInstall?useExpressInstall:null;this.xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.redirectUrl=redirectUrl?redirectUrl:null;this.detectKey=detectKey?detectKey:null;this.escapeIs=false;this.objAttrs=new Object();this.params=new Object();this.flashVars=new Array();this.flashVarsStr="";this.embedAttrs=new Object();this.forSetAttribute("id",this.id);this.objAttrs["classid"]=this.classid;this.forSetAttribute("codebase",this.codebase);this.forSetAttribute("width",this.width);this.forSetAttribute("height",this.height);this.forSetAttribute("movie",this.movie);this.forSetAttribute("quality",this.quality);this.forSetAttribute("pluginspage",this.pluginspage);this.forSetAttribute("type",this.type);}
sinaFlash.prototype={getFlashHtml:function(){var str='<object ';for(var i in this.objAttrs){str+=i+'="'+this.objAttrs[i]+'" ';}str+='>';for(var i in this.params){str+='<param name="'+i+'" value="'+this.params[i]+'" /> ';}if(this.flashVarsStr!=""){str+='<param name="FlashVars" value="'+this.flashVarsStr+'" /> ';}str+='<embed ';for(var i in this.embedAttrs){str+=i+'="'+this.embedAttrs[i]+'" ';}str+=' ></embed></object>';return str;},forSetAttribute:function(name,value){name=name.toLowerCase();switch(name){case "classid":break;case "pluginspage":this.embedAttrs["pluginspage"]=value;break;case "src":this.embedAttrs["src"]=value;this.params["movie"]=value;break;case "movie":this.params["movie"]=value;this.embedAttrs["src"]=value;break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":this.embedAttrs["type"]=value;break;case "codebase":this.objAttrs["codebase"]=value;break;case "width":this.objAttrs["width"]=value;this.embedAttrs["width"]=value;break;case "height":this.objAttrs["height"]=value;this.embedAttrs["height"]=value;break;case "align":this.objAttrs["align"]=value;this.embedAttrs["align"]=value;break;case "vspace":this.objAttrs["vspace"]=value;this.embedAttrs["vspace"]=value;break;case "hspace":this.objAttrs["hspace"]=value;this.embedAttrs["hspace"]=value;break;case "class":this.objAttrs["class"]=value;this.embedAttrs["class"]=value;break;case "title":this.objAttrs["title"]=value;break;case "accesskey":this.objAttrs["accesskey"]=value;break;case "name":this.objAttrs["name"]=value;this.embedAttrs["name"]=value;break;case "id":this.objAttrs["id"]=value;this.embedAttrs["name"]=value;break;case "tabindex":this.objAttrs["tabindex"]=value;break;default:this.params[name]=this.embedAttrs[name]=value;}},forGetAttribute:function(name){name=name.toLowerCase();if(this.objAttrs[name]!=undefined){return this.objAttrs[name];}else if(this.embedAttrs[name]!=undefined){return this.embedAttrs[name];}else if(this.embedAttrs!=undefined){return this.embedAttrs[name];}else{return null;}},setAttribute:function(name,value){this.forSetAttribute(name,value);},getAttribute:function(name){return this.forGetAttribute(name);},addVariable:function(name,value){if(this.escapeIs){name=escape(name);value=escape(value);}if(this.flashVarsStr==""){this.flashVarsStr=name+"="+value;}else{this.flashVarsStr+="&"+name+"="+value;}this.embedAttrs["FlashVars"]=this.flashVarsStr;},getVariable:function(name){var locString=this.flashVarsStr;if(this.escapeIs){name=escape(name);}var reg=new RegExp(name+"=([^\\&]*)(\\&?)","i").exec(locString);if(this.escapeIs){return unescape(RegExp.$1);}return RegExp.$1;},addParam:function(name,value){this.forSetAttribute(name,value);},getParam:function(){return this.forGetAttribute(name);},write:function(ID){sina.$(ID).innerHTML=this.getFlashHtml();}}