HWR={loaded:false};HWR.load=function(G,E,D){HWR.tid=E;var F=D?("serviceUrl="+D):"";var A={cid:G,fid:G+"_flash",width:410,height:290,movie:"http://www.baidu.com/swf/laonian.swf",align:"middle",salign:"lt",wmode:"window",scale:"noscale",allowscriptaccess:"always",allownetworking:"all",flashVars:F};var C=new SWFObject(A);HWR.so=C;var B;C.onLoadInit=function(H){HWR.ao=B=C.asObjects.handWrite;B.onCloseClick=function(I){HWR._onCloseClick()};B.onCharSelect=function(I){HWR._onCharSelect(I["char"])}};C.load()};HWR._onCharSelect=function(C){var A=document.getElementById(HWR.tid);A.value+=C;var B=document.search.q.value;document.search.q.focus();document.search.q.value=B};HWR._onCloseClick=function(){if(HWR.onCloseClick){HWR.onCloseClick()}};HWR.onCloseClick=null;HWR.clear=function(){HWR.ao.call("clear",[])};SWFObject=function(A){this.cfg=A;this.swfId=A.fid;this.asObjects={};this.onLoadInit=null;SWFObject.instances[this.swfId]=this};SWFObject.prototype.load=function(){Utils.f(this.cfg)};SWFObject.prototype.getASObject=function(A){return this.asObjects[A.asoId]};SWFObject.prototype.registerASObject=function(C){var B=C.asoId;var A=this.swfId;return this.asObjects[B]=new ASObject({asoId:B,swfId:A})};SWFObject.prototype.getASObjectProperty=function(A){if(this.swf==null){this.swf=Utils.g(this.swfId)}return this.swf.getASObjectProperty(A)};SWFObject.prototype.setASObjectProperty=function(A){if(this.swf==null){this.swf=Utils.g(this.swfId)}this.swf.setASObjectProperty(A)};SWFObject.prototype.callASObjectMethod=function(A){if(this.swf==null){this.swf=Utils.g(this.swfId)}return this.swf.callASObjectMethod(A)};SWFObject.instances={};SWFObject.getSWFObject=function(A){return SWFObject.instances[A.swfId]};SWFObject.dispatchASObjectEvent=function(E){var D=E.swfId;var C=E.asoId;var F=E.type;var G=E.data;var A=SWFObject.getSWFObject({swfId:D});var B=(C==undefined)?A:A.getASObject({asoId:C});var H="on"+F.substr(0,1).toUpperCase()+F.substr(1);if(B[H]!=null){B[H](G)}};SWFObject.registerASObject=function(D){var C=D.swfId;var B=D.asoId;var A=SWFObject.getSWFObject(D);A.registerASObject(D)};ASObject=function(A){this.swfId=A.swfId;this.asoId=A.asoId;this.swfObject=SWFObject.getSWFObject(A);if(ASObject.instances[this.swfId]==null){ASObject.instances[this.swfId]={}}ASObject.instances[this.swfId][this.asoId]=this};ASObject.prototype.get=function(A){return this.swfObject.getASObjectProperty({asoId:this.asoId,property:A})};ASObject.prototype.set=function(B,A){this.swfObject.setASObjectProperty({asoId:this.asoId,property:B,value:A})};ASObject.prototype.call=function(B,A){return this.swfObject.callASObjectMethod({asoId:this.asoId,method:B,parameters:A})};ASObject.instances={};Utils={g:function(A){return document.getElementById(A)},f:function(B){var C='<embed id="#{fid}" name="#{fid}" src="#{movie}" flashVars="#{flashVars}" width="#{width}" height="#{height}" align="#{align}" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" wmode="#{wmode}" scale="#{scale}" salign="#{salign}" allownetworking="#{allownetworking}" allowscriptaccess="#{allowscriptaccess}" />';var A='<object id="#{fid}" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="#{width}" height="#{height}" align="#{align}"><param name="movie" value="#{movie}" /><param name="flashVars" value="#{flashVars}" /><param name="wmode" value="#{wmode}" /><param name="scale" value="#{scale}" /><param name="salign" value="#{salign}" /><param name="allownetworking" value="#{allownetworking}" /><param name="allowscriptaccess" value="#{allowscriptaccess}" /></object>';this.g(B.cid).innerHTML=this.fm(this.b.isIE?A:C,B)},fm:function(C,B){if(arguments.length){if(typeof (B)=="object"){C=C.replace(/#\{([^\{\}]+)\}/g,function(D,F){var E=B[F];if(typeof E=="function"){E=E(F)}return typeof (E)=="undefined"?"":E})}else{if(typeof (B)!="undefined"){for(var A=arguments.length-2;A>-1;A--){C=C.replace(new RegExp("#\\{"+A+"\\}","g"),arguments[A+1])}}}}return C},b:{isIE:/msie/i.test(navigator.userAgent),isFF:/firefox/i.test(navigator.userAgent),isMaxthon:(function(){var A=false;try{A=external.max_version}catch(B){}return A})()},mo:function(){var A={};var B=arguments.length;for(var C=0;C<B;C++){var D=arguments[C];for(var E in D){if(A[E]!=null){continue}A[E]=arguments[C][E]}}return A}};function getFlashVersion(){var E=navigator;if(E.plugins&&E.mimeTypes.length){var A=E.plugins["Shockwave Flash"];if(A&&A.description){return A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0"}}else{if(window.ActiveXObject&&!window.opera){for(var B=10;B>=2;B--){try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+B);if(D){return B+".0.0";break}}catch(C){}}}}return"0"}function addStyle(B,A){var C=document.styleSheets[0];if(C.addRule){C.addRule(B,A)}else{if(C.insertRule){C.insertRule(B+" { "+A+" }",C.cssRules.length)}}}function penControl(){var A=parseInt(getFlashVersion());if(A<9){addStyle("#penControl","display:none")}}function stopClosePen(A){A=A||window.event;if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}}var enablePen=false;function openPen(B){if(!enablePen){var C=document.getElementById(HWR.so.cfg.cid);C.className="hwr_visible";enablePen=true}B=B||event;var A=B.target||B.srcElement;A.blur();stopClosePen(B)}HWR.onCloseClick=function(){HWR.clear();var B=document.getElementById(HWR.so.cfg.cid);B.className="hwr_hidden";var A=document.search.q.value;document.search.q.focus();document.search.q.value=A;enablePen=false};function closePen(C){var D=document.getElementById(HWR.so.cfg.cid);C=C||event;var B=C.target||C.srcElement;if(enablePen){HWR.clear();D.className="hwr_hidden";if(B.nodeName!="INPUT"){var A=document.search.q.value;document.search.q.focus();document.search.q.value=A}enablePen=false}};
