/*////////////////////////////////////////////////////////////////////////////////////////

  swfIN 1.0.0 RC6  -  2006-10-17
  javascript toolkit for flash developers
  © 2004-2006 Francis Turmel  |  swfIN.nectere.ca  |  www.nectere.ca  |  francis@nectere.ca
  released under the MIT license

/*////////////////////////////////////////////////////////////////////////////////////////
var fd={};fd.showFlash=function(_1,id,_3,_4,w,h,_7,_8){if(fd.movies==null){fd.movies=[];}if(_7==null){_7=0;}var _9=fd.tools.getFlashVersion();var _a="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+_7+",0,0,0";if(fd.player_download==null){fd.player_download="http://www.macromedia.com/go/getflashplayer";}(_8!=null)?_8=_8.split(" : "):_8="";if(_9>=_7||fd.tools.getQsParam("bypassFlashCheck")=="true"){fd.actions.outputTag(_1,id,_3,_4,w,h,_a);}else{if(_8[0]=="r"){fd.actions.redirect(_8[1],_8[2],_7,_9);}else{if(_8[0]=="i"){fd.actions.image(_8[1],_8[2]);}else{if(_8[0]=="d"){fd.actions.showDiv(_8[1]);}else{if(_8[0]=="h"){fd.actions.html(_8[1]);}}}}}for(var i=0;i<fd.movies.length;i++){if(fd.movies[i]==id){alert("swfIN alert:\nYou cannot name two swfs by the same id. Please revise your swfs IDs in your swfIN() instanciation.");}}fd.movies.push(id);};fd.actions={outputTag:function(_c,id,_e,_f,w,h,_12){for(var k in _f){(_c.indexOf("?")==-1)?_c+="?"+k+"="+_f[k]:_c+="&"+k+"="+_f[k];}var p=[];p["quality"]="high";p["menu"]="false";p["swLiveConnect"]="true";p["pluginspage"]=fd.player_download;p["allowScriptAccess"]="sameDomain";for(var i in _e){p[i]=_e[i];}var _16,obj_h;if(!fd.tools.ns4()){_16="100%";obj_h="100%";}else{_16=fd.size.calculate(w,"w");obj_h=fd.size.calculate(h,"h");}var tag="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='"+_12+"' id='"+id+"' width='"+_16+"' height='"+obj_h+"' align='top' hspace='0' vspace='0'><param name='movie' value='"+_c+"'>";for(var i in p){tag+="<param name='"+i+"' value='"+p[i]+"'>";}tag+="<embed src='"+_c+"' width='"+_16+"' height='"+obj_h+"' align='top' hspace='0' vspace='0' type='application/x-shockwave-flash' name='"+id+"' ";for(var i in p){tag+=i+"='"+p[i]+"' ";}tag+="></embed></object>";if(!fd.tools.ns4()){document.write("<div id='div_"+id+"' style='width:"+fd.size.calculate(w,"w")+"; height:"+fd.size.calculate(h,"h")+"'>"+tag+"</div>");$("div_"+id).innerHTML=$("div_"+id).innerHTML;$("div_"+id).fd_w=w;$("div_"+id).fd_h=h;}else{document.write(tag);}},redirect:function(url,_1b,_1c,_1d){if(_1b=="true"){location.href=url+"?r="+_1c+"&i="+_1d;}else{location.href=url;}},image:function(_1e,url){if(url=="none"){document.write("<img src='"+_1e+"' border=0 />");}else{if(url==null){url=fd.player_download;}document.write("<a href='"+url+"' target='_blank'><img src='"+_1e+"' border=0 /></a>");}},showDiv:function(id){if(!fd.tools.ns4()&&!fd.tools.ie5_mac()){$(id).style.display="block";}},html:function(_21){document.write(_21);}};fd.size={calculate:function(val,_23){if(val.indexOf(" : ")!=-1){val=val.split(" : ");var _24=val[0].split("%");var _25=(_24[0]!=""&&_24[1]!=null)?(_24[0]/100):1;var _26=fd.tools.browserSize()[_23]*_25;return (val[1]>_26||val[1]=="")?val[1]:val[0];}else{return val;}},refresh:function(){if(!fd.tools.ns4()){for(var id in fd.movies){if($("div_"+fd.movies[id])){var w=fd.size.calculate($("div_"+fd.movies[id]).fd_w,"w");var h=fd.size.calculate($("div_"+fd.movies[id]).fd_h,"h");$("div_"+fd.movies[id]).style.width=w;$("div_"+fd.movies[id]).style.height=h;}}}else{location.reload();}},resizeDiv:function(id,w,h){var _2d=$("div_"+id).fd_w.split(" : ");var _2e=$("div_"+id).fd_h.split(" : ");$("div_"+id).fd_w=(_2d[1]==null)?w:w+" : "+_2d[1];$("div_"+id).fd_h=(_2e[1]==null)?h:h+" : "+_2e[1];alert($("div_"+id).fd_w+" "+$("div_"+id).fd_h);fd.size.refresh();},changeMinSize:function(id,w,h){var _32=$("div_"+id).fd_w.split(" : ");var _33=$("div_"+id).fd_h.split(" : ");$("div_"+id).fd_w=_32[0]+" : "+w;$("div_"+id).fd_h=_33[0]+" : "+h;fd.size.refresh();},percent2pixel:function(){return;}};fd.tools={getQsParam:function(key){var tmp=fd.tools.getQs()[key];return (tmp!=null&&tmp!=undefined&&tmp!="")?tmp:null;},getQs:function(){var _36=window.location.search.substring(1).split("&");var qs=[];for(var i=0;i<_36.length;i++){var pos=_36[i].indexOf("=");if(pos>0){qs[_36[i].substring(0,pos)]=_36[i].substring(pos+1);}}return qs;},ns4:function(){return (document.layers)?true:false;},ie5_mac:function(){var _3a=navigator.userAgent.toLowerCase();return (_3a.indexOf("msie 5")!=-1&&_3a.indexOf("mac")!=-1);},ie7:function(){var _3b=navigator.userAgent.toLowerCase();return (_3b.indexOf("msie 7")!=-1);},browserSize:function(){if(self.innerWidth){return {w:self.innerWidth,h:self.innerHeight};}else{if(document.documentElement&&document.documentElement.clientWidth){return {w:document.documentElement.clientWidth,h:document.documentElement.clientHeight};}else{if(document.body){return {w:document.body.clientWidth,h:document.body.clientHeight};}}}return false;},getFlashVersion:function(){document.writeln("<script language=\"VBscript\">");document.writeln("Function detectActiveXControl(activeXControlName)");document.writeln("  on error resume next");document.writeln("  detectActiveXControl = False");document.writeln("  detectActiveXControl = IsObject(CreateObject(activeXControlName))");document.writeln("End Function");document.writeln("</scr"+"ipt>");var _3c=0;var b=navigator.userAgent.toLowerCase();if((b.indexOf("msie")!=-1)&&(b.indexOf("win")!=-1)&&(b.indexOf("opera")==-1)){if(fd.tools.ie7()){_3c=15;}else{for(var i=3;i<15;i++){if(detectActiveXControl("ShockwaveFlash.ShockwaveFlash."+i)==true){_3c=i;}}}}else{if(navigator.plugins["Shockwave Flash"]){var _3f=navigator.plugins["Shockwave Flash"].description;_3c=parseInt(_3f.charAt(_3f.indexOf(".")-1));}if(b.indexOf("webtv/2.6")!=-1){_3c=4;}if(b.indexOf("webtv/2.5")!=-1){_3c=3;}if(b.indexOf("webtv")!=-1){_3c=2;}}return _3c;},screenSize:function(_40){if(_40=="full"){return {w:screen.width,h:screen.height};}if(_40=="avail"){return {w:screen.availWidth,h:screen.availHeight};}return false;},popUp:function(url,_42,w,h,x,y,_47){var _48=fd.tools.screenSize("full");var scr=fd.tools.screenSize("avail");w=(w=="full")?scr.w:w;h=(h=="full")?scr.h:h;x=(x=="center")?(_48.w-w)/2:x;y=(y=="center")?(_48.h-h)/2:y;var p=[];p["width"]=w;p["innerWidth"]=w;p["height"]=h;p["innerHeight"]=h;p["toolbar"]=0;p["location"]=0;p["directories"]=0;p["status"]=0;p["menubar"]=0;p["scrollbars"]=0;p["resizable"]=0;p["copyhistory"]=0;p["fullscreen"]=0;for(var i in _47){p[i]=_47[i];}var _4c="";for(var i in p){_4c+=(_4c=="")?i+"="+p[i]:","+i+"="+p[i];}var win=window.open(url,_42,_4c);win.resizeTo(w,h);win.moveTo(0,0);win.moveBy(x,y);win.focus();}};if(Array.prototype.push==null){Array.prototype.push=function(val){this[this.length]=val;return this.length;};}function $(id){if(!fd.tools.ns4()){return document.getElementById(id);}else{return document.layers[id];}}window.onresize=fd.size.refresh;var swfIN=function(_51,id,w,h,_55){this.fd=fd;this.params=[];this.flashVars=[];this.movie=_51;this.id=id;this.w=w;this.h=h;};swfIN.prototype={addParam:function(_56,val){this.params[_56]=val;},addVar:function(_58,val){this.flashVars[_58]=val;},addVars:function(_5a){for(var i in _5a){this.addVar(i,_5a[i]);}},minSize:function(_5c,_5d){if(_5c!=null){this.w+=" : "+_5c;}if(_5d!=null){this.h+=" : "+_5d;}},detect:function(_5e,_5f,_60,_61){this.requiredVersion=_5e;this.param1=_5f,this.param2=_60,this.param3=_61;var _62="";for(var i=1;i<=3;i++){if(this["param"+i]!=null){if(_62==""){_62+=this["param"+i];}else{_62+=" : "+this["param"+i];}}}this.myAction=_62;},write:function(){this.fd.showFlash(this.movie,this.id,this.params,this.flashVars,this.w,this.h,this.requiredVersion,this.myAction);this.fd.size.refresh();},name:"swfIN 1.0.0 RC6  -  2006-10-17",author:"\ufffd 2004-2006 Francis Turmel  |  swfIN.nectere.ca  |  www.nectere.ca  |  francis@nectere.ca",desc:"javascript toolkit for flash developers  |  released under the MIT license"};