/**
 * Copyright (c) 2008-2010 Borneosoft Pty. Ltd.
 * All rights reserved.
 * This program and the accompanying materials are
 * owned by Borneosoft Pty. Ltd.
 * Copying, modifying, and redistributing are prohibited
 * without written permission from Borneosoft Pty. Ltd.
 * 
 */
var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version"},searchString:function(g){for(var b=0;b<g.length;b++){var c=g[b].string;var f=g[b].prop;this.versionSearchString=g[b].versionSearch||g[b].identity;if(c){if(c.indexOf(g[b].subString)!=-1){return g[b].identity}}else{if(f){return g[b].identity}}}},searchVersion:function(c){var b=c.indexOf(this.versionSearchString);if(b==-1){return}return parseFloat(c.substring(b+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"}]};BrowserDetect.init();var fx;var ie6=false;var ie7=false;var ie8=false;if(BrowserDetect.browser=="Explorer"||BrowserDetect.browser=="Windows"){fx="ie";var ver=Math.round(BrowserDetect.version);if(ver<=6){ie6=true}else{if(ver<=7){ie7=true}else{if(ver<=8){ie8=true}}}}else{if(BrowserDetect.browser=="Mozilla"||BrowserDetect.browser=="Netscape"||BrowserDetect.browser=="Firefox"||BrowserDetect.browser=="Chrome"||BrowserDetect.browser=="Safari"||BrowserDetect.browser=="Konqueror"||BrowserDetect.browser=="Mac"||BrowserDetect.browser=="Linux"){fx="ns"}else{fx=BrowserDetect.browser}}function IEVersion(){var i=navigator,j=window,g=document;var f="NA";var c=i.userAgent;var h="NA";var b="NA";if(/msie/i.test(c)&&(!j.opera)){if(j.attachEvent&&j.ActiveXObject){f=parseInt((c.match(/.+ie\s([\d.]+)/i)||[])[1]);if(f==7){if(g.documentMode){f=8;if(/trident\/\d/i.test(c)){b="CompatMode"}else{b="IE7Mode"}}}else{if(f==8){if(g.documentMode){b="IE8Mode"}}}h=(g.documentMode)?g.documentMode:(g.compatMode&&g.compatMode=="CSS1Compat")?7:5}}return{UserAgent:c,Version:f,BrowserMode:b,DocMode:h}}var ieVer=new IEVersion();if(fx=="ns"){try{document.createElement("input");HTMLElement.prototype.click=function(){if(typeof this.onclick=="function"){this.onclick({type:"click"})}}}catch(e){alert("click method for HTMLElement couldn't be added")}try{document.createElement("a");HTMLElement.prototype.click=function(){if(typeof this.onclick=="function"){if(this.onclick({type:"click"})&&this.href){window.open(this.href,this.target?this.target:"_self")}}else{if(this.href){window.open(this.href,this.target?this.target:"_self")}}}}catch(e){alert("click method for HTMLAnchorElement couldn't be added")}HTMLElement.prototype.__defineSetter__("outerHTML",function(f){this.outerHTMLInput=f;var b=this.ownerDocument.createRange();b.setStartBefore(this);var c=b.createContextualFragment(f);this.parentNode.replaceChild(c,this)});var emptyElements={HR:true,BR:true,IMG:true,INPUT:true};var specialElements={TEXTAREA:true};HTMLElement.prototype.__defineGetter__("outerHTML",function(){var g=this;var c="";switch(g.nodeType){case Node.ELEMENT_NODE:c+="<";c+=g.nodeName;if(!specialElements[g.nodeName]){for(var b=0;b<g.attributes.length;b++){c+=" "+g.attributes[b].nodeName.toUpperCase()+'="'+g.attributes[b].nodeValue+'"'}c+=">";if(!emptyElements[g.nodeName]){c+=g.innerHTML;c+="</"+g.nodeName+">"}}else{switch(g.nodeName){case"TEXTAREA":for(var b=0;b<g.attributes.length;b++){if(g.attributes[b].nodeName.toLowerCase()!="value"){c+=" "+g.attributes[b].nodeName.toUpperCase()+'="'+g.attributes[b].nodeValue+'"'}else{var f=g.attributes[b].nodeValue}}c+=">";c+=f;c+="</"+g.nodeName+">";break}}break;case Node.TEXT_NODE:c+=g.nodeValue;break;case Node.COMMENT_NODE:c+="<!--"+g.nodeValue+"-->";break}return c});if(typeof CSSStyleDeclaration!="undefined"&&!CSSStyleDeclaration.prototype.pixelLeft){CSSStyleDeclaration.prototype.__defineSetter__("pixelTop",function(b){this.top=b+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelLeft",function(b){this.left=b+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelRight",function(b){this.right=b+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelBottom",function(b){this.bottom=b+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelWidth",function(b){this.width=b+"px"});CSSStyleDeclaration.prototype.__defineSetter__("pixelHeight",function(b){this.height=b+"px"});CSSStyleDeclaration.prototype.__defineGetter__("pixelTop",function(){return parseInt(this.top)});CSSStyleDeclaration.prototype.__defineGetter__("pixelLeft",function(){return parseInt(this.left)});CSSStyleDeclaration.prototype.__defineGetter__("pixelRight",function(){return parseInt(this.right)});CSSStyleDeclaration.prototype.__defineGetter__("pixelBottom",function(){return parseInt(this.bottom)});CSSStyleDeclaration.prototype.__defineGetter__("pixelWidth",function(){return parseInt(this.width)});CSSStyleDeclaration.prototype.__defineGetter__("pixelHeight",function(){return parseInt(this.height)});HTMLElement.prototype.__defineGetter__("nsCurrentStyle",function(){var f={};try{var c=this;for(var b=0;b<properties.length;b++){f.__defineGetter__(properties[b],encapsulateObjects(c,properties[b]))}}catch(g){}return f});function encapsulateObjects(b,c){return function(){return document.defaultView.getComputedStyle(b,null).getPropertyValue(c)}}}}function trim(b){if(typeof b!="undefined"&&b!=null&&typeof b=="string"){return b.replace(/^\s*/,"").replace(/\s*$/,"")}else{return b}}function hexToDigit(b){var c=0;if(b=="0"||b=="1"||b=="2"||b=="3"||b=="4"||b=="5"||b=="6"||b=="7"||b=="8"||b=="9"){c=parseInt(b)}else{if(b=="a"||b=="A"){c=10}else{if(b=="b"||b=="B"){c=11}else{if(b=="c"||b=="C"){c=12}else{if(b=="d"||b=="D"){c=13}else{if(b=="e"||b=="E"){c=14}else{if(b=="f"||b=="F"){c=15}}}}}}}return c}function urlEncode(i){var h={},f={},g=0,c=[];var b=i.toString();h["!"]="%21";h["%20"]="+";b=encodeURIComponent(b);for(search in h){replace=h[search];c=b.split(search);b=c.join(replace)}return b.replace(/(\%([a-z0-9]{2}))/g,function(l,k,j){return"%"+j.toUpperCase()});return b}function urlDecode(j){var k="";if(typeof j!="undefined"&&j){var b=j.length;var g;var f,c;var h;g=0;while(g<b){h=j.charAt(g);if(h=="%"){g++;f=parseInt(hexToDigit(j.charAt(g)))<<4;g++;c=parseInt(hexToDigit(j.charAt(g)));k+=String.fromCharCode(f+c)}else{k+=h}g++}}return k}function htmlEncode(b){return b.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/&/g,"&amp;")}function htmlEncode1(b){return b.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")}function _nN(b){if(b){if(b.nodeType==1){return b}else{return _nN(b.nextSibling)}}else{return null}}function _pN(b){if(b){if(b.nodeType==1){return b}else{return _pN(b.previousSibling)}}else{return null}}function getOffsets(b){var h=b.target;if(typeof h.offsetLeft=="undefined"){h=h.parentNode}var c=getPageCoords(h);var f={x:window.pageXOffset+b.clientX,y:window.pageYOffset+b.clientY};var g={offsetX:f.x-c.x,offsetY:f.y-c.y};return g}function getPageCoords(b){var c={x:0,y:0};while(b){c.x+=b.offsetLeft;c.y+=b.offsetTop;b=b.offsetParent}return c}function findPosX(g){var k=0;var h=g;var b;var j,c,i;while(typeof h!="undefined"&&h){j=parseInt(h.style.borderLeftWidth);c=parseInt(h.style.paddingLeft);i=parseInt(h.style.marginLeft);k+=h.offsetLeft+(!isNaN(j)?j:0)+(!isNaN(c)?c:0)+(!isNaN(i)?i:0);b=h;try{h=h.offsetParent}catch(f){break}}if(typeof b!="undefined"&&b){if(typeof b.left!="undefined"&&b.left){k+=b.left}}return k}function findPosY(i){var g=0;var k=i;var b;var f,j,c;while(typeof k!="undefined"&&k){f=parseInt(k.style.borderTopWidth);j=parseInt(k.style.paddingTop);c=parseInt(k.style.marginTop);g+=k.offsetTop+(!isNaN(f)?f:0)+(!isNaN(j)?j:0)+(!isNaN(c)?c:0);b=k;try{k=k.offsetParent}catch(h){break}}if(typeof b!="undefined"&&b){if(typeof b.top!="undefined"&&b.top){g+=b.top}}return g}function _dm(){var b={w:0,h:0};if(typeof window.innerHeight!="undefined"){b.h=window.innerHeight;b.w=window.innerWidth}else{if(document.documentElement&&typeof document.documentElement.clientHeight!="undefined"&&document.documentElement.clientHeight!=0){b.h=document.documentElement.clientHeight;
b.w=document.documentElement.clientWidth}else{if(document.body&&typeof document.body.clientHeight!="undefined"){b.h=document.body.clientHeight;b.w=document.body.clientWidth}else{}}}return b}function getStyle(x,styleProp){if(window.getComputedStyle){var y=x.ownerDocument.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp)}else{if(fx=="ie"){if(x.currentStyle){var y=eval("x.currentStyle."+styleProp)}}else{if(x.nsCurrentStyle){var y=eval("x.nsCurrentStyle."+styleProp)}}}return y}function getStyleInt(c,b){var f=0;try{var h=getStyle(c,b);var g=h.split("px");f=g[0]}catch(i){}return f}function XmlDocument(){}XmlDocument.create=function(){try{if(document.implementation&&document.implementation.createDocument){var c=document.implementation.createDocument("","",null);if(c.readyState==null){c.readyState=1;c.addEventListener("load",function(){c.readyState=4;if(typeof c.onreadystatechange!="undefined"){c.onreadystatechange()}},false)}return c}if(window.ActiveXObject){return new ActiveXObject(getControlPrefix()+".XmlDom")}}catch(b){}throw new Error("Your browser does not support XmlDocument objects")};function _zt(c){var f;if(typeof c=="string"){f=document.getElementById(c)}else{f=c}if(typeof f!="undefined"&&f){var b=f.value;if(typeof b!="undefined"&&b){if(b==""||(b!=""&&b.length<3)){b="###"}var g=document.body;var h=document.createElement("span");h.style.fontFamily=f.style.fontFamily;h.style.whiteSpace=f.style.whiteSpace;f.style.display="none";h.innerHTML=b.replace(/</,"H").replace(/>/,"H");g.appendChild(h);f.style.pixelWidth=h.offsetWidth+5;f.style.display="inline";h.style.display="none";g.removeChild(h)}}}function getRadioValue(b){return"<"+b+">"+_getRadioValue(b)+"</"+b+">"}function _getRadioValue(b){var f="";var g=document.getElementsByName("id"+b);if(typeof g!="undefined"&&g){var c;for(c=0;c<g.length;c++){if(g[c].checked){f=g[c].value;break}}}return f}function disableRadio(b,f){var g=document.getElementsByName("id"+b);if(typeof g!="undefined"&&g){var c;for(c=0;c<g.length;c++){g[c].disabled=f}}return -1}function getCheckboxValue(b){return"<"+b+">"+_getCheckboxValue(b)+"</"+b+">"}function _getCheckboxValue(b){var c="";var f=document.getElementById("id"+b);if(typeof f!="undefined"&&f){if(f.checked){c="1"}else{c="0"}}return c}function setRemoteText(b,f){var c=document.getElementById(f);if(typeof c!="undefined"&&c!=null){c.__url=b;c.holderid=f}}function downloadRemoteText(i,f){var h=document.getElementById(i);if(typeof h!="undefined"&&h!=null){var c=h.__url;if(typeof c!="undefined"&&c!=null){var g=h.innerHTML;if(typeof g=="undefined"||g==null||g==""){var b;if(fx=="ie"){b=new ActiveXObject("Microsoft.XMLHTTP")}else{if(fx=="ns"){b=new XMLHttpRequest()}}if(f){b.open("GET",c,true);b.setRequestHeader("Content-Type","text/html");b.onreadystatechange=function(){if(b.readyState==4){if(isSessionExpired(b.status)){return}h.innerHTML=b.responseText}};b.send(null)}else{b.open("GET",c,false);b.send(null);if(isSessionExpired(b.status)){return}h.innerHTML=b.responseText}}}}}function getRemoteText(c,i,f){var h=document.getElementById(i);if(typeof h!="undefined"&&h!=null){h.__url=c;h.holderid=i;var g=h.innerHTML;if(typeof g=="undefined"||g==null||g==""){var b;if(fx=="ie"){b=new ActiveXObject("Microsoft.XMLHTTP")}else{if(fx=="ns"){b=new XMLHttpRequest()}}if(f){b.open("GET",c,true);b.setRequestHeader("Content-Type","text/html");b.onreadystatechange=function(){if(b.readyState==4){if(isSessionExpired(b.status)){return}h.innerHTML=b.responseText}};b.send(null)}else{b.open("GET",c,false);b.send(null);if(isSessionExpired(b.status)){return}h.innerHTML=b.responseText}}}}function setRemoteXML(b,f){var c=document.getElementById(f);if(typeof c!="undefined"&&c!=null){c.__url=b;c.holderid=f}}function downloadRemoteXML(i,f){var h=document.getElementById(i);if(typeof h!="undefined"&&h!=null){var c=h.__url;if(typeof c!="undefined"&&c!=null){var g=h._Xml;if(typeof g=="undefined"||g==null){var b;if(fx=="ie"){b=new ActiveXObject("Microsoft.XMLHTTP")}else{if(fx=="ns"){b=new XMLHttpRequest()}}if(f){b.open("GET",c,true);b.setRequestHeader("Content-Type","text/html");b.onreadystatechange=function(){if(b.readyState==4){if(isSessionExpired(b.status)){return}h._Xml=b.responseXML}};b.send(null)}else{b.open("GET",c,false);b.send(null);if(isSessionExpired(b.status)){return}h._Xml=b.responseXML}}}}}function getRemoteXML(c,i,f){var h=document.getElementById(i);if(typeof h!="undefined"&&h!=null){h.__url=c;h.holderid=i;var g=h._Xml;if(typeof g=="undefined"||g==null){var b;if(fx=="ie"){b=new ActiveXObject("Microsoft.XMLHTTP")}else{if(fx=="ns"){b=new XMLHttpRequest()}}if(f){b.open("GET",c,true);b.setRequestHeader("Content-Type","text/html");b.onreadystatechange=function(){if(b.readyState==4){if(isSessionExpired(b.status)){return}h._Xml=b.responseXML}};b.send(null)}else{b.open("GET",c,false);b.send(null);if(isSessionExpired(b.status)){return}h._Xml=b.responseXML}}}}function getWebRoot(g){var c="/Borneosoft/Service?cmd=getwebroot&rn="+Math.round(Math.random()*1000000000);var b;if(fx=="ie"){b=new ActiveXObject("Microsoft.XMLHTTP")}else{if(fx=="ns"){b=new XMLHttpRequest()}}b.open("POST",c,true);b.setRequestHeader("Content-Type","text/xml");b.onreadystatechange=function(){if(b.readyState==4){if(isSessionExpired(b.status)){return}var j=b.responseText;var h=j.split("|");var k=h[0];var i=parseInt(h[1]);var f=h[2];if(typeof g!="undefined"&&g){g(k,i,f)}}};b.send("")}function closingSessionExpiredLogon(){window.showinglogon=false}function openLogonBox(c){var b=c.container[0];c.overlay.fadeIn("slow",function(){$("#osx-modal-content",b).show();var f=$("#osx-modal-title",b);f.show();c.container.slideDown("slow",function(){setTimeout(function(){$("#osx-modal-data").height(250);var g=$("#osx-modal-data",b).height()+f.height()+20;c.container.animate({height:g},200,function(){$("div.close",b).show();$("#osx-modal-data",b).show();var i=document.getElementById("idSimpleModalLogonBox");if(typeof i!="undefined"&&i){i.width=$("#osx-modal-data").width();i.height=$("#osx-modal-data").height()-4}var h=document.getElementById("osx-container");h.style.zIndex=20000})},300)})})}function closeLogonBox(b){b.container.animate({top:"-"+(b.container.height()+20)},500,function(){$.modal.close();window.showinglogon=false})}function isSessionExpired(b){if(b==403){var c=window.showinglogon;if(typeof c=="undefined"||c==false){window.showinglogon=true;var f=sContextPath+"/logonBox.jsp?rnd="+Math.round(Math.random()*1000000000);var g=document.getElementById("osx-modal-content");if(typeof g=="undefined"||g==null){g=document.createElement("div");g.id="osx-modal-content";g.innerHTML='<div id="osx-modal-title">Your session has expired, please logon again.</div><div class="close"><a href="javascript:void(0);" class="simplemodal-close">x</a></div><div id="osx-modal-data"><iframe id="idSimpleModalLogonBox" src="'+f+'" scrolling="auto" frameborder="0" width="300" style="overflow: hidden;"></iframe></div>';document.body.appendChild(g)}$("#osx-modal-content").modal({overlayId:"osx-overlay",containerId:"osx-container",closeHTML:null,minHeight:120,opacity:65,position:["0",],overlayClose:true,onOpen:openLogonBox,onClose:closeLogonBox})}if(window.opener!=null&&typeof window.opener.checkLatestListId!="undefined"&&window.opener.checkLatestListId!=null){window.opener.clearInterval(window.opener.checkLatestListId)}else{if(window.parent!=null&&typeof window.parent.checkLatestListId!="undefined"&&window.parent.checkLatestListId!=null){window.parent.clearInterval(window.parent.checkLatestListId)}else{if(typeof checkLatestListId!="undefined"&&checkLatestListId!=null){window.clearInterval(checkLatesListtId)}}}return true}return false}document.getElemetsByClassName=function(g,k){var b=[];var f=null;var j=new RegExp(["(^|\\s)",g,"(\\s|$)"].join(""));if(k&&k.getElementsByTagName){f=k.getElementsByTagName("*")}if(!f){f=document.getElementsByTagName?document.getElementsByTagName("*"):document.all}for(var h=0,l=f.length;h<l;h++){var c=f[h].getAttribute("class")||f[h].className;
if(c.match(j)){b.push(f[h])}}return b};function WindowSize(){this.w=0;this.h=0;return this}WindowSize.prototype.update=function(){var f=document;var b=(window.innerWidth)?window.innerWidth:(f.documentElement&&f.documentElement.clientWidth)?f.documentElement.clientWidth:f.body.clientWidth;var c=(window.innerHeight)?window.innerHeight:(f.documentElement&&f.documentElement.clientHeight)?f.documentElement.clientHeight:f.body.clientHeight;if(b!=this.w||c!=this.h){this.w=b;this.h=c;return true}return false};function PageSize(){this.win=new WindowSize();this.w=0;this.h=0;return this}PageSize.prototype.update=function(){var g=document;var c=(window.innerWidth&&window.scrollMaxX)?window.innerWidth+window.scrollMaxX:(g.body.scrollWidth>g.body.offsetWidth)?g.body.scrollWidth:g.body.offsetWidt;var f=(window.innerHeight&&window.scrollMaxY)?window.innerHeight+window.scrollMaxY:(g.body.scrollHeight>g.body.offsetHeight)?g.body.scrollHeight:g.body.offsetHeight;var b=this.win.update();if(c<this.win.w){c=this.win.w}if(f<this.win.h){f=this.win.h}if(b||c!=this.w||f!=this.h){this.w=c;this.h=f;return true}return false};function PagePos(){this.x=0;this.y=0;return this}PagePos.prototype.update=function(){var c=document;var b=(window.pageXOffset)?window.pageXOffset:(c.documentElement&&c.documentElement.scrollLeft)?c.documentElement.scrollLeft:(c.body)?c.body.scrollLeft:0;var f=(window.pageYOffset)?window.pageYOffset:(c.documentElement&&c.documentElement.scrollTop)?c.documentElement.scrollTop:(c.body)?c.body.scrollTop:0;if(b!=this.x||f!=this.y){this.x=b;this.y=f;return true}return false};if(!window.Spica){var Spica={};Spica.Browser=new function(){this.name=navigator.userAgent;this.isWinIE=this.isMacIE=false;this.isGecko=this.name.match(/Gecko\//);this.isSafari=this.name.match(/AppleWebKit/);this.isSafari3=(this.name.match(/AppleWebKit\/(\d\d\d)/)&&parseInt(RegExp.$1)>500);this.isKHTML=this.isSafari||navigator.appVersion.match(/Konqueror|KHTML/);this.isOpera=window.opera;if(document.all&&!this.isGecko&&!this.isSafari&&!this.isOpera){this.isWinIE=this.name.match(/Win/);this.isMacIE=this.name.match(/Mac/);this.isNewIE=(this.name.match(/MSIE (\d\.\d)/)&&RegExp.$1>6.5)}};Spica.Event={cache:false,getEvent:function(b){return(b)?b:((window.event)?window.event:null)},getKey:function(b){if(!b){return}return(b.keyCode)?b.keyCode:b.charCode},stop:function(c){if(!c){return}try{c.stopPropagation()}catch(b){}c.cancelBubble=true;try{c.preventDefault()}catch(b){}return(c.returnValue=false)},register:function(b,f,c){if(!b){return}if(f=="keypress"&&!b.addEventListener){f="keydown"}if(f=="mousewheel"&&Spica.Browser.isGecko){f="DOMMouseScroll"}if(!this.cache){this.cache=[]}if(b.addEventListener){this.cache.push([b,f,c]);b.addEventListener(f,c,false)}else{if(b.attachEvent){this.cache.push([b,f,c]);b.attachEvent("on"+f,c)}else{b["on"+f]=c}}},deregister:function(b,f,c){if(!b){return}if(f=="keypress"&&!b.addEventListener){f="keydown"}if(f=="mousewheel"&&Spica.Browser.isGecko){f="DOMMouseScroll"}if(b.removeEventListener){b.removeEventListener(f,c,false)}else{if(b.detachEvent){b.detachEvent("on"+f,c)}else{b["on"+f]=null}}},deregisterAll:function(){if(!Spica.Event.cache){return}for(var b=0,c=Spica.Event.cache.length;b<c;b++){Spica.Event.deregister(Spica.Event.cache[b]);Spica.Event.cache[b][0]=null}Spica.Event.cache=false},run:function(b){if(typeof b!="function"){return}(Spica.Browser.isGecko||Spica.Browser.isOpera)?this.register(window,"DOMContentLoaded",b):this.register(window,"load",b)}};Spica.Event.register(window,"unload",Spica.Event.deregisterAll)}function Lightbox(c){var b=this;b._imgs=new Array();b._sets=new Array();b._wrap=null;b._box=null;b._img=null;b._open=-1;b._page=new PageSize();b._pos=new PagePos();b._zoomimg=null;b._expandable=false;b._expanded=false;b._funcs={move:null,up:null,drag:null,wheel:null,dbl:null};b._level=1;b._curpos={x:0,y:0};b._imgpos={x:0,y:0};b._minpos={x:0,y:0};b._expand=c.expandimg;b._shrink=c.shrinkimg;b._blank=c.blankimg;b._resizable=c.resizable;b._timer=null;b._anim={step:0,w:50,h:50,a:0,t:0,f:c.animation};b._indicator=null;b._overall=null;b._openedset=null;b._prev=null;b._next=null;b._hiding=[];b._first=false;b._changed=false;return b._init(c)}Lightbox.prototype={refresh:function(b){if(!b){b=document}this._imgs.length=0;this._genListFromLinks(b)},_init:function(f){var c=this;var g=document;if(!g.getElementsByTagName){return}if(Spica.Browser.isMacIE){return c}var b=g.getElementsByTagName("body")[0];c._wrap=c._createWrapOn(b);c._box=c._createBoxOn(b,f);c._img=c._box.firstChild;c._zoomimg=g.getElementById("actionImage");if(!f.skipInit){c._genListFromLinks(g)}return c},_genListFromLinks:function(k){var f=this;var c=k.getElementsByTagName("a");for(var j=0;j<c.length;j++){var h=c[j];var g=f._imgs.length;var b=String(h.getAttribute("rel")).toLowerCase();if(!h.getAttribute("href")||!b.match("lightbox")){continue}f._imgs[g]={src:h.getAttribute("href"),w:-1,h:-1,title:"",cls:h.className,set:b};if(h.getAttribute("title")){f._imgs[g].title=h.getAttribute("title")}else{if(h.firstChild&&h.firstChild.getAttribute&&h.firstChild.getAttribute("title")){f._imgs[g].title=h.firstChild.getAttribute("title")}}h.onclick=f._genOpener(g);if(b!="lightbox"){if(!f._sets[b]){f._sets[b]=new Array()}f._sets[b].push(g)}}},_genOpener:function(c){var b=this;return function(){b._show(c);return false}},_createWrapOn:function(f){var b=this;if(!f){return null}var c=document.createElement("div");f.appendChild(c);c.id="overlay";c.style.display="none";c.style.position="fixed";c.style.top="0px";c.style.left="0px";c.style.zIndex="50";c.style.width="100%";c.style.height="100%";if(Spica.Browser.isWinIE){c.style.position="absolute"}Spica.Event.register(c,"click",function(g){b._close(g)});return c},_createBoxOn:function(f,i){var q=this;if(!f){return null}var h=document.createElement("div");f.appendChild(h);h.id="lightbox";h.style.display="none";h.style.position="absolute";h.style.zIndex="60";var g=document.createElement("img");h.appendChild(g);g.id="lightboxImage";g.width=200;g.height=200;q._set_cursor(g);Spica.Event.register(g,"mouseover",function(){q._show_action()});Spica.Event.register(g,"click",function(s){q._close(s)});var b=new Image;b.onload=function(){var s=document.createElement("img");h.appendChild(s);s.id="loadingImage";s.src=b.src;s.style.position="absolute";s.style.zIndex="70";q._set_cursor(s);Spica.Event.register(s,"click",function(t){q._close(t)});b.onload=function(){}};if(i.loadingimg!=""){b.src=i.loadingimg}if(i.previmg){var j=document.createElement("img");h.appendChild(j);j.id="prevLink";j.style.display="none";j.style.position="absolute";j.style.left="9px";j.style.zIndex="70";j.src=i.previmg;q._prev=j;Spica.Event.register(j,"mouseover",function(){q._show_action()});Spica.Event.register(j,"click",function(){q._show_next(-1)})}if(i.nextimg){var m=document.createElement("img");h.appendChild(m);m.id="nextLink";m.style.display="none";m.style.position="absolute";m.style.right="9px";m.style.zIndex="70";m.src=i.nextimg;q._next=m;Spica.Event.register(m,"mouseover",function(){q._show_action()});Spica.Event.register(m,"click",function(){q._show_next(+1)})}var o=document.createElement("img");h.appendChild(o);o.id="actionImage";o.style.display="none";o.style.position="absolute";o.style.top="15px";o.style.left="15px";o.style.zIndex="70";q._set_cursor(o);o.src=q._expand;Spica.Event.register(o,"mouseover",function(){q._show_action()});Spica.Event.register(o,"click",function(){q._zoom()});if(i.closeimg){var c=document.createElement("img");h.appendChild(c);c.id="closeButton";c.style.display="inline";c.style.position="absolute";c.style.right="9px";c.style.top="10px";c.style.zIndex="80";c.src=i.closeimg;q._set_cursor(c);Spica.Event.register(c,"click",function(s){q._close(s)})}var n=document.createElement("span");h.appendChild(n);n.id="lightboxCaption";n.style.display="none";n.style.position="absolute";n.style.zIndex="80";if(!i.effectpos){i.effectpos={x:0,y:0}}else{if(i.effectpos.x==""){i.effectpos.x=0}if(i.effectpos.y==""){i.effectpos.y=0
}}var r=new Image;r.onload=function(){var s=document.createElement("img");h.appendChild(s);s.id="effectImage";s.src=r.src;if(i.effectclass){s.className=i.effectclass}s.style.position="absolute";s.style.display="none";s.style.left=[i.effectpos.x,"px"].join("");s.style.top=[i.effectpos.y,"px"].join("");s.style.zIndex="90";q._set_cursor(s);Spica.Event.register(s,"click",function(){s.style.display="none"})};if(i.effectimg!=""){r.src=i.effectimg}if(q._resizable){var k=document.createElement("div");f.appendChild(k);k.id="lightboxOverallView";k.style.display="none";k.style.position="absolute";k.style.zIndex="70";q._overall=k;var l=document.createElement("div");f.appendChild(l);l.id="lightboxIndicator";l.style.display="none";l.style.position="absolute";l.style.zIndex="80";q._indicator=l}return h},_set_photo_size:function(){var l=this;if(l._open==-1){return}var g={w:l._page.win.w-30,h:l._page.win.h-30};var k={x:15,y:15};var h={p:9,n:9,y:0};if(!l._expanded){var i={w:l._imgs[l._open].w,h:l._imgs[l._open].h};if(i.w<0){i.w=l._img.width}if(i.h<0){i.h=l._img.height}var f=1;if((i.w>=g.w||i.h>=g.h)&&i.h&&i.w){f=((g.w/i.w)<(g.h/i.h))?g.w/i.w:g.h/i.h}l._expandable=(f<1)?true:false;l._anim.w=Math.floor(i.w*f);l._anim.h=Math.floor(i.h*f);if(l._resizable){l._expandable=true}if(Spica.Browser.isWinIE){l._box.style.display="block"}l._imgpos.x=l._pos.x+(g.w-l._img.width)/2;l._imgpos.y=l._pos.y+(g.h-l._img.height)/2;h.y=Math.floor(l._img.height/2)-10;l._show_overall(false);var c=document.getElementById("loadingImage");if(c){c.style.left=[(l._img.width-30)/2,"px"].join("");c.style.top=[(l._img.height-30)/2,"px"].join("")}}else{var b=parseInt(l._imgs[l._open].w*l._level);var j=parseInt(l._imgs[l._open].h*l._level);l._minpos.x=l._pos.x+g.w-l._img.width;l._minpos.y=l._pos.y+g.h-l._img.height;if(l._img.width<=g.w){l._imgpos.x=l._pos.x+(g.w-l._img.width)/2}else{if(l._imgpos.x>l._pos.x){l._imgpos.x=l._pos.x}else{if(l._imgpos.x<l._minpos.x){l._imgpos.x=l._minpos.x}}k.x=15+l._pos.x-l._imgpos.x;h.p=l._pos.x-l._imgpos.x-5;h.n=l._img.width-l._page.win.w+l._imgpos.x+25;if(Spica.Browser.isWinIE){h.n-=10}}if(l._img.height<=g.h){l._imgpos.y=l._pos.y+(g.h-l._img.height)/2;h.y=Math.floor(l._img.height/2)-10}else{if(l._imgpos.y>l._pos.y){l._imgpos.y=l._pos.y}else{if(l._imgpos.y<l._minpos.y){l._imgpos.y=l._minpos.y}}k.y=15+l._pos.y-l._imgpos.y;h.y=Math.floor(g.h/2)-10+l._pos.y-l._imgpos.y}l._anim.w=b;l._anim.h=j;l._show_overall(true)}l._box.style.left=[l._imgpos.x,"px"].join("");l._box.style.top=[l._imgpos.y,"px"].join("");l._zoomimg.style.left=[k.x,"px"].join("");l._zoomimg.style.top=[k.y,"px"].join("");l._wrap.style.left=l._pos.x;if(l._prev&&l._next){l._prev.style.left=[h.p,"px"].join("");l._next.style.right=[h.n,"px"].join("");l._prev.style.top=l._next.style.top=[h.y,"px"].join("")}l._changed=true},_show_overall:function(j){var f=this;if(f._overall==null){return}if(j){if(f._open==-1){return}var i=100;var h={w:0,h:0,x:0,y:0};var c={w:0,h:0,x:0,y:0};var k={w:f._img.width,h:f._img.height};var g={w:f._page.win.w-30,h:f._page.win.h-30};var b=k.w;if(b<k.h){b=k.h}if(b<g.w){b=g.w}if(b<g.h){b=g.h}if(b<1){return}h.w=parseInt(k.w/b*i);h.h=parseInt(k.h/b*i);c.w=parseInt(g.w/b*i);c.h=parseInt(g.h/b*i);h.x=f._pos.x+g.w-i-20;h.y=f._pos.y+g.h-i-20;c.x=h.x-parseInt((f._imgpos.x-f._pos.x)/b*i);c.y=h.y-parseInt((f._imgpos.y-f._pos.y)/b*i);f._overall.style.left=[h.x,"px"].join("");f._overall.style.top=[h.y,"px"].join("");f._overall.style.width=[h.w,"px"].join("");f._overall.style.height=[h.h,"px"].join("");f._indicator.style.left=[c.x,"px"].join("");f._indicator.style.top=[c.y,"px"].join("");f._indicator.style.width=[c.w,"px"].join("");f._indicator.style.height=[c.h,"px"].join("");f._overall.style.display="block";f._indicator.style.display="block"}else{f._overall.style.display="none";f._indicator.style.display="none"}},_set_size:function(c){var b=this;if(b._open==-1){return}if(!b._page.update()&&!b._pos.update()&&!b._changed){return}if(Spica.Browser.isWinIE){b._wrap.style.width=[b._page.win.w,"px"].join("");b._wrap.style.height=[b._page.win.h,"px"].join("");b._wrap.style.top=[b._pos.y,"px"].join("")}if(c){b._set_photo_size()}},_set_cursor:function(c){var b=this;if(Spica.Browser.isWinIE&&!Spica.Browser.isNewIE){return}c.style.cursor="pointer"},_current_setindex:function(){var b=this;if(!b._openedset){return -1}var f=b._sets[b._openedset];for(var c=0,g=f.length;c<g;c++){if(f[c]==b._open){return c}}return -1},_get_setlength:function(){var b=this;if(!b._openedset){return -1}return b._sets[b._openedset].length},_show_action:function(){var c=this;if(c._open==-1){return}var b=c._current_setindex();if(b>-1){if(b>0){c._prev.style.display="inline"}if(b<c._get_setlength()-1){c._next.style.display="inline"}}if(!c._expandable||!c._zoomimg){return}c._zoomimg.src=(c._expanded)?c._shrink:c._expand;c._zoomimg.style.display="inline"},_hide_action:function(){var b=this;if(b._zoomimg){b._zoomimg.style.display="none"}if(b._open>-1&&b._expanded){b._dragstop(null)}if(b._prev){b._prev.style.display="none"}if(b._next){b._next.style.display="none"}},_zoom:function(){var b=this;var c=document.getElementById("closeButton");if(b._expanded){b._reset_func();b._expanded=false;if(c){c.style.display="inline"}}else{if(b._open>-1){b._level=1;b._imgpos.x=b._pos.x;b._imgpos.y=b._pos.y;b._expanded=true;b._funcs.drag=function(f){b._dragstart(f)};b._funcs.dbl=function(f){b._close(null)};if(b._resizable){b._funcs.wheel=function(f){b._onwheel(f)};Spica.Event.register(b._box,"mousewheel",b._funcs.wheel)}Spica.Event.register(b._img,"mousedown",b._funcs.drag);Spica.Event.register(b._img,"dblclick",b._funcs.dbl);b._show_caption(false);if(c){c.style.display="none"}}}b._set_photo_size();b._show_action()},_reset_func:function(){var b=this;if(b._funcs.wheel!=null){Spica.Event.deregister(b._box,"mousewheel",b._funcs.wheel)}if(b._funcs.move!=null){Spica.Event.deregister(b._img,"mousemove",b._funcs.move)}if(b._funcs.up!=null){Spica.Event.deregister(b._img,"mouseup",b._funcs.up)}if(b._funcs.drag!=null){Spica.Event.deregister(b._img,"mousedown",b._funcs.drag)}if(b._funcs.dbl!=null){Spica.Event.deregister(b._img,"dblclick",b._funcs.dbl)}b._funcs={move:null,up:null,drag:null,wheel:null,dbl:null}},_onwheel:function(b){var c=this;var g=0;b=Spica.Event.getEvent(b);if(b.wheelDelta){g=event.wheelDelta/-120}else{if(b.detail){g=b.detail/3}}if(Spica.Browser.isOpera){g=-g}var f=(c._level<1)?0.1:(c._level<2)?0.25:(c._level<4)?0.5:1;c._level=(g>0)?c._level+f:c._level-f;if(c._level>8){c._level=8}else{if(c._level<0.5){c._level=0.5}}c._set_photo_size();return Spica.Event.stop(b)},_dragstart:function(b){var c=this;b=Spica.Event.getEvent(b);c._curpos.x=b.screenX;c._curpos.y=b.screenY;c._funcs.move=function(f){c._dragging(f)};c._funcs.up=function(f){c._dragstop(f)};Spica.Event.register(c._img,"mousemove",c._funcs.move);Spica.Event.register(c._img,"mouseup",c._funcs.up);return Spica.Event.stop(b)},_dragging:function(b){var c=this;b=Spica.Event.getEvent(b);c._imgpos.x+=b.screenX-c._curpos.x;c._imgpos.y+=b.screenY-c._curpos.y;c._curpos.x=b.screenX;c._curpos.y=b.screenY;c._set_photo_size();return Spica.Event.stop(b)},_dragstop:function(b){var c=this;b=Spica.Event.getEvent(b);if(c._funcs.move!=null){Spica.Event.deregister(c._img,"mousemove",c._funcs.move)}if(c._funcs.up!=null){Spica.Event.deregister(c._img,"mouseup",c._funcs.up)}c._funcs.move=null;c._funcs.up=null;c._set_photo_size();return(b)?Spica.Event.stop(b):false},_show_caption:function(f){var c=this;var b=document.getElementById("lightboxCaption");if(!b){return}if(b.innerHTML.length==0||!f){b.style.display="none"}else{b.style.top=[c._img.height+10,"px"].join("");b.style.left="0px";b.style.width=[c._img.width+20,"px"].join("");b.style.display="block"}},_toggle_wrap:function(l){var o=this;o._wrap.style.display=l?"block":"none";if(o._hiding.length==0&&!o._first){var q=["select","embed","object"];for(var k=0,c=q.length;k<c;k++){var f=document.getElementsByTagName(q[k]);for(var h=0,g=f.length;h<g;h++){var b=f[h].style.visibility;if(!b){if(f[h].currentStyle){b=f[h].currentStyle.visibility
}else{if(document.defaultView){b=document.defaultView.getComputedStyle(f[h],"").getPropertyValue("visibility")}}}if(b=="hidden"){continue}o._hiding.push(f[h])}}o._first=true}for(var k=0,c=o._hiding.length;k<c;k++){o._hiding[k].style.visibility=l?"hidden":"visible"}if(l){o._setOpacity(o._wrap,5)}},_prepare:function(c){var b=this;if(b._open==-1){return}b._set_size(false);b._toggle_wrap(true);b._box.style.display="block";b._hide_action();b._img.src=b._blank;var j=document.getElementById("loadingImage");if(j){j.style.display="inline"}var h=["effectImage","closeButton","lightboxCaption"];for(var f in h){var g=document.getElementById(h[f]);if(g){g.style.display="none"}}},_show:function(c){var b=this;var f=new Image;if(c<0||c>=b._imgs.length){return}b._open=c;b._prepare();b._set_photo_size();f.onload=function(){b._expanded=false;if(b._imgs[b._open].w==-1){b._imgs[b._open].w=f.width;b._imgs[b._open].h=f.height}var g=document.getElementById("lightboxCaption");if(g){try{g.innerHTML=b._imgs[b._open].title}catch(h){}}b._anim.t=(new Date()).getTime();b._timer=window.setInterval(function(){b._run()},20);b._img.setAttribute("title",b._imgs[b._open].title);b._anim.step=(b._anim.f)?0:2;b._set_photo_size();if(!b._anim.f){b._show_image()}if(b._imgs[b._open].set!="lightbox"){var i=b._imgs[b._open].set;if(b._sets[i].length>1){b._openedset=i}if(!b._prev||!b._next){b._openedset=null}}b._show_action()};b._expandable=false;b._expanded=false;b._anim.step=-1;f.src=b._imgs[b._open].src},_run:function(){var b=this;var c=(new Date()).getTime();if(c-b._anim.t<50){return}b._anim.t=c;b._set_size(true);if(b._anim.step==0||b._anim.w!=b._img.width||b._anim.h!=b._img.height){b._doResizing()}else{if(b._anim.step==1){b._doFadeIn()}else{if(b._anim.step==3){b._doFadeOut()}}}},_show_image:function(){var b=this;if(b._open==-1){return}b._img.src=b._imgs[b._open].src;var g=document.getElementById("loadingImage");if(g){g.style.display="none"}var c=document.getElementById("effectImage");if(c&&(!c.className||b._imgs[b._open].cls==c.className)){c.style.display="block"}var f=document.getElementById("closeButton");if(f){f.style.display="inline"}b._show_caption(true)},_doResizing:function(){var b=this;var c={x:(b._anim.f)?Math.floor((b._anim.w-b._img.width)/3):0,y:(b._anim.f)?Math.floor((b._anim.h-b._img.height)/3):0};b._img.width+=c.x;b._img.height+=c.y;if(Math.abs(c.x)<1){b._img.width=b._anim.w}if(Math.abs(c.y)<1){b._img.height=b._anim.h}if(b._anim.w==b._img.width&&b._anim.h==b._img.height){b._changed=false;b._set_photo_size();if(b._anim.step==0){b._anim.step=1;b._anim.a=0;b._show_image();b._setOpacity(b._img,b._anim.a)}else{if(b._anim.step==2&&!b._expanded){b._show_caption(true)}}}},_doFadeIn:function(){var b=this;b._anim.a+=2;if(b._anim.a>10){b._anim.step=2;b._anim.a=9.9}b._setOpacity(b._img,b._anim.a)},_doFadeOut:function(){var b=this;b._anim.a-=1;if(b._anim.a<1){b._anim.step=2;b._anim.a=0;if(b._timer!=null){window.clearInterval(b._timer);b._timer=null}b._toggle_wrap(false)}b._setOpacity(b._wrap,b._anim.a)},_setOpacity:function(b,c){if(Spica.Browser.isWinIE){b.style.filter="alpha(opacity="+(c*10)+")"}else{b.style.opacity=c/10}},_close_box:function(){var b=this;b._open=-1;b._openedset=null;b._reset_func();b._show_overall(false);b._box.style.display="none";if(!b._anim.f&&b._timer!=null){window.clearInterval(b._timer);b._timer=null}},_show_next:function(g){var b=this;if(!b._openedset){return b._close(null)}var c=b._current_setindex()+g;var f=b._sets[b._openedset][c];b._close_box();b._show(f)},_close:function(b){var c=this;if(b!=null){b=Spica.Event.getEvent(b);var f=b.target||b.srcElement;if(f&&f.getAttribute("id")=="lightboxImage"&&c._expanded){return}}c._close_box();if(c._anim.f&&c._anim.step==2){c._anim.step=3;c._anim.a=5}else{c._toggle_wrap(false)}}};var lbox=null;var idTOCPanel;var noTOC=false;window.onload=function(){lightbox=new Lightbox({loadingimg:sContextPath+"/_tools/lightbox_plus/loading.gif",expandimg:sContextPath+"/_tools/lightbox_plus/expand.gif",shrinkimg:sContextPath+"/_tools/lightbox_plus/shrink.gif",blankimg:sContextPath+"/_tools/lightbox_plus/blank.gif",previmg:sContextPath+"/_tools/lightbox_plus/prev.gif",nextimg:sContextPath+"/_tools/lightbox_plus/next.gif",closeimg:sContextPath+"/_tools/lightbox_plus/close.gif",effectimg:sContextPath+"/_tools/lightbox_plus/zzoop.gif",effectpos:{x:-40,y:-20},effectclass:"effectable",resizable:false,animation:false});lightbox.refresh();layout();var b=document.getElementById("idContent");b.focus();idTOCPanel=new Spry.Widget.CollapsiblePanel("idTOCPanel",{contentIsOpen:false});generated_toc.init(function(){idTOCPanel.close()},function(){noTOC=true});if(noTOC){var c=document.getElementById("__TOC");c.style.display="none"}if(typeof bookmark!="undefined"&&bookmark!=null&&bookmark!=""){window.location.hash=bookmark}layout()};window.onresize=function(){layout()};function layout(){var m=0;var i=_dm();var c=document.getElementById("idPageBody");if(!plain){var r=document.getElementById("idTelp");var s=document.getElementById("idLogo");var b=document.getElementById("idHorzLine");var f=document.getElementById("idCompanyNoticeLine");var q=document.getElementById("__TOC");var k=document.getElementById("__Footer");var o=document.getElementById("idTOCHeader");var g=document.getElementById("idCollapsiblePanelContent");var l=document.getElementById("generated-toc");m=s.offsetHeight+b.offsetHeight+f.offsetHeight+r.offsetHeight+(!noTOC?o.offsetHeight:0)+32;c.style.pixelTop=s.offsetHeight+b.offsetHeight+r.offsetHeight+(!noTOC?o.offsetHeight:0)+32;if(!noTOC){q.style.pixelTop=s.offsetHeight+b.offsetHeight+r.offsetHeight+32;g.style.pixelHeight=i.h-m;l.style.pixelHeight=i.h-m}k.style.pixelTop=i.h-f.offsetHeight}var n=i.w;var j=i.h-m;c.style.pixelWidth=n;c.style.pixelHeight=j}var Spry;if(!Spry){Spry={}}if(!Spry.Widget){Spry.Widget={}}Spry.Widget.CollapsiblePanel=function(b,c){this.element=this.getElement(b);this.focusElement=null;this.hoverClass="CollapsiblePanelTabHover";this.openClass="CollapsiblePanelOpen";this.closedClass="CollapsiblePanelClosed";this.focusedClass="CollapsiblePanelFocused";this.enableAnimation=true;this.enableKeyboardNavigation=true;this.animator=null;this.hasFocus=false;this.contentIsOpen=true;this.openPanelKeyCode=Spry.Widget.CollapsiblePanel.KEY_DOWN;this.closePanelKeyCode=Spry.Widget.CollapsiblePanel.KEY_UP;Spry.Widget.CollapsiblePanel.setOptions(this,c);this.attachBehaviors()};Spry.Widget.CollapsiblePanel.prototype.getElement=function(b){if(b&&typeof b=="string"){return document.getElementById(b)}return b};Spry.Widget.CollapsiblePanel.prototype.addClassName=function(c,b){if(!c||!b||(c.className&&c.className.search(new RegExp("\\b"+b+"\\b"))!=-1)){return}c.className+=(c.className?" ":"")+b};Spry.Widget.CollapsiblePanel.prototype.removeClassName=function(c,b){if(!c||!b||(c.className&&c.className.search(new RegExp("\\b"+b+"\\b"))==-1)){return}c.className=c.className.replace(new RegExp("\\s*\\b"+b+"\\b","g"),"")};Spry.Widget.CollapsiblePanel.prototype.hasClassName=function(c,b){if(!c||!b||!c.className||c.className.search(new RegExp("\\b"+b+"\\b"))==-1){return false}return true};Spry.Widget.CollapsiblePanel.prototype.setDisplay=function(b,c){if(b){b.style.display=c}};Spry.Widget.CollapsiblePanel.setOptions=function(g,f,b){if(!f){return}for(var c in f){if(b&&f[c]==undefined){continue}g[c]=f[c]}};Spry.Widget.CollapsiblePanel.prototype.onTabMouseOver=function(b){this.addClassName(this.getTab(),this.hoverClass);return false};Spry.Widget.CollapsiblePanel.prototype.onTabMouseOut=function(b){this.removeClassName(this.getTab(),this.hoverClass);return false};Spry.Widget.CollapsiblePanel.prototype.open=function(){this.contentIsOpen=true;if(this.enableAnimation){if(this.animator){this.animator.stop()}this.animator=new Spry.Widget.CollapsiblePanel.PanelAnimator(this,true,{duration:this.duration,fps:this.fps,transition:this.transition});this.animator.start()}else{this.setDisplay(this.getContent(),"block")}this.removeClassName(this.element,this.closedClass);this.addClassName(this.element,this.openClass)
};Spry.Widget.CollapsiblePanel.prototype.close=function(){this.contentIsOpen=false;if(this.enableAnimation){if(this.animator){this.animator.stop()}this.animator=new Spry.Widget.CollapsiblePanel.PanelAnimator(this,false,{duration:this.duration,fps:this.fps,transition:this.transition});this.animator.start()}else{this.setDisplay(this.getContent(),"none")}this.removeClassName(this.element,this.openClass);this.addClassName(this.element,this.closedClass)};Spry.Widget.CollapsiblePanel.prototype.onTabClick=function(b){if(this.isOpen()){this.close()}else{this.open()}this.focus();return this.stopPropagation(b)};Spry.Widget.CollapsiblePanel.prototype.onFocus=function(b){this.hasFocus=true;this.addClassName(this.element,this.focusedClass);return false};Spry.Widget.CollapsiblePanel.prototype.onBlur=function(b){this.hasFocus=false;this.removeClassName(this.element,this.focusedClass);return false};Spry.Widget.CollapsiblePanel.KEY_UP=38;Spry.Widget.CollapsiblePanel.KEY_DOWN=40;Spry.Widget.CollapsiblePanel.prototype.onKeyDown=function(c){var b=c.keyCode;if(!this.hasFocus||(b!=this.openPanelKeyCode&&b!=this.closePanelKeyCode)){return true}if(this.isOpen()&&b==this.closePanelKeyCode){this.close()}else{if(b==this.openPanelKeyCode){this.open()}}return this.stopPropagation(c)};Spry.Widget.CollapsiblePanel.prototype.stopPropagation=function(b){if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}if(b.stopPropagation){b.stopPropagation()}else{b.cancelBubble=true}return false};Spry.Widget.CollapsiblePanel.prototype.attachPanelHandlers=function(){var f=this.getTab();if(!f){return}var c=this;Spry.Widget.CollapsiblePanel.addEventListener(f,"click",function(h){return c.onTabClick(h)},false);Spry.Widget.CollapsiblePanel.addEventListener(f,"mouseover",function(h){return c.onTabMouseOver(h)},false);Spry.Widget.CollapsiblePanel.addEventListener(f,"mouseout",function(h){return c.onTabMouseOut(h)},false);if(this.enableKeyboardNavigation){var g=null;var b=null;this.preorderTraversal(f,function(h){if(h.nodeType==1){var i=f.attributes.getNamedItem("tabindex");if(i){g=h;return true}if(!b&&h.nodeName.toLowerCase()=="a"){b=h}}return false});if(g){this.focusElement=g}else{if(b){this.focusElement=b}}if(this.focusElement){Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"focus",function(h){return c.onFocus(h)},false);Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"blur",function(h){return c.onBlur(h)},false);Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"keydown",function(h){return c.onKeyDown(h)},false)}}};Spry.Widget.CollapsiblePanel.addEventListener=function(f,c,g,b){try{if(f.addEventListener){f.addEventListener(c,g,b)}else{if(f.attachEvent){f.attachEvent("on"+c,g)}}}catch(h){}};Spry.Widget.CollapsiblePanel.prototype.preorderTraversal=function(b,c){var g=false;if(b){g=c(b);if(b.hasChildNodes()){var h=b.firstChild;while(!g&&h){g=this.preorderTraversal(h,c);try{h=h.nextSibling}catch(f){h=null}}}}return g};Spry.Widget.CollapsiblePanel.prototype.attachBehaviors=function(){var b=this.element;var c=this.getTab();var f=this.getContent();if(this.contentIsOpen||this.hasClassName(b,this.openClass)){this.addClassName(b,this.openClass);this.removeClassName(b,this.closedClass);this.setDisplay(f,"block");this.contentIsOpen=true}else{this.removeClassName(b,this.openClass);this.addClassName(b,this.closedClass);this.setDisplay(f,"none");this.contentIsOpen=false}this.attachPanelHandlers()};Spry.Widget.CollapsiblePanel.prototype.getTab=function(){return this.getElementChildren(this.element)[0]};Spry.Widget.CollapsiblePanel.prototype.getContent=function(){return this.getElementChildren(this.element)[1]};Spry.Widget.CollapsiblePanel.prototype.isOpen=function(){return this.contentIsOpen};Spry.Widget.CollapsiblePanel.prototype.getElementChildren=function(c){var b=[];var f=c.firstChild;while(f){if(f.nodeType==1){b.push(f)}f=f.nextSibling}return b};Spry.Widget.CollapsiblePanel.prototype.focus=function(){if(this.focusElement&&this.focusElement.focus){this.focusElement.focus()}};Spry.Widget.CollapsiblePanel.PanelAnimator=function(b,g,f){this.timer=null;this.interval=0;this.fps=60;this.duration=500;this.startTime=0;this.transition=Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition;this.onComplete=null;this.panel=b;this.content=b.getContent();this.doOpen=g;Spry.Widget.CollapsiblePanel.setOptions(this,f,true);this.interval=Math.floor(1000/this.fps);var i=this.content;var h=i.offsetHeight?i.offsetHeight:0;this.fromHeight=(g&&i.style.display=="none")?0:h;if(!g){this.toHeight=0}else{if(i.style.display=="none"){i.style.visibility="hidden";i.style.display="block"}i.style.height="";this.toHeight=i.offsetHeight}this.distance=this.toHeight-this.fromHeight;this.overflow=i.style.overflow;i.style.height=this.fromHeight+"px";i.style.visibility="visible";i.style.overflow="hidden";i.style.display="block"};Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition=function(g,c,b,f){g/=f;return c+((2-g)*g*b)};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.start=function(){var b=this;this.startTime=(new Date).getTime();this.timer=setTimeout(function(){b.stepAnimation()},this.interval)};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stop=function(){if(this.timer){clearTimeout(this.timer);this.content.style.overflow=this.overflow}this.timer=null};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stepAnimation=function(){var g=(new Date).getTime();var c=g-this.startTime;if(c>=this.duration){if(!this.doOpen){this.content.style.display="none"}this.content.style.overflow=this.overflow;this.content.style.height=this.toHeight+"px";if(this.onComplete){this.onComplete()}return}var f=this.transition(c,this.fromHeight,this.distance,this.duration);this.content.style.height=((f<0)?0:f)+"px";var b=this;this.timer=setTimeout(function(){b.stepAnimation()},this.interval)};Spry.Widget.CollapsiblePanelGroup=function(b,c){this.element=this.getElement(b);this.opts=c;this.attachBehaviors()};Spry.Widget.CollapsiblePanelGroup.prototype.setOptions=Spry.Widget.CollapsiblePanel.prototype.setOptions;Spry.Widget.CollapsiblePanelGroup.prototype.getElement=Spry.Widget.CollapsiblePanel.prototype.getElement;Spry.Widget.CollapsiblePanelGroup.prototype.getElementChildren=Spry.Widget.CollapsiblePanel.prototype.getElementChildren;Spry.Widget.CollapsiblePanelGroup.prototype.setElementWidget=function(b,c){if(!b||!c){return}if(!b.spry){b.spry=new Object}b.spry.collapsiblePanel=c};Spry.Widget.CollapsiblePanelGroup.prototype.getElementWidget=function(b){return(b&&b.spry&&b.spry.collapsiblePanel)?b.spry.collapsiblePanel:null};Spry.Widget.CollapsiblePanelGroup.prototype.getPanels=function(){if(!this.element){return[]}return this.getElementChildren(this.element)};Spry.Widget.CollapsiblePanelGroup.prototype.getPanel=function(b){return this.getPanels()[b]};Spry.Widget.CollapsiblePanelGroup.prototype.attachBehaviors=function(){if(!this.element){return}var g=this.getPanels();var f=g.length;for(var c=0;c<f;c++){var b=g[c];this.setElementWidget(b,new Spry.Widget.CollapsiblePanel(b,this.opts))}};Spry.Widget.CollapsiblePanelGroup.prototype.openPanel=function(c){var b=this.getElementWidget(this.getPanel(c));if(b&&!b.isOpen()){b.open()}};Spry.Widget.CollapsiblePanelGroup.prototype.closePanel=function(c){var b=this.getElementWidget(this.getPanel(c));if(b&&b.isOpen()){b.close()}};Spry.Widget.CollapsiblePanelGroup.prototype.openAllPanels=function(){var g=this.getPanels();var f=g.length;for(var c=0;c<f;c++){var b=this.getElementWidget(g[c]);if(b&&!b.isOpen()){b.open()}}};Spry.Widget.CollapsiblePanelGroup.prototype.closeAllPanels=function(){var g=this.getPanels();var f=g.length;for(var c=0;c<f;c++){var b=this.getElementWidget(g[c]);if(b&&b.isOpen()){b.close()}}};generated_toc={generate:function(b,g){generate_from="0";generate_for="unset";tocparent=document.getElementById("generated-toc");if(tocparent){classes=tocparent.className.split(/\s+/);for(var f=0;f<classes.length;f++){if(classes[f].match(/^generate_from_h[1-6]$/)){generate_from=classes[f].substr(classes[f].length-1,1)
}else{if(classes[f].match(/^generate_for_[0-9a-zA-Z]+$/)){generate_for=classes[f].match(/^generate_for_([0-9a-zA-Z]+)$/)[1]}}}}else{return}if(generate_for=="page"){top_node=document.getElementsByTagName("body")}else{if(generate_for=="parent"||generate_for==""){top_node=tocparent.parentNode}else{top_node=document.getElementById(generate_for)}}if(generate_from==0){first_header_found=generated_toc.findFirstHeader(top_node);if(!first_header_found){g();return}else{generate_from=first_header_found.toLowerCase().substr(1)}}headings_to_treat={h6:""};for(var f=5;f>=parseInt(generate_from);f--){headings_to_treat["h"+f]=""}nodes=top_node.all?top_node.all:top_node.getElementsByTagName("*");headings=[];for(var f=0;f<nodes.length;f++){if(nodes[f].nodeName.toLowerCase() in headings_to_treat){if((" "+nodes[f].className+" ").indexOf("no-TOC")!=-1){continue}headings.push(nodes[f])}}if(headings.length==0){g()}status=generated_toc.readCookie("generated_toc_display");if(status&&status=="open"){display_initially="block";toggle_initially="Hide table of contents"}else{display_initially="none";toggle_initially="Show table of contents"}cur_head_lvl="h"+generate_from;cur_list_el=document.createElement("ul");cur_list_el.style.display="block";tocparent.appendChild(cur_list_el);for(var f=0;f<headings.length;f++){this_head_el=headings[f];this_head_lvl=headings[f].nodeName.toLowerCase();this_head_text=headings[f].innerHTML;if(typeof this_head_text!="undefined"&&this_head_text!=null){this_head_text="_"+this_head_text.replace(/[\W]+/gi,"_");this_head_text=this_head_text.replace(/[\s\.\-&]+/gi,"_")}if(!this_head_el.id){this_head_el.id=this_head_text;this_head_el.setAttribute("tabindex","-1")}while(this_head_lvl>cur_head_lvl){var h=null;for(var c=0;c<cur_list_el.childNodes.length;c++){if(cur_list_el.childNodes[c].nodeName.toLowerCase()=="li"){h=cur_list_el.childNodes[c]}}if(!h){h=document.createElement("li")}new_list_el=document.createElement("ul");h.appendChild(new_list_el);cur_list_el.appendChild(h);cur_list_el=new_list_el;cur_head_lvl="h"+(parseInt(cur_head_lvl.substr(1,1))+1)}while(this_head_lvl<cur_head_lvl){cur_list_el=cur_list_el.parentNode.parentNode;cur_head_lvl="h"+(parseInt(cur_head_lvl.substr(1,1))-1)}li=document.createElement("li");a=document.createElement("a");a.href="#"+this_head_el.id;if(typeof b!="undefined"&&b!=null){a.onclick=b}a.appendChild(document.createTextNode(generated_toc.innerText(this_head_el)));li.appendChild(a);cur_list_el.appendChild(li)}p=document.createElement("p");p.id="aftertoc";tocparent.appendChild(p)},wrapOpenClose:function(b,c){return function(f){d=c.style.display;b.firstChild.nodeValue=(d=="block"?"Show":"Hide")+" table of contents";b.className=(d=="block"?"toggle-closed":"toggle-open");c.style.display=d=="block"?"none":"block";if(c.style.display=="block"){generated_toc.createCookie("generated_toc_display","open",21)}else{generated_toc.createCookie("generated_toc_display","closed",21)}if(window.event){window.event.returnValue=false;window.event.cancelBubble=true}else{f.preventDefault();f.stopPropagation()}}},createCookie:function(f,g,h){if(h){var c=new Date();c.setTime(c.getTime()+(h*24*60*60*1000));var b="; expires="+c.toGMTString()}else{var b=""}document.cookie=f+"="+g+b+"; path=/"},readCookie:function(f){var h=f+"=";var b=document.cookie.split(";");for(var g=0;g<b.length;g++){var j=b[g];while(j.charAt(0)==" "){j=j.substring(1,j.length)}if(j.indexOf(h)==0){return j.substring(h.length,j.length)}}return null},eraseCookie:function(b){createCookie(b,"",-1)},innerText:function(b){return(typeof(b.innerText)!="undefined")?b.innerText:(typeof(b.textContent)!="undefined")?b.textContent:b.innerHTML.replace(/<[^>]+>/g,"")},findFirstHeader:function(f){var g=f.nodeName.toLowerCase();if(g.match(/^h[1-6]$/)){return g}else{for(var c=0;c<f.childNodes.length;c++){var b=generated_toc.findFirstHeader(f.childNodes[c]);if(b){return b}}return null}},init:function(b,c){if(arguments.callee.done){return}arguments.callee.done=true;generated_toc.generate(b,c)}};