
if(typeof deconcept=="undefined")var deconcept=new Object();if(typeof deconcept.util=="undefined")deconcept.util=new Object();if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil=new Object();deconcept.SWFObject=function(swf,id,w,h,ver,c,quality,xiRedirectUrl,redirectUrl,detectKey){if(!document.getElementById){return;}
this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(swf){this.setAttribute('swf',swf);}
if(id){this.setAttribute('id',id);}
if(w){this.setAttribute('width',w);}
if(h){this.setAttribute('height',h);}
if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}
if(c){this.addParam('bgcolor',c);}
var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');if(redirectUrl){this.setAttribute('redirectUrl',redirectUrl);}}
deconcept.SWFObject.prototype={useExpressInstall:function(path){this.xiSWFPath=!path?"expressinstall.swf":path;this.setAttribute('useExpressInstall',true);},setAttribute:function(name,value){this.attributes[name]=value;},getAttribute:function(name){return this.attributes[name];},addParam:function(name,value){this.params[name]=value;},getParams:function(){return this.params;},addVariable:function(name,value){this.variables[name]=value;},getVariable:function(name){return this.variables[name];},getVariables:function(){return this.variables;},getVariablePairs:function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs[variablePairs.length]=key+"="+variables[key];}
return variablePairs;},getSWFHTML:function(){var swfNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath);}
swfNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'"';swfNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams();for(var key in params){swfNode+=[key]+'="'+params[key]+'" ';}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"';}
swfNode+='/>';}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath);}
swfNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'">';swfNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var params=this.getParams();for(var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />';}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />';}
swfNode+="</object>";}
return swfNode;},write:function(elementId){if(this.getAttribute('useExpressInstall')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!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 n=(typeof elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'));}}
return false;}}
deconcept.SWFObjectUtil.getPlayerVersion=function(){var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new deconcept.PlayerVersion(x.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 axo=1;var counter=3;while(axo){try{counter++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+counter);PlayerVersion=new deconcept.PlayerVersion([counter,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(PlayerVersion.major==6){return PlayerVersion;}}
try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}
if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return PlayerVersion;}
deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0;}
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true;}
deconcept.util={getRequestParameter:function(param){var q=document.location.search||document.location.hash;if(param==null){return q;}
if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1));}}}
return"";}}
deconcept.SWFObjectUtil.cleanupSWFs=function(){var objects=document.getElementsByTagName("OBJECT");for(var i=objects.length-1;i>=0;i--){objects[i].style.display='none';for(var x in objects[i]){if(typeof objects[i][x]=='function'){objects[i][x]=function(){};}}}}
if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);}
window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}
if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];}}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

Ext.namespace("KapIT");KapIT._hashmanager=null;KapIT._swfwrappers=null;KapIT._propertybox=null;function __setFlashPlayerWidth(divid,w)
{document.getElementById(divid).style.width=w+"px";document.getElementById(divid+"_object").setAttribute("width",w);}
function __setFlashPlayerHeight(divid,h)
{document.getElementById(divid).style.height=h+"px";document.getElementById(divid+"_object").setAttribute("height",h);}
function __getCurrentState()
{return KapIT._propertybox.getCurrentState();}
function __goBack()
{history.go(-1);}
function __callSWFWrapper(divid,method,args,async)
{if(!KapIT._swfwrappers){return;}
var wrapper=KapIT._swfwrappers[divid];if(!wrapper){return;}
var f=wrapper[method];if(!f){return;}
if(async){f.defer(50,wrapper,args);}else{if("SWFCreated"==method){f.apply(wrapper);}else{f.apply(wrapper,args);}}}
KapIT.registerSWFWrapper=function(id,obj)
{if(!obj||!id||!id.length)
return;if(!KapIT._swfwrappers)
KapIT._swfwrappers={};KapIT._swfwrappers[id]=obj;}
KapIT.unregisterSWFWrapper=function(id)
{if(!id||!id.length||!KapIT._swfwrappers)
return;KapIT._swfwrappers[id]=null;}
KapIT.getCookie=function(name)
{var cookies={};var c=document.cookie+";";var re=/\s?(.*?)=(.*?);/g;var matches;while((matches=re.exec(c))!=null)
{var n=matches[1];var value=matches[2];if(n=="KAPIT-"+name)
return value;}
return"";};KapIT.setCookie=function(name,value)
{document.cookie="KAPIT-"+name+"="+value+";"+"expires="+new Date(new Date().getTime()+(3600000*24*93)).toGMTString()+";path=/;";};KapIT.toHex=function(v,minlength)
{if(v==undefined||isNaN(v))
return undefined;var tokens="0123456789abcdef";var str="";var a=v,d,r;while(true)
{d=Math.floor(a/16);r=a%16;str=tokens.charAt(r)+str;if(d<16)
{if(d!=0)
str=tokens.charAt(d)+str;break;}
a=d;}
if(minlength==undefined||str.length>=minlength)
return str;var prefix="";for(var i=0;i<minlength-str.length;i++)
prefix+="0";return prefix+str;}
KapIT.parseJSONString=function(s)
{while(s.length>0&&(s.charAt(0)!="{")&&(s.charAt(0)!="["))
s=s.substring(1,s.length);if(s.length>0)
{var e=Math.max(s.lastIndexOf("]"),s.lastIndexOf("}"));s=s.substring(0,e+1);return eval("("+s+")");}
return null;}

KapIT.HashManager=function(callback,usecookie)
{if(KapIT._hashmanager!=null)
return;KapIT._hashmanager=this;this._ready=false;this._callback=callback;this._currenthash=this._getHash();this._usecookie=usecookie;if(usecookie)
{if(this._currenthash=="")
{this._currenthash=KapIT.getCookie("application-state");if(this._currenthash!="")
document.location.hash=this._currenthash;}
else
KapIT.setCookie("application-state",this._currenthash);}}
Ext.extend(KapIT.HashManager,Object,{_ready:false,_currenthash:null,_callback:null,_ieframe:null,_usecookie:false,run:function()
{if(this._ready)
return;if(Ext.isIE)
{this._ieframe=document.getElementById("kapit_hmanager_frame");if(!this._ieframe)
{var f=document.createElement("iframe");f.setAttribute("id","kapit_hmanager_frame");f.style.position="absolute";f.style.left=0;f.style.top=0;f.style.width=1;f.style.height=1;f.style.visibility="hidden";f.setAttribute("src","");document.body.appendChild(f);this._writeIEFrame(this._currenthash);}}
this._runHashWatcher();},getHash:function()
{return this._decode(this._currenthash);},setHash:function(h)
{if(h==null)
h="";h=this._encode(h);if(this._usecookie)
KapIT.setCookie("application-state",h);this._ieframe=document.getElementById("kapit_hmanager_frame");if(this._ieframe)
{document.location.hash=h;this._writeIEFrame(h);}
else
{document.location.hash=h;}},_writeIEFrame:function(h)
{try
{var d=this._ieframe.contentWindow.document;d.open();d.write('<html><body><script type="text\/javascript">window._hash="'+h+'";'+'window.onload=parent.KapIT._hashmanager._syncHash;<\/script><\/body><\/html>');d.close();}
catch(e)
{}},_syncHash:function()
{var h=document.location.href;var i=h.indexOf("#");h=i>=0?h.substr(i+1):"";if(this._hash!=h)
{document.location.hash=this._hash;}},_runHashWatcher:function()
{window.setInterval(function()
{var manager=KapIT._hashmanager;var h=manager._getHash();if(h!=manager._currenthash)
{manager._currenthash=h;manager._callback.call(manager,manager._decode(h));}},250);},_getHash:function()
{var h=top.location.href;var i=h.indexOf("#");return i>=0?h.substr(i+1):"";},_encode:function(h)
{if(!h)
return;h=h.replace(/[\{\[]/g,"(");h=h.replace(/[\}\]]/g,")");h=h.replace(/\,/g,"!");h=h.replace(/\:/g,"~");h=h.replace(/\"/g,"\'");return encodeURIComponent(h);},_decode:function(h)
{if(!h)
return;h=decodeURIComponent(h);h=h.replace(/\'/g,"\"");h=h.replace(/\!/g,",");h=h.replace(/\~/g,":");var re=/\(([^\:]+?[\,\)])/gi;h=h.replace(re,"[$1");re=/([\,\[][^\:^\)]*?)\)/gi;h=h.replace(re,"$1]");h=h.replace(/\(/g,"{");h=h.replace(/\)/g,"}");return h;}});

KapIT.PropertyBox=function(config,usecookie,nostate)
{if(KapIT._propertybox)
return;KapIT._propertybox=this;this._initProperties(config);if(!nostate)
this._connectToBrowserHistory(usecookie);this._defaultstate=this.getCurrentStateString();if(KapIT.getDocumentTitle)
{window.onfocus=this.updateDocumentTitle.createDelegate(this);window.onblur=this.updateDocumentTitle.createDelegate(this);}};Ext.extend(KapIT.PropertyBox,Object,{_properties:null,_listeners:null,_currstate:null,_hashmanager:null,_defaultstate:null,_initProperties:function(config)
{if(!config)
return;this._properties={};this._currstate={};var e;for(var i=0;i<config.length;i++)
{e=config[i];this._properties[e.name]=new KapIT.PropertyBox.Property(e.name,e.value,e.instate,e.equals);if(e.instate)
this._currstate[e.name]=e.value;}},_connectToBrowserHistory:function(usecookie)
{this._hashmanager=new KapIT.HashManager(this._onStateChange.createDelegate(this),usecookie);var oldstate=this._computeCurrentState();var str=this._hashmanager.getHash();this._updateState(oldstate,str);this._hashmanager.run();},_onStateChange:function(str)
{if(!str)
str=this._defaultstate;var oldstate=this._computeCurrentState();if(this._updateState(oldstate,str))
this._notifyStateChange(oldstate,this._currstate);this.updateDocumentTitle();},_updateState:function(oldstate,str)
{if(!str||!oldstate||!KapIT.parseJSONString)
return false;var state=KapIT.parseJSONString(str);if(!state)
return false;this._currstate={};var v;var modified=false;for(var p in oldstate)
{v=state[p];if(v==undefined)
v=oldstate[p];if(this._properties[p].modify(v,null,true))
modified=true;this._currstate[p]=this._properties[p].getValue();}
return modified;},_notifyStateChange:function(oldstate,newstate,initiator)
{if(!this._listeners)
return;var listener;for(var i=0;i<this._listeners.length;i++)
{listener=this._listeners[i];if(initiator&&(listener==initiator)){continue;}
if(listener.onStateChange)
listener.onStateChange.call(listener,oldstate,newstate);}},_computeCurrentState:function()
{if(!this._properties)
return;var state={};for(var p in this._properties)
{if(this._properties[p].isInState())
state[p]=this._properties[p].getValue();}
return state;},getCurrentState:function()
{return this._computeCurrentState();},getCurrentStateString:function()
{if(!this._properties)
return;var state="";var first=true;for(var n in this._properties)
{if(!this._properties[n].isInState())
continue;state+=first?"{":",";if(first)first=false;state+=n+":"+this._properties[n].getState();}
state+="}";return state;},addListener:function(prop,obj,callback)
{if(!this.hasListener(obj)&&obj.onStateChange!=undefined)
{if(this._listeners==null)
this._listeners=new Array();this._listeners.push(obj);}
if(!prop)
return;var p=this._properties[prop]
if(p)
p.addListener(obj,callback);},hasListener:function(obj)
{if(this._listeners==null||obj==null)
return false;for(var i=0;i<this._listeners.length;i++)
if(this._listeners[i]==obj)
return true;return false;},removeListener:function(prop,obj)
{var p=this._properties[prop]
if(!p)
return;p.removeListener(obj);},getValue:function(prop)
{var p=this._properties[prop]
if(!p)
return;return p.getValue();},changeState:function(props,values,obj)
{var oldstate=this._computeCurrentState();var modified=this.modify(props,values,obj,true);if(modified)
{var newstate=this._computeCurrentState();this._notifyStateChange(oldstate,newstate,obj);}},modify:function(props,values,obj,changestate)
{var modified;if(typeof props=="object")
{if(!(typeof values=="object"||values.length!=props.length))
return false;for(var i=0;i<props.length;i++)
if(this._modify(props[i],values[i],obj,changestate))
modified=true;}
else
modified=this._modify(props,values,obj,changestate);if(modified)
this._stateModified();return modified;},_modify:function(prop,value,obj,changingstate)
{var p=this._properties[prop]
if(!p)
return false;if(p.modify(value,obj,changingstate))
{this._currstate[prop]=p.getValue();return p.isInState();}
return false;},_stateModified:function()
{if(this._hashmanager)
this._hashmanager.setHash(this.getCurrentStateString());},updateDocumentTitle:function()
{if(KapIT.getDocumentTitle)
window.document.title=KapIT.getDocumentTitle();}});Ext.namespace("KapIT.PropertyBox");KapIT.PropertyBox.Property=function(name,value,instate,equals)
{this._name=name;this._value=this._decode(value);this._instate=instate;this.__equals=equals;};Ext.extend(KapIT.PropertyBox.Property,Object,{_name:null,_value:null,_listeners:null,_instate:false,addListener:function(obj,callback)
{if(!obj||!callback)
return false;if(this._listeners==null)
this._listeners=new Array();var e=this._getListenerEntry(obj);if(e!=null)
e.callback=callback.createDelegate(obj);else
this._listeners.push({obj:obj,callback:callback.createDelegate(obj)});return true;},removeListener:function(obj)
{if(!this._listeners)
return;for(var i=0;i<this._listeners.length;i++)
if(this._listeners[i].obj==obj)
{this._listeners.splice(i,1);break;}},hasListener:function(obj)
{return this._getListenerEntry(obj)!=null;},_getListenerEntry:function(obj)
{if(!this._listeners)
return null;for(var i=0;i<this._listeners.length;i++)
if(this._listeners[i].obj==obj)
return this._listeners[i];return null;},isInState:function()
{return this._instate;},getValue:function()
{return this._value;},modify:function(value,initiator,changingstate)
{if(changingstate)
value=this._decode(value);if(this._equals(this._value,value))
return false;this._value=value;this._notifyExcept(initiator,changingstate);return true;},_decode:function(v)
{if(typeof v=="string")
return unescape(v);if(v instanceof Array)
{for(var i=0;i<v.length;i++)
{if(typeof v[i]=="string")
v[i]=unescape(v[i]);}
return v;}
if(typeof v=="object")
{for(var n in v)
{if(typeof v[n]=="string")
v[n]=unescape(v[n]);}
return v;}
return v;},_equals:function(v0,v1)
{if(this.__equals)
return this.__equals.call(this,v0,v1);if(!v0&&!v1)
return true;if(v0 instanceof Array)
{if(!(v1 instanceof Array)||v1.length!=v0.length)
return false;for(var i=0;i<v0.length;i++)
{if(v1[i]!=v0[i])
return false;}
return true;}
if(typeof v0=="object")
{if(typeof v1!="object")
return false;for(var n in v0)
{if(v1[n]!=v0[n])
return false;}
for(var n in v1)
{if(v1[n]!=v0[n])
return false;}
return true;}
return v0==v1;},getState:function()
{if(typeof this._value=="string")
{escape(this._value[n]);return'"'+escape(this._value)+'"';}
if(typeof this._value!="object")
return this._value;if(this._value instanceof Array)
{var state="[";var first=true;for(var i=0;i<this._value.length;i++)
{state+=first?"":",";if(first)first=false;if(typeof this._value[i]=="string")
state+='"'+escape(this._value[i])+'"';else
state+=this._value[i];}
state+="]";return state;}
var state="";var first=true;for(var n in this._value)
{state+=first?"{":",";if(first)first=false;if(typeof this._value[n]=="string")
state+=n+':"'+escape(this._value[n])+'"';else
state+=n+':'+this._value[n];}
state+="}";return state;},_notifyExcept:function(initiator,changingstate)
{if(!this._listeners)
return;var entry;for(var i=0;i<this._listeners.length;i++)
{entry=this._listeners[i];if(!entry.callback||!entry.obj||(initiator&&(entry.obj==initiator))||(changingstate&&entry.obj.onStateChange))
continue;entry.callback.call(this,this._value);}}});

KapIT.SWFWrapper=function(file,baseurl,wrapper,width,height,vars,ver,xiurl)
{this._wrapperid=wrapper;this._baseurl=baseurl;KapIT.registerSWFWrapper(wrapper,this);if(!ver)
ver="9";KapIT.SWFWrapper.superclass.constructor.call(this,this._baseurl+"/"+file,wrapper+"_object",width,height,ver);var el=this.getWrapperElement();var bgcolor=undefined;if(el)
bgcolor=el.style.backgroundColor;if(bgcolor!=undefined)
{var re=/rgb\((\s*[0-9]{1,3}\s*?)\,(\s*[0-9]{1,3}\s*?)\,(\s*[0-9]{1,3}\s*?)\)/gi;var a=re.exec(bgcolor);if(a&&a.length==4)
{var v=Number(a[1]*256*256)+Number(a[2]*256)+Number(a[3]);bgcolor="#"+KapIT.toHex(v,6);}}
if(xiurl)
this.useExpressInstall(xiurl);this.addParam("base",this._baseurl);this.addParam("scale","noScale");this.addParam("SeamlessTabbing","false");this.addParam("allowScriptAccess","always");this.addParam("allowFullScreen","true");this.addParam("quality","best");this.addParam("bgcolor",bgcolor);for(var key in vars)
{var value=vars[key];this.addVariable(key,value);}
this.addVariable("__divid",wrapper);if(KapIT._locale!=undefined)
this.addVariable("__locale",KapIT._locale);this.write();if(KapIT._propertybox)
KapIT._propertybox.addListener(null,this,null);}
Ext.extend(KapIT.SWFWrapper,deconcept.SWFObject,{_wrapperid:null,_swfobject:null,_baseurl:null,write:function()
{KapIT.SWFWrapper.superclass.write.call(this,this._wrapperid);},getSWFObject:function()
{return document.getElementById(this._wrapperid+"_object");},getWrapperElement:function()
{return document.getElementById(this._wrapperid);},onStateChange:function(oldstate,newstate)
{if(!this._swfobject)
return;this._swfobject.onBrowserStateChange(oldstate,newstate);},SWFPropertiesChanged:function(props,values)
{if(!KapIT._propertybox)
return;KapIT._propertybox.changeState(props,values,this);},SWFCreated:function()
{this._swfobject=this.getSWFObject();}});
