if(typeof Wildfire=="undefined"){Wildfire=new Object();Wildfire.LinkedLoading=true;Wildfire._pixeIframeCreated=false}Wildfire.Flash={isIE:(navigator.appVersion.indexOf("MSIE")!=-1)?true:false,isWin:(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false,isOpera:(navigator.userAgent.indexOf("Opera")!=-1)?true:false,AC_Generateobj:function(E,D,A){var C="";if(this.isIE&&this.isWin&&!this.isOpera){C+="<object ";for(var B in E){C+=B+'="'+E[B]+'" '}C+=">";for(var B in D){C+='<param name="'+B+'" value="'+D[B]+'" /> '}C+="</object>"}else{C+="<embed ";for(var B in A){C+=B+'="'+A[B]+'" '}C+="> </embed>"}return C},AC_FL_GetContent:function(){var A=this.AC_GetArgs(arguments);return this.AC_Generateobj(A.objAttrs,A.params,A.embedAttrs)},AC_GetArgs:function(B,D,F){var A={};A.embedAttrs={};A.params={};A.objAttrs={};for(var C=0;C<B.length;C=C+2){var E=B[C].toLowerCase();switch(E){case"movie":A.embedAttrs.src=B[C+1];A.params.movie=B[C+1];break;case"id":case"width":case"height":case"align":case"name":A.embedAttrs[B[C]]=A.objAttrs[B[C]]=B[C+1];break;default:A.embedAttrs[B[C]]=A.params[B[C]]=B[C+1]}}A.objAttrs.codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";A.objAttrs.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";A.embedAttrs.type="application/x-shockwave-flash";A.embedAttrs.pluginspage="http://www.macromedia.com/go/getflashplayer";return A}};Wildfire.onClose=Wildfire.onPostProfile=Wildfire.onPostComment=Wildfire.onSend=Wildfire.onEmail=function(){};Wildfire.modules=new Object();Wildfire.modulesArray=new Array();Wildfire.initShare=function(E,C,D,A,B){return Wildfire._createJSModule("share",""+E,C,D,A,B,"cssURL,cornerRoundness,initialMessageType,domainForCallback,partner,source,partnerData,width,height,emailTabHidden,customCheckboxVisible,customCheckboxChecked,customCheckboxText,internalColor,frameColor,externalColor,tabTextColor,textColor,fontType,fontSize,headerInternalColor,headerFrameColor")};Wildfire.initPost=function(E,C,D,A,B){return Wildfire._createFlashModule("post",""+E,C,D,A,B)};Wildfire.init=Wildfire.initShare;Wildfire.applyConfig=function(A){if(isnotnull(Wildfire.share)){Wildfire.share.applyConfig(A)}};Wildfire._GetFlashModuleXMLConfig=function(A){var B=document.getElementById(A+"_progress");if(B!=null){B.innerHTML="&nbsp;";B.style.display="none";B.style.visibility="hidden"}xs=["config",[],["display",["width","height","showCodeBox","rememberMeVisible","emailImportProviders","networksToShow","networksToHide","bookmarksToShow","bookmarksToHide","bulletinChecked","showEmail","showPost","showBookmark","showDesktop","showCloseButton"],"body",["font=fontType","size=fontSize"],["background",["frame-color=frameColor","background-color=internalColor","corner-roundness=cornerRoundness"],"controls",[],["textboxes",[],["inputs",["color=textInputColor","background-color=textInputBackgroundColor","frame-color=textInputBorderColor"]],"snbuttons",["color=tabTextColor|snButtonsTextColor","background-color=snButtonsBackgroundColor","frame-color=snButtonsFrameColor","over-color=tabTextColor|snButtonsOverTextColor","over-background-color=snButtonsOverBackgroundColor","over-frame-color=snButtonsOverFrameColor"],"buttons",["font=fontType|buttonFontType","color=buttonTextColor"]],'texts background-color="transparent" ',["color=textColor"],["messages",["color=messageTextColor"],"links",["font=linkFontType","color=linkTextColor"],"privacy",["color=privacyTextColor"]]]]];var D=Wildfire._GetFlashModuleConfig(A);var C=Wildfire._BuildXMLConfigFromJSON(D,xs);return C};Wildfire._GetFlashModuleConfigAttribute=function(G,D,H,B){var F=document.getElementById(G+"_progress");if(F!=null){F.innerHTML="&nbsp;";F.style.display="none";F.style.visibility="hidden"}var A=Wildfire.modules[G];if(A!=null){var I=A.config[D];if(typeof I=="undefined"){return null}if(typeof I=="function"){return I(D,B)}if(H==true){if(isnotnull(I)){try{var C=document.getElementById(I);if(isnotnull(C)){return C.value}else{return I}}catch(E){return I}}}else{return I}}else{return{error:"Modlue not found",MID:G}}};Wildfire._GetFlashModuleConfig=function(A){if(Wildfire.modules==null){alert("Wildfire has no modules yet")}var C=Wildfire.modules[A];if(C!=null){var B=C.config;return B}else{return null}};Wildfire._BuildXMLConfigFromJSON=function(F,A){var L=new Array();try{for(var D=0;D<A.length;D+=2){L[L.length]="<"+A[D]+" ";var G=A[D+1];for(var B=0;B<G.length;B++){var I=G[B].split("=");var J=I[0];var C;if(I.length>1){C=I[1]}else{C=I[0]}var K=C.split("|");for(var E=0;E<K.length;E++){if(typeof F[K[E]]!="undefined"){L[L.length]=J+'="';L[L.length]=(""+F[K[E]]).replace("&","&amp;").replace('"',"&quot;").replace("<","&lt;").replace(">","&gt;");L[L.length]='" ';break}}}if(D+2==A.length){L[L.length]="/>"}else{if(typeof A[D+2]!="string"){L[L.length]=">";L[L.length]=Wildfire._BuildXMLConfigFromJSON(F,A[D+2]);L[L.length]="</"+A[D].split(" ")[0]+">";D++}else{L[L.length]="/>"}}}}catch(H){}return L.join("")};Wildfire._createJSModule=function(H,A,I,B,K,D,J){try{D.location=document.location.href}catch(E){}D.partner=A;D.width=B;D.height=K;if(undef(H)||undef(A)||undef(I)||undef(B)||undef(K)||undef(D)){return }var C=this[I]=this.modules[I]=this.modulesArray[this.modulesArray.length]=new Wildfire._JSModule();C.copyConfig(D);C.ready=false;C.type=H;C.id=I;C.partner=A;C.width=B;C.height=K;C.container=document.getElementById(I);C.container.style.width=B+"px";C.container.style.height=K+"px";C.qsParams=new Array();var G=J.split(",");for(var F=0;F<G.length;F++){Wildfire._addQSParam(C,G[F])}C.init(true);return C};Wildfire._origOnLoad=null;Wildfire._onLoad=function(A){Wildfire.onLoad=Wildfire._origOnLoad;if(Wildfire.LinkedLoading==false){if(Wildfire._origOnLoad!=null){Wildfire._origOnLoad(A)}return }Wildfire.LinkedLoading=false;if(Wildfire._origOnLoad!=null){Wildfire._origOnLoad(A)}if((A.ModuleID==Wildfire.modulesArray[0].id)){for(var B=1;B<Wildfire.modulesArray.length;B++){if(!Wildfire.modulesArray[B].ready){try{Wildfire.modulesArray[B].init(true)}catch(C){}}}}};Wildfire._createFlashModule=function(H,A,I,B,K,D){try{if(typeof D.bookmarkURL=="undefined"){D.bookmarkURL=document.location.href}}catch(F){}if(Wildfire.LinkedLoading){if(typeof Wildfire.onLoad!="undefined"&&Wildfire.onLoad!=Wildfire._onLoad){Wildfire._origOnLoad=Wildfire.onLoad}Wildfire.onLoad=Wildfire._onLoad}var J=false;var G;if(this.modules[I]!=null){J=true;document.getElementById(I).innerHTML="&nbsp;";G=this.modules[I].idxInArray}else{G=this.modulesArray.length}try{D.location=document.location.href}catch(E){}D.partner=A;D.width=B;D.height=K;if(undef(H)||undef(A)||undef(I)||undef(B)||undef(K)||undef(D)){return }var C=new Wildfire._FlashModule();this.modulesArray[G]=this[I]=this.modules[I]=C;C.idxInArray=G;C.copyConfig(D);C.queued=false;C.ready=false;C.type=H;C.id=I;C.partner=A;C.width=B;C.height=K;C.container=document.getElementById(I);C.container.style.width=B+"px";C.container.style.height=K+"px";if(!Wildfire.LinkedLoading||this.modulesArray.length==1||this.modulesArray[0].ready){C.init(true)}else{C.queued=true}return C};Wildfire._raiseModulesUpdate=function(){var C="";for(var A in this.modules){C+=A+","}var B={type:"modulesUpdate",modules:C};this._raiseSysEvent(B)};Wildfire._raiseSysSignoutEvent=function(){this._raiseSysEvent({type:"signout"})};Wildfire._raiseSysEvent=function(C){if(this.modulesArray.length<=1){return }for(var B in this.modules){var A=this.modules[B].raiseSysEvent;if(A!=null){A(C)}}};Wildfire._onFrameLoaded=function(B){var C=document.getElementById(B+"_UIFrame");if(C!=null){C.style.visibility="visible"}var A=document.getElementById(B+"_progress");if(A!=null){A.style.display="none"}this.modules[B].UIFrame.style.visibility="visible";this.modules[B].applyConfig();this.modules[B].ready=true;setTimeout("Wildfire._raiseModulesUpdate()",1500)};Wildfire._addQSParam=function(B,A){if(def(typeof B.config)&&def(B.config[A])){B.qsParams[B.qsParams.length]=A+"="+Wildfire._URLEncode(B.config[A])}};Wildfire._URLEncode=function(A){if(encodeURIComponent){return encodeURIComponent(A)}else{es=escape(A);return es.replace(/\+/g,"%2b").replace(/%20/g,"+").replace(/[/]/g,"%2f").replace(/%3D/g,"%3d")}};Wildfire._onCallback=Wildfire._raiseEvent=function(A){try{switch(A.type){case"send":if(isnotnull(Wildfire.onSend)){Wildfire.onSend(A)}break;case"postComment":if(isnotnull(Wildfire.onPostComment)){Wildfire.onPostComment(A)}break;case"postProfile":if(isnotnull(Wildfire.onPostProfile)){Wildfire.onPostProfile(A)}break;case"close":if(isnotnull(Wildfire.onClose)){Wildfire.onClose(A)}break;case"load":if(isnotnull(Wildfire.onLoad)){Wildfire.modules[A.ModuleID].ready=true;Wildfire.onLoad(A)}break;case"email":if(isnotnull(Wildfire.onEmail)){Wildfire.onEmail(A)}}}catch(B){}};Wildfire._Module=function(){};Wildfire._JSModule=function(){this.formsContainer=null;this.pingTimeout=null};Wildfire._JSModule.prototype=new Wildfire._Module();Wildfire._FlashModule=function(){};Wildfire._FlashModule.prototype=new Wildfire._Module();Wildfire._JSModule.prototype.pingOK=function(A){window.clearTimeout(this.pingTimeout);this.config.safeMode=!A;this.init(false)};Wildfire._FlashModule.prototype.init=function(B){var A="";if((""+this.config.isApply)!="true"){A+='<div style="position:relative;top:50%;text-align:center;font-size:12px;z-index:50;" id="'+this.id+'_progress"><center><img  src="'+this.config.progressImageSrc+'"></center></div>'}A+=Wildfire.Flash.AC_FL_GetContent("id","wfmodule_"+this.id,"name","wfmodule_"+this.id,"width",this.config.width,"height",this.config.height,"movie","http://cdn.gigya.com/WildFire/swf/wildfire.swf","quality","high","align","middle","play","true","loop","true","scale","showall","wmode",(this.config.nowmode?"":"transparent"),"devicefont","false","bgcolor",((this.config.nowmode&&this.config.outsideColor)?this.config.outsideColor:"#ffffff"),"menu","true","allowFullScreen","false","allowScriptAccess","always","salign","","flashvars","ModuleID="+this.id+"&now="+(new Date()).getTime(),"swLiveConnect","true");window["wfmodule_"+this.id]=null;if(!Wildfire._pixeIframeCreated){A+="<iframe src='http://cdn.gigya.com/wildfire/do_not_delete.htm' style='width:0;height:0;visibility:hidden' />";Wildfire._pixeIframeCreated=true}this._injectWFCode(A);window["wfmodule_"+this.id]=document.getElementById("wfmodule_"+this.id)};Wildfire._IsModuleReady=function(A){return(window["wfmodule_"+A]!=null)};Wildfire._JSModule.prototype.init=function(C){var D="http://wildfire.gigya.com/wildfire";var A=this.id;var I=A+"_UIFrame";var F=this.config;if(!F.safeMode&&C&&this.pingTimeout==null){var H=document.createElement("script");H.src=D+"/jsping.ashx?mid="+A+"&rand="+Math.random()+Math.random();this.container.appendChild(H);this.pingTimeout=window.setTimeout("Wildfire.modules['"+A+"'].pingOK(false)",10000);return }var G=this.qsParams.join("&");G+=("&mid="+A);var E="";var J="";var B=D+"/"+this.type+"Main.aspx?"+G;if(F.safeMode){B=this.getSafeModeURL();if(B==null){Wildfire[A]=Wildfire.modules[A]=Wildfire.modulesArray[Wildfire.modulesArray.length]=null;return null}E+="<iframe allowtransparency='true' id="+I+" name="+I+" style='width:"+F.width+"px;height:"+F.height+"px;display:inherit;visibility:inherit' frameborder=0 scrolling=no></iframe>";J+="<form id='"+A+"_postForm' action='"+B+"' method='POST' target="+I+" style='display:none'></form>"}else{if(F.simple){if(this.type=="share"){B=D+"/shareSimple.aspx"}if(B==null){Wildfire[A]=Wildfire.modules[A]=Wildfire.modulesArray[Wildfire.modulesArray.length]=null;return null}E+="<iframe allowtransparency='true' id="+I+" name="+I+" style='width:"+F.width+"px;height:"+F.height+"px;display:inherit;visibility:inherit' frameborder=0 scrolling=no></iframe>";J+="<form id='"+A+"_postForm' action='"+B+"' method='POST' target="+I+" style='display:none'></form>"}else{E+="<div style='position:relative;top:50%;text-align:center;font-size:12px;' id='"+A+"_progress'><center><img  src='"+F.progressImageSrc+"'></center></div>";E+="<iframe allowtransparency='true' onload='Wildfire._onFrameLoaded(\""+A+"\")' id="+I+" style='visibility:hidden;width:"+F.width+"px;height:"+F.height+"px;' src='"+B+"' frameborder=0 scrolling=no></iframe>";E+='<iframe id="IFREndlessActivityBugFix" style="display:none;width:100px;height:10px"></iframe>';E+=this._createCBFrame();J+="<form id='"+A+"_postForm' action='"+D+"/WFHandler.ashx?cmd=config' method='POST' target='"+A+"_postTargetFrame' style='display:none'></form>";J+="<form id='"+A+"_sysEventForm' action='"+D+"/WFHandler.ashx?cmd=sysEvent' method='POST' target='"+A+"_sysEventFrame' style='display:none'></form>"}}this._injectWFCode(E,J);if(document.getElementById(A+"_wfCBFrame")==null){F.domainForCallback=null}this.UIFrame=document.getElementById(A+"_UIFrame");this.postForm=document.getElementById(A+"_postForm");this.sysEventForm=document.getElementById(A+"_sysEventForm");if(F.simple||F.safeMode){this.applyConfig()}};Wildfire._JSModule.prototype._createCBFrame=function(){if(def(this.config.domainForCallback)&&document.getElementById(this.id+"_wfCBDiv")==null){try{document.domain=this.config.domainForCallback;return"<iframe name='"+this.id+"_wfCBFrame' style='visibility:hidden;width:0px;height:0px;' src='http://wildfire."+this.config.domainForCallback+"/wildfire/WFHandler.ashx?domain="+escape(this.config.domainForCallback)+"'></iframe>"}catch(A){return""}}else{return""}};Wildfire._FlashModule.prototype.copyConfig=Wildfire._JSModule.prototype.copyConfig=function(A){if(A!=null){this.config={};for(var B in A){this.config[B]=A[B]}}if(undef(this.config.progressImageSrc)){this.config.progressImageSrc="http://cdn.gigya.com/WildFire/i/progress_ani.gif"}if(undef(this.config.simple)){this.config.simple=navigator.userAgent.toLowerCase().indexOf("safari")!=-1}};Wildfire._JSModule.prototype.getSafeModeURL=function(){if(this.type=="share"){return"http://backup.gigya.com/WFSimple/share.aspx"}return null};Wildfire._JSModule.prototype._injectWFCode=function(A,C){var B=this.container;for(;((B!=null)&&((""+B.tagName).toLowerCase()!="form"));B=B.parentNode){}if(B!=null){this.container.innerHTML=A;this.formsContainer=document.createElement("div");this.formsContainer.style.display="none";B.parentNode.insertBefore(this.formsContainer,B);this.formsContainer.innerHTML=C}else{this.container.innerHTML=A+C}};Wildfire._FlashModule.prototype._injectWFCode=function(A){this.container.innerHTML=A};Wildfire._JSModule.prototype.raiseSysEvent=function(D){if(this.sysEventForm==null||!this.ready){return }var C=new Array();var B=0;for(var A in D){if(typeof A!="function"&&D[A]!=null){C[B++]="<input type=hidden name='"+A+"'/>"}}this.sysEventForm.innerHTML=C.join("");for(var B=0;B<this.sysEventForm.length;B++){this.sysEventForm[B].value=D[this.sysEventForm[B].name]}this.sysEventForm.submit()};Wildfire._FlashModule.prototype.applyConfig=function(A){A.isApply="true";return Wildfire._createFlashModule(this.type,this.partner,this.id,this.width,this.height,A)};Wildfire._JSModule.prototype.applyConfig=function(B){if(B!=null){this.copyConfig(B)}var A=this.config;if(A==null){return }if(A.location==null||A.location==""){try{A.location=document.location.href}catch(F){}}A.partner=this.partner;A.width=this.width;A.height=this.height;postContent=["default","myspace","hi5","friendster","xanga","livejournal","freewebs","facebook","bebo","blogger","tagged","typepad","blackplanet"];for(var H=0;H<postContent.length;H++){this._getTemplate(postContent[H]+"Content")}shareTemplates=["default","comment","email","myspace","hi5","friendster","xanga","freewebs"];for(var G=0;G<shareTemplates.length;G++){this._getTemplate(shareTemplates[G]+"Template")}var E=new Array();var D=0;for(var C in A){if(typeof C!="function"&&A[C]!=null){E[D++]="<input type=hidden name='"+C+"'/>"}}this.postForm.innerHTML=E.join("");for(var D=0;D<this.postForm.length;D++){this.postForm[D].value=this.config[this.postForm[D].name]}this.postForm.submit();window.setTimeout("Wildfire._EndlessActivityBugFix();",1000)};Wildfire._EndlessActivityBugFix=function(){var A=document.getElementById("IFREndlessActivityBugFix");if(A!=null){A.src="http://cdn.gigya.com/wildfire/i/n.gif"}};Wildfire._JSModule.prototype._getTemplate=function(A){if(isnotnull(this.config[A])){try{if(isnotnull(document.getElementById(this.config[A]))){this.config[A]=document.getElementById(this.config[A]).value}}catch(B){}}};Wildfire._CopyAtts=function(A,B,C){for(k in C.split(",")){A[C[k]]=B[C[k]]}};Wildfire._CopyAllAtts=function(A,B){for(k in B){A[k]=B[k]}};function undef(A){return(typeof (A)=="undefined")}function def(A){return(typeof (A)!="undefined")}function isnotnull(A){return(def(A)&&(A!=null))}function WFQueue(){var A=new Array();var B=0;this.count=function(){return A.length};this.enqueue=function(C){A.push(C)};this.dequeue=function(){if(A.length){var D=A[B];if(++B*2>=A.length){for(var C=B;C<A.length;C++){A[C-B]=A[C]}A.length-=B;B=0}return D}else{return undefined}}}Wildfire._hideWildfirePopup=function(){document.getElementById("wildfire_postDiv").style.display="none"};Wildfire._popupConfigs=[];Wildfire.renderPostButton=function(D,C,A,B){B.showCloseButton=true;Wildfire._popupConfigs.push(B);var E=Wildfire._popupConfigs.length-1;document.write('<img id="Wildfire_Button'+E+'" src="http://cdn.gigya.com/wildfire/i/post-to-button.gif" style="cursor: pointer" onclick="Wildfire._showWildfirePopup('+["'"+D+"'",C,A,E].join(", ")+')" border=0 alt="Post to my social network or blog" title="Post to my social network or blog" />')};Wildfire._lastID=0;Wildfire._getScrollXY=function(){var B=0,A=0;if(typeof (window.pageYOffset)=="number"){A=window.pageYOffset;B=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){A=document.body.scrollTop;B=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){A=document.documentElement.scrollTop;B=document.documentElement.scrollLeft}}}return[B,A]};Wildfire._showPopup=function(H,C){var B=document.getElementById("wildfire_postDiv");var F;if(B){F=B.style}else{B=document.createElement("div");B.id="wildfire_postDiv";B.style.position="absolute";B.style.display="none";B.style.zIndex=999999;if(document.body!=null){document.body.insertBefore(B,document.body.firstChild)}}F=B.style;var A;var D;var G=document.documentElement;A=G.clientHeight;D=G.clientWidth;if(typeof A=="undefined"||A==0){A=document.body.clientHeight;D=document.body.clientWidth}if(typeof A=="undefined"||A==0){A=window.innerHeight;D=window.innerWidth}scrl=Wildfire._getScrollXY();var E=scrl[1];var I=scrl[0];F.top=""+(E+Math.floor((A-C)/2))+"px";F.left=""+(I+Math.floor((D-H)/2))+"px";F.width=""+H+"px";F.height=""+C+"px"};Wildfire._showWildfirePopup=function(D,B,A,E){Wildfire._showPopup(B,A);Wildfire.onClose=Wildfire._hideWildfirePopup;Wildfire.initPost(D,"wildfire_postDiv",B,A,Wildfire._popupConfigs[E]);var C=document.getElementById("wildfire_postDiv");C.style.display=""};Wildfire._injectCIMP=function(){if(document.getElementById("wildfire_cimp")==null&&document.body!=null){var A=document.createElement("div");A.id="wildfire_cimp";A.width=1;A.height=1;A.style.display="none";A.style.visibility="hidden";A.style.position="absolute";A.innerHTML='<img src="http://counters.gigya.com/wildfire/i/CIMP.gif" />';document.body.insertBefore(A,document.body.firstChild)}};window.setTimeout("Wildfire._injectCIMP()",5000);
