/* mjl.js
 * MITSUE-LINKS JavaScript Library
 * Version 2.0.7
 * Copyright (C) 2008-2009 MITSUE-LINKS
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
/*@cc_on eval((function(){var ps="document external self top parent setInterval clearInterval setTimeout clearTimeout".split(" ");var c=[];for(var i=0,l=ps.length,p=null;i<l;i++){p=ps[i];window["_"+p]=window[p];c.push(p+"=_"+p);}return "var "+c.join(",");})()); @*/var MJL={};MJL.version="2.0.7";MJL.inherit=function(c,a){if(undefined!==c.__proto__&&undefined!==c.prototype.__proto__){c.prototype.__proto__=a.prototype;c.__proto__=a;if(a.prototype.isPrototypeOf&&a.prototype.isPrototypeOf(c.prototype)){return c}}c.prototype=new a();try{c.prototype.constructor=c}catch(b){throw Error("can't substitution 'constructor': "+b)}return c};MJL.convArray=function(d){if(d instanceof Array){return d}try{return Array.prototype.slice.call(d)}catch(c){var b=d.length;var a=new Array(b);for(var f=0;f<b;f++){a[f]=d[f]}return a}};MJL.sanitize=(function(){var a=/^[\s\t]+/;var b=/[\s\t]+$/;return function(c){return c.replace(a,"").replace(b,"")}})();MJL.ua=(function(){/*@cc_on @if (@_jscript) var type = "trident"; @else @*/var type=(undefined!==window.opera)?"opera":(undefined!==window.Components)?"gecko":(undefined!==window.defaultstatus)?"webkit":"unknown";/*@end @*/var ret={gecko:false,opera:false,webkit:false,trident:false,unknown:false,quirks:("BackCompat"==document.compatMode),version:("opera"==type)?Number(window.opera.version()):("webkit"==type)?document.evaluate?3:2:("trident"==type)?("undefined"!=typeof document.documentMode)?document.documentMode:("undefined"!=typeof external.SqmEnabled)?7:6:0,activex:("undefined"!=typeof ActiveXObject)};ret[type]=true;return ret})();MJL.convNode=function(f){var b=document.createElement("div");b.innerHTML=f;var d=b.childNodes;var e=d.length;var a=null;if(e<=1){a=d[0]}else{a=document.createDocumentFragment();for(var g=0;g<e;g++){a.appendChild(d[0])}}return a};MJL.getClassNameRegExp=(function(){var a={};return function(b){if(undefined===a[b]){a[b]=new RegExp("(?:^|[\\s\\t]+)"+b+"(?:[\\s\\t]+|$)")}return a[b]}})();MJL.hasClassName=function(b,a){if("string"!=typeof a){return false}return MJL.getClassNameRegExp(a).test(b.className)};MJL.addClassName=function(b,a){if(MJL.hasClassName(b,a)){return}b.className=b.className?b.className+" "+a:a};MJL.removeClassName=function(c,a){if(!MJL.hasClassName(c,a)){return}var b=MJL.sanitize(c.className.replace(MJL.getClassNameRegExp(a)," "));if(b){c.className=b}else{c.removeAttribute("class");c.removeAttribute("className")}};MJL.getElementsByClassName=(function(){if(document.getElementsByClassName){return function(b,a){return MJL.convArray(b.getElementsByClassName(a))}}else{if(document.querySelectorAll){return function(b,a){return MJL.convArray(b.querySelectorAll("."+a))}}else{if(document.evaluate){return function(d,b){var e=document.evaluate('.//*[contains(concat(" ",@class," ")," '+b+' ")]',d,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var f=e.snapshotLength;var a=new Array(f);for(var c=0;c<f;c++){a[c]=e.snapshotItem(c)}return a}}else{return function(e,c){var b=e.getElementsByTagName("*");var d=b.length;var a=[];for(var f=0;f<d;f++){if(MJL.hasClassName(b[f],c)){a.push(b[f])}}return a}}}}})();MJL.getElementsByChildNodes=(function(){if(document.evaluate){return function(d,g,a){var e=document.evaluate(!g?"./*":(false===a)?"./*[not(self::"+g+")]":"./"+g,d,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var f=e.snapshotLength;var b=new Array(f);for(var c=0;c<f;c++){b[c]=e.snapshotItem(c)}return b}}else{return function(e,g,a){var c=e.childNodes;var d=c.length;var b=[];if(false!==a){a=true}for(var f=0;f<d;f++){if(1==c[f].nodeType&&(!g||a==(g==c[f].nodeName.toLowerCase()))){b.push(c[f])}}return b}}})();MJL.vp=(function(){var a=MJL.ua.quirks?"body":"documentElement";return{getInnerSize:function(){var b=0;var c=0;if(MJL.ua.webkit&&MJL.ua.version<3){b=window.innerWidth;c=window.innerHeight}else{if(MJL.ua.opera&&MJL.ua.version<9.5){b=document.body.clientWidth;c=document.body.clientHeight}else{b=document[a].clientWidth;c=document[a].clientHeight}}return{width:b,height:c}},getFullSize:function(){return{width:document[a].scrollWidth,height:document[a].scrollHeight}},getScrollPosition:function(){return{x:(window.pageXOffset||document[a].scrollLeft),y:(window.pageYOffset||document[a].scrollTop)}}}})();MJL.event={add:function(f,d,g,a,e){var c=e?g:this._wrapAfterCare(g);var b=c;if(this._origins[d]){b=this._origins[d].add(f,c,a)}else{if(f.addEventListener){f.addEventListener(d,c,a)}else{if(f.attachEvent){f.attachEvent("on"+d,c)}else{b=null}}}if(!e&&null!==b&&"unload"!=d){this._store(f,d,b,a)}return b},remove:function(d,c,e,a){var b=e;if(this._origins[c]){b=this._origins[c].remove(d,e,a)}else{if(d.removeEventListener){d.removeEventListener(c,e,a)}else{if(d.detachEvent){d.detachEvent("on"+c,e)}}}return b},getCurrentNode:function(a){return a.currentTarget?a.currentTarget:a.srcElement?a.srcElement:window.event.srcElement?window.event.srcElement:null},windowLoaded:false,_types:{},_store:function(c,b,d,a){if(undefined===this._types[b]){this._types[b]=[]}this._types[b].push({node:c,listener:d,useCapture:a})},_origins:{},_createStack:function(a){if(undefined===this._origins[a]._callStack){this._origins[a]._callStack={id:0,listeners:{}}}},_getStack:function(a){return this._origins[a]._callStack},_addStack:function(b,c){this._createStack(b);var a=this._getStack(b);var d=a.id;a.listeners[d]=c;a.id++;return d},_removeStack:function(b,c){var a=this._getStack(b);if(undefined===a||undefined===a.listeners[c]){return false}delete a.listeners[c];return true},_runStack:function(c){var a=this._getStack(c);if(undefined===a){return}for(var b in a.listeners){a.listeners[b]()}},_wrapAfterCare:function(a){return function(c){var b=a.apply(a,arguments);if(false===b){if(c.preventDefault){c.preventDefault()}else{c.returnValue=false}if(c.stopPropagation){c.stopPropagation()}else{c.cancelBubble=true}}}}};MJL.event.add(window,"unload",function(){var b=MJL.event._types;for(var c in b){var e=b[c];var d=e.length;for(var a=0;a<d;a++){MJL.event.remove(e[a].node,c,e[a].listener,e[a].useCapture)}}},false,true);MJL.event.add(window,"load",function(){MJL.event.windowLoaded=true},false);MJL.event._origins.resize=(MJL.ua.trident&&7<=MJL.ua.version)?{add:(function(){var a=true;function b(){a=true}var c=0;window.attachEvent("onresize",function(){if(a){a=false;MJL.event._runStack("resize");setTimeout(b,0)}});return function(e,f,d){return MJL.event._addStack("resize",f)}})(),remove:function(b,c,a){return MJL.event._removeStack("resize",c)}}:undefined;MJL.event._origins.fontresize={add:(function(){if(MJL.ua.trident){return function(c,d,b){return MJL.event.add(MJL.style._getUnitElem(),"resize",d,b)}}else{var a=false;return function(c,d,b){var e=MJL.event._addStack("fontresize",d);if(!a){a=true;setInterval(function(){if(MJL.style.isZoomed()){MJL.event._runStack("fontresize")}},1000)}return e}}})(),remove:(function(){if(MJL.ua.trident){return function(b,c,a){return MJL.event.remove(MJL.style._getUnitElem(),"resize",c,a)}}else{return function(b,c,a){return MJL.event._removeStack("fontresize",c)}}})()};MJL.style={getWithTitles:function(){var d=MJL.ua.webkit?this._getList():document.styleSheets;var a=d.length;var b={};for(var c=0;c<a;c++){var e=d[c].title;if(!e){continue}if(undefined==b[e]){b[e]=[]}b[e].push(d[c])}return b},switchAlt:function(e){var c=this.getWithTitles();if(undefined===c[e]){return false}for(var i in c){var a=c[i];var f=a.length;for(var b=0;b<f;b++){a[b].disabled=true}}var d=c[e];var h=d.length;for(var g=0;g<h;g++){d[g].disabled=false}return true},getComputed:(function(){var a={height:{enable:(MJL.ua.trident||(MJL.ua.opera&&MJL.ua.version<9.5)),calc:function(f,i,c){var h=parseInt(this.getComputed(f,"paddingTop"))||0;var g=parseInt(this.getComputed(f,"paddingBottom"))||0;var d;if(MJL.ua.trident&&7<=MJL.ua.version&&!f.currentStyle.hasLayout){var e=f.style.zoom;f.style.zoom=1;d=f.clientHeight;f.style.zoom=e}else{d=f.clientHeight}return(d<=0)?0:(d-h-g)+"px"}},fontSize:{enable:(MJL.ua.trident||(MJL.ua.webkit&&MJL.ua.webkit<3)),calc:function(d,e,c){return this._getUnitElem().offsetWidth+"px"}}};if(document.defaultView&&document.defaultView.getComputedStyle){var b=document.defaultView;return function(d,e){var c=b.getComputedStyle(d,null)[e];if(a[e]&&a[e].enable){c=a[e].calc.apply(this,[d,e,c])}return c}}else{if(document.documentElement&&document.documentElement.currentStyle){return function(e,g){var d=e.currentStyle[g];if(a[g]&&a[g].enable){d=a[g].calc.apply(this,[e,g,d])}else{if(!this._cond.px.test(d)&&this._cond.num.test(d)){var f=e.style.left;var c=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;e.style.left=d||0;d=e.style.pixelLeft;e.style.left=f;e.runtimeStyle.left=c}}return d}}else{throw Error("not supported getting computed style")}}})(),isZoomed:(function(){if(MJL.ua.opera){var a=0;var c=0;MJL.event.add(window,"load",function(){innerSize=MJL.vp.getInnerSize();c=MJL.style.getComputed(document.body,"fontSize")},false);return function(){var e=MJL.vp.getInnerSize();var d=MJL.style.getComputed(document.body,"fontSize");if(innerSize.width==e.width&&innerSize.height==e.height&&c==d){return false}innerSize=e;c=d;return true}}else{var b=0;MJL.event.add(window,"load",function(){b=MJL.style.getComputed(document.body,"fontSize")},false);return function(){var d=MJL.style.getComputed(document.body,"fontSize");if(b==d){return false}b=d;return true}}})(),_cond:{px:/\d\s*px$/i,num:/^\d/,rel:/(?:^|\s)stylesheet(?:\s|$)/i},_unitElem:null,_getUnitElem:function(){if(null===this._unitElem){var a=document.createElement("div");a.style.display="block";a.style.width="1em";a.style.height="1em";a.style.position="absolute";a.style.top="-999em";a.style.left="-999em";document.body.appendChild(a);this._unitElem=a}return this._unitElem},_getList:function(){var b=document.getElementsByTagName("link");var d=b.length;var c=[];for(var a=0;a<d;a++){if(this._cond.rel.test(b[a].getAttribute("rel"))){c.push(b[a])}}return c}};MJL.style.Switcher=function(){this.parent=null;this.targets=[];var a=this;this.options={collect:a._collectDefault};this._cookie=new MJL.Cookie(this._COOKIE_STATUS.name,this._COOKIE_STATUS.optional);this.setOptions.apply(this,arguments)};MJL.style.Switcher.prototype={setOptions:function(b,a){if(arguments.length<1){return}this.parent=b;if(null!==a&&"object"==typeof a){for(var c in this.options){if(undefined===a[c]){continue}this.options[c]=a[c]}}},create:function(){this.setOptions.apply(this,arguments);this._setTargets();this._setEvent();this._getCookie()},set:function(a){MJL.style.switchAlt(a);this._setCookie(a)},_COOKIE_STATUS:{name:"MJL.style.Switcher",key:"title",optional:{path:"/",fileUnit:false}},_collectDefault:function(f){var g=("a"==f.nodeName.toLowerCase())?[f]:f.getElementsByTagName("a");var h=g.length;var d=[];for(var c=0;c<h;c++){var b=g[c].getAttribute("href");var e=b.lastIndexOf("#");var i=(-1==e)?"":b.substring(e+1);if(i){d.push({node:g[c],title:i})}}return d},_setTargets:function(){this.targets=this.options.collect.call(this,this.parent)},_setEvent:function(){var a=this.targets.length;for(var b=0;b<a;b++){MJL.event.add(this.targets[b].node,"click",this._getEventListener(b),false)}},_getEventListener:function(b){var a=this;return function(){a.set(a.targets[b].title);return false}},_getCookie:function(){var a=this._cookie.get(this._COOKIE_STATUS.key);if(a){this.set(a)}},_setCookie:function(a){this._cookie.set(this._COOKIE_STATUS.key,a)}};MJL.Cookie=function(){this.name="";this.params={path:"",domain:"","max-age":31536000,secure:false};this.options={fileUnit:true,index:"index.html"};this._nameCond={str:"",regexp:null};this.setOptions.apply(this,arguments)};MJL.Cookie.prototype={setOptions:function(b,a){if(null!==a&&"object"==typeof a){for(var d in this.options){if(undefined===a[d]){continue}this.options[d]=a[d]}for(var c in this.params){if(undefined===a[c]){continue}this.params[c]=a[c]}}this.setName(b)},setName:function(a){if(!a||"string"!=typeof a){throw Error("invalid cookie name ("+a+")")}if(this.options.fileUnit){var b=window.location.pathname;if(this._DIR_COND.test(b)&&this.options.index){b+=this.options.index}a+="@"+b}this.name=a;this._nameCond.str=a+"=";this._nameCond.regexp=new RegExp("^"+a+"=")},get:function(a){var b=this._getAll();return("string"==typeof a)?b[a]:b},set:function(d,e){if(undefined===d||undefined===e){return}var b=this._getAll();var a=[];b[d]=e;for(var c in b){if(undefined===b[c]){continue}a.push(encodeURIComponent(c)+":"+encodeURIComponent(b[c]))}if(0<a.length){document.cookie=this.name+"="+a.join(",")+this._getParamStr()}},remove:function(){var a=this.params["max-age"];this.params["max-age"]=0;document.cookie=this.name+"="+this._getParamStr();this.params["max-age"]=a},_DIR_COND:/\/$/i,_DELIMITERS:{item:/\s*;\s*/,value:/\s*\,\s*/,hash:/\s*:\s*/},_param2:{path:{cond:function(a){return a},conv:function(a){return a}},domain:{cond:function(a){return a},conv:function(a){return a}},"max-age":{cond:function(a){return !isNaN(a)},conv:function(a){return a}},secure:{cond:function(a){return a},conv:function(a){return(a?"sequre":"")}}},_getAll:function(){var h=document.cookie;if(!h){return{}}var f={};var c=h.split(this._DELIMITERS.item);var a=c.length;for(var e=0;e<a;e++){if(0==c[e].indexOf(this._nameCond.str)){var i=c[e].replace(this._nameCond.regexp,"").split(this._DELIMITERS.value);var g=i.length;for(var j=0;j<g;j++){var b=i[j].split(this._DELIMITERS.hash);f[decodeURIComponent(b[0])]=decodeURIComponent(b[1])}break}}return f},_getParamStr:function(){var c=[];for(var b in this.params){if(this._param2[b].cond(this.params[b])){c.push(b+"="+this._param2[b].conv(this.params[b]))}}var a=this._getExpiresStr();if(a){c.push(a)}var d=c.join(";");return((""==d)?"":";"+d)},_getExpiresStr:function(){var b=this.params["max-age"];if(isNaN(b)){return""}var a=new Date();a.setTime(a.getTime()+b);return"expires="+a.toGMTString()}};MJL.Rollover=function(){this.targets=[];this.enable="";this.options={disable:"",switchers:{on:{cond:/(\.[^\.]+)$/g,replace:"_o$1"},off:{cond:"",replace:""}}};this.setOptions.apply(this,arguments)};MJL.Rollover.prototype={setOptions:function(b,a){if(arguments.length<1){return}this.enable=b;if(null!==a&&"object"==typeof a){for(var c in this.options){if(undefined===a[c]){continue}this.options[c]=a[c]}}},create:function(){this.setOptions.apply(this,arguments);this._setTargets();this._setEvents()},_TYPES:(function(){function a(c){return function(d){var e=d.getAttribute("src").replace(this.options.switchers[c].cond,this.options.switchers[c].replace);this._addCache(e);return function(){d.setAttribute("src",e)}}}function b(c){return function(g){var j=g.getElementsByTagName("img");var h=j.length;var f=a(c);var e=new Array(h);for(var d=0;d<h;d++){e[0]=f.call(this,j[d])}return function(){for(var k=0;k<h;k++){e[k]()}}}}return{img:{isTarget:function(){return true},getters:{mouseover:a("on"),mouseout:a("off")}},input:{isTarget:function(c){return("image"==c.getAttribute("type"))},getters:{mouseover:a("on"),mouseout:a("off"),focus:a("on"),blur:a("off")}},a:{isTarget:function(c){var d=c.getElementsByTagName("img");return(0<d.length)},getters:{focus:b("on"),blur:b("off")}}}})(),_isEnable:function(a){if(!this.options.disable){return true}do{if(MJL.hasClassName(a,this.options.disable)){return false}if(MJL.hasClassName(a,this.enable)){return true}a=a.parentNode}while(a);return false},_isTarget:function(b){var a=b.nodeName.toLowerCase();if(undefined===this._TYPES[a]){return false}if(this._TYPES[a].isTarget(b)&&this._isEnable(b)){return true}return false},_getElements:function(){var d=[];var a=MJL.getElementsByClassName(document,this.enable);var b=a.length;for(var g=0;g<b;g++){if(this._isTarget(a[g])){d.push(a[g])}for(var j in this._TYPES){var f=a[g].getElementsByTagName(j);var h=f.length;for(var i=0;i<h;i++){if(this._isTarget(f[i])){d.push(f[i])}}}}return d},_setTargets:function(){var b=this._getElements();var d=b.length;for(var h=0;h<d;h++){var c=b[h].nodeName.toLowerCase();var g={element:b[h],events:{}};var f=this._TYPES[c].getters;for(var a in f){g.events[a]=f[a].call(this,b[h])}this.targets.push(g)}},_setEvents:function(){var a=this.targets.length;for(var b=0;b<a;b++){for(var c in this.targets[b].events){MJL.event.add(this.targets[b].element,c,this.targets[b].events[c],false)}}},_addCache:(function(){var a={};return function(b){if(a[b]){return}a[b]=document.createElement("img");a[b].setAttribute("src",b)}})()};MJL.Flash=function(){this.node=null;this.alt=null;this.options={activate:false,version:0,minVerMsg:null};this.params={};this.validCreated=false;this.setOptions.apply(this,arguments)};MJL.Flash.prototype={type:"application/x-shockwave-flash",pluginurl:"http://www.adobe.com/go/getflashplayer",classid:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab",version:(function(){var d="";try{d=navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin.description;d.match(/(\d+)\.(\d+)(?:\s*[r\.](\d+))?(?:\s*[bd](\d+))?$/)}catch(c){try{d=(new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")).GetVariable("$version")}catch(c){try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");d="6,0,21,0";b.AllowScriptAccess="always";d=b.GetVariable("$version")}catch(c){try{d=(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(c){d=""}}}d.match(/(\d+),(\d+),(\d+),(\d+)/)}var a={major:0,minor:0,revision:0,debug:0};if(d){a.major=parseInt(RegExp.$1)||0;a.minor=parseInt(RegExp.$2)||0;a.revision=parseInt(RegExp.$3)||0;a.debug=parseInt(RegExp.$4)||0}return a})(),enable:(function(){try{return !!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin}catch(a){try{return !!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))}catch(a){}}return false})(),compVersion:function(b,d,c,a){b=parseInt(b);d=parseInt(d);c=parseInt(c);a=parseInt(a);return((this.version.major<b)?1:(this.version.major>b)?-1:isNaN(d)?0:(this.version.minor<d)?1:(this.version.minor>d)?-1:isNaN(c)?0:(this.version.revision<c)?1:(this.version.revision>c)?-1:isNaN(a)?0:(this.version.debug<a)?1:(this.version.debug>a)?-1:0)},setOptions:function(b,a){if(arguments.length<1){return}if(1!=b.nodeType||"object"!=b.nodeName.toLowerCase()){throw Error("invalid 'object' element node: "+elem)}this.node=b;this.validCreated=false;if(null!==a&&"object"==typeof a){for(var c in this.options){if(undefined===a[c]){continue}this.options[c]=a[c]}}this._setParams();this._setOptionsByParams()},create:function(){this.setOptions.apply(this,arguments);this._switchNode();this._activate();return this.node},_setParams:function(){var c=MJL.getElementsByChildNodes(this.node,"param");var a=c.length;for(var b=0;b<a;b++){this.params[c[b].getAttribute("name")]=c[b].getAttribute("value")}},_setOptionsByParams:function(){for(var a in this.options){if(undefined===this.params[a]){continue}this.options[a]=this.params[a]}},_switchNode:function(){if(this.enable){if(this.compVersion(this.options.version)<=0){this.validCreated=true;return}this.alt=(this.options.minVerMsg)?this._createMinVerMsg():this._createAlt();var b=this.alt;var a=this.node;this.node=this.alt;a.parentNode.replaceChild(b,a)}},_createMinVerMsg:function(){return("string"==typeof this.options.minVerMsg)?MJL.convNode(this.options.minVerMsg):this.options.minVerMsg},_createAlt:(function(){if(MJL.ua.trident){return function(){return MJL.convNode(this.node.innerHTML)}}else{return function(){var d=document.createDocumentFragment();var a=MJL.getElementsByChildNodes(this.node,"param",false);var b=a.length;for(var c=0;c<b;c++){d.appendChild(a[c].cloneNode(true))}return d}}})(),_activate:function(){if(MJL.ua.activex&&this.options.activate&&this.validCreated){this._setCopyObject();this.node.setAttribute("classid",this.classid)}},_setCopyObject:function(){var g=document.createElement("object");var d=this.node.attributes;var e=d.length;for(var b=0;b<e;b++){if(""==d[b].value||"null"===d[b].value||"type"==d[b].name||"classid"==d[b].name){continue}g.setAttribute(d[b].name,d[b].value)}var f=this.node.childNodes;var h=f.length;for(var i=0;i<h;i++){g.appendChild(f[i].cloneNode(true))}this.node.parentNode.replaceChild(g,this.node);this.node=g}};MJL.Flash.version=MJL.Flash.prototype.version;MJL.Flash.enable=MJL.Flash.prototype.enable;MJL.Flash.compVersion=MJL.Flash.prototype.compVersion;MJL.Window=function(){this.parent=null;this.targets=[];var a=this;this.options={name:"_blank",collect:a._collectDefault};this.params={left:null,top:null,height:null,width:null,menubar:"yes",toolbar:"yes",location:"yes",status:"yes"};this.setOptions.apply(this,arguments)};MJL.Window.prototype={setOptions:function(b,a){if(arguments.length<1){return}this.parent=b;if(null!==a&&"object"==typeof a){for(var d in this.options){if(undefined===a[d]){continue}this.options[d]=a[d]}for(var c in this.params){if(undefined===a[c]){continue}this.params[c]=this._normalizeParam(a[c])}}},create:function(){this.setOptions.apply(this,arguments);this._setTargets();this._setEvents()},open:function(b){var a=window.open(this.targets[b].uri,this.options.name,this._getParamStr());this.targets[b].ref=a?a:null},_IMMUTABLE_PARAMS:{resizable:"yes",scrollbars:"yes"},_NODE2URI:{a:function(a){return a.getAttribute("href")}},_collectDefault:function(a){return(("a"==a.nodeName.toLowerCase())?[a]:a.getElementsByTagName("a"))},_collectHTTP:function(k){var c=[];if("a"==k.nodeName.toLowerCase()){var d=k.getAttribute("href");if(d&&"http"==d.substring(0,4)){c=[k]}}else{if(document.evaluate){var h=document.evaluate('.//a[starts-with(@href, "http")]',k,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var f=h.snapshotLength;c.length=f;for(var g=0;g<f;g++){c[g]=h.snapshotItem(g)}}else{var b=k.getElementsByTagName("a");var e=b.length;for(var j=0;j<e;j++){var d=b[j].getAttribute("href");if(d&&"http"==d.substring(0,4)){c.push(b[j])}}}}return c},_setTargets:function(){var a=this.options.collect.call(this,this.parent);var b=a.length;for(var c=0;c<b;c++){var d=a[c].nodeName.toLowerCase();this.targets[c]={node:a[c],uri:this._NODE2URI[d](a[c]),ref:null}}},_setEvents:function(){var a=this.targets.length;for(var b=0;b<a;b++){MJL.event.add(this.targets[b].node,"click",this._getEventListener(b),false)}},_getEventListener:function(b){var a=this;return function(){a.open(b);return false}},_getParamStr:function(){var a=[];for(var c in this.params){if(null===this.params[c]){continue}a.push(c+"="+this.params[c])}for(var b in this._IMMUTABLE_PARAMS){a.push(b+"="+this._IMMUTABLE_PARAMS[b])}return a.join(",")},_normalizeParam:function(a){return((true===a)?"yes":(false===a)?"no":a)}};MJL.Window.collectDefault=MJL.Window.prototype._collectDefault;MJL.Window.collectHTTP=MJL.Window.prototype._collectHTTP;MJL.Tab=function(){this.container=null;this.content=null;this.list=null;this.id="";this.activeId="";this.stat=false;this.classes={container:"tabContainer",list:"tabList",panel:"tabPanel",title:"tabTitle",active:"active",stat:"static"};var a=this;this.options={cookie:{},collect:a._collectDefault};this.items={};this.nitems=0;this._cookie=null;this._cookieName="MJL.Tab";this.setOptions.apply(this,arguments)};MJL.Tab.prototype={setOptions:function(b,a){if(arguments.length<1){return}this.content=b;this.id=b.getAttribute("id");if(null!==a&&"object"==typeof a){for(var c in this.options){if(undefined===a[c]){continue}this.options[c]=a[c]}}if(!this.id){this.options.cookie=null}},create:function(){this.setOptions.apply(this,arguments);this._distStatic();this._getContents();this._createContainer();this._createList();this._setEvents();this._createCookie()},replace:function(){var b=document.createComment("");var a=this.content.parentNode;a.replaceChild(b,this.content);for(var c in this.items){MJL.addClassName(this.items[c].panel,this.classes.panel)}if(this.stat){a.replaceChild(this.content,b)}else{this.container.appendChild(this.list);this.container.appendChild(this.content);a.replaceChild(this.container,b)}this.active()},active:function(d){var a=this._getActiveId();var b=this.classes.active;if(d==a){return}else{if(!this._isValidId(d)){d=a}}MJL.removeClassName(this.items[a].list,b);MJL.removeClassName(this.items[a].panel,b);MJL.addClassName(this.items[d].list,b);MJL.addClassName(this.items[d].panel,b);this._setActiveId(d);this._setCookie()},_ID_PREFIX:"MJL_TAB_ITEM_",_URI2ID:/^[^#]*#/,_collectDefault:function(a){return MJL.getElementsByChildNodes(a)},_distStatic:function(){this.stat=MJL.hasClassName(this.content,this.classes.stat);if(this.stat){MJL.removeClassName(this.content,this.classes.stat)}},_isValidId:function(a){return(""!=a&&undefined!==this.items[a])},_getActiveId:function(){var c=this._getActiveIdByMarkup();var a=this._getCookie();if(!this._isValidId(a)){var b=window.location.hash;a=b?b.replace(this._URI2ID,""):"";if(!this._isValidId(a)){a=c;if(!this._isValidId(a)){for(var d in this.items){a=d;break}}}}this._setActiveId(a);this._getActiveId=this._getActiveIdBySelf;return a},_getActiveIdByMarkup:function(){var a="";for(var b in this.items){if(MJL.hasClassName(this.items[b].panel,this.classes.active)){a=b;break}}if(a){MJL.removeClassName(this.items[b].panel,this.classes.active);if(this.stat){MJL.removeClassName(this.items[b].list,this.classes.active)}}return a},_getActiveIdBySelf:function(){return this.activeId},_setActiveId:function(a){if(this._isValidId(a)){this.activeId=a}},_getId:(function(){var a=0;return function(b){var c="";if(this.stat){c=b.getAttribute("id");if(!c){throw Error("invalid id attribute value '"+c+"'")}}else{c=this._ID_PREFIX+a;a++}return c}})(),_getIdByHref:function(b){var a=b.getAttribute("href");if(!a){throw Error("invalid href attribure value '"+a+"'")}var c=a.replace(this._URI2ID,"");if(!this._isValidId(c)){throw Error("invalid reference ID '"+c+"' in '"+a+"'")}return c},_getContents:function(){var a=this.options.collect.call(this,this.content);var b=a.length;for(var c=0;c<b;c++){var d=this._getId(a[c]);if(undefined===this.items[d]){this.items[d]={panel:a[c],title:this._getTitle(a[c]),list:null,event:null}}else{throw Error("overlapping id value '"+d+"'")}}this.nitems=b},_getTitle:function(a){var c="";if(this.stat){}else{var b=MJL.getElementsByClassName(a,this.classes.title);if(b.length<1){throw Error("not found title-use element")}c=b[0]}return c},_cloneTitle:function(f){var d=document.createDocumentFragment();var a=this.items[f].title.childNodes;var b=a.length;for(var e=0;e<b;e++){d.appendChild(a[e].cloneNode(true))}return d},_createContainer:function(){var a=null;if(this.stat){a=this.content.parentNode;while(a&&!MJL.hasClassName(a,this.classes.container)){a=a.parentNode}if(!a){throw Error("not found tab container element")}}else{a=document.createElement("div");MJL.addClassName(a,this.classes.container)}this.container=a},_createList:function(){var f=null;if(this.stat){f=MJL.getElementsByClassName(this.container,this.classes.list)[0];if(!f){throw Error("not found tab list element")}var e=MJL.getElementsByChildNodes(f);var g=e.length;if(g!=this.nitems){throw Error("not equal tab list items ("+this.nitems+") and contents ("+g+")")}for(var i=0;i<g;i++){var d=this._getEventElement(e[i]);var h=this._getIdByHref(d);this.items[h].list=e[i];this.items[h].event=d}}else{f=document.createElement("ul");MJL.addClassName(f,this.classes.list);for(var h in this.items){var b=document.createElement("li");var d=document.createElement("a");d.setAttribute("href","#"+h);f.appendChild(b).appendChild(d).appendChild(this._cloneTitle(h));this.items[h].list=b;this.items[h].event=d}}this.list=f},_getEventElement:function(a){var b=a.getElementsByTagName("a")[0];if(!b){throw Error("not found valid event element")}return b},_setEvents:function(){for(var a in this.items){MJL.event.add(this.items[a].event,"click",this._getEventListener(a),false)}},_getEventListener:function(b){var a=this;return function(){a.active(b);return false}},_createCookie:function(){if(null===this.options.cookie||null!==this._cookie){return}this._cookie=new MJL.Cookie(this._cookieName,this.options.cookie)},_setCookie:function(){if(null===this.options.cookie){return}this._cookie.set(this.id,this._getActiveId())},_getCookie:function(){return((null===this.options.cookie)?"":this._cookie.get(this.id))}};MJL.HeightEqualizer=function(){this.parent=null;this.targets=[];var a=this;this.options={groupBy:0,collect:a._collectDefault,resize:true};this._listeners={resize:null,fontresize:null};this.setOptions.apply(this,arguments)};MJL.HeightEqualizer.prototype={setOptions:function(b,a){if(arguments.length<1){return}this.parent=b;if(null!==a&&"object"==typeof a){for(var c in this.options){if(undefined===a[c]){continue}this.options[c]=a[c]}}},create:function(){this.setOptions.apply(this,arguments);this.targets=this.options.collect.call(this,this.parent);this.set();this._setAutoResize()},set:function(){this.release();var c=this._getHeights();var a=this.targets.length;for(var b=0;b<a;b++){this.targets[b].style.height=c[b]}},release:function(){var a=this.targets.length;for(var b=0;b<a;b++){this.targets[b].style.height=""}},_UNIT:"px",_collectDefault:function(a){return MJL.getElementsByChildNodes(a)},_getHeights:function(e){var c=this.targets.length;var f=new Array(c);for(var d=0;d<c;d++){f[d]=parseInt(MJL.style.getComputed(this.targets[d],"height"))}var b=this.options.groupBy;var a=0;if(b<2||c<=b){a=Math.max.apply(Math,f)+this._UNIT;for(var d=0;d<c;d++){f[d]=a}}else{for(var d=0;d<c;d++){if(0==d%b){a=Math.max.apply(Math,f.slice(d,d+b))+this._UNIT}f[d]=a}}return f},_setAutoResize:function(){if(this.options.resize){var b=this;for(var a in this._listeners){this._listeners[a]=MJL.event.add(window,a,function(){b.set()},false)}}}};MJL.enable={rollover:function(c,b){var a=new MJL.Rollover(c,b);a.create();return a},flash:function(f,c){var a=MJL.getElementsByClassName(document,f);var d=a.length;var b=new Array(d);for(var h=0;h<d;h++){var g=new MJL.Flash(a[h],c);g.create();b.push(g)}return b},window:function(f,c){var a=MJL.getElementsByClassName(document,f);var d=a.length;var b=new Array(d);for(var h=0;h<d;h++){var g=new MJL.Window(a[h],c);g.create();b[h]=g}return b},tab:function(f,c){var a=MJL.getElementsByClassName(document,f);var d=a.length;var b=new Array(d);for(var h=0;h<d;h++){var g=new MJL.Tab(a[h],c);g.create();g.replace();b[h]=g}return b},styleSwitcher:function(f,c){var a=MJL.getElementsByClassName(document,f);var d=a.length;var b=new Array(d);for(var h=0;h<d;h++){var g=new MJL.style.Switcher(a[h],c);g.create();b[h]=g}return b},heightEqualizer:function(f,c){var a=MJL.getElementsByClassName(document,f);var d=a.length;var b=new Array(d);for(var h=0;h<d;h++){var g=new MJL.HeightEqualizer(a[h],c);g.create();b[h]=g}return b}};