// SWF OBJECT v?
if(typeof deconcept=="undefined"){var deconcept={}}if(typeof deconcept.util=="undefined"){deconcept.util={}}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={}}deconcept.SWFObject=function(f,d,m,g,j,l,n,i,a,e){if(!document.getElementById){return}this.DETECT_KEY=e?e:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(f){this.setAttribute("swf",f)}if(d){this.setAttribute("id",d)}if(m){this.setAttribute("width",m)}if(g){this.setAttribute("height",g)}if(j){this.setAttribute("version",new deconcept.PlayerVersion(j.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(!deconcept.prepUnloadSet){deconcept.prepUnloadSet=true;window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)}};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(l){this.addParam("bgcolor",l)}var b=n?n:"high";this.addParam("quality",b);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var k=(i)?i:window.location;this.setAttribute("xiRedirectUrl",k);this.setAttribute("redirectUrl","");if(a){this.setAttribute("redirectUrl",a)}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]||""},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]||""},getVariables:function(){return this.variables},getVariablePairs:function(){var a=[];var b;var c=this.getVariables();for(b in c){a[a.length]=b+"="+c[b]}return a},getSWFHTML:function(){var d="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}d='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'"';d+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var c=this.getParams();for(var a in c){d+=[a]+'="'+c[a]+'" '}var b=this.getVariablePairs().join("&");if(b.length>0){d+='flashvars="'+b+'"'}d+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}d='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'">';d+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var c=this.getParams();for(var a in c){d+='<param name="'+a+'" value="'+c[a]+'" />'}var b=this.getVariablePairs().join("&");if(b.length>0){d+='<param name="flashvars" value="'+b+'" />'}d+="</object>"}return d},write:function(a){if(this.getAttribute("useExpressInstall")){var b=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(b)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var c=(typeof a=="string")?document.getElementById(a):a;c.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var c=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){c=new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var d=1;var b=3;while(d){try{b++;d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);c=new deconcept.PlayerVersion([b,0,0])}catch(f){d=null}}}else{try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(f){try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");c=new deconcept.PlayerVersion([6,0,21]);d.AllowScriptAccess="always"}catch(f){if(c.major==6){return c}}try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(f){}}if(d!=null){c=new deconcept.PlayerVersion(d.GetVariable("$version").split(" ")[1].split(","))}}}return c};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};deconcept.util={getRequestParameter:function(d){var c=document.location.search||document.location.hash;if(d==null){return c}if(c){var b=c.substring(1).split("&");for(var a=0;a<b.length;a++){if(b[a].substring(0,b[a].indexOf("="))==d){return b[a].substring((b[a].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var c=document.getElementsByTagName("OBJECT");for(var b=c.length-1;b>=0;b--){c[b].style.display="none";for(var a in c[b]){if(typeof c[b][a]=="function"){c[b][a]=function(){}}}c[b].removeNode(true)}};if(!document.getElementById&&document.all){document.getElementById=function(a){return document.all[a]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
// SWF ADDRESS v?
if(typeof com=="undefined"){var com={}}if(typeof com.asual=="undefined"){com.asual={}}if(typeof com.asual.util=="undefined"){com.asual.util={}}com.asual.util.Browser=new function(){var d=false;var h=-1;var b=navigator.userAgent;var e=false;var f=false;var a=false;var g=false;var c=false;if(/MSIE/.test(b)){e=true;h=parseFloat(b.substring(b.indexOf("MSIE")+4));d=h>=6}else{if(/AppleWebKit/.test(b)){a=true;h=parseFloat(b.substring(b.indexOf("Safari")+7));d=h>=312}else{if(/Opera/.test(b)){g=true;h=parseFloat(navigator.appVersion);d=h>=9.02}else{if(/Camino/.test(b)){f=true;h=parseFloat(b.substring(b.indexOf("Camino")+7));d=h>=1}else{if(/Firefox/.test(b)){c=true;h=parseFloat(b.substring(b.indexOf("Firefox")+8));d=h>=1}else{if(/Netscape/.test(b)){c=true;h=parseFloat(b.substring(b.indexOf("Netscape")+9));d=h>=8}else{if(/Mozilla/.test(b)&&/rv:/.test(b)){c=true;h=parseFloat(b.substring(b.indexOf("rv:")+3));d=h>=1.8}}}}}}}this.isSupported=function(){return d};this.getVersion=function(){return h};this.isIE=function(){return e};this.isSafari=function(){return a};this.isOpera=function(){return g};this.isCamino=function(){return f};this.isMozilla=function(){return c}};com.asual.util.Events=new function(){var c=[];var a=com.asual.util.Browser;var d="DOMContentLoaded";if(a.isIE()||a.isSafari()){(function(){try{if(a.isIE()||!/loaded|complete/.test(document.readyState)){document.documentElement.doScroll("left")}}catch(g){return setTimeout(arguments.callee,0)}for(var f=0,g;g=c[f];f++){if(g.t==d){g.l.call(null)}}})()}this.addListener=function(g,e,f){c.push({o:g,t:e,l:f});if(e==d&&(a.isIE()||a.isSafari())){return}if(g.addEventListener){g.addEventListener(e,f,false)}else{if(g.attachEvent){g.attachEvent("on"+e,f)}}};this.removeListener=function(k,g,h){for(var f=0,j;j=c[f];f++){if(j.o==k&&j.t==g&&j.l==h){c.splice(f,1);break}}if(g==d&&(a.isIE()||a.isSafari())){return}if(k.removeEventListener){k.removeEventListener(g,h,false)}else{if(k.detachEvent){k.detachEvent("on"+g,h)}}};var b=function(){for(var f=0,e;e=c[f];f++){if(e.t!=d){com.asual.util.Events.removeListener(e.o,e.t,e.l)}}};this.addListener(window,"unload",b)};SWFAddressEvent=function(c){this.toString=function(){return"[object SWFAddressEvent]"};this.type=c;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.parameters={};var a=SWFAddress.getParameterNames();for(var b=0,d;d=a[b];b++){this.parameters[d]=SWFAddress.getParameter(d)}};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddress=new function(){var _browser=com.asual.util.Browser;var _supported=_browser.isSupported();var _d=top.document;var _h=top.history;var _l=top.location;var _iframe,_form,_url,_js="swfaddress.js";var _title=_d.title;var _length=_h.length;var _silent=false;var _listeners={};var _stack=[];var _ids=[];var _opts=[];_opts.history=true;_opts.html=false;_opts.strict=true;_opts.tracker="urchinTracker";if((!_supported&&_l.href.indexOf("#")!=-1)||(_browser.isSafari()&&_browser.getVersion()<412&&_l.href.indexOf("#")!=-1&&_l.search!="")){_d.open();_d.write('<html><head><meta http-equiv="refresh" content="0;url='+_l.href.substr(0,_l.href.indexOf("#"))+'" /></head></html>');_d.close()}var _getHash=function(){var index=_l.href.indexOf("#");if(index!=-1){return _l.href.substring(index).replace(/^#/g,"")}return""};var _value=_getHash();var _strictCheck=function(value,force){if(_opts.strict){if(force){if(value.substr(0,1)!="/"){value="/"+value}value=value.replace(/^([^\?.]*[^\/])(\?|$)/,"$1/$2").replace(/\/\//,"/")}else{if(value==""){value="/"}}}return value};var _titleCheck=function(){if(_browser.isIE()&&_d.title!=_title){SWFAddress.setTitle(_title)}};var _listen=function(){if(!_silent){if(_browser.isIE()){if(_value!=_getHash()){if(_browser.getVersion()<7){_l.reload()}else{SWFAddress.setValue(_getHash())}}}else{if(_browser.isSafari()){if(_length!=_h.length){_length=_h.length;if(typeof _stack[_length-1]!="undefined"){_value=_stack[_length-1]}_update()}}else{if(_value!=_getHash()){_value=_getHash();_update()}}}_titleCheck()}};var _jsDispatch=function(type){if(SWFAddress.hasEventListener(type)){SWFAddress.dispatchEvent(new SWFAddressEvent(type))}type=type.substr(0,1).toUpperCase()+type.substring(1);if(typeof SWFAddress["on"+type]=="function"){SWFAddress["on"+type]()}};var _jsInit=function(){_jsDispatch("init")};var _jsChange=function(){_jsDispatch("change")};var _swfChange=function(){for(var i=0,id;id=_ids[i];i++){var obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!="undefined"){obj.parentNode.so.call("setSWFAddressValue",SWFAddress.getValue())}else{obj=(obj&&typeof obj.setSWFAddressValue!="undefined")?obj:((obj.getElementsByTagName("object")[0]&&typeof obj.getElementsByTagName("object")[0].setSWFAddressValue!="undefined")?obj.getElementsByTagName("object")[0]:((obj.getElementsByTagName("embed")[0]&&typeof obj.getElementsByTagName("embed")[0].setSWFAddressValue!="undefined")?obj.getElementsByTagName("embed")[0]:null));if(obj){obj.setSWFAddressValue(SWFAddress.getValue())}}}}};var _update=function(){_swfChange();_jsChange()};var _track=function(){if(typeof _opts.tracker!="undefined"&&eval("typeof "+_opts.tracker+' != "undefined"')){var fn=eval(_opts.tracker);if(typeof fn=="function"){fn((_l.pathname+SWFAddress.getValue()).replace(/\/\//,"/").replace(/^\/$/,""))}}};var _htmlWrite=function(){var doc=_iframe.contentWindow.document;doc.open();doc.write('<script>var swfaddress = "'+_getHash()+'";<\/script>');doc.close()};var _htmlLoad=function(){if(_opts.html){var src=_iframe.contentWindow.location.href;_value=(src.indexOf("?")>-1)?src.substring(src.indexOf("?")+1):""}else{_value=(typeof _iframe.contentWindow.swfaddress!="undefined")?_iframe.contentWindow.swfaddress:""}if(_value!=_getHash()){_update();_l.hash=_value}};var _load=function(){var attr='id="swfaddress" style="position:absolute;top:-9999px;"';if(_browser.isIE()){document.body.appendChild(document.createElement("div")).innerHTML="<iframe "+attr+' src="'+(_opts.html?_url.replace(/\.js(\?.*)?$/,".html")+"?"+_getHash():"javascript:false;")+'"></iframe>';_iframe=document.getElementById("swfaddress");setTimeout(function(){if(!_opts.html&&typeof _iframe.contentWindow.swfaddress=="undefined"){_htmlWrite()}com.asual.util.Events.addListener(_iframe,"load",_htmlLoad)},10)}else{if(_browser.isSafari()){if(_browser.getVersion()<412){document.body.innerHTML+="<form "+attr+' method="get"></form>';_form=document.getElementById("swfaddress")}if(typeof _l.swfaddress=="undefined"){_l.swfaddress={}}if(typeof _l.swfaddress[_l.pathname]!="undefined"){_stack=_l.swfaddress[_l.pathname].split(",")}}else{if(_browser.isOpera()&&_ids.length==0){document.body.innerHTML+="<embed "+attr+' src="'+_url.replace(/\.js(\?.*)?$/,".swf")+'" type="application/x-shockwave-flash" />'}}}setTimeout(_jsInit,1);setTimeout(_jsChange,2);setTimeout(_track,10);setInterval(_listen,50)};this.onInit=null;this.onChange=null;this.toString=function(){return"[class SWFAddress]"};this.back=function(){_h.back()};this.forward=function(){_h.forward()};this.go=function(delta){_h.go(delta)};this.href=function(url,target){target=typeof target!="undefined"?target:"_self";switch(target){case"_self":self.location.href=url;break;case"_top":_l.href=url;break;case"_blank":window.open(url);break;default:top.frames[target].location.href=url;break}};this.popup=function(url,name,options,handler){var popup=window.open(url,name,eval(options));eval(handler)};this.addEventListener=function(type,listener){if(typeof _listeners[type]=="undefined"){_listeners[type]=[]}_listeners[type].push(listener)};this.removeEventListener=function(type,listener){if(typeof _listeners[type]!="undefined"){for(var i=0,l;l=_listeners[type][i];i++){if(l==listener){break}}_listeners[type].splice(i,1)}};this.dispatchEvent=function(event){if(typeof _listeners[event.type]!="undefined"&&_listeners[event.type].length){event.target=this;for(var i=0,l;l=_listeners[event.type][i];i++){l(event)}return true}return false};this.hasEventListener=function(type){return(typeof _listeners[type]!="undefined"&&_listeners[type].length>0)};this.getStrict=function(){return _opts.strict};this.setStrict=function(strict){_opts.strict=enabled};this.getHistory=function(){return _opts.history};this.setHistory=function(history){_opts.history=history};this.getTracker=function(){return _opts.tracker};this.setTracker=function(tracker){_opts.tracker=tracker};this.getIds=function(){return _ids};this.getId=function(index){return _ids[0]};this.setId=function(id){_ids[0]=id};this.addId=function(id){this.removeId(id);_ids.push(id)};this.removeId=function(id){for(var i=0,swfid;swfid=_ids[i];i++){if(id==swfid){_ids.splice(i,1);break}}};this.getTitle=function(){return _d.title};this.setTitle=function(title){if(!_supported){return null}if(typeof title=="undefined"){return}if(title=="null"){title=""}_title=_d.title=title;if(_iframe&&_iframe.contentWindow){_iframe.contentWindow.document.title=title}};this.getStatus=function(){return top.status};this.setStatus=function(status){if(!_supported){return null}if(typeof status=="undefined"){return}if(!_browser.isSafari()){if(status=="null"){status=""}status=_strictCheck(status,true);if(status=="/"){status=""}if(!(/http(s)?:\/\//.test(status))){var index=_l.href.indexOf("#");status=(index==-1?_l.href:_l.href.substr(0,index))+"#"+status}top.status=status}};this.resetStatus=function(){top.status=""};this.getValue=function(){if(!_supported){return null}return _strictCheck(_value,false)};var timerFix;this.setValue=function(arg){clearTimeout(timerFix);timerFix=setTimeout("SWFAddress.setValueWithDelay('"+arg+"');",100)};this.setValueWithDelay=function(value){if(!_supported){return null}if(typeof value=="undefined"){return}if(value=="null"){value=""}value=_strictCheck(value,true);if(value=="/"){value=""}if(_value==value){return}_value=value;_silent=true;_update();_stack[_h.length]=_value;if(_browser.isSafari()){if(_opts.history){_l.swfaddress[_l.pathname]=_stack.toString();_length=_h.length+1;if(_browser.getVersion()<412){if(_l.search==""){_form.action="#"+_value;_form.submit()}}else{var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);var anchor=document.createElement("a");anchor.href="#"+_value;anchor.dispatchEvent(evt)}}else{_l.replace("#"+_value)}}else{if(_value!=_getHash()){if(_opts.history){_l.hash="#"+_value}else{_l.replace("#"+_value)}}}if(_browser.isIE()&&_opts.history){if(_opts.html){_iframe.contentWindow.location.assign(_iframe.contentWindow.location.pathname+"?"+_getHash())}else{_htmlWrite()}}setTimeout(_track,10);_silent=false};this.getPath=function(){var value=this.getValue();if(value.indexOf("?")!=-1){return value.split("?")[0]}else{return value}};this.getQueryString=function(){var value=this.getValue();var index=value.indexOf("?");if(index!=-1&&index<value.length){return value.substr(index+1)}return""};this.getParameter=function(param){var value=this.getValue();var index=value.indexOf("?");if(index!=-1){value=value.substr(index+1);var params=value.split("&");var p,i=params.length;while(i--){p=params[i].split("=");if(p[0]==param){return p[1]}}}return""};this.getParameterNames=function(){var value=this.getValue();var index=value.indexOf("?");var names=[];if(index!=-1){value=value.substr(index+1);if(value!=""&&value.indexOf("=")!=-1){var params=value.split("&");var i=0;while(i<params.length){names.push(params[i].split("=")[0]);i++}}}return names};if(!_supported){return}for(var i=1;i<_length;i++){_stack.push("")}_stack.push(_l.hash.replace(/^#/g,""));if(_browser.isIE()&&_l.hash!=_getHash()){_l.hash="#"+_getHash()}var scripts=document.getElementsByTagName("script");for(var i=0,s;s=scripts[i];i++){if(s.src.indexOf(_js)>-1){_url=String(s.src);break}}if(_url && (qi=_url.indexOf("?"))>-1){var param,params=_url.substr(qi+1).split("&");for(var j=0,p;p=params[j];j++){param=p.split("=");if(/^(history|html|strict)$/.test(param[0])){_opts[param[0]]=(isNaN(param[1])?eval(param[1]):(parseFloat(param[1])>0))}if(/^tracker$/.test(param[0])){_opts[param[0]]=param[1]}}}if(/file:\/\//.test(_l.href)){_opts.html=false}_titleCheck();com.asual.util.Events.addListener(document,"DOMContentLoaded",_load)};if(typeof swfobject!="undefined"){SWFObject=swfobject}if(typeof FlashObject!="undefined"){SWFObject=FlashObject}if(typeof SWFObject!="undefined"){if(SWFObject.prototype&&SWFObject.prototype.write){com.asual.SWFObjectWrite=SWFObject.prototype.write;SWFObject.prototype.write=function(){if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof arguments[0]=="string")?document.getElementById(arguments[0]):arguments[0]).so=this}if(success=com.asual.SWFObjectWrite.apply(this,arguments)){SWFAddress.addId(this.getAttribute("id"))}return success}}else{com.asual.SWFObjectRegisterObject=SWFObject.registerObject;SWFObject.registerObject=function(){com.asual.SWFObjectRegisterObject.apply(this,arguments);SWFAddress.addId(arguments[0])};com.asual.SWFObjectCreateSWF=SWFObject.createSWF;SWFObject.createSWF=function(){com.asual.SWFObjectCreateSWF.apply(this,arguments);SWFAddress.addId(arguments[0].id)};com.asual.SWFObjectEmbedSWF=SWFObject.embedSWF;SWFObject.embedSWF=function(){com.asual.SWFObjectEmbedSWF.apply(this,arguments);SWFAddress.addId(arguments[8].id)}}}if(typeof UFO!="undefined"){com.asual.UFOCreate=UFO.create;UFO.create=function(){com.asual.UFOCreate.apply(this,arguments);SWFAddress.addId(arguments[0].id)}}if(typeof AC_FL_RunContent!="undefined"){com.asual.AC_FL_RunContent=AC_FL_RunContent;AC_FL_RunContent=function(){com.asual.AC_FL_RunContent.apply(this,arguments);for(var c=0,b;b=arguments[c];c++){if(b=="id"){SWFAddress.addId(arguments[c+1]);break}}}};
/* Copyright (c) 2007-2008 Ali Rantakari ( http://hasseg.org/blog )
*  VERSION 2.0 Apr 2008
*  This code is licensed under the MIT License http://en.wikipedia.org/wiki/MIT_License */
var extMouseWheel=function(){var c=true;var e=[];var d=function(f){if(navigator.appName.indexOf("Microsoft")!=-1){return window[f];}else{return document[f];}};var h=function(f){var i=0;if(f.offsetParent){while(1){i+=f.offsetLeft;if(!f.offsetParent){break;}f=f.offsetParent;}}else{if(f.x){i+=f.x;}}return i;};var g=function(i){var f=0;if(i.offsetParent){while(1){f+=i.offsetTop;if(!i.offsetParent){break;}i=i.offsetParent;}}else{if(i.y){f+=i.y;}}return f;};var a=function(f){return(navigator.userAgent.indexOf(f)!=-1);};var b=function(k){var m=0;if(!k){k=window.event;}if(k.wheelDelta){m=k.wheelDelta/120;if(window.opera){m=-m;}}else{if(k.detail){m=-k.detail*3;}}if(c){if(m>0){m=3;}else{if(m==0){m=0;}else{m=-3;}}}if(m){var i=null;for(var f in e){if(e[f]!=null&&e[f]==k.currentTarget){i=f;}}var l;if(a("Camino")){l={x:k.layerX,y:k.layerY};}else{if(a("Firefox")){l={x:(k.layerX-h(k.currentTarget)),y:(k.layerY-g(k.currentTarget))};}else{l={x:k.offsetX,y:k.offsetY};}}l.ctrlKey=(a("Mac"))?(k.metaKey||k.ctrlKey):k.ctrlKey;l.altKey=k.altKey;l.shiftKey=k.shiftKey;l.buttonDown=false;if(d(i).dispatchExternalMouseWheelEvent){d(i).dispatchExternalMouseWheelEvent(m,l.x,l.y,l.ctrlKey,l.altKey,l.shiftKey,l.buttonDown);}}if(k.preventDefault){k.preventDefault();}k.returnValue=false;};return{initCaptureFor:function(i){if(a("Mac")||a("Safari")){var f=document.getElementById(i).parentNode;while(f!=null&&f.nodeName!="DIV"){f=f.parentNode;}if(f!=undefined&&f!=null){e[i]=f;if(f.addEventListener){f.addEventListener("DOMMouseScroll",b,false);}f.onmousewheel=b;return true;}else{return false;}}else{return false;}}};}();
// FluidHtmlJS v 0.9
var FHTML_DEFAULT_INDEX_PAGE		= "index.php"
var FHTML_DIV 						= "fhtml";
var FHTML_SWF_NAME 					= "fhtml_main";
var FHTML_SWF_PATH					= "Fhtml.swf";
var FHTML_SWF_VERSION				= "10";
var FHTML_TRACE 					= "jsTrace";
var EXECUTE_FHTML 					= "executeFhtml";
var DEBUG_TEXTAREA					= "debug";

//allow resize width and allow resize height.
var rsw= false;
var rsh= false

function loadFhtmlSwf(defaultLayout, swfPath, w, h, bgColor, modulePath, base, noFlashUrl) {
	var so = new SWFObject(swfPath, FHTML_SWF_NAME, w, h, FHTML_SWF_VERSION, bgColor,null,document.location.href,noFlashUrl);
	var path = defaultLayout == undefined ||defaultLayout == "" ? FHTML_DEFAULT_INDEX_PAGE : defaultLayout;
	FHTML_SWF_PATH = swfPath;
    so.useExpressInstall("javascript/swfobject/expressinstall.swf");
    so.addParam("allowFullScreen", "true");
    so.addParam("wmode", "window");
    so.addParam("flashVars", "defaultLayout=" + path + "&modulePath=" + modulePath+ "&encodeUrls=false");    
    if (base != undefined) so.addParam("base", base);
    //so.addVariable("defaultLayout", path);
    //if (modul != undefined) so.addVariable("frameworkPath", frameworkPath);
	so.write(FHTML_DIV);
}

function debug(val) {
	document.getElementById(DEBUG_TEXTAREA).value = val;
}
function getLocation() {
	return window.location.toString();
}
function getFlash(name) {
     if (navigator.appName.indexOf("Microsoft") != -1) return window[name];
     else return document[name];
}
function callFlash(swf, func, value) {
     getFlash(swf)[func](value);
}
function focusFlash() {
	window.document[FHTML_SWF_NAME].focus();
}
function trace(value) {
	callFlash(FHTML_SWF_NAME, FHTML_TRACE, "jsTrace: " + value);
}
//was called executeFhtml - wanted something...shorter...
function doFhtml(action) {
	callFlash(FHTML_SWF_NAME, EXECUTE_FHTML, action);
}
//Not sure if this matters anymore...
function fhtmlScript(val) {
	var a = val.split(";");
	for (var index = 0; index < a.length - 1; index++) callFlash(FHTML_SWF_NAME, EXECUTE_FHTML, a[index])
}
function onPageLoad() {
	//resets browser so flash can behave as "100%" h and w or fixed w and h that uses browser for overflow.  Called whenever a new layout loads at the top level.
	//NOT called manually.... Actually, might not need this anymore - onSwfResize will probably handle it...
	var fs = getFlashSize();
	var ws = getWindowSize();
	if (fs.w > ws.w || fs.h > ws.h) setFlashSize(ws.w, ws.h);
	else setFlashSize("100%", "100%");
}
function getWindowSize() {
	var w, h;
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			w = window.innerWidth;
			h = window.innerHeight;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1) {
			w = document.body.offsetWidth;
			h = document.body.offsetHeight;
		}
	}
	return {w:w, h:h};
}
function getFlashSize() {
	var w, h;
	if (document.all && !document.getElementById) {
		w = document.all[FHTML_DIV].offsetWidth;
		h = document.all[FHTML_DIV].offsetHeight;
	} else {
		w = document.getElementById(FHTML_DIV).offsetWidth;
		h = document.getElementById(FHTML_DIV).offsetHeight;
	}
	return {w:w, h:h};
}
function setFlashSize(w, h) {
	if (document.all && !document.getElementById) {
		document.all[FHTML_DIV].style.pixelWidth = w;
		document.all[FHTML_DIV].style.pixelHeight = h;
	} else {
		document.getElementById(FHTML_DIV).style.width = w;
		document.getElementById(FHTML_DIV).style.height = h;
	}
}
function setAllowedResizeAxes(w, h) {
	rsw = w;
	rsh = h;
}
function onPageResize() {
	var w, h;
	var fs = getFlashSize();
	var ws = getWindowSize();

	if (fs.w > ws.w && rsw) w = fs.w;
	else w = "100%";
	if (fs.h > ws.h && rsh) h = fs.h;
	else h = "100%";
	setFlashSize(w, h);
}
function onSwfExpand (w, h) {
	var nw, nh;
	var willChange = false;
	var ws = getWindowSize();
	var fs = getFlashSize();
	if (w > ws.w && rsw) {
		nw = w;
		willChange = true;
	}
	else nw = fs.w;
	if (h > ws.h && rsh) {
		nh = h;
		willChange = true;
	}
	else nh = fs.h;
	if (willChange == true) setFlashSize(nw, nh);
}