/**
 * doijs package
 * 
 * @author donna iwan setiawan
 * @version 1.1 release 18
 * copyright - (c) 2007 - 2011 donna iwan setiawan
 */

var doi=new function(){var a=false;var b=false;return{debug:function(c){if(c==undefined){return b}b=!!(c);return b},extend:function(c,e){function d(){}d.prototype=e.prototype;c.prototype=new d();c.prototype.constructor=c;c.baseConstructor=e;c.superClass=e.prototype},load:function(){if(doi.rendered()){return}a=true;doi.event.fire(doi,"load");if(doi._$events&&doi._$events.load){delete doi._$events.load}},rendered:function(){return a}}};window.doi=doi;doi.body=function(){return document.body||document.getElementsByTagName("body")[0]};String.prototype.get_html_translation_table=function(i,f){var d={},h={},c=0,a="";var e={},b={};var j={},g={};j=(i?i.toUpperCase():"HTML_SPECIALCHARS");g=(f?f.toUpperCase():"ENT_COMPAT");e[0]="HTML_SPECIALCHARS";e[1]="HTML_ENTITIES";b[0]="ENT_NOQUOTES";b[2]="ENT_COMPAT";b[3]="ENT_QUOTES";if(!isNaN(j)){j=e[j]}if(!isNaN(g)){g=b[g]}if(j=="HTML_SPECIALCHARS"){d["60"]="&lt;";d["62"]="&gt;";d["38"]="&amp;"}else{if(j=="HTML_ENTITIES"){d["38"]="&amp;";d["60"]="&lt;";d["62"]="&gt;";d["160"]="&nbsp;";d["161"]="&iexcl;";d["162"]="&cent;";d["163"]="&pound;";d["164"]="&curren;";d["165"]="&yen;";d["166"]="&brvbar;";d["167"]="&sect;";d["168"]="&uml;";d["169"]="&copy;";d["170"]="&ordf;";d["171"]="&laquo;";d["172"]="&not;";d["173"]="&shy;";d["174"]="&reg;";d["175"]="&macr;";d["176"]="&deg;";d["177"]="&plusmn;";d["178"]="&sup2;";d["179"]="&sup3;";d["180"]="&acute;";d["181"]="&micro;";d["182"]="&para;";d["183"]="&middot;";d["184"]="&cedil;";d["185"]="&sup1;";d["186"]="&ordm;";d["187"]="&raquo;";d["188"]="&frac14;";d["189"]="&frac12;";d["190"]="&frac34;";d["191"]="&iquest;";d["192"]="&Agrave;";d["193"]="&Aacute;";d["194"]="&Acirc;";d["195"]="&Atilde;";d["196"]="&Auml;";d["197"]="&Aring;";d["198"]="&AElig;";d["199"]="&Ccedil;";d["200"]="&Egrave;";d["201"]="&Eacute;";d["202"]="&Ecirc;";d["203"]="&Euml;";d["204"]="&Igrave;";d["205"]="&Iacute;";d["206"]="&Icirc;";d["207"]="&Iuml;";d["208"]="&ETH;";d["209"]="&Ntilde;";d["210"]="&Ograve;";d["211"]="&Oacute;";d["212"]="&Ocirc;";d["213"]="&Otilde;";d["214"]="&Ouml;";d["215"]="&times;";d["216"]="&Oslash;";d["217"]="&Ugrave;";d["218"]="&Uacute;";d["219"]="&Ucirc;";d["220"]="&Uuml;";d["221"]="&Yacute;";d["222"]="&THORN;";d["223"]="&szlig;";d["224"]="&agrave;";d["225"]="&aacute;";d["226"]="&acirc;";d["227"]="&atilde;";d["228"]="&auml;";d["229"]="&aring;";d["230"]="&aelig;";d["231"]="&ccedil;";d["232"]="&egrave;";d["233"]="&eacute;";d["234"]="&ecirc;";d["235"]="&euml;";d["236"]="&igrave;";d["237"]="&iacute;";d["238"]="&icirc;";d["239"]="&iuml;";d["240"]="&eth;";d["241"]="&ntilde;";d["242"]="&ograve;";d["243"]="&oacute;";d["244"]="&ocirc;";d["245"]="&otilde;";d["246"]="&ouml;";d["247"]="&divide;";d["248"]="&oslash;";d["249"]="&ugrave;";d["250"]="&uacute;";d["251"]="&ucirc;";d["252"]="&uuml;";d["253"]="&yacute;";d["254"]="&thorn;";d["255"]="&yuml;"}else{throw Error("Table: "+j+" not supported");return false}}if(g!="ENT_NOQUOTES"){d["34"]="&quot;"}if(g=="ENT_QUOTES"){d["39"]="&#039;"}for(c in d){a=String.fromCharCode(c);h[a]=d[c]}return h};String.prototype.htmlentities=function(e){var d={},c="",a="",b=0;a=this.toString();if(false===(d=this.get_html_translation_table("HTML_ENTITIES",e))){return false}for(c in d){entity=d[c];a=a.split(c).join(entity)}return a};doi.browser=new function(){var b=navigator.userAgent.toLowerCase();var a=navigator.appVersion.toLowerCase();return{version:(b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(b),opera:/opera/.test(b),msie:/msie/.test(b)&&!/opera/.test(b),mozilla:/mozilla/.test(b)&&!/(compatible|webkit)/.test(b),os:{mac:/mac/.test(a),win:/win/.test(a),unix:/x11/.test(a),linux:/linux/.test(a)}}};doi.dom=new function(){function a(d,c){return typeof d==c}function b(e,d){for(var c in d){if(doi.dom.isObject(d[c])){e[c]=e[c]||{};b(e[c],d[c])}else{e[c]=d[c]}}}return{$:function(e){var r,l=arguments[1]||false;if(this.isString(e)){if(/^#/.test(e)){e=e.replace(/^#/,"");return this.getElementById(e,l)}else{if(r=e.match(/^id\:(.*)/)){return this.getElementById(this.trim(r[1]),l)}else{if(/^\./.test(e)){e=e.replace(/^\./,"");return this.getElementsByClass(this.trim(e),l)}else{if(r=e.match(/^class\:(.*)/)){return this.getElementsByClass(this.trim(r[1]),l)}else{if(r=e.match(/^tag\:([a-z]+);?(.*)/i)){var c=this.getElementsByTagName(this.trim(r[1]),l);if(!c){return false}if(!r[2]){return c}var j=r[2].split(/;/);var g={};for(var o=0;o<j.length;o++){var f=j[o].split(/=/);var d=doi.dom.trim(f[0]);var p=doi.dom.trim(f[1]);if(d==""||p==""){continue}g[d]=p}var n=[];for(var h=0;h<c.length;h++){var q=true;for(var o in g){var m=c[h].getAttribute(o);if(m){var k=doi.regexp.RegExp(g[o]);if(!k.test(m)){q=false;break}}else{q=false}}if(q){n.push(c[h])}}if(n.length==0){return false}return n}else{if(r=e.match(/^name\:(.*)/)){return this.getElementsByName(this.trim(r[1]))}else{return this.getElementById(e,l)}}}}}}}else{if(e&&e.nodeType){return e}else{if(e&&(this.isObject(e)||this.isFunction(e))){return e}}}return false},addClass:function(f,e){if(!f){return}var d=[];if(this.isArray(f)){for(var c=0;c<f.length;c++){if(this.isElement(f[c])){d.push(f[c])}}}else{if(this.isElement(f)){d=[f]}}for(var c=0;c<d.length;c++){if(!this.hasClass(d[c],e)){d[c].className+=" "+e}}},addClassName:function(d,c){this.addClass(d,c)},className:function(f,e){if(!f){return}var d=[];if(this.isArray(f)){for(var c=0;c<f.length;c++){if(this.isElement(f[c])){d.push(f[c])}}}else{if(this.isElement(f)){d=[f]}}for(var c=0;c<d.length;c++){d[c].className=e}},clone:function(e){if(doi.dom.isElement(e)){var c=!!(arguments[1]);return e.cloneNode(c)}for(var d in e){this[d]=(doi.dom.isObject(e[d]))?new doi.dom.clone(e[d]):e[d]}},debug:function(d,g,e){var f="";if(!g&&g!=0){g=1}if(!e){e="object"}g=this.parseInt(g);if(this.isObject(d)&&g>0){for(var c in d){f+=this.debug(d[c],g-1,e+"."+c)}}else{f+=e+" = "+d+"\n"}return f},execScript:function(f){if(!f||(f&&this.isArray(f))){return}var g=doi.dom.getElementsByTagName("script",f);if(!g){return}var c=[];for(var e=0;e<g.length;e++){var d=document.createElement("script");d.type=g[e].type;if(g[e].src!=""){d.src=g[e].src}else{if(g[e].text!=""){d.text=g[e].text}}c.push(d)}for(var e=0;e<c.length;e++){f.appendChild(c[e])}},get:function(c){var d=arguments[1]||false;return this.$(c,d)},getElementsByClass:function(f,e){var g=[];var d=this.getElementsByTagName("*",e);if(d){for(var c=0;c<d.length;c++){if(this.hasClass(d[c],f)){g.push(d[c])}}}if(g.length!=0){return g}return false},getElementsByClassName:function(d,c){return this.getElementsByClass(d,c)},getElementById:function(e){var d=arguments[1]||false;var c;if(d&&d.getElementById){c=d.getElementById(e)}else{if(document.getElementById){c=document.getElementById(e)}else{if(document.all){c=document.all(e)}}}if(c){if(c.length){return c[0]}else{return c}}return false},getElementsByName:function(d){if(doi.browser.msie){var c=document.getElementsByTagName("*");var f=[];for(var e=0;e<c.length;e++){if((c[e].name&&c[e].name==d)||(c[e].getAttribute("name")==d)){f[f.length]=c[e]}}if(f.length!=0){return f}return false}else{if(document.getElementsByName){var f=document.getElementsByName(d);if(f.length!=0){return f}}}return false},getElementsByTagName:function(d,e){if(!e){e=document}if(e&&e.getElementsByTagName){var c=e.getElementsByTagName(d);if(c.length!=0){return c}}return false},getStyle:function(l,m){if(l){if(this.isArray(l)){return false}}else{return false}if(!m&&!m.split){return false}var e=m.split(";");var c={};for(var h=0;h<e.length;h++){if(!e[h].replace||e[h]==""){continue}var g=e[h].replace(/\-(\w{1})/g,function(){return arguments[1].toUpperCase()});if(l.currentStyle){c[e[h]]=l.currentStyle[g]}else{if(window.getComputedStyle){if(window.getComputedStyle(l,null)){c[e[h]]=window.getComputedStyle(l,null).getPropertyValue(e[h])}else{c[e[h]]=null}}else{c[e[h]]=l.style[e[h]]}}}var f=0;for(var d in c){f++}if(f<=0){return false}else{if(f==1){return c[e[0]]}else{return c}}return false},hasClass:function(g,f){if(!g||(g&&!g.className)||!f){return false}var c=g.className.split(/\s+/);var h=!!arguments[2];if(h){var e=new RegExp(f,"i")}else{var e=new RegExp("^"+doi.regexp.preg_quote(f)+"$","i")}for(var d in c){if(e.test(c[d])){return true}}return false},hasClassName:function(d,c){var e=!!arguments[2];return this.hasClass(d,c,!!e)},html:function(d){if(!d){return""}if(this.isElement(d)){var f=document.createElement("div");var e=d.cloneNode(true);f.appendChild(e);return f.innerHTML}else{if(this.isString(d)){return d}else{if(this.isArray(d)){htmls=[];for(var c=0;c<d.length;c++){var f=document.createElement("div");var e=d[c].cloneNode(true);f.appendChild(e);htmls.push(f.innerHTML)}return htmls}}}},isArray:function(c){return(c&&!this.isString(c)&&c.length&&c.constructor.toString().indexOf("Array")!=-1)},isBool:function(c){if(c&&c.toLowerCase){c=c.toLowerCase();switch(c){case"true":case"false":return true;default:return false}}return a(c,"boolean")},isBoolean:function(c){return this.isBool(c)},isDefined:function(c){return !doi.dom.isUndefined(c)},isElement:function(d){var c=arguments[1];if(c&&this.isString(c)){c=c.toLowerCase();return(d&&d.nodeName&&d.nodeName.toLowerCase()==c)}return(d&&d.nodeName)},isFunction:function(c){return a(c,"function")},isNaN:function(c){return isNaN(c)},isNumber:function(c){return a(c,"number")},isObject:function(c){return a(c,"object")},isString:function(c){return a(c,"string")},isUndefined:function(c){return(c==undefined)},merge:function(){var d={};for(var c=0;c<arguments.length;c++){if(doi.dom.isObject(arguments[c])){b(d,arguments[c])}}return new doi.dom.clone(d)},outerHTML:function(c){return this.html(c)},parseAttribute:function(j){var c={};if(j&&j.split){var k=j.split(";");var e=k.length;for(var f=0;f<e;f++){var g=new Array();var h=k[f];var d=h.indexOf(":");g.push(h.substr(0,d));g.push(h.substr(d+1).replace(/'/g,""));if(g[0]!=""){g[0]=g[0].replace(/\-(\w{1})/g,function(){return arguments[1].toUpperCase()});var m="";if(!doi.dom.isUndefined(g[1])){m=g[1].toLowerCase()}if(m=="true"||m=="false"){c[g[0]]=(m=="true")}else{c[g[0]]=g[1]}}}}return c},parseFloat:function(c){c=parseFloat(c);if(this.isNaN(c)){c=0}return c},parseInt:function(d,c){if(doi.dom.isUndefined(c)){c=10}d=parseInt(d,c);if(this.isNaN(d)){d=0}return d},removeClass:function(c,h){if(!c){return}var f=[];if(this.isArray(c)){for(var g=0;g<c.length;g++){if(this.isElement(c[g])){f.push(c[g])}}}else{if(this.isElement(c)){f=[c]}}try{var k=!!arguments[2];if(k){var m=new RegExp(h,"i")}else{var m=new RegExp("^"+doi.regexp.preg_quote(h)+"$","i")}for(var g=0;g<f.length;g++){var n=f[g].className.split(/\s+/);var l="";if(n.length){for(var e in n){if(!m.test(n[e])){l+=" "+n[e]}}}f[g].className=this.trim(l)}}catch(d){alert(d)}},removeClassName:function(d,c){var e=!!arguments[2];this.removeClass(d,c,e)},replaceClass:function(e,d,c){var f=!!arguments[3];this.removeClass(e,d,f);this.addClass(e,c)},replaceClassName:function(e,d,c){this.replaceClass(e,d,c)},stringPad:function(g,f,c,e){g=""+g;if(!e){e="left"}var h="";f-=g.length;for(var d=1;d<=f;d++){h+=c;if(h.length>f){h.substr(0,f);break}}if(e!="left"){return g+""+h}return h+""+g},style:function(g,c){if(!g){return}var f=[];if(this.isArray(g)){for(var d=0;d<g.length;d++){if(this.isElement(g[d])){f.push(g[d])}}}else{if(this.isElement(g)){f=[g]}}if(this.isObject(c)){var k="";for(var d in c){k+=d+":"+c[d]+";"}k=this.parseAttribute(k)}else{var k=this.parseAttribute(c)}for(var j=0;j<f.length;j++){g=f[j];for(var d in k){try{if(d=="opacity"){g.style[d]=this.parseInt(k[d])/10;g.style.filter="alpha(opacity="+(this.parseInt(k[d])*10)+")"}else{g.style[d]=k[d]}}catch(h){continue}}}},toBool:function(c){if(c&&c.toLowerCase){c=c.toLowerCase();switch(c){case"true":return true;case"false":return false}}return !!(c)},toBoolean:function(c){return this.toBool(c)},trim:function(c){if(!c){c=""}if(c.replace){c=c.replace(/^\s+/,"");c=c.replace(/\s+$/,"")}return c},write:function(c){if(!c){return}var e=document.createElement("div");if(this.isElement(c)){e.appendChild(c);var d=doi.body();while(d&&d.lastChild&&d.lastChild.nodeType==1){d=d.lastChild}if(d.nodeName=="BODY"){d.appendChild(e.childNodes[0])}else{d.parentNode.appendChild(e.childNodes[0])}}else{if(this.isString(c)){var d=doi.body();while(d&&d.lastChild&&d.lastChild.nodeType==1){d=d.lastChild}e.innerHTML=c;if(d.nodeName=="BODY"){d.appendChild(e.childNodes[0])}else{d.parentNode.appendChild(e.childNodes[0])}}}},request:function(){var e={};var d="";var f="";var c=arguments[0]||location.href;function g(){if(/#/.test(c)){f=c.substr(c.indexOf("#")+1,c.length);c=c.substr(0,c.indexOf("#"))}if(/\?/.test(c)){d=c.substr(0,c.indexOf("?"));var o=c.substr(c.indexOf("?")+1,c.length);var n=o.split("&");for(var l=0;l<n.length;l++){var m=n[l].split("=");e[m[0]]=m[1]}}else{if(/\.php/.test(c)){var p=c.indexOf(".php")+4;d=c.substr(0,p);var o=c.substr(p+1,c.length);o=o.replace(/(&|\=)/g,"/");var n=o.split("/");for(var l=0;l<n.length;l+=2){var j=n[l];var h=n[l+1];e[j]=h}}else{d=c}}}g();return{get:function(h){if(h){if(e[h]){return e[h]}return null}return e},getAnchor:function(){return f},remove:function(j){if(doi.dom.isArray(j)){for(var h in j){delete e[j[h]]}}else{delete e[j]}},append:function(i,h){e[i]=h},toString:function(){var k=[];for(var h in e){k.push(h+"="+e[h])}var j=k.join("&");if(j!=""){return d+"?"+j}else{return d}}}}}};doi.request=new doi.dom.request();doi.regexp=new function(){this.preg_quote=function(a){return a.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:\-])/g,"\\$1")};this.RegExp=function(b){var a=arguments[1]||"";return new RegExp(doi.regexp.preg_quote(b),a)}};doi.dom.screen=new function(){return{get:function(){if(doi.body().scrollHeight>doi.body().offsetHeight){var a=doi.body().scrollWidth;var b=doi.body().scrollHeight}else{var a=doi.body().offsetWidth;var b=doi.body().offsetHeight}return{width:a,height:b}},width:function(){return this.get().width},height:function(){return this.get().height}}};doi.dom.dimension=new function(){return{absolutePosition:function(b){var d={top:0,left:0};if(!doi.dom.isElement(b)){return d}if(b.getBoundingClientRect){var a=this.bodyScroll();var c=b.getBoundingClientRect();d.top=c.top+a.scrollTop;d.left=c.left+a.scrollLeft}else{if(b.offsetParent){do{d.left+=b.offsetLeft||0;d.top+=b.offsetTop||0;if(b.offsetParent){d.left-=b.scrollLeft||0;d.top-=b.scrollTop||0}}while(b=b.offsetParent)}}return d},bodyScroll:function(){if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement}return document.body},client:function(){var a={width:0,height:0};if(self.innerWidth){a.width=self.innerWidth;a.height=self.innerHeight}else{a.width=doi.body().clientWidth;a.height=doi.body().clientHeight}return a},screen:doi.dom.screen}};doi.event=new function(){var c=null,f=[],a=0;function g(){if(doi.browser.safari){c=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){window.clearInterval(c);c=null;doi.load()}},10)}else{if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){doi.load()},false)}else{if(doi.rendered()){return}try{document.documentElement.doScroll("left")}catch(h){setTimeout(arguments.callee,0);return}doi.load()}}}g();function e(k,i,h,j){if(!k._$events){k._$events={}}if(!k._$events[i]){k._$events[i]={};if(k["on"+i]){k._$events[i][0]=k["on"+i]}}if(doi.dom.isDefined(h._$guid)){return}h._$cancelBubble=j;h._$guid=++a;k._$events[i][h._$guid]=h;k["on"+i]=b}function d(n,l){var m=arguments[2]||{};if(n._$events&&n._$events[l]){var h=n._$events[l];for(var j in h){n._$event=h[j];n._$event(false,m)}}else{if(n["on"+l]&&doi.dom.isFunction(n["on"+l])){var k=function(i,o){n["on"+l](i,o)};k(false,m)}}}function b(k){var l=true;k=k||window.event;if(!k){return false}var h={};if(this._$events){h=this._$events[k.type]}for(var j in h){this._$event=h[j];if(this._$event._$cancelBubble){k.cancelBubble=true;if(k.stopPropagation){k.stopPropagation()}}if(this._$event(k)===false){l=false}}return l}return{add:function(m,k,j){var l=true;if(doi.dom.isDefined(arguments[3])){l=!!(arguments[3])}if(!m&&!doi.rendered()){f.push({elm:m,type:k,handler:j,cancelBubble:l});return}if(!m){return}if(m.length&&m!=window){for(var h=0;h<m.length;h++){e(m[h],k,j,l)}}else{e(m,k,j,l)}},fire:function(l,j){var k=arguments[2]||{};if(!l){return}if(l.length){for(var h=0;h<l.length;h++){d(l[h],j,k)}}else{d(l,j,k)}},load:function(){for(var j=0;j<f.length;j++){var h=f[j];doi.event.add(h.elm,h.type,h.handler,h.cancelBubble)}delete (f)},remove:function(k,i,h){var j=!!(arguments[3]);if(k._$events&&k._$events[i]){if(doi.dom.isDefined(k._$events[i][h._$guid])){delete k._$events[i][h._$guid];delete h._$guid;delete h._$cancelBubble}}},fromTarget:function(h){h=h||window.event;return h.srcElement||h.relatedTarget},toTarget:function(h){h=h||window.event;return h.relatedTarget||h.toElement},stop:function(h){h=h||window.event;h.cancelBubble=true;h.returnValue=false;if(h.stopPropagation){h.stopPropagation()}if(h.preventDefault){h.preventDefault()}}}};doi.event.add(doi,"load",doi.event.load);doi.event.add(window,"load",doi.load);doi.ajax=new function(){var a=["REQUEST_NOT_INITIALIZED","REQUEST_HAS_BEEN_SET_UP","REQUEST_HAS_BEEN_SENT","REQUEST_IN_PROGRESS","REQUEST_COMPLETE","REQUEST_FAIL"];function b(e,f,d){var c=arguments[3];if(!c){c={}}if(e.readyState==4){if(!doi.browser.msie){e._is_stop=true;window.clearTimeout(e._timeout_handler)}if(e.status==200){if(c.success){c.success(e,c)}}else{if(c.failure){c.failure(e,c)}}}if(c.readystate){c.readystate(e,c)}}this.request=function(h,f){var d=false;var j="";var c=arguments[2];if(!c){c={timeout:10000}}if(doi.dom.isUndefined(c.timeout)){c.timeout=10000}try{if(window.XMLHttpRequest){d=new XMLHttpRequest();if(d.overrideMimeType){d.overrideMimeType("text/html")}}else{if(window.ActiveXObject){d=new window.ActiveXObject("Msxml2.XMLHTTP")||new window.ActiveXObject("Microsoft.XMLHTTP")}else{alert("Your browser doesn't support AJAX");return false}}if(/#/.test(f)){f=f.substring(0,f.indexOf("#"))}if(!/\?.*_ajax=/.test(f)){if(/\?/.test(f)){f+="&_ajax=1"}else{f+="?_ajax=1"}}if(h&&h.toUpperCase){h=h.toUpperCase()}else{h="GET"}if(c.data){if(doi.dom.isString(c.data)){j+="&"+c.data}else{if(doi.dom.isElement(c.data,"form")){for(var g=0;g<c.data.elements.length;g++){var l=c.data.elements[g];if(l.tagName=="INPUT"){if(l.type=="checkbox"||l.type=="radio"){if(!l.checked){continue}}}else{if(l.tagName=="SELECT"){if(l.selectedIndex<0){l.value=""}else{l.value=l.options[l.selectedIndex].value}}}if(l.disabled){continue}j+="&"+l.name+"="+encodeURIComponent(l.value)}}}}d.onreadystatechange=function(){b(d,h,f,c)};if(h=="GET"){if(!/\?/.test(f)){f+="?"}f+=j}d.open(h,f,true);d.setRequestHeader("X-Requested-With","XMLHttpRequest");d.setRequestHeader("Accept","text/xml, application/xml");if(h=="POST"){d.setRequestHeader("Content-type","application/x-www-form-urlencoded");d.setRequestHeader("Content-length",j.length);d.setRequestHeader("Connection","close")}d.send(j);if(!doi.browser.msie){d._timeout_handler=window.setTimeout(function(){if(d){if(!doi.browser.msie){d._is_stop=true}d.onreadystatechange=function(){};d.abort();if(c.failure){c.failure(d,c)}}},c.timeout);if(!doi.browser.msie){d._is_stop=false}}}catch(k){alert(k)}return d};this.abort=function(c){if(c){c.onreadystatechange=function(){};c.abort()}};this.isStop=function(c){if(c){return(c._is_stop)}return true}};doi.iAjax=new function(){var b,c="doi-iajax",a,d=this;this.load=function(){var f=b;var h;if(f.contentDocument){h=f.contentDocument}else{if(f.contentWindow){h=f.contentWindow.document}else{h=window.frames[c].document}}if(h.location.href=="about:blank"){return}var e=a;if(e&&e.success){var g=e.success;if(doi.dom.isFunction(g)){g(h.body.innerHTML)}}};this.submit=function(h,e){if(!b){doi.dom.write('<iframe id="'+c+'" name="'+c+'" src="about:blank" onload="doi.iAjax.load()"></iframe>');b=d.element();doi.dom.style(b,{display:"none"})}h.setAttribute("target",c);if(!/\?.*_ajax=/.test(h.action)){if(/\?/.test(h.action)){h.action+="&_ajax=1"}else{h.action+="?_ajax=1"}}var f=b;a=e;if(e&&e.submit){var g=e.submit;if(doi.dom.isFunction(g)){g()}}return true};this.element=function(){return doi.dom.$("#"+c)}};doi.effect=new function(){this.animate=function(b,c){var a=arguments[2]||{};var d=arguments[3]||{};c(b,a,d)};this.blind=function(b){var a=arguments[1]||{};var d=arguments[2]||{};var c=(a.type)||"v";if(c=="v"){var f=(a.from)||b.scrollHeight;var e=(a.to)||b.scrollHeight;a.from=doi.dom.parseInt(a.from);a.to=doi.dom.parseInt(a.to);if(f>e){doi.effect.blindUp(b,a,d)}else{doi.effect.blindDown(b,a,d)}}else{var f=(a.from)||b.scrollWidth;var e=(a.to)||b.scrollWidth;a.from=doi.dom.parseInt(f);a.to=doi.dom.parseInt(e);if(f>e){doi.effect.blindLeft(b,a,d)}else{doi.effect.blindRight(b,a,d)}}};this.blindY=function(a){var b=arguments[1]||{};var d=arguments[2]||{};if(!a){return}if(doi.dom.isArray(a)){var c=a[0]}else{var c=a}var f=c.scrollHeight;if(doi.dom.isDefined(b.from)){f=doi.dom.parseInt(b.from)}var e=c.scrollHeight;if(doi.dom.isDefined(b.to)){e=doi.dom.parseInt(b.to)}if(f>e){doi.effect.blindUp(a,b,d)}else{doi.effect.blindDown(a,b,d)}};this.blindX=function(a){var b=arguments[1]||{};var d=arguments[2]||{};if(!a){return}if(doi.dom.isArray(a)){var c=a[0]}else{var c=a}var f=c.scrollWidth;if(doi.dom.isDefined(b.from)){f=doi.dom.parseInt(b.from)}var e=c.scrollWidth;if(doi.dom.isDefined(b.to)){e=doi.dom.parseInt(b.to)}if(f>e){doi.effect.blindLeft(a,b,d)}else{doi.effect.blindRight(a,b,d)}};this.blindUp=function(d){if(!d){return}if(doi.dom.isArray(d)){var e=d[0]}else{var e=d}var g=arguments[1]||{};var c=arguments[2]||{};doi.dom.style(d,{display:"block",visibility:"visible",overflow:"hidden"});var i=(g.from)||e.offsetHeight;var j=(g.to)||0;i=doi.dom.parseInt(i);j=doi.dom.parseInt(j);if(i<j){var f=j;j=i;i=f}var b=1;var h=Math.ceil(i/20);if(e.doi_blindv_timer){window.clearInterval(e.doi_blindv_timer)}e.doi_blindv_timer=window.setInterval(function(){i-=h;if(i<=j){i=j;if(i<=0){doi.dom.style(d,{height:"1px",display:"none"})}else{doi.dom.style(d,{height:i+"px"})}window.clearInterval(e.doi_blindv_timer);e.doi_blindv_timer=false;if(g.stop&&doi.dom.isFunction(g.stop)){g.stop(c)}return}doi.dom.style(d,{height:i+"px"});if(g.to=="auto"){if(e.offsetHeight<=e.scrollHeight){i=e.scrollHeight;doi.dom.style(d,{height:i+"px"});window.clearInterval(e.doi_blindv_timer);e.doi_blindv_timer=false;if(g.stop&&doi.dom.isFunction(g.stop)){g.stop(c)}return}}},b)};this.blindDown=function(d){if(!d){return}if(doi.dom.isArray(d)){var e=d[0]}else{var e=d}var g=arguments[1]||{};var c=arguments[2]||{};doi.dom.style(d,{display:"block",visibility:"visible",overflow:"hidden"});var i=(g.from)||0;var j=(g.to)||e.scrollHeight;i=doi.dom.parseInt(i);j=doi.dom.parseInt(j);if(i>j){var f=j;j=i;i=f}var b=1;var h=Math.ceil(j/20);if(e.doi_blindv_timer){window.clearInterval(e.doi_blindv_timer)}e.doi_blindv_timer=window.setInterval(function(){i+=h;if(i>=j){i=j;doi.dom.style(d,{height:i+"px"});window.clearInterval(e.doi_blindv_timer);e.doi_blindv_timer=false;if(g.stop&&doi.dom.isFunction(g.stop)){g.stop(c)}return}doi.dom.style(d,{height:i+"px"})},b)};this.blindLeft=function(d){if(!d){return}if(doi.dom.isArray(d)){var e=d[0]}else{var e=d}var g=arguments[1]||{};var c=arguments[2]||{};doi.dom.style(d,{display:"block",visibility:"visible",overflow:"hidden"});var i=(g.from)||e.offsetWidth;var j=(g.to)||0;i=doi.dom.parseInt(i);j=doi.dom.parseInt(j);if(i<j){var f=j;j=i;i=f}var b=1;var h=Math.ceil(i/20);if(e.doi_blindh_timer){window.clearInterval(e.doi_blindh_timer)}e.doi_blindh_timer=window.setInterval(function(){i-=h;if(i<=j){i=j;if(i==0){doi.dom.style(d,{width:"0px",display:"none"})}else{doi.dom.style(d,{width:i+"px"})}window.clearInterval(e.doi_blindh_timer);e.doi_blindh_timer=false;if(g.stop&&doi.dom.isFunction(g.stop)){g.stop(c)}return}doi.dom.style(d,{width:i+"px"});if(g.to=="auto"){if(e.offsetWidth<=e.scrollWidth){i=e.scrollWidth;doi.dom.style(d,{width:i+"px"});window.clearInterval(e.doi_blindh_timer);e.doi_blindh_timer=false;if(g.stop&&doi.dom.isFunction(g.stop)){g.stop(c)}return}}},b)};this.blindRight=function(d){if(!d){return}if(doi.dom.isArray(d)){var e=d[0]}else{var e=d}var g=arguments[1]||{};var c=arguments[2]||{};doi.dom.style(d,{display:"block",visibility:"visible",overflow:"hidden"});var i=(g.from)||0;var j=(g.to)||e.scrollWidth;i=doi.dom.parseInt(i);j=doi.dom.parseInt(j);if(i>j){var f=j;j=i;i=f}var b=1;var h=Math.ceil(j/20);if(e.doi_blindh_timer){window.clearInterval(e.doi_blindh_timer)}e.doi_blindh_timer=window.setInterval(function(){i+=h;if(i>=j){i=j;doi.dom.style(d,{width:i+"px"});window.clearInterval(e.doi_blindh_timer);e.doi_blindh_timer=false;if(g&&g.stop&&doi.dom.isFunction(g.stop)){g.stop(c)}return}doi.dom.style(d,{width:i+"px"})},b)};this.moveY=function(d){if(!d){return}if(doi.dom.isArray(d)){var e=d[0]}else{var e=d}var f=arguments[1]||{};var c=arguments[2]||{};var j=0;var b=1;var k=1;var i=f.from||0;var h=f.to||0;if(i<h){var g=2*h/(Math.pow(20,2))}else{var g=2*i/(Math.pow(20,2))}if(e.doi_movey_timer){window.clearInterval(e.doi_movey_timer)}e.doi_movey_timer=window.setInterval(function(){j+=k;if(i<h){var a=(g/2)*Math.pow(j,2)+i;if(a>=h){a=h;window.clearInterval(e.doi_movey_timer);e.doi_movey_timer=false}}else{var a=-(g/2)*Math.pow(j,2)+i;if(a<=h){a=h;window.clearInterval(e.doi_movey_timer);e.doi_movey_timer=false}}doi.dom.style(d,{top:a+"px"});if(a==h){if(f&&f.stop&&doi.dom.isFunction(f.stop)){f.stop(c)}}},b)}};doi.widget=new function(){var a=9999;var b=[];return{queue:{length:0},base:function(c,d){return{init:function(e,f){},render:function(){}}},instance:new function(){return{get:function(c){if(this.instance[c]){return this.instance[c]}return false},instance:{length:0},save:function(c,d){if(!d){d="doi-widget-"+this.instance.length++;this.instance[d]=c}else{if(/\[\]$/.test(d)){d=d.replace(/\[\]$/,this.instance.length++)}}this.instance[d]=c;return d},length:function(){return this.instance.length}}},register:function(e){var d=false;for(var c=0;c<b.length;c++){if(b[c]==e){d=true;break}}if(!d){b.push(e)}},render:function(){for(var c=0;c<b.length;c++){if(b[c]){(new b[c](false,arguments[0])).render()}}},zIndex:function(){var c=a-doi.widget.instance.length();if(c<=0){c=a}return c}}};doi.event.add(doi,"load",doi.widget.render);doi.widget.button=function(){var a=arguments[0]||false,c=[],b=[];return{render:function(){if(!a){c=doi.dom.$("tag:button;title=doi-widget-button:true")}else{if(a.length){c=a}else{c=[a]}}for(var e=0;e<c.length;e++){if(!doi.dom.isElement(c[e])){continue}var d=new doi.widget.buttonByElement(c[e]);d.render();b.push(d)}}}};doi.widget.register(doi.widget.button);doi.widget.buttonByElement=function(){var d=arguments[0]||false,b,j,i=this,k,e=false,g="doi-widget-button",f,a,h,m,l="",c=true;return{render:function(){if(e){return}if(!doi.dom.isElement(d)){var u=document.createElement("button");doi.dom.write(u);j=doi.widget.instance.save(this);d=u;k=j}else{j=doi.widget.instance.save(this,d.id);g=d.className||g;k=d.name||j}d.name=k;doi.dom.className(d,g);b=doi.dom.parseAttribute(d.getAttribute("title"))||{};if(!b.imagePosition){b.imagePosition="left"}if(b.title){d.setAttribute("title",b.title)}else{d.setAttribute("title","")}if(b.imageHover){var w=b.imageHover;w=w.replace(/http\/\//,"http://");h=new Image();h.src=w}if(b.imageClick){var n=b.imageClick;n=n.replace(/http\/\//,"http://");m=new Image();m.src=n}for(var r=0;r<d.childNodes.length;r++){if(d.childNodes[r].nodeName=="IMG"){f=d.childNodes[r].cloneNode(true)}else{l+=doi.dom.outerHTML(d.childNodes[r])}}if(f){a=new Image();a.src=f.src}var x=document.createElement("table");var s=document.createElement("tbody");x.appendChild(s);x.setAttribute("cellPadding",0);x.setAttribute("cellSpacing",0);x.setAttribute("border",0);x.setAttribute("width","100%");var t=document.createElement("tr");var q=document.createElement("tr");var p=document.createElement("td");p.setAttribute("valign","middle");p.setAttribute("align","center");var o=document.createElement("td");o.setAttribute("valign","middle");o.setAttribute("align","center");if(l==""&&!f){s.appendChild(t);p.innerHTML="&nbsp";t.appendChild(p)}else{switch(b.imagePosition){case"right":s.appendChild(t);if(l!=""){p.innerHTML=l;t.appendChild(p)}if(f){o.appendChild(f);t.appendChild(o)}break;case"top":if(f){p.appendChild(f);t.appendChild(p);s.appendChild(t)}if(l!=""){o.innerHTML=l;q.appendChild(o);s.appendChild(q)}break;case"bottom":if(l!=""){p.innerHTML=l;t.appendChild(p);s.appendChild(t)}if(f){o.appendChild(f);q.appendChild(o);s.appendChild(q)}break;default:s.appendChild(t);if(f){p.appendChild(f);t.appendChild(p)}if(l!=""){o.innerHTML=l;t.appendChild(o)}}}d.innerHTML="";d.appendChild(x);var v=document.createElement("span");v.id=j;d.removeAttribute("id");doi.dom.className(v,g);d.parentNode.insertBefore(v,d);v.appendChild(d);d=v;doi.event.add(d,"mouseover",function(){if(f&&h){f.src=h.src}doi.dom.addClass(this,g+"-hover")});doi.event.add(d,"mouseout",function(){if(f){f.src=a.src}doi.dom.removeClass(this,g+"-down");doi.dom.removeClass(this,g+"-hover")});doi.event.add(d,"mousedown",function(){if(f&&m){f.src=m.src}doi.dom.removeClass(this,g+"-hover");doi.dom.addClass(this,g+"-down")});doi.event.add(d,"mouseup",function(){if(f&&h){f.src=h.src}doi.dom.removeClass(this,g+"-down");doi.dom.addClass(this,g+"-hover")});e=true},hide:function(){c=false;doi.dom.style(d,"visibility:hidden")},visible:function(){return c},show:function(){c=true;doi.dom.style(d,"visibility:visible")},element:function(){return d}}};doi.widget.calendar=function(c){var e=[],d=[],b="doi-widget-calendar",a=arguments[1]||{};this.render=function(){if(!c){e=doi.dom.$("tag:div;title=doi-widget-calendar:true")}else{if(c.length){e=c}else{e=[c]}}if(!e||(e&&e.length==0)){return}for(var g=0;g<e.length;g++){var j=e[g].getAttribute("title");var f=doi.dom.merge({},a);f.className=(e[g].className)||b;f.attribute=doi.dom.parseAttribute(j);if(f.attribute.title){e[g].setAttribute("title",f.attribute.title)}else{e[g].setAttribute("title","")}var h=new doi.widget.calendarByElement(e[g],f);h.render();d.push(h)}};this.calendars=function(){return d}};doi.widget.register(doi.widget.calendar);doi.widget.calendarByElement=function(){var m=arguments[0],a=arguments[1]||{},b=(a.className)||"doi-widget-calendar",c,h=a.attribute||{},d=false,f=new Date(),g={d:f.getDate(),m:f.getMonth()+1,y:f.getFullYear(),h:0,i:0,s:0},e,i={from:f.getFullYear(),to:f.getFullYear()},p=this,o=false,r="m";if(doi.dom.isString(h)){h=doi.dom.parseAttribute(h)}this.data={day:["","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],month:["","January","February","March","April","May","June","July","August","September","October","November","December"]};this.render=function(){if(d){return}if(!m||(m&&!doi.dom.isElement(m))){c=doi.widget.instance.save(this);var y=document.createElement("div");doi.dom.write(y);m=y}else{c=doi.widget.instance.save(this,m.id);if(!h){var u=m.getAttribute("title");m.setAttribute("title","");h=doi.dom.parseAttribute(u)}}if(a.parent&&doi.dom.isElement(a.parent)){a.parent.appendChild(m)}m.id=c;doi.dom.className(m,b);if(h.year){var t=h.year.match(/(\d{4,})(\s{1,}\d{4,})*/);if(t){var x=t[1];if(x<1900){x=f.getFullYear()}var w=doi.dom.parseInt(t[2]);if(w<1900){w=f.getFullYear()}i.from=x;i.to=w}else{i.from=1900;i.to=f.getFullYear()+10}}var v=q(h.value);if(v){g=n(v)}else{g=n(g)}e=new doi.dom.clone(g);m.innerHTML="";m.appendChild(s());d=true};this.element=function(){return doi.dom.$("#"+c)};function n(t){if(!t.y){t.y=g.y}if(!t.m){t.m=g.m}if(!t.d){t.d=g.d}var w=new Date(t.y,t.m-1,t.d);t.d=w.getDate();t.m=w.getMonth()+1;t.y=w.getFullYear();var v=i.from;var u=i.to;if(i.from>i.to){v=i.to;u=i.from}if(t.y<v||t.y>u){if(t.y<v){t.y=u}else{t.y=v}w=new Date(t.y,t.m-1,t.d);t.d=w.getDate();t.m=w.getMonth()+1;t.y=w.getFullYear()}if(t.h<0||t.h>23){t.h=0}if(t.i<0||t.i>59){t.i=0}if(t.s<0||t.s>59){t.s=0}return t}function q(x){if(!doi.dom.isString(x)){return false}var y=/^(\d{4,})\-(\d{1,2})\-(\d{1,2})(.*)/;var v=x.match(y);var u={};if(v){u.y=doi.dom.parseInt(v[1]);u.m=doi.dom.parseInt(v[2]);u.d=doi.dom.parseInt(v[3]);u.h=0;u.i=0;u.s=0;if(v[4]){var w=v[4].split(":");u.h=doi.dom.parseInt(w[0]);u.i=doi.dom.parseInt(w[1]);u.s=doi.dom.parseInt(w[2])}}else{v=x.split(":");u.h=doi.dom.parseInt(v[0]);u.i=doi.dom.parseInt(v[1]);u.s=doi.dom.parseInt(v[2])}return u}function j(w){var y=doi.dom.$("#"+c+"-nav-info");var x=document.createElement("div");if(r=="m"){var u=document.createElement("a");u.href="#";u.innerHTML=w.y;var v=document.createTextNode(p.data.month[w.m]+" ");doi.event.add(u,"click",function(){r="y";j(w);return false});x.appendChild(v);x.appendChild(u)}else{var u=document.createElement("a");u.href="#";u.innerHTML=p.data.month[w.m];var v=document.createTextNode(" "+w.y);doi.event.add(u,"click",function(){r="m";j(w);return false});x.appendChild(u);x.appendChild(v)}if(y){y.innerHTML="";y.appendChild(x)}else{return x}}function k(t,u,v){if(u=="next"){if(r=="m"){v.m++}else{v.y++}}else{if(r=="m"){v.m--}else{v.y--}}v=n(v);doi.event.fire(p,"navcellclick",{type:u,element:t,datetime:v});j(v);l(false,v)}function s(){var E=document.createElement("table");var x=document.createElement("tbody");E.setAttribute("cellPadding",0);E.setAttribute("cellSpacing",0);E.setAttribute("border",0);E.setAttribute("width","100%");var y=document.createElement("tr");var w=document.createElement("tr");var v=document.createElement("td");var u=document.createElement("td");E.appendChild(x);x.appendChild(y);x.appendChild(w);y.appendChild(v);w.appendChild(u);u.id=c+"-content";var C=document.createElement("table");var t=document.createElement("tbody");C.setAttribute("cellPadding",0);C.setAttribute("cellSpacing",0);C.setAttribute("border",0);C.setAttribute("width","100%");var D=document.createElement("tr");var B=document.createElement("td");B.setAttribute("width","10%");var A=document.createElement("td");var z=document.createElement("td");z.setAttribute("width","10%");v.appendChild(C);C.appendChild(t);t.appendChild(D);D.appendChild(B);D.appendChild(A);D.appendChild(z);C.id=c+"-nav";B.id=c+"-nav-back";A.id=c+"-nav-info";z.id=c+"-nav-next";doi.dom.className(C,b+"-nav");doi.dom.className(B,b+"-nav-back");doi.dom.className(A,b+"-nav-info");doi.dom.className(z,b+"-nav-next");doi.event.add(B,"mouseover",function(){doi.dom.addClass(this,b+"-nav-back-hover")});doi.event.add(z,"mouseover",function(){doi.dom.addClass(this,b+"-nav-next-hover")});doi.event.add(B,"mouseout",function(){doi.dom.removeClass(this,b+"-nav-back-hover")});doi.event.add(z,"mouseout",function(){doi.dom.removeClass(this,b+"-nav-next-hover")});doi.event.add(B,"click",function(){k(this,"back",g)});doi.event.add(z,"click",function(){k(this,"next",g)});B.innerHTML="&laquo;";z.innerHTML="&raquo;";A.appendChild(j(g));l(u,g);return E}function l(C){var Q=document.createElement("table");Q.setAttribute("cellPadding",1);Q.setAttribute("cellSpacing",1);Q.setAttribute("border",0);Q.setAttribute("width","100%");doi.dom.className(Q,b+"-content");var w=document.createElement("tbody");Q.appendChild(w);var P=new Date(g.y,g.m-1,1);var D=P.getDay();if(D==0){D=7}var P=new Date(g.y,g.m-1,31);var M=31;if(P.getMonth()+1!=g.m){M=31-P.getDate()}var x=(new Date(g.y,g.m-1,M).getDay());if(x==0){x=7}var I=Math.ceil((M+D-1)/7);var B=new Date(g.y,g.m-2,1);var A=B.getMonth()+1;var u=B.getFullYear();B=new Date(u,A-1,31);var z=31;var G=B.getMonth()+2;if(G>12){G-=12}if(G!=g.m){z-=B.getDate()}B=new Date(u,A-1,z);var y=B.getDay();if(y==0){y=7}var E=new Date(g.y,g.m,1);var O=1;var F=1;var H=B.getDate()-B.getDay()+1;var t=i.from;var J=i.to;if(t>J){t=i.to;J=i.from}for(var L=0;L<=I;L++){var N=document.createElement("tr");for(var K=1;K<=7;K++){var v=document.createElement("td");if(L==0){v.innerHTML=p.data.day[K];doi.dom.className(v,b+"-content-day");N.appendChild(v);continue}if(L==1){if(K>=D){v._datetime={d:O,m:g.m,y:g.y};doi.dom.className(v,b+"-content-cell");v.innerHTML=O++}else{v._datetime={d:H,m:B.getMonth()+1,y:B.getFullYear()};v.innerHTML=H++;if(v._datetime.y<t||v._datetime.y>J){v._datetime=false;v.innerHTML="&nbsp"}doi.dom.className(v,b+"-content-cell-other")}}else{if(L==I){if(K<=x){v._datetime={d:O,m:g.m,y:g.y};v.innerHTML=O++;doi.dom.className(v,b+"-content-cell")}else{v._datetime={d:F,m:E.getMonth()+1,y:E.getFullYear()};v.innerHTML=F++;if(v._datetime.y<t||v._datetime.y>J){v._datetime=false;v.innerHTML="&nbsp"}doi.dom.className(v,b+"-content-cell-other")}}else{v._datetime={d:O,m:g.m,y:g.y};v.innerHTML=O++;doi.dom.className(v,b+"-content-cell")}}if(e.d==v._datetime.d&&e.m==v._datetime.m&&e.y==v._datetime.y){doi.dom.addClassName(v,b+"-content-cell-click");if(o){doi.dom.removeClass(o,"-content-cell-click")}o=v}N.appendChild(v);doi.event.add(v,"click",function(){if(!this._datetime){return false}doi.dom.addClass(this,b+"-content-cell-click");if(o){doi.dom.removeClass(o,b+"-content-cell-click")}o=this;p.value(this._datetime,(e.m!=this._datetime.m));doi.event.fire(p,"cellclick",{element:o,datetime:this._datetime})});v._row=L;v._col=K;doi.event.add(v,"mouseover",function(){var X=b+"-content-cell-hover-focus";var R=b+"-content-cell-hover";doi.dom.addClass(this,X);var W=this.parentNode;for(var V=0;V<W.childNodes.length;V++){var U=W.childNodes[V];doi.dom.addClass(U,R)}var Y=W.parentNode.parentNode;var Z=this._row;var T=this._col;var S=Y.rows.length;for(var V=0;V<S;V++){if(V==0){doi.dom.addClass(Y.rows[V].childNodes[T-1],b+"-content-day-hover")}else{doi.dom.addClass(Y.rows[V].childNodes[T-1],R)}}});doi.event.add(v,"mouseout",function(){var X=b+"-content-cell-hover-focus";var R=b+"-content-cell-hover";doi.dom.removeClass(this,X);var W=this.parentNode;for(var V=0;V<W.childNodes.length;V++){var U=W.childNodes[V];doi.dom.removeClass(U,R)}var Y=W.parentNode.parentNode;var Z=this._row;var T=this._col;var S=Y.rows.length;for(var V=0;V<S;V++){if(V==0){doi.dom.removeClass(Y.rows[V].childNodes[T-1],b+"-content-day-hover")}else{doi.dom.removeClass(Y.rows[V].childNodes[T-1],R)}}})}w.appendChild(N)}if(!C){C=doi.dom.$("#"+c+"-content")}if(C){if(C.firstChild){C.replaceChild(Q,C.firstChild)}else{C.innerHTML="";C.appendChild(Q)}}doi.event.fire(p,"render")}this.value=function(){var t=arguments[0];var u=(arguments[1]!=false);if(t){if(doi.dom.isString(t)){t=q(t);if(!t){return new doi.dom.clone(e)}}t=n(t);e=new doi.dom.clone(t);g=new doi.dom.clone(t);if(u){j(g);l(false,g)}}return new doi.dom.clone(e)}};doi.widget.dateBox=function(c){var e=[],d=[],b="doi-widget-datebox",a=arguments[1]||{};this.render=function(){if(!c){e=doi.dom.$("tag:input;title=doi-widget-datebox:true")}else{if(c.length){e=c}else{e=[c]}}if(!e||(e&&e.length==0)){return}for(var g=0;g<e.length;g++){var f=new doi.widget.dateBoxByElement(e[g],a);f.render();d.push(f)}};this.dateboxes=function(){return d}};doi.widget.register(doi.widget.dateBox);doi.widget.dateBoxByElement=function(e){var f=arguments[1]||{},h,a="",l=this,o=[],n,p,d=false,c=new Date(),k=true,j=null,m={d:0,m:0,y:0,h:0,i:0,s:0},b,i="doi-widget-datebox";this.data={day:["","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],month:["","January","February","March","April","May","June","July","August","September","October","November","December"]};this.render=function(){if(d){true}if(!e||!(e&&doi.dom.isElement(e))){var q=document.createElement("input");q.setAttribute("type","text");doi.dom.write(q);e=q;n=doi.widget.instance.save(this);p=(f.name)||n}else{n=doi.widget.instance.save(this,e.id);e.id=n;p=(e.name)||(f.name)||n}l.enabled(!e.disabled);var U={};U.className=(e.className)||i;U.attribute=doi.dom.parseAttribute(e.getAttribute("title"));if(doi.dom.isString(f.attribute)){f.attribute=doi.dom.parseAttribute(f.attribute)}f=doi.dom.merge(U,f);h=f.attribute||{};if(f.attribute.title){e.setAttribute("title",f.attribute.title)}else{e.setAttribute("title","")}h.zIndex=h.zIndex||doi.widget.zIndex();doi.dom.style(e,{visibility:"hidden",display:"none"});i=(e.className)||i;if(h.format){var w=h.format.match(/([d|m|y|h|i|s]+)/);if(w){var R=w[1];for(var W=0;W<R.length;W++){var N=R.substr(W,1);var Q=new doi.regexp.RegExp(N);if(a.match(Q)){continue}a+=N}}if(a.match(/(h|hi|his)/)&&!a.match(/(h|hi|his)$/)){a.replace(/(h|hi|his)/,"")}}if(a==""){a="dmy"}var L={from:c.getFullYear(),to:c.getFullYear()+10};if(h.year){var w=h.year.match(/(\d{4,})(\s{1,}\d{4,})*/);if(w){var z=w[1];if(z<1900){z=c.getFullYear()}var ae=doi.dom.parseInt(w[2]);if(ae<1900){ae=c.getFullYear()+10}L.from=z;L.to=ae}else{L.from=1900;L.to=c.getFullYear()+10}}h.year=L.from+" "+L.to;if(e.value){h.value=e.value}var Z=document.createElement("div");var H=document.createElement("table");var T=e.parentNode;T.insertBefore(Z,e);Z.appendChild(e);Z.appendChild(H);H.setAttribute("cellPadding",0);H.setAttribute("cellSpacing",0);H.setAttribute("border",0);var Y=document.createElement("tbody");var P=document.createElement("tr");H.appendChild(Y);Y.appendChild(P);j=new doi.widget.calendarByElement(false,{parent:Z,attribute:h,className:i+"-calendar"});j.render();doi.event.add(j,"cellclick",function(){l.value(arguments[1].datetime,false)});doi.event.add(j,"render",function(){if(l.frame()){l.frame().resize()}});if(h.value){m=j.value(h.value)}var af=document.createElement("table");af.setAttribute("cellPadding",0);af.setAttribute("cellSpacing",0);af.setAttribute("border",0);af.setAttribute("width","100%");bbody=document.createElement("tbody");btr=document.createElement("tr");btd1=document.createElement("td");btd1.innerHTML="Today";btd2=document.createElement("td");btd2.innerHTML="Clear";j.element().appendChild(af);af.appendChild(bbody);bbody.appendChild(btr);btr.appendChild(btd1);btr.appendChild(btd2);doi.dom.className([af,btd1,btd2],i+"-button");doi.dom.style([btd1,btd2],{"text-align":"center"});doi.event.add([btd1,btd2],"mouseover",function(){doi.dom.addClass(this,i+"-button-hover")});doi.event.add([btd1,btd2],"mouseout",function(){doi.dom.removeClass(this,i+"-button-hover")});doi.event.add(btd1,"click",function(){var r=new Date();var s={};s.d=r.getDate();s.m=r.getMonth()+1;s.y=r.getFullYear();s.h=r.getHours();s.i=r.getMinutes();s.s=r.getSeconds();l.value(s)});doi.event.add(btd2,"click",function(){m.d=0;m.m=0;m.y=0;m.h=0;m.i=0;m.s=0;l.value()});b=new doi.widget.layer(j.element(),{id:n+"-frame",position:"fixed",className:i+"-frame",zIndex:h.zIndex,visibility:"hidden",effect:h.effect});b.render();doi.event.add(document,"click",function(){l.hide()});var M=!!(a.match(/(d|m|y)/));if(/\[\]$/.test(e.name)){var u=e.name.replace(/\[\]$/,"");var E=u+"-dd[]";var C=u+"-mm[]";var A=u+"-yy[]";var aa=u+"-hh[]";var G=u+"-ii[]";var B=u+"-ss[]"}else{var E=e.name+"-dd";var C=e.name+"-mm";var A=e.name+"-yy";var aa=e.name+"-hh";var G=e.name+"-ii";var B=e.name+"-ss"}for(var W=0;W<a.length;W++){var ab=a.substr(W,1);var ac=document.createElement("td");var ag=document.createElement("td");if(ab=="d"){var S='<select id="'+n+'-dd" name="'+E+'">';for(var ad=0;ad<=31;ad++){var K=ad;if(ad==0){K=""}var F="";if(ad==m.d){F="selected"}S+='<option style="text-align:right" value="'+ad+'" '+F+">"+K+"</option>"}S+="</select>";ac.innerHTML=S;ac.childNodes[0]._type="d"}else{if(ab=="m"){var S='<select id="'+n+'-mm" name="'+C+'">';for(var V=0;V<l.data.month.length;V++){var K=l.data.month[V];var F="";if(V==m.m){F="selected"}S+='<option value="'+V+'" '+F+">"+K+"</option>"}S+="</select>";ac.innerHTML=S;ac.childNodes[0]._type="m"}else{if(ab=="y"){var S='<select id="'+n+'-yy" name="'+A+'">';S+='<option value="0"></option>';if(L.from>L.to){for(var J=L.from;J>=L.to;J--){var F="";if(J==m.y){F="selected"}S+='<option style="text-align:right" value="'+J+'" '+F+">"+J+"</option>"}}else{for(var J=L.from;J<=L.to;J++){var F="";if(J==m.y){F="selected"}S+='<option style="text-align:right" value="'+J+'" '+F+">"+J+"</option>"}}S+="</select>";ac.innerHTML=S;ac.childNodes[0]._type="y"}else{if(ab=="h"){ag.innerHTML="&nbsp;&nbsp;";var S='<select id="'+n+'-hh" name="'+aa+'">';for(var X=0;X<24;X++){var K=X;if(X==0){K=""}var F="";if(X==m.h){F="selected"}S+='<option style="text-align:right" value="'+X+'" '+F+">"+K+"</option>"}S+="</select>";ac.innerHTML=S;ac.childNodes[0]._type="h"}else{if(ab=="i"){ag.innerHTML="&nbsp;:&nbsp;";var S='<select id="'+n+'-ii" name="'+G+'">';for(var I=0;I<60;I++){var K=I;if(I==0){K=""}var F="";if(I==m.i){F="selected"}S+='<option style="text-align:right" value="'+I+'" '+F+">"+K+"</option>"}S+="</select>";ac.innerHTML=S;ac.childNodes[0]._type="i"}else{if(ab=="s"){ag.innerHTML="&nbsp;:&nbsp;";var S='<select id="'+n+'-ss" name="'+B+'">';for(var O=0;O<60;O++){var K=O;if(O==0){K=""}var F="";if(O==m.s){F="selected"}S+='<option style="text-align:right" value="'+O+'" '+F+">"+K+"</option>"}S+="</select>";ac.innerHTML=S;ac.childNodes[0]._type="s"}}}}}}ac.childNodes[0].disabled=!(k);if(ag.innerHTML!=""){P.appendChild(ag)}P.appendChild(ac);ac.childNodes[0].onchange=function(){var r={};r[this._type]=this.value;switch(this._type){case"h":case"i":case"s":l.value(r,false);break;default:l.value(r)}};doi.dom.style(ac,{padding:"0px"})}if(M){var v=document.createElement("td");var D=document.createElement("td");v.innerHTML="&nbsp;&nbsp;&nbsp;&#9660;&nbsp;&nbsp;&nbsp;";D.innerHTML="&nbsp;";P.appendChild(D);P.appendChild(v);doi.dom.style([v,D],{padding:"0px"});doi.dom.className(v,i+"-caller");v.id=n+"-caller";doi.event.add(v,"mouseover",function(){doi.dom.addClassName(this,i+"-caller-hover")});doi.event.add(v,"mouseout",function(){doi.dom.removeClassName(this,i+"-caller-hover")});doi.event.add(v,"click",function(r){if(l.frame().visible()){l.hide()}else{l.show()}});if(!k){doi.dom.style(v,{display:"none",visibility:"hidden"})}}doi.dom.style(Z,{position:"relative",textAlign:"left"});doi.event.add(window,"resize",function(){if(l.frame().visible()){l.show()}});doi.event.add(window,"scroll",function(){if(l.frame().visible()){l.show()}});d=true};this.show=function(){l.value(m);var s=l.frame().element().offsetHeight;var q=doi.dom.dimension.absolutePosition(l.element());var u=e.parentNode.offsetHeight+q.top;var r=q.left;if(q.top<s){if(doi.browser.msie){u+=5}}else{if(doi.dom.dimension.client().height+doi.dom.dimension.bodyScroll().scrollTop<q.top+l.element().offsetHeight+s){u-=s+l.element().offsetHeight;if(doi.browser.msie){u-=5}}else{if(doi.browser.msie){u+=5}}}l.frame().show({top:u,left:r})};this.hide=function(){l.frame().hide()};function g(s){var r=true;for(var q in s){if(s[q]>0){r=false;break}}return r}this.value=function(){var z=arguments[0];if(z){m=j.value(z,arguments[1])}if(d){var u=document.getElementById(n+"-dd");if(u){u.value=m.d}var q=document.getElementById(n+"-mm");if(q){q.value=m.m}var x=document.getElementById(n+"-yy");if(x){x.value=m.y}var t=document.getElementById(n+"-hh");if(t){if(doi.dom.isDefined(m.h)){t.value=m.h}m.h=t.value}var r=document.getElementById(n+"-ii");if(r){if(doi.dom.isDefined(m.i)){r.value=m.i}m.i=r.value}var B=document.getElementById(n+"-ss");if(B){if(doi.dom.isDefined(m.s)){B.value=m.s}m.s=B.value}if(e){var A="";if(/(d|m|y)/.test(a)){A=m.y+"-"+doi.dom.stringPad(m.m,2,"0")+"-"+doi.dom.stringPad(m.d,2,"0")}if(a.match(/h/)){A+=" "+doi.dom.stringPad(m.h,2,"0")}if(a.match(/i/)){A+=":"+doi.dom.stringPad(m.i,2,"0")}if(a.match(/s/)){A+=":"+doi.dom.stringPad(m.s,2,"0")}if(m.d==0&&m.m==0&&m.y==0&&m.h==0&&m.i==0&&m.s==0){A=""}var w=e.value;e.value=A;if(w!=A){doi.event.fire(e,"change")}}}return new doi.dom.clone(m)};this.frame=function(){return b};this.enabled=function(){var q=arguments[0];if(!doi.dom.isUndefined(q)){q=!!(q);if(d){if(k==q){return k}if(l.frame().visible()){l.hide()}var r=document.getElementById(n+"-dd");if(r){r.disabled=!(q)}r=document.getElementById(n+"-mm");if(r){r.disabled=!(q)}r=document.getElementById(n+"-yy");if(r){r.disabled=!(q)}r=document.getElementById(n+"-hh");if(r){r.disabled=!(q)}r=document.getElementById(n+"-ii");if(r){r.disabled=!(q)}r=document.getElementById(n+"-ss");if(r){r.disabled=!(q)}if(q){doi.dom.style(doi.dom.$("#"+n+"-caller"),{display:"block",visibility:"visible"})}else{doi.dom.style(doi.dom.$("#"+n+"-caller"),{display:"none",visibility:"hidden"})}}k=q}return k};this.element=function(){return e.parentNode}};doi.widget.frames=function(){var b=arguments[0]||false,a=arguments[1]||{},c=false;if(b){return new doi.widget.frame(b,a)}this.render=function(){if(c||b){return false}var e=doi.dom.$("tag:div;title=doi-widget-frame:true");if(!e||(e&&e.length==0)){return false}for(var d=0;d<e.length;d++){(new doi.widget.frame(e[d],a)).render()}c=true}};doi.widget.register(doi.widget.frames);doi.widget.frame=function(){var b=arguments[0]||false,a=arguments[1]||{},e=this,c="doi-widget-frame",d;this.render=function(){if(doi.dom.isElement(b)){var g=doi.dom.parseAttribute(b.title);if(doi.dom.isDefined(g.doiWidgetFrame)){if(g.doiWidgetFrame){d=doi.widget.instance.save(this,b.id);c=b.className||a.className||c;g.title=g.title||"";b.setAttribute("title",g.title)}else{return}}else{d=doi.widget.instance.save(this);c=a.className||c;var l=document.createElement("div");l.id=d;var j=b.parentNode;if(j){j.insertBefore(l,b)}else{doi.body().appendChild(l)}l.appendChild(b);b=l}a=doi.dom.merge(a,g)}else{d=doi.widget.instance.save(this);var l=document.createElement("div");l.id=d;c=a.className||c;doi.dom.write(l);if(doi.dom.isString(b)){l.innerHTML=b}b=l}doi.dom.className(b,c);var f=a.position||"absolute";if(a.position=="fixed"){f="absolute";doi.body().insertBefore(b,doi.body().firstChild)}a.visibility=a.visibility||doi.dom.getStyle(b,"visibility")||"hidden";var k=doi.dom.getStyle(b,"z-index");if(k=="auto"){a.zIndex=a.zIndex||doi.widget.zIndex()}else{a.zIndex=a.zIndex||k||doi.widget.zIndex()}doi.dom.style(b,{display:"block",visibility:a.visibility,position:f,zIndex:a.zIndex});a.width=a.width||b.scrollWidth;a.width=doi.dom.parseInt(a.width);a.height=b.scrollHeight;doi.dom.style(b,{display:"none",overflow:"hidden"});if(doi.browser.msie&&doi.browser.version<7&&f=="absolute"&&!a.noIframe){var i='<iframe id="'+d+'-iframe" frameborder="0" scrolling="no"></iframe>';var h=document.createElement("div");h.innerHTML=i;i=h.childNodes[0];b.parentNode.insertBefore(i,b);doi.dom.style(i,{position:"absolute",display:"block",visibility:a.visibility,width:a.width+"px",height:a.height+"px",zIndex:a.zIndex-1})}};this.show=function(){if(!e.visible()){e.visible(true)}var k=arguments[0]||{};var g=arguments[1]||{};var m=e.element();doi.dom.style(m,{display:"block"});var i=e.element("iframe");var q=m.offsetTop;var f=m.offsetLeft;if(!doi.dom.isUndefined(k.top)){q=k.top}if(!doi.dom.isUndefined(k.left)){f=k.left}q=doi.dom.parseInt(q);f=doi.dom.parseInt(f);var n=k.zIndex||a.zIndex;var o=0;if(doi.widget.modalBox2&&doi.widget.modalBox2.visible()){o=doi.widget.modalBox2.zIndex()}else{if(doi.widget.modalBox1&&doi.widget.modalBox1.visible()){o=doi.widget.modalBox1.zIndex()}else{if(doi.widget.modalBox&&doi.widget.modalBox.visible()){o=doi.widget.modalBox.zIndex()}}}if(n<o){n=o}doi.dom.style([m,i],{top:q+"px",left:f+"px",visibility:a.visibility,zIndex:n});doi.dom.style(i,{zIndex:n-1});var p="auto";if(k.width){p=doi.dom.parseInt(k.width)+"px"}var j="auto";if(k.height){j=doi.dom.parseInt(k.height)+"px"}doi.dom.style(m,{display:"block",width:p,height:j});doi.dom.style(i,{display:"block",width:m.offsetWidth+"px",height:m.offsetHeight+"px"});if(a.effect){a.effect([m,i],{from:"0",to:j,stop:function(){if(k&&k.show&&doi.dom.isFunction(k.show)){k.show(g)}}});return}if(k&&k.show&&doi.dom.isFunction(k.show)){k.show(g)}};this.hide=function(){if(!e.visible()){return}var g=arguments[0]||{};var k=arguments[1]||{};var l=e.element();var j=e.iframe();var f=l.offsetWidth;var f=(g.width)||l.offsetWidth;f=doi.dom.parseInt(f);var i=0;if(a.effect){a.effect([l,j],{from:l.offsetHeight,to:"0",stop:function(){e.visible(false);if(g&&g.hide&&doi.dom.isFunction(g.hide)){g.hide(k)}}});return}doi.dom.style([l,j],{display:"block",visibility:"hidden"});if(g&&g.hide&&doi.dom.isFunction(g.hide)){g.hide(k)}e.visible(false)};this.resize=function(){var n=e.element();var l=e.iframe();var i=arguments[0]||{};var m=arguments[1]||{};var g=n.offsetWidth;var k=n.offsetHeight;var f=i.width||n.scrollWidth;var j=i.height||n.scrollHeight;f=doi.dom.parseInt(f);j=doi.dom.parseInt(j);if(a.effect&&e.visible()){doi.dom.style([n,l],{width:f+"px",height:k+"px"});a.effect([n,l],{from:k,to:j,stop:function(){if(i.resize&&doi.dom.isFunction(i.resize)){i.resize(m)}}});return{width:f,height:j}}var f="auto";if(i.width){f=doi.dom.parseInt(i.width)+"px"}var j="auto";if(i.height){j=doi.dom.parseInt(i.height)+"px"}doi.dom.style(n,{width:f,height:j});f=n.offsetWidth;j=n.offsetHeight;doi.dom.style(l,{width:f+"px",height:j+"px"});if(i.resize&&doi.dom.isFunction(i.resize)){i.resize(m)}return{width:f,height:j}};this.moveTo=function(){var f={top:0,left:0};f=doi.dom.merge(f,arguments[0]);var h=e.element();var g=e.iframe();doi.dom.style([h,g],{top:f.top+"px",left:f.left+"px"})};this.visible=function(){if(doi.dom.isDefined(arguments[0])){if(arguments[0]){a.visibility="visible"}else{a.visibility="hidden"}}return(a.visibility=="visible")};this.iframe=function(){return e.element("iframe")};this.element=function(){if(arguments[0]=="iframe"){if(!a.noIframe){return doi.dom.$("#"+d+"-iframe")}return null}return b};this.zIndex=function(){return a.zIndex};this.width=function(){if(this.visible()){return e.element().offsetWidth}return e.element().scrollWidth};this.height=function(){if(this.visible()){return e.element().offsetHeight}return e.element().scrollHeight}};doi.widget.imagecrops=function(){var a=arguments[0]||false,c=arguments[1]||{},b=false;if(a){return new doi.widget.imagecrop(a,c)}this.render=function(){if(b||a){return false}var e=doi.dom.$("tag:div;title=doi-widget-imagecrop:true");if(!e||(e&&e.length==0)){return false}for(var d=0;d<e.length;d++){(new doi.widget.imagecrop(e[d],c)).render()}b=true}};doi.widget.register(doi.widget.imagecrops);doi.widget.imagecrop=function(){var b=arguments[0]||false,e=arguments[1]||{},c="",d="doi-widget-imagecrop",a=100;_height=100,_this=this;return{render:function(){var g=false;var k="";e.className=b.className||d;e.width=e.width||a;e.height=e.height||_height;if(!b){b=document.createElement("div");g=new Image();k=e.imageSrc;e.imageWidth=doi.dom.parseInt(e.imageWidth);e.imageHeight=doi.dom.parseInt(e.imageHeight);if(e.imageWidth){doi.dom.style(g,"width:"+e.imageWidth+"px")}if(e.imageHeight){doi.dom.style(g,"height:"+e.imageHeight+"px")}b.appendChild(g);doi.dom.write(b)}else{g=doi.dom.$("tag:img",b)[0];k=g.src;g.src="";var j=doi.dom.parseAttribute(b.getAttribute("title"));e=doi.dom.merge(e,j)}if(b.style.width){if(b.style.width.charAt(b.style.width.length-1)=="%"){var f=doi.dom.parseInt(b.style.width.substring(0,b.style.width.length-1));e.width=Math.floor(b.parentNode.offsetWidth*f/100)}else{e.width=b.style.width}}if(b.style.height){if(b.style.width.charAt(b.style.height.length-1)=="%"){var i=doi.dom.parseInt(b.style.height.substring(0,b.style.height.length-1));e.height=Math.floor(b.parentNode.offsetHeight*f/100)}else{e.height=b.style.height}}e.title=e.title||"";b.setAttribute("title",e.title);e.height=doi.dom.parseInt(e.height);e.width=doi.dom.parseInt(e.width);doi.dom.addClass(b,e.className);doi.dom.style(b,{position:"relative",width:e.width+"px",height:e.height+"px",overflow:"hidden"});g.onload=function(){var o=this;var n=o.width;var q=o.height;if(n>e.width){var m=Math.floor((n-e.width)/2);m="-"+m}else{var m=Math.floor((e.width-n)/2)}if(q>e.height){var p=Math.floor((q-e.height)/2);p="-"+p}else{var p=Math.floor((e.height-q)/2)}doi.dom.style(o,{position:"absolute",left:"0px",top:"0px","margin-top":p+"px","margin-left":m+"px"})};g.src=k}}};doi.widget.layers=function(){var b=arguments[0]||false,a=arguments[1]||{},c=false;if(b){return new doi.widget.layer(b,a)}this.render=function(){if(c||b){return false}var e=doi.dom.$("tag:div;title=doi-widget-layer:true");if(!e||(e&&e.length==0)){return false}for(var d=0;d<e.length;d++){(new doi.widget.layer(e[d],a)).render()}c=true}};doi.widget.register(doi.widget.layers);doi.widget.layer=function(){var b=arguments[0]||false,e=null,f=this,a=arguments[1]||{},c="doi-widget-layer",d;return{element:function(){if(arguments[0]&&arguments[0]=="iframe"){return e}return b},hide:function(){if(!this.visible()){return}this.visible(false);var j=arguments[0]||{};var n=arguments[1]||{};var k=this.element();var m=this.element("iframe");var i=k.offsetWidth;var l=k.offsetHeight;if(a.effect&&doi.effect){switch(a.effect){case"blind":case"blindxy":var g=false;doi.effect.blindX([k,m],{to:0,from:i,stop:function(){if(j&&j.hide&&doi.dom.isFunction(j.hide)){if(g){j.hide(n)}g=true}}});doi.effect.blindY([k,m],{to:0,from:l,stop:function(){if(j&&j.hide&&doi.dom.isFunction(j.hide)){if(g){j.hide(n)}g=true}}});return;case"blindx":doi.effect.blindX([k,m],{to:0,from:i,stop:function(){if(j&&j.hide&&doi.dom.isFunction(j.hide)){j.hide(n)}}});return;case"blindy":doi.effect.blindY([k,m],{to:0,from:l,stop:function(){if(j&&j.hide&&doi.dom.isFunction(j.hide)){j.hide(n)}}});return}}doi.dom.style([k,m],{visibility:"hidden",width:"1px",height:"1px",display:"none"});if(j&&j.hide&&doi.dom.isFunction(j.hide)){j.hide(n)}},height:function(){var g=0;if(doi.dom.getStyle(b,"display")!="none"){g=b.offsetHeight}else{doi.dom.style(b,{display:"block"});g=b.scrollHeight;doi.dom.style(b,{display:"none"})}return g},iframe:function(){return this.element("iframe")},moveTo:function(){var g={top:0,left:0};g=doi.dom.merge(g,arguments[0]);var h=this.element();var i=this.iframe();doi.dom.style([h,i],{top:g.top+"px",left:g.left+"px"})},render:function(){if(doi.dom.isElement(b)){var l=doi.dom.parseAttribute(b.title);l.title=l.title||"";a.id=a.id||false;if(doi.dom.isDefined(l.doiWidgetLayer)){if(!l.doiWidgetLayer){return false}c=b.className||a.className||c;d=b.id||a.id;b.setAttribute("title",l.title)}else{c=a.className||c;d=a.id;var o=document.createElement("div");var m=b.parentNode;if(m){m.insertBefore(o,b)}else{doi.dom.write(o)}o.appendChild(b);b=o}}else{c=a.className||c;var o=document.createElement("div");doi.dom.write(o);if(doi.dom.isString(b)){o.innerHTML=b}b=o}a=doi.dom.merge(a,l);d=doi.widget.instance.save(this,d);b.id=d;doi.dom.className(b,c);a.position=a.position||"absolute";var g=a.position;if(a.position=="fixed"){g="absolute";doi.body().insertBefore(b,doi.body().lastChild)}a.visibility=a.visibility||doi.dom.getStyle(b,"visibility")||"hidden";var n=doi.dom.getStyle(b,"z-index");if(n=="auto"){a.zIndex=a.zIndex||doi.widget.zIndex()}else{a.zIndex=a.zIndex||n||doi.widget.zIndex()}doi.dom.style(b,{display:"block",visibility:a.visibility,position:g,zIndex:a.zIndex,overflow:"hidden"});if(a.effect&&doi.effect&&a.visibility=="hidden"){switch(a.effect){case"blind":case"blindxy":doi.dom.style(b,{width:"1px",height:"1px"});break;case"blindx":doi.dom.style(b,{width:"1px",height:"auto"});break;case"blindy":doi.dom.style(b,{width:"auto",height:"1px"});break;default:doi.dom.style(b,{width:"auto",height:"auto"})}}else{doi.dom.style(b,{width:"auto",height:"auto"})}if(doi.browser.msie&&doi.browser.version<7&&g=="absolute"&&!a.noIframe){var k='<iframe id="'+d+'-iframe" frameborder="0" scrolling="no"></iframe>';var o=document.createElement("div");o.innerHTML=k;e=o.childNodes[0];b.parentNode.insertBefore(e,b);doi.dom.style(e,{position:"absolute",display:"block",visibility:a.visibility,zIndex:a.zIndex-1,width:"1px",height:"1px"})}if(a.visibility!="hidden"){var i=b.scrollWidth;var j=b.scrollHeight;doi.dom.style(e,{width:i+"px",height:j+"px"})}else{doi.dom.style(b,{display:"none"})}return true},resize:function(){if(!this.visible()){return}var j=this.element();var i=this.element("iframe");var m=arguments[0]||{};var h=arguments[1]||{};var p=m.effect||a.effect||"";var l=j.offsetWidth;var o=j.offsetHeight;var k=m.width||j.scrollWidth;var n=m.height||j.scrollHeight;k=doi.dom.parseInt(k);n=doi.dom.parseInt(n);if(p!=""){p="blind"}if(p&&doi.effect){if(k<=l&&doi.dom.isDefined(m.width)&&m.width=="auto"){k="auto"}if(n<=o&&doi.dom.isDefined(m.height)&&m.height=="auto"){n="auto"}switch(p){case"blind":case"blindxy":var g=false;doi.effect.blindX([j,i],{from:l,to:k,stop:function(){if(m&&m.resize&&doi.dom.isFunction(m.resize)){if(g){m.resize(h)}g=true}}});doi.effect.blindY([j,i],{from:o,to:n,stop:function(){if(m&&m.resize&&doi.dom.isFunction(m.resize)){if(g){m.resize(h)}g=true}}});return{width:k,height:n}}}doi.dom.style(j,{width:"auto",height:"auto"});doi.dom.style(i,{width:j.offsetWidth+"px",height:j.offsetHeight+"px"});if(m.resize&&doi.dom.isFunction(m.resize)){m.resize(h)}return{width:k,height:n}},show:function(){if(this.visible()){return}this.visible(true);var o=arguments[0]||{};var j=arguments[1]||{};var m=this.element();var k=this.element("iframe");var s=m.offsetTop;var i=m.offsetLeft;if(doi.dom.isDefined(o.top)){s=o.top}if(doi.dom.isDefined(o.left)){i=o.left}s=doi.dom.parseInt(s);i=doi.dom.parseInt(i);var p=o.zIndex||a.zIndex;var q=0;if(doi.widget.modalBox2&&doi.widget.modalBox2.visible()){q=doi.widget.modalBox2.zIndex()}else{if(doi.widget.modalBox1&&doi.widget.modalBox1.visible()){q=doi.widget.modalBox1.zIndex()}else{if(doi.widget.modalBox&&doi.widget.modalBox.visible()){q=doi.widget.modalBox.zIndex()}}}if(p<q){p=q}doi.dom.style(m,{display:"block",height:"1px"});var r=o.width||m.scrollWidth;r=doi.dom.parseInt(r);var n=o.height||m.scrollHeight;n=doi.dom.parseInt(n);doi.dom.style([m,k],{display:"block",top:s+"px",left:i+"px"});if(a.effect&&doi.effect){switch(a.effect){case"blind":case"blindxy":var g=false;doi.effect.blindX([m,k],{from:0,to:r,stop:function(){if(o&&o.show&&doi.dom.isFunction(o.show)){if(g){o.show(j)}g=true}}});doi.effect.blindY([m,k],{from:0,to:n,stop:function(){if(o&&o.show&&doi.dom.isFunction(o.show)){if(g){o.show(j)}g=true}}});return;case"blindx":doi.dom.style([m,k],{height:n+"px"});doi.effect.blindX([m,k],{from:0,to:r,stop:function(){if(o&&o.show&&doi.dom.isFunction(o.show)){o.show(j)}}});return;case"blindy":doi.dom.style([m,k],{width:r+"px"});doi.effect.blindY([m,k],{from:0,to:n,stop:function(){if(o&&o.show&&doi.dom.isFunction(o.show)){o.show(j)}}});return}}doi.dom.style([m,k],{width:r+"px",height:n+"px",visibility:"visible",zIndex:p});doi.dom.style(k,{zIndex:p-1});if(o&&o.show&&doi.dom.isFunction(o.show)){o.show(j)}},visible:function(){if(doi.dom.isDefined(arguments[0])){if(!!arguments[0]){a.visibility="visible"}else{a.visibility="hidden"}}return(a.visibility!="hidden")},width:function(){var g=0;if(doi.dom.getStyle(b,"display")!="none"){g=b.offsetWidth}else{doi.dom.style(b,{display:"block"});g=b.scrollWidth;doi.dom.style(b,{display:"none"})}return g},zIndex:function(){return a.zIndex}}};doi.widget.loaderBox=new function(){var d,f=false,a=false,g="doi-widget-loaderbox",h=this,b=false,e=arguments[0],c=300;if(!e){e={}}var i=doi.widget.instance.save(this,e.id);this.render=function(){if(f){return}g=e.className||g;var m=document.createElement("div");m.id=i;var l=document.createElement("div");l.innerHTML="&nbsp;";doi.dom.className(m,g+"-bar");doi.dom.className(l,g+"-loader");var k=document.createElement("a");k.href="#";k.innerHTML="<span>Close</span>";doi.event.add(k,"click",function(){h.hide();return false});m.appendChild(k);d=new doi.widget.layer(false,{className:"doi-widget-loaderbox",position:"fixed",effect:"blindy",visibility:"hidden",zIndex:999999});d.render();d.element().appendChild(m);d.element().appendChild(l);var j=doi.dom.parseInt(doi.dom.getStyle(d.element(),"width"));if(j>c){c=j}doi.dom.style([d.element(),d.element("iframe")],{top:"-500px",height:"1px",width:c+"px"});doi.event.add(window,"scroll",function(){if(a){var n=doi.dom.dimension.bodyScroll().scrollTop;doi.effect.moveY([h.frame().element(),h.frame().iframe()],{from:h.frame().element().offsetTop,to:n})}});f=true};this.frame=function(){return d};this.show=function(){if(a){return}var o=arguments[0]||{};var j=arguments[1];e=o;var n=doi.dom.dimension.client();var m=c;var k=Math.ceil((n.width-m)/2);var p=doi.dom.dimension.bodyScroll().scrollTop;d.show(doi.dom.merge(e,{top:p,left:k}),j);b=window.setInterval(function(){var s=doi.dom.dimension.client();var r=d.width();var q=Math.ceil((s.width-r)/2);doi.dom.style([d.element(),d.iframe()],{left:q+"px"})},1);a=true};this.element=function(){return doi.dom.$("#"+i)};this.hide=function(){if(!a){return}var j=arguments[0]||{};var k=doi.dom.merge(e,j);d.hide({hide:function(){doi.dom.style([h.frame().element(),h.frame().iframe()],{top:"-500px",height:"1px",width:c+"px"});if(k.hide&&doi.dom.isFunction(k.hide)){k.hide()}}});window.clearInterval(b);b=false;a=false}};doi.event.add(doi,"load",doi.widget.loaderBox.render);doi.widget.menu=function(d){var e=[],c=[],b="doi-widget-menu",a=arguments[1]||{};a.attribute=a.attribute||{};a.attribute.layout=a.attribute.layout||"hv";this.render=function(){if(!d){e=doi.dom.$("tag:div;title=doi-widget-menu:true")}else{if(d.length){e=d}else{e=[d]}}if(!e||(e&&e.length==0)){return}for(var f=0;f<e.length;f++){var g=new doi.widget.menuBar(e[f],a);g.render();c.push(g)}};this.menus=function(){return c}};doi.widget.register(doi.widget.menu);doi.widget.menuBar=function(){var d=arguments[0],e=arguments[1]||{},a,f=false,k=[],h=this,j=doi.widget.instance.save(this,d.id),c=0,g=e.className||"doi-widget-menu",i=[],b=doi.widget.zIndex();function l(){if(f){return}if(!d||!(d&&doi.dom.isElement(d))){return}var q=d.getAttribute("title");var o={};o.className=(d.className)||g;g=o.className;o.attribute=doi.dom.parseAttribute(q);e=doi.dom.merge(e,o);a=e.attribute||{};if(doi.dom.isUndefined(a.nodeVisibility)){a.nodeVisibility=true}if(doi.dom.isUndefined(a.effect)){a.effect=false}if(e.attribute.title){d.setAttribute("title",e.attribute.title)}else{d.setAttribute("title","")}b=(a.zIndex)||b;for(var p=0;p<d.childNodes.length;p++){if(d.childNodes[p].nodeName=="UL"){for(var n=0;n<d.childNodes[p].childNodes.length;n++){if(d.childNodes[p].childNodes[n].nodeName=="LI"){var m=new doi.widget.menuItem(d.childNodes[p].childNodes[n]);h.addItem(m);m.parent(h)}}}}doi.event.add(document,"click",function(){h.hide()});f=true}this.attribute=function(){return e.attribute};this.layout=function(){return e.attribute.layout.charAt(0)};this.level=function(){if(doi.dom.isUndefined(arguments[0])){c=doi.dom.parseInt(arguments[0])}return c};this.element=function(){return d};this.registerFrame=function(o,m){var p=m.level()-1;if(i[p]&&i[p].object==m){return}for(var n=i.length-1;n>=p;n--){i[n].object.hide();i.pop()}i.push({object:m,element:o})};this.hide=function(){for(var m=i.length-1;m>=0;m--){i[m].object.hide();i.pop()}};this.render=function(){var s=c+1;h.element().innerHTML="";var r=h.element();if(/^h/i.test(e.attribute.layout)){var o=document.createElement("table");o.setAttribute("border",0);o.setAttribute("cellPadding",0);o.setAttribute("cellSpacing",0);var m=document.createElement("tbody");var p=document.createElement("tr");r.appendChild(o);o.appendChild(m);m.appendChild(p)}for(var n=0;n<h.items().length;n++){if(/^h/i.test(e.attribute.layout)){var q=document.createElement("td");p.appendChild(q)}else{var q=r}h.items()[n].effect(a.effect);h.items()[n].nodeVisibility(a.nodeVisibility);h.items()[n].className(g+"-item");h.items()[n].frameClassName(g+"-frame");h.items()[n].layout(e.attribute.layout.charAt(0));h.items()[n].level(s);h.items()[n].menuBar(h);h.items()[n].zIndex(b);h.items()[n].render(q)}r.id=j;doi.dom.className(r,g);d=r};this.hasItem=function(){return(k.length>0)};this.items=function(){return k};this.addItem=function(m){k.push(m)};l()};doi.widget.menuItem=function(){var o,p=this,j=arguments[0],e=false,l="",i="",n,c=[],d=doi.widget.instance.save(this),b,m=0,r=null,a="doi-widget-menu-item",f="doi-widget-menu-frame",t=0,g="h",h=true,k=false,s;function q(){if(e){return}if(!j||!(j&&doi.dom.isElement(j))){return}if(j.nodeName=="LI"){for(var w=0;w<j.childNodes.length;w++){if(j.childNodes[w].nodeName=="A"){n=j.childNodes[w].cloneNode(false);for(var v=0;v<j.childNodes[w].childNodes.length;v++){if(j.childNodes[w].childNodes[v].nodeName=="IMG"){i=doi.dom.outerHTML(j.childNodes[w].childNodes[v])}else{if(j.childNodes[w].childNodes[v].nodeName=="#text"){l+=j.childNodes[w].childNodes[v].nodeValue}else{l+=doi.dom.outerHTML(j.childNodes[w].childNodes[v])}}}}else{if(j.childNodes[w].nodeName=="UL"){for(var v=0;v<j.childNodes[w].childNodes.length;v++){if(j.childNodes[w].childNodes[v].nodeName=="LI"){var u=new doi.widget.menuItem(j.childNodes[w].childNodes[v]);p.addItem(u);u.parent(p)}}}}}}e=true}this.effect=function(){if(doi.dom.isDefined(arguments[0])){s=arguments[0]}return s};this.nodeVisibility=function(){if(doi.dom.isDefined(arguments[0])){h=!!(arguments[0])}return h};this.layout=function(){if(doi.dom.isDefined(arguments[0])){g=arguments[0]}return g};this.zIndex=function(){if(doi.dom.isDefined(arguments[0])){t=doi.dom.parseInt(arguments[0])}return t};this.menuBar=function(){if(arguments[0]){o=arguments[0]}return o};this.level=function(){if(doi.dom.isDefined(arguments[0])){m=doi.dom.parseInt(arguments[0])}return m};this.parent=function(){if(doi.dom.isObject(arguments[0])){r=arguments[0]}return r};this.hide=function(){window.clearInterval(k);k=false;if(p.frame()){p.frame().hide()}doi.dom.removeClass(p.element(),a+"-hover")};this.show=function(B){doi.dom.addClass(B,a+"-hover");if(p.hasItem()){var A=doi.dom.dimension.absolutePosition(B);var D=B.offsetWidth;var z=B.offsetHeight;var G=p.frame().height();var y=p.frame().width();var E=doi.dom.dimension.bodyScroll();var u=doi.dom.dimension.client();var x=(doi.dom.screen.height()>u.height)?doi.dom.screen.height():u.height;var C=(doi.dom.screen.width()>u.width)?doi.dom.screen.width():u.width;if(p.layout()=="h"){var F=A.top+z;var v=A.left;if(F+G-E.scrollTop>u.height){if(A.top-G>0){F=A.top-G}}if(v+y-E.scrollLeft>u.width){v-=(v+y-E.scrollLeft-u.width)+20;if(v<E.scrollLeft){v=E.scrollLeft}}}else{var F=A.top;var v=A.left+B.offsetWidth;if(F+G-E.scrollTop>u.height){F-=(F+G-E.scrollTop-u.height)+20;if(F<E.scrollTop){F=E.scrollTop}}if(v+y-E.scrollLeft>u.width){if(A.left-y>0){v=A.left-y}}}p.frame().show({top:F,left:v})}p.menuBar().registerFrame(B,p)};this.className=function(){if(arguments[0]){a=arguments[0]}return a};this.frameClassName=function(){if(arguments[0]){f=arguments[0]}return f};this.render=function(F){var v=document.createElement("div");j=v;if(F){F.appendChild(j)}else{doi.dom.write(j)}if(p.title()=="-"){var H=document.createElement("hr");if(p.layout()=="h"){doi.dom.className(H,a+"-hseparator");doi.dom.className(v,a+"-hseparator")}else{doi.dom.className(H,a+"-separator");doi.dom.className(v,a+"-separator")}v.appendChild(H);return}doi.event.add(v,"mouseover",function(K){var J=this;if(!k){k=window.setInterval(function(){p.show(J)},1)}});doi.event.add(v,"mouseout",function(K){var J=doi.event.toTarget(K);if(!J){return}while((J!=this)&&(J.nodeName)&&(J.nodeName!="BODY")&&(J.nodeName!="HTML")){J=J.parentNode}if(J==this){return}if(p.frame()&&p.frame().visible()){}else{doi.dom.removeClass(this,a+"-hover")}});var I=document.createElement("table");I.setAttribute("border","0");I.setAttribute("cellPadding","0");I.setAttribute("cellSpacing","0");I.setAttribute("width","100%");I.setAttribute("height","100%");var B=document.createElement("tbody");var D=document.createElement("tr");var z=document.createElement("td");z.innerHTML=p.icon();var y=document.createElement("td");p.element("link").innerHTML=p.title();y.appendChild(p.element("link"));var w=document.createElement("td");if(p.hasItem()){if(p.nodeVisibility()){if(p.layout()=="h"){w.innerHTML="&#9660;"}else{w.innerHTML="&#9658;"}}else{w.innerHTML="&nbsp;"}b=new doi.widget.layer(false,{id:d+"-layer",position:"fixed",className:f,zIndex:t,visibility:"hidden",effect:s});b.render();var u=m+1;if(p.menuBar().attribute().layout.charAt(1)=="h"){var x=document.createElement("table");x.setAttribute("border",0);x.setAttribute("cellPadding",0);x.setAttribute("cellSpacing",0);var E=document.createElement("tbody");var G=document.createElement("tr");p.frame().element().appendChild(x);x.appendChild(E);E.appendChild(G)}for(var A=0;A<p.items().length;A++){p.items()[A].effect(p.effect());p.items()[A].nodeVisibility(p.nodeVisibility());p.items()[A].className(p.frameClassName()+"-item");p.items()[A].frameClassName(p.frameClassName());p.items()[A].layout(p.menuBar().attribute().layout.charAt(1));p.items()[A].level(u);p.items()[A].menuBar(p.menuBar());p.items()[A].zIndex(t+1);if(p.menuBar().attribute().layout.charAt(1)=="h"){var C=document.createElement("td");G.appendChild(C)}else{var C=b.element()}p.items()[A].render(C)}b.resize();doi.dom.className(w,a+"-node-parent")}else{w.innerHTML="&nbsp;";doi.dom.className(w,a+"-node")}doi.dom.className(v,a);doi.dom.className(z,a+"-icon");doi.dom.className(y,a+"-title");v.appendChild(I);I.appendChild(B);B.appendChild(D);D.appendChild(z);D.appendChild(y);D.appendChild(w)};this.frame=function(){return b};this.element=function(){if(arguments[0]=="link"){return n}return j};this.addItem=function(u){c.push(u)};this.title=function(){if(l==""){l="&nbsp;"}return l};this.icon=function(){if(i==""){i="&nbsp;"}return i};this.hasItem=function(){return(c.length>0)};this.items=function(){return c};q()};doi.widget.modalbox=function(){var x,b=arguments[0]||{},m=arguments[1]||1,l,d,t,e,r=true,n=30,i,p=this,k,s,a=750,c=300,h=0,o=false,f=false,g=false,u=[],q=false;b.className=b.className||"doi-widget-modalbox";b.id=doi.widget.instance.save(this,b.id);b.zIndex=b.zIndex||0;function y(){l=document.createElement("div");l.id=b.id;doi.dom.className(l,b.className);x=document.createElement("div");x.id=b.id+"-bar";doi.dom.className(x,b.className+"-bar");var z=document.createElement("a");z.setAttribute("href","#");z.innerHTML="Close";z.id=b.id+"-close";doi.event.add(z,"click",function(){p.hide();return false});var B=document.createElement("span");var E=document.createElement("a");E.setAttribute("href","#");E.innerHTML="Back";doi.event.add(E,"click",function(){p.back();return false});B.id=b.id+"-back";B.innerHTML=" | ";B.insertBefore(E,B.firstChild);x.appendChild(B);if(doi.debug()){var D=document.createElement("span");var A=document.createElement("a");A.setAttribute("href","#");A.innerHTML="View Source";doi.event.add(A,"click",function(){var F=p.element("content").innerHTML;p.show({url:F.htmlentities(),type:"html"});return false});D.id=b.id+"-source";D.innerHTML=" | ";D.insertBefore(A,D.firstChild);x.appendChild(D)}x.appendChild(z);l.appendChild(x);t=document.createElement("div");t.innerHTML="&nbsp;";t.id=b.id+"-loader";doi.dom.className(t,b.className+"-loader");l.appendChild(t);e=document.createElement("div");e.id=b.id+"-content";doi.dom.className(e,b.className+"-content");l.appendChild(e);doi.dom.style(e,{visibility:"hidden",display:"none"});if(!b.zIndex){i=new doi.widget.overlay({animated:true})}else{i=new doi.widget.overlay({animated:true,zIndex:b.zIndex})}i.render();b.zIndex=i.zIndex()+2;d=new doi.widget.layer(l,{className:b.className+"-frame",position:"fixed",zIndex:b.zIndex,noIframe:true,effect:"blindy",visibility:"hidden"});d.render();doi.dom.style([d.element(),d.element("iframe")],{top:"-500px",height:"1px"});var C=false;doi.event.add(window,"scroll",function(){if(p.visible()){var F=doi.dom.dimension.bodyScroll().scrollTop;window.clearTimeout(C);C=window.setTimeout(function(){doi.effect.moveY([p.frame().element(),p.frame().iframe()],{from:p.frame().element().offsetTop,to:F})},500)}})}function j(z){s=window.setTimeout(function(){var C=p.element("content");doi.dom.style(C,{visibility:"visible",display:"block"});if(z.type=="url"){if(q){doi.ajax.abort(q)}var B=new doi.dom.request(z.url);B.append("_modalbox",m);z.url=B.toString();var E=z.method||"GET";q=doi.ajax.request(E,z.url,{success:function(H){C.innerHTML=H.responseText;doi.dom.execScript(C);doi.widget.render({attribute:{zIndex:p.overlay().zIndex()+100}});if(window.sorttable){var G=doi.dom.get("class:sortable",C);if(G){for(var F in G){sorttable.makeSortable(G[F])}}}p.hide("loader")},failure:function(F){alert("Could not load page!");p.hide("loader")},data:z.data})}else{if(z.type=="image"){var A=new Image();C.innerHTML="";var D=document.createElement("div");doi.dom.style(D,{textAlign:"center"});D.appendChild(A);C.appendChild(D);A.onload=function(){var F=this.width;if(this.width>p.overlay().width()){F=p.overlay().width()-100}var H=doi.dom.dimension.client();var G=Math.floor(this.height/this.width*F);if(G>H.height){G=H.height-100;F=Math.floor(this.width/this.height*G)}doi.dom.style(this,{width:F+"px",height:G+"px"});p.hide("loader")};A.src=z.url}else{if(z.type=="element"&&doi.dom.isElement(z.url)){g=z.url;C.innerHTML="";C.appendChild(z.url);z.display=doi.dom.getStyle(z.url,"display");z.visibility=doi.dom.getStyle(z.url,"visibility");doi.dom.style(z.url,{display:"block",visibility:"visible"});p.hide("loader")}else{if(z.type=="html"){C.innerHTML=z.url;doi.dom.execScript(C);doi.widget.render({attribute:{zIndex:p.overlay().zIndex()+100}});p.hide("loader")}}}}},a)}function w(A){var z=p.element("loader");if(p.visible("loader")){var B=z.offsetHeight;if(B>n){n=B}}else{p.show("loader")}j(A)}function v(){var B=doi.dom.dimension.client();var A=p.frame().width();var z=Math.ceil((B.width-A)/2);if(p.frame().element().offsetTop<=0){var C=doi.dom.dimension.bodyScroll().scrollTop;doi.dom.style([p.frame().element(),p.frame().iframe()],{left:z+"px",top:C+"px"})}else{doi.dom.style([p.frame().element(),p.frame().iframe()],{left:z+"px"})}}this.back=function(){if(!p.visible()||u.length<=1){return false}u.pop();var z=u.length-1;if(u[z]){p.show(u[z],true)}if(z<=0){doi.dom.style(p.element("back"),{visibility:"hidden"})}return true};this.element=function(){var z=false;switch(arguments[0]){case"bar":z=x;break;case"loader":z=t;break;case"content":z=e;break;case"back":z=doi.dom.$(b.id+"-back");break;case"overlay":z=i.element();break;case"frame":z=d.element();break;default:z=l}return z};this.frame=function(){return d};this.hide=function(){if(arguments[0]=="loader"){var z=p.element("loader");if(p.visible("loader")||z.doi_blindv_timer){window.clearTimeout(s);s=false;doi.effect.blindY(z,{from:z.offsetHeight,to:"0",stop:function(){p.resize();p.visible("loader",false)}})}return}p.frame().hide({hide:function(){doi.dom.style(p.element(),{width:h+"px"});doi.dom.style([p.frame().element(),p.frame().element("iframe")],{visibility:"hidden",display:"block",top:"-500px",height:"1px",width:h+"px"});p.overlay().hide({hide:function(){window.clearInterval(k);k=false;window.clearTimeout(s);s=false;var B=p.element("content");if(f.type=="element"&&doi.dom.isElement(g)){doi.body().appendChild(g);doi.dom.style(g,{display:f.display,visibility:f.visibility});g=false}B.innerHTML="";doi.dom.style(B,{height:"auto",visibility:"hidden",display:"none"});doi.dom.style(p.element("loader"),{height:n+"px",display:"block"});p.visible("loader",false);p.visible(false);f=false;var A=u[0];if(A&&A.hide&&doi.dom.isFunction(A.hide)){A.hide()}u=[];doi.ajax.abort(q)}})}})};this.overlay=function(){return i};this.resize=function(){var S=p.element("bar");var R=p.element("content");var P=p.element("frame");var M=p.element("loader");var U=R.scrollTop;doi.dom.style(R,{width:"auto",height:"auto",position:"absolute",overflow:"auto"});var F=P.offsetHeight;var E=S.offsetHeight+M.offsetHeight+R.offsetHeight;var J=doi.dom.dimension.client().height;var B=false;if(E>J){E=J-20;B=true}var I=P.offsetWidth;var H=R.offsetWidth;var D=doi.dom.dimension.client().width-100;if(H<h){H=h}if(H>D){H=D;B=true}if(B){var K=doi.dom.parseInt(doi.dom.getStyle(R,"padding-top"));var z=doi.dom.parseInt(doi.dom.getStyle(R,"padding-bottom"));var Q=doi.dom.parseInt(doi.dom.getStyle(R,"border-top-width"));var C=doi.dom.parseInt(doi.dom.getStyle(R,"border-bottom-width"));var N=P.scrollHeight-E+K+z+Q+C;doi.dom.style(R,{height:R.offsetHeight-N+"px"})}R.scrollTop=U;doi.dom.style(R,{position:"relative"});if(doi.browser.msie){var O=doi.dom.parseInt(doi.dom.getStyle(R,"padding-left"));var L=doi.dom.parseInt(doi.dom.getStyle(R,"padding-right"));var A=doi.dom.parseInt(doi.dom.getStyle(R,"border-left-width"));var T=doi.dom.parseInt(doi.dom.getStyle(R,"border-right-width"));var G=R.offsetWidth-(O+L+A+T);doi.dom.style(R,{width:G+"px"})}doi.dom.style(p.element(),{width:H+"px"});p.frame().resize({width:H,height:E})};this.show=function(){var C=arguments[0]||{};if(h==0){var A=doi.dom.parseInt(doi.dom.getStyle(l,"width"));if(A>c){h=A}else{h=c}}if(doi.dom.isString(C)){if(C=="loader"){if(!p.visible("loader")){p.visible("loader",true);var z=p.element("loader");doi.effect.blindY(z,{from:"0",to:n,stop:function(){p.resize()}})}return}var D=C;C={};C.url=D;C.type="url";if(/\.(jpg|jpeg|bmp|gif|png|svg)$/i.test(D)){C.type="image"}}else{if(doi.dom.isElement(C)){var D=C;C={};C.url=D;C.type="element"}else{if(C.url){if(doi.dom.isElement(C.url)){C.type="element"}else{if(!C.type){if(/\.(jpg|jpeg|bmp|gif|png|svg)$/i.test(C.url)){C.type="image"}else{C.type="url"}}}}}}C.type=C.type||"html";C.url=C.url||"Nothing to be loaded.";C.data=C.data||{};f=C;var B=arguments[1]||false;if(!B){u.push(f)}if(u.length>1){doi.dom.style(p.element("back"),{visibility:"visible"})}else{doi.dom.style(p.element("back"),{visibility:"hidden"})}if(!p.visible()){p.element("content").innerHTML="";doi.dom.style([d.element(),d.element("iframe")],{top:"-500px",height:"1px",width:h+"px"});p.visible(true);if(C.width){doi.dom.style([p.element("content"),p.frame().element(),p.frame().element("iframe")],{width:C.width+"px"})}else{C.width=h}p.overlay().show({show:function(){p.frame().show({show:w},C);p.visible("loader",true)},click:function(){p.hide({});doi.event.fire(document,"click")}});k=window.setInterval(v,1)}else{C.width=C.width||h;w(C)}return};this.visible=function(){if(doi.dom.isDefined(arguments[0])){if(arguments[0]=="loader"){if(doi.dom.isDefined(arguments[1])){r=!!(arguments[1])}return r}o=!!(arguments[0])}return o};this.zIndex=function(){return b.zIndex};doi.event.add(doi,"load",y)};doi.widget.modalBox=new doi.widget.modalbox({zIndex:99999},1);doi.widget.modalBox1=new doi.widget.modalbox({zIndex:999999},2);doi.widget.modalBox2=new doi.widget.modalbox({zIndex:9999999},3);doi.widget.overlay=function(){var e=arguments[0]||{},i=doi.widget.instance.save(this),d=false,b=e.zIndex||99999,a=false,g=7,f=e.className||"doi-widget-overlay",h=false,c=null,k=null,j=[],l={left:0,top:0};e.animated=!!(e.animated);return{render:function(){var m=this;var p=document.createElement("div");p.id=i;doi.dom.className(p,f);doi.dom.style(p,"opacity:0;visibility:hidden;position:absolute;top:0px;left:0px;width:100%;height:100%;display:block;z-index:"+b);doi.body().insertBefore(p,doi.body().lastChild);c=p;if(doi.browser.msie&&doi.browser.version>7){var o='<iframe id="'+i+'-frame" frameborder="0" scrolling="no"></iframe>';var n=document.createElement("div");n.innerHTML=o;o=n.childNodes[0];p.parentNode.insertBefore(o,p);doi.dom.style(o,"visibility:hidden;position:absolute;display:block;top:0px;left:0px;width:100%;height:100%;z-index:"+(b-1));k=o}doi.event.add(c,"click",function(){for(var q in j){if(doi.dom.isFunction(j[q])){j[q]()}}delete j;j=[];m.hide()})},show:function(){if(a){return}a=true;h=false;l.top=doi.dom.dimension.bodyScroll().scrollTop;l.left=doi.dom.dimension.bodyScroll().scrollLeft;document.getElementsByTagName("html")[0].style.overflow="hidden";doi.dom.style(doi.body(),"overflow:hidden;height:100%");var p=doi.dom.getStyle(c,"background-color");if(p=="transparent"||p=="rgba(0, 0, 0, 0)"){doi.dom.style(c,"background:black")}doi.dom.style([c,k],"visibility:visible;");var n=arguments[0]||{};doi.event.fire(this,"show");if(e.animated){var o=0;var m=g;d=window.setInterval(function(){o++;if(o>m){window.clearInterval(d);d=false;if(n.show&&doi.dom.isFunction(n.show)){n.show()}}doi.dom.style(c,"opacity:"+o)},10)}else{doi.dom.style(c,"opacity:"+g);if(n.show&&doi.dom.isFunction(n.show)){n.show()}}if(n.click&&doi.dom.isFunction(n.click)){j.push(n.click)}},hide:function(){if(!a){return}var n=arguments[0]||{};a=false;doi.event.fire(this,"hide");if(e.animated){var m=g;window.clearInterval(d);d=window.setInterval(function(){m--;if(m<0){window.clearInterval(d);doi.dom.style(c,"opacity:0");doi.dom.style([c,k],"visibility:hidden");document.getElementsByTagName("html")[0].style.overflow="visible";doi.dom.style(document.body,"overflow:auto;height:100%");window.scrollTo(l.left,l.top);if(n.hide&&doi.dom.isFunction(n.hide)){n.hide()}}doi.dom.style(c,"opacity:"+m)},10)}else{doi.dom.style(c,"opacity:0");doi.dom.style([c,k],"visibility:hidden");document.getElementsByTagName("html")[0].style.overflow="visible";doi.dom.style(document.body,"overflow:auto;height:100%");window.scrollTo(l.left,l.top);if(n.hide&&doi.dom.isFunction(n.hide)){n.hide()}}},iframe:function(){return k},element:function(){switch(arguments[0]){case"iframe":return k;default:return c}},height:function(){return c.offsetHeight},width:function(){return c.offsetWidth},zIndex:function(){return b},visible:function(){return a}}};doi.widget.page=function(){var k,w,c,m=arguments[1]||1,f,v,b=arguments[0]||{},u,d,x,q,t=this,y=[],r=true;b.className=b.className||"doi-widget-page";b.id=doi.widget.instance.save(this,b.id);b.zIndex=b.zIndex||0;function z(){k=document.createElement("div");doi.body().insertBefore(k,doi.body().lastChild);k.id=b.id;doi.dom.className(k,b.className);h();j();o();s();if(doi.browser.msie){doi.dom.style(k,"position:absolute")}else{doi.dom.style(k,"position:fixed")}doi.dom.style(k,"left:0px;top:0px;display:none;z-index:"+b.zIndex)}function h(){w=document.createElement("div");w.id=b.id+"-bar";doi.dom.className(w,b.className+"-bar");k.appendChild(w);var B=document.createElement("button");doi.dom.className(B,b.className+"-bar-close");B.id=b.id+"-bar-close";doi.event.add(B,"click",function(){t.hide();return false});w.appendChild(B);q=new doi.widget.buttonByElement(B);q.render();var A=document.createElement("button");doi.dom.className(A,b.className+"-bar-back");A.id=b.id+"-bar-back";doi.event.add(A,"click",function(){t.back();return false});w.appendChild(A);x=new doi.widget.buttonByElement(A);x.render();x.hide()}function o(){c=document.createElement("div");c.id=b.id+"-content";doi.dom.className(c,b.className+"-content");doi.dom.style(c,"opacity:10;overflow:auto");c.innerHTML="";k.appendChild(c)}function j(){v=document.createElement("div");doi.dom.className(v,b.className+"-loader");k.appendChild(v);doi.dom.style(v,"position:absolute;visibility:hidden")}function s(){if(!b.zIndex){f=new doi.widget.overlay({animated:true})}else{f=new doi.widget.overlay({animated:true,zIndex:b.zIndex})}f.render();b.zIndex=f.zIndex()+2}function p(){var A=(v.parentNode.offsetWidth-v.offsetWidth)/2;var B=((v.parentNode.offsetHeight+w.offsetHeight-v.offsetHeight)/2);doi.dom.style(v,{visibility:"visible",top:B+"px",left:A+"px"})}function g(){doi.dom.style(v,"visibility:hidden")}function l(B){var C="";var A=new doi.dom.request(B.url);A.append("_modalbox",m);B.url=A.toString();var D="get";if(B.method){D=B.method}d=doi.ajax.request(D,B.url,{success:function(E){C=E.responseText;i(C,B)},failure:function(){g()},data:B.data})}function n(A){i(A.url,A)}function a(B){var A=new Image();var C=document.createElement("div");doi.dom.style(C,{textAlign:"center"});C.appendChild(A);i(C,B);A.onload=function(){g()};A.src=B.url}function i(D,E){if(!doi.dom.isElement(D)&&D==""){g();return}var A=5;var G=10;var C=0;var H=0.15;var F=G;if(doi.browser.msie){u=false;c.innerHTML="";if(doi.dom.isElement(D)){c.appendChild(D)}else{c.innerHTML=D}doi.dom.execScript(c);doi.widget.render({attribute:{zIndex:f.zIndex()+100}});try{if(sorttable){var I=doi.dom.get("class:sortable",c);if(I){for(var J in I){if(I.hasOwnProperty(J)){sorttable.makeSortable(I[J])}}}}if(c.UIRender){c.UIRender()}}catch(B){}g();if(E.show&&doi.dom.isFunction(E.show)){E.show()}}else{u=window.setInterval(function(){F=F-H;doi.dom.style(c,"opacity:"+F);if(F<C){window.clearInterval(u);F=C;c.innerHTML="";if(doi.dom.isElement(D)){c.appendChild(D)}else{c.innerHTML=D}doi.dom.execScript(c);doi.widget.render({attribute:{zIndex:f.zIndex()+100}});try{if(sorttable){var L=doi.dom.get("class:sortable",c);if(L){for(var K in L){if(L.hasOwnProperty(K)){sorttable.makeSortable(L[K])}}}}if(c.UIRender){c.UIRender()}}catch(M){}u=window.setInterval(function(){F=F+H;doi.dom.style(c,"opacity:"+F);if(F>G){window.clearInterval(u);u=false;g();if(E.show&&doi.dom.isFunction(E.show)){E.show()}}},A)}},A)}}function e(A){if(u){return}if(d){doi.ajax.abort(d)}p();y.push(A);if(y.length>1){x.show()}else{x.hide()}if(A.type=="url"){l(A)}else{if(A.type=="image"){a(A)}else{if(A.type=="html"){n(A)}else{if(A.url){l(A)}}}}}this.element=function(){var A=false;switch(arguments[0]){case"bar":A=w;break;case"back-button":A=x;break;case"close-button":A=q;break;case"loader":A=v;break;case"content":A=c;break;case"overlay":A=f.element();break;default:A=k}return A};this.hide=function(){if(d){doi.ajax.abort(d)}if(u){window.clearInterval(u);u=false}doi.dom.style(k,"display:none");c.innerHTML="";g();f.hide();y=[];x.hide();r=true};this.show=function(){var A=arguments[0]||{};if(doi.dom.isString(A)){var B=A;A={};A.url=B;if(/\.(jpg|jpeg|bmp|gif|png|svg)$/i.test(B)){A.type="image"}else{A.type="url"}}if(f.visible()){e(A);return}c.innerHTML="";f.show({show:function(){if(!A.width){A.width=f.width()}if(A.width<400){A.width=400}if(!A.height){A.height=doi.dom.dimension.client().height}var C=(f.width()-A.width)/2;if(doi.browser.msie){var D=doi.dom.dimension.bodyScroll().scrollTop;doi.dom.style(k,"top:"+D+"px")}doi.dom.style(k,{left:C+"px",width:A.width+"px",height:A.height+"px",display:"block",visibility:"visible",opacity:10});doi.dom.style(c,{height:A.height-w.offsetHeight+"px"});e(A)},click:function(){t.hide()}})};this.zIndex=function(){return b.zIndex};this.visible=function(){if(f){return f.visible()}else{return false}};this.resize=function(){};this.back=function(){var A=false;if(x.visible()){y.pop();this.show(y.pop());A=true}return A};this.render=function(){z()}};doi.event.add(doi,"load",function(){doi.widget.modalBox=new doi.widget.page({zIndex:99999},1);doi.widget.modalBox.render();doi.widget.modalBox1=new doi.widget.page({zIndex:999999},2);doi.widget.modalBox1.render();doi.widget.modalBox2=new doi.widget.page({zIndex:9999999},3);doi.widget.modalBox2.render()});doi.widget.scrollers=function(){var b=arguments[0]||false,a=arguments[1]||{},c=false;if(b){return new doi.widget.layer(b,a)}this.render=function(){if(c||b){return false}var e=doi.dom.$("tag:div;title=doi-widget-scroller:true");if(!e||(e&&e.length==0)){return false}for(var d=0;d<e.length;d++){(new doi.widget.scroller(e[d],a)).render()}c=true}};doi.widget.register(doi.widget.scrollers);doi.widget.scroller=function(){var c=arguments[0]||false,d={speed:25,step:2,interval:15,href:"",layout:"h"},e="doi-widget-scroller",i,f={},b=false,a=false,h=false;_isRunning=false,_firstTimeLoading=true;var g=arguments[1]||{};d.speed=g.speed||d.speed;d.step=g.step||d.step;d.href=g.href||d.href;d.interval=g.interval||d.interval;d.layout=g.layout||d.layout;return{request:function(){if(!c||!doi.ajax||d.href==""){return}var j=this;doi.ajax.abort(h);h=doi.ajax.request("get",d.href,{success:function(k){j.setContent(k.responseText)}})},render:function(){if(doi.dom.isElement(c)){var k=doi.dom.parseAttribute(c.title);c.title="";d.speed=k.speed||d.speed;d.step=k.step||d.step;d.href=k.href||d.href;d.interval=k.interval||d.interval;d.layout=k.layout||d.layout;i=c.id||false;e=c.className||e}else{c=document.createElement("div");doi.dom.write(c)}doi.dom.className(c,e);var j=c.innerHTML;c.innerHTML="";doi.dom.style(c,"position:relative;display:block;overflow:hidden;");var l=document.createElement("div");doi.dom.style(l,"position:absolute;");c.appendChild(l);i=doi.widget.instance.save(this,i);doi.event.add(c,"mouseover",function(){var m=doi.widget.instance.get(i);if(m&&m.stop){m.stop()}});doi.event.add(c,"mouseout",function(){var m=doi.widget.instance.get(i);if(m&&m.start){m.start()}});this.setContent(j);window.clearInterval(a);if(d.href!=""){a=window.setInterval(function(){var m=doi.widget.instance.get(i);if(!m){return}if(m.request){m.request()}},d.interval*60000)}},setContent:function(){var l=arguments[0]||"";l=doi.dom.trim(l);if(l==""){f="";if(_firstTimeLoading){_firstTimeLoading=false;this.request()}return}var p=document.createElement("div");p.innerHTML=l;var j=doi.dom.get("tag:a",p);if(j.length<=0){return}var m=document.createElement("table");doi.dom.className(m,e);m.setAttribute("border","0");if(d.layout=="h"){var n=document.createElement("tr");m.appendChild(n);for(var k=0;k<j.length;k++){var o=document.createElement("td");n.appendChild(o);o.innerHTML=doi.dom.html(j[k])}}else{doi.dom.addClass(m,e+"-vertical");for(var k=0;k<j.length;k++){var n=document.createElement("tr");m.appendChild(n);var o=document.createElement("td");n.appendChild(o);o.innerHTML=doi.dom.html(j[k])}}f=m;if(c&&c.childNodes[0]){c.childNodes[0].innerHTML=doi.dom.html(f);_isRunning=false;this.start()}},start:function(){var k=c.childNodes[0];if(!k){return}if(!_isRunning){if(d.layout=="h"){doi.dom.style(k,"left:"+c.offsetWidth+"px")}else{doi.dom.style(k,"top:"+c.offsetHeight+"px")}}_isRunning=true;window.clearInterval(b);if(d.layout=="h"){var j=Math.floor((c.offsetHeight-k.offsetHeight)/2);if(j>0){doi.dom.style(k,"top:"+j+"px")}b=window.setInterval(function(){var l=k.offsetLeft-d.step;if(l+k.offsetWidth<0){l=c.offsetWidth}doi.dom.style(k,"left:"+l+"px");if(j<=0){j=Math.floor((c.offsetHeight-k.offsetHeight)/2);if(j>0){doi.dom.style(k,"top:"+j+"px")}}},d.speed)}else{b=window.setInterval(function(){var l=k.offsetTop-d.step;if(l+k.offsetHeight<0){l=c.offsetHeight}doi.dom.style(k,"top:"+l+"px")},d.speed)}},stop:function(){window.clearInterval(b);window.clearInterval(a)}}};doi.widget.tab=function(b){var c=[],a=[];this.render=function(){if(!b){c=doi.dom.$("tag:div;title=doi-widget-tab:true")}else{if(b.length){c=b}else{c=[b]}}if(!c||(c&&c.length==0)){return}for(var d=0;d<c.length;d++){var e=new doi.widget.tabByElement(c[d]);e.render();a.push(e)}};this.tabs=function(){return a}};doi.widget.register(doi.widget.tab);doi.widget.tabByElement=function(a){var f=arguments[1]||{},c,e=this,i=[],h,g=0,b=false,d="doi-widget-tab";this.render=function(){if(b){true}if(!a||!(a&&doi.dom.isElement(a))){return false}f.className=(a.className)||d;doi.dom.className(a,f.className);f.attribute=doi.dom.parseAttribute(a.getAttribute("title"));c=f.attribute||{};if(f.attribute.title){a.setAttribute("title",f.attribute.title)}else{a.setAttribute("title","")}h=doi.widget.instance.save(this,a.id);g=c.tabIndex||g;if(c.tabPosition=="bottom"){f.className+="-bottom"}for(var m=0;m<a.childNodes.length;m++){if(a.childNodes[m].nodeName=="DIV"){var q={};q.element=a.childNodes[m];q.id=(q.element.id)||h+"-"+i.length;q.title=q.element.getAttribute("title");q.focus=(g==i.length);q.element.setAttribute("title","");i.push(q)}}if(g<0||g>=i.length){g=0;for(var m=0;m<i.length;m++){items[m].focus=(g==m)}}var j=document.createElement("div");doi.dom.className(j,f.className+"-header");doi.dom.style(j,{overflow:"visible",display:"block"});if(!c.tabAlign){c.tabAlign="left"}var o='<div align="'+(c.tabAlign)+'" width="100%"></div>';j.innerHTML=o;var r=document.createElement("table");doi.dom.className(r,f.className+"-header");r.setAttribute("cellPadding",0);r.setAttribute("cellSpacing",0);r.setAttribute("border",0);var n=document.createElement("tbody");var p=document.createElement("tr");if(c.tabPosition=="bottom"){a.appendChild(j)}else{a.insertBefore(j,a.firstChild)}j.childNodes[0].appendChild(r);r.appendChild(n);n.appendChild(p);if(c.outerLeftVisibility){var l=document.createElement("td");l.id=h+"-outer-left";if(g==0){doi.dom.className(l,f.className+"-outer-left-focus")}else{doi.dom.className(l,f.className+"-outer-left")}l.innerHTML="&nbsp;";p.appendChild(l)}for(var m=0;m<i.length;m++){doi.dom.className(i[m].element,f.className+"-content");i[m].element.id=i[m].id;var l=document.createElement("td");if(i[m].focus){doi.dom.className(l,f.className+"-focus");doi.dom.style(i[m].element,{display:"block",visibility:"visible"})}else{doi.dom.style(i[m].element,{display:"none",visibility:"hidden"});if(m<g){doi.dom.className(l,f.className+"-left")}else{doi.dom.className(l,f.className+"-right")}}l.innerHTML=i[m].title;l.id=i[m].id+"-header";p.appendChild(l);if(c.tabSpaceVisibility&&(m<i.length-1)){l=document.createElement("td");l.id=i[m].id+"-space";if(m<g){doi.dom.className(l,f.className+"-space-left")}else{doi.dom.className(l,f.className+"-space-right")}l.innerHTML="&nbsp;";p.appendChild(l)}}if(c.outerRightVisibility){var l=document.createElement("td");if(g==i.length-1){doi.dom.className(l,f.className+"-outer-right-focus")}else{doi.dom.className(l,f.className+"-outer-right")}l.innerHTML="&nbsp;";l.id=h+"-outer-right";p.appendChild(l)}for(var m=0;m<i.length;m++){var k=doi.dom.$("#"+i[m].id+"-header");k._tabIndex=m;doi.event.add(k,"click",function(){e.tabFocus(this._tabIndex)});doi.event.add(k,"mouseover",function(){if(e.tabFocus()==this._tabIndex){return}doi.dom.addClass(this,this.className+"-hover");if(this._tabIndex==0&&c.outerLeftVisibility){var s=doi.dom.$("#"+h+"-outer-left");doi.dom.addClass(s,s.className+"-hover")}else{if((this._tabIndex==i.length-1)&&c.outerRightVisibility){var t=doi.dom.$("#"+h+"-outer-right");doi.dom.addClass(t,t.className+"-hover")}}});doi.event.add(k,"mouseout",function(){if(e.tabFocus()==this._tabIndex){return}doi.dom.removeClass(this,"-hover$",true);if(this._tabIndex==0&&c.outerLeftVisibility){var s=doi.dom.$("#"+h+"-outer-left");doi.dom.removeClass(s,"-hover$",true)}else{if((this._tabIndex==i.length-1)&&c.outerRightVisibility){var t=doi.dom.$("#"+h+"-outer-right");doi.dom.removeClass(t,"-hover$",true)}}})}b=true};this.element=function(){if(doi.dom.isDefined(arguments[0])){var j=doi.dom.parseInt(arguments[0]);if(i&&i[j]){return i[j]}}return doi.dom.$("#"+h)};this.tabFocus=function(n){if(doi.dom.isUndefined(n)){return g}if(g==n){return false}var q=g;if(n>=0&&n<i.length){g=n}else{return false}if(b){if(e.onBlur){var l=e.onBlur(q,n);if(!doi.dom.isUndefined(l)&&!l){g=q;return false}}e.hide(doi.dom.$("#"+i[q].id));e.show(doi.dom.$("#"+i[g].id));for(var k=0;k<i.length;k++){var m="#"+i[k].id+"-header";var o=f.className+"-focus";var r=f.className+"-space-right";if(k<g){o=f.className+"-left";r=f.className+"-space-left"}else{if(k>g){o=f.className+"-right";r=f.className+"-space-right"}}doi.dom.className(doi.dom.$(m),o);doi.dom.className(doi.dom.$("#"+i[k].id+"-space"),r)}var p;var j;if(c.outerLeftVisibility){p=doi.dom.$("#"+h+"-outer-left")}if(c.outerRightVisibility){j=doi.dom.$("#"+h+"-outer-right")}if(g==0){if(i.length==1){doi.dom.className(p,f.className+"-outer-left-focus");doi.dom.className(j,f.className+"-outer-right-focus")}else{doi.dom.className(p,f.className+"-outer-left-focus");doi.dom.className(j,f.className+"-outer-right")}}else{if(g==i.length-1){doi.dom.className(p,f.className+"-outer-left");doi.dom.className(j,f.className+"-outer-right-focus")}else{doi.dom.className(p,f.className+"-outer-left");doi.dom.className(j,f.className+"-outer-right")}}if(doi.widget.modalBox&&doi.widget.modalBox.visible()){doi.widget.modalBox.resize()}i[q].focus=false;i[n].focus=true;if(e.onFocus){e.onFocus(q,n)}}return g};this.hide=function(j){doi.dom.style(j,{display:"none",visibility:"hidden"})};this.show=function(j){doi.dom.style(j,{display:"block",visibility:"visible"})};this.id=function(){return h}};(function(a){a.treemenu=function(d){var f=[],e=[],c="doi-widget-treemenu",b=arguments[1]||{};b.attribute=b.attribute||{};return{render:function(){if(!d){f=doi.dom.$("tag:div;title=doi-widget-treemenu:true")}else{if(d.length){f=d}else{f=[d]}}if(!f||(f&&f.length==0)){return}for(var g=0;g<f.length;g++){var h=new doi.widget.menuBar(f[g],b);h.render();_menus.push(h)}}}}})(doi.widget);
