if(typeof Dottoro=="undefined")var Dottoro={};Dottoro.LIBPATH=typeof Dottoro_LibPath=="undefined"?"":Dottoro_LibPath;Dottoro.BROWSER_IE=1;Dottoro.BROWSER_FF=2;Dottoro.BROWSER_OP=4;Dottoro.BROWSER_SA=8;Dottoro.BROWSER_ALL=15;Dottoro.CSS_SIDES=["top","right","bottom","left"];Dottoro.BOX_INNER=1;Dottoro.BOX_PADDING=2;Dottoro.BOX_SCROLLBAR=3;Dottoro.BOX_BORDER=4;Dottoro.BOX_MARGIN=5;
(function(){var a=navigator.userAgent.toLowerCase();Dottoro.isIE=a.indexOf("msie")>-1;Dottoro.isFF=a.indexOf("firefox")>-1;Dottoro.isOP=a.indexOf("opera")>-1;Dottoro.isWK=a.indexOf("webkit")>-1;if(Dottoro.isIE&&(a=/msie ([\w.]+)/.exec(a)))a=parseInt(a[1]),Dottoro["isIE"+a]=true})();Dottoro.IsString=function(a){return typeof a==="string"};Dottoro.IsObject=function(a){return typeof a==="object"||typeof a==="function"};Dottoro.IsArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"};
(function(){var a=false,b=/xyz/.test(function(){var xyz;})?/\b_super\b/:/.*/;Dottoro.Class=function(){};Dottoro.Class.extend=function(c){var d=this.prototype;a=true;var e=new this;a=false;for(var f in c)c.hasOwnProperty(f)&&(e[f]=typeof c[f]=="function"&&typeof d[f]=="function"&&b.test(c[f])?function(a,b){return function(){var c=this._super;this._super=d[a];var e=b.apply(this,arguments);this._super=c;return e}}(f,c[f]):c[f]);Class=function(){!a&&this.init&&this.init.apply(this,arguments)};Class.prototype=
e;Class.constructor=Class;Class.extend=arguments.callee;return Class}})();
Dottoro.ClassEvents=Dottoro.Class.extend({init:function(){this.handlerID=0;this.userEventHandlersByID={};this.userEventHandlersByType={}},fireDrEvent:function(a){for(var a="dr_"+a,b=[a,this],c=1;c<arguments.length;c++)b.push(arguments[c]);c=false;if(this.userEventHandlersByType[a])for(var d in this.userEventHandlersByType[a])this.userEventHandlersByType[a].hasOwnProperty(d)&&Dottoro.CallUserFunc(this.userEventHandlersByType[a][d],b)===false&&(c=true);return c},AddListener:function(a,b){this.userEventHandlersByType[a]||
(this.userEventHandlersByType[a]={});this.handlerID++;this.userEventHandlersByID[""+this.handlerID]={name:a,listener:b};this.userEventHandlersByType[a][""+this.handlerID]=b;return this.handlerID},RemoveListener:function(a){if(this.userEventHandlersByID[""+a]){var b=this.userEventHandlersByID[""+a].name;delete this.userEventHandlersByID[""+a];this.userEventHandlersByType[b]&&delete this.userEventHandlersByType[b][""+a]}}});
Dottoro.ClassEventsSettings=Dottoro.ClassEvents.extend({init:function(){this._super();this.settings={}},ReadSettings:function(a){a&&this.SetSettings(Dottoro.SplitSettings(a))},SetSettings:function(a){if(a)for(var b in a)a.hasOwnProperty(b)&&this.SetSetting(b,a[b])},SetSetting:function(a,b){var c=a.toLowerCase();if(this.settings.hasOwnProperty(c)){var d=typeof this.settings[c];this.settings[c]=d!=typeof b?d=="string"?""+b:Dottoro.StrToType(b,d):b}else this.settings[c]=b},GetSetting:function(a){return this.settings[a.toLowerCase()]}});
Dottoro.CallUserFunc=function(a,b){Dottoro.IsArray(b)||(b=[b]);return Dottoro.IsArray(a)?a[0][a[1]].apply(a[0],b):a.apply(null,b)};Dottoro.registeredEventHandlers={};Dottoro.registeredEventCounter=0;Dottoro.CAPTURE_NO=0;Dottoro.CAPTURE_ELEM=1;Dottoro.CAPTURE_WINDOW=2;Dottoro.CAPTURE_ALLWINDOW=3;
Dottoro.AddAttachEvent=function(a,b,c,d){for(var e=[c],f=4;f<arguments.length;f++)e.push(arguments[f]);var g=function(a){a=[a].concat(e);return Dottoro.CallUserFunc(b,a)};if(!d)d=Dottoro.CAPTURE_NO;var h=c;if(c.addEventListener)switch(d){case Dottoro.CAPTURE_ELEM:c.addEventListener(a,g,true);break;case Dottoro.CAPTURE_WINDOW:h=Dottoro.GetWinFromDoc(c.ownerDocument);if(!h)return false;h.addEventListener(a,g,true);break;case Dottoro.CAPTURE_ALLWINDOW:for(var f=Dottoro.GetWinFromDoc(c.ownerDocument),
h=Dottoro.GetAllFrameWindows(f),j=[],f=0;f<h.length;f++)try{h[f].addEventListener(a,g,true);var k={key:Dottoro.registeredEventCounter,type:a,handler:g,elem:h[f],capture:d};Dottoro.registeredEventHandlers[""+Dottoro.registeredEventCounter]=k;Dottoro.registeredEventCounter++;j.push(k)}catch(n){}return j;default:if(Dottoro.IsArray(a))for(f=0;f<a.length;f++)c.addEventListener(a[f],g,false);else c.addEventListener(a,g,false)}else if(c.attachEvent)if(Dottoro.IsArray(a))for(f=0;f<a.length;f++)c.attachEvent("on"+
a[f],g);else c.attachEvent("on"+a,g);else return null;k={key:Dottoro.registeredEventCounter,type:a,handler:g,elem:h,capture:d};Dottoro.registeredEventHandlers[""+Dottoro.registeredEventCounter]=k;Dottoro.registeredEventCounter++;return k};
Dottoro.RemoveDetachEvent=function(a,b){if(!Dottoro.IsObject(a))return false;if(Dottoro.IsArray(a)){for(var c=true,d=0;d<a.length;d++)Dottoro.RemoveDetachEvent(a[d],b)||(c=false);return c}var c=a.type,e=a.handler,f=a.elem,d=a.capture;if(f.removeEventListener)switch(d){case Dottoro.CAPTURE_ELEM:case Dottoro.CAPTURE_WINDOW:case Dottoro.CAPTURE_ALLWINDOW:f.removeEventListener(c,e,true);break;default:if(Dottoro.IsArray(c))for(d=0;d<c.length;d++)f.removeEventListener(c[d],e,false);else f.removeEventListener(c,
e,false)}else if(f.detachEvent)if(Dottoro.IsArray(c))for(d=0;d<c.length;d++)f.detachEvent("on"+c[d],e);else f.detachEvent("on"+c,e);else return false;b||delete Dottoro.registeredEventHandlers[a.key];return true};Dottoro.RemoveHandlersOnUnload=function(){for(i in Dottoro.registeredEventHandlers)Dottoro.registeredEventHandlers.hasOwnProperty(i)&&Dottoro.RemoveDetachEvent(Dottoro.registeredEventHandlers[i],true)};
Dottoro.CreateHTTPRequestObject=function(){var a=window.ActiveXObject&&location.protocol==="file:";if(window.XMLHttpRequest&&!a)return new XMLHttpRequest;else try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(b){}return null};Dottoro.IsRequestSuccessful=function(a){return a.status==0||a.status>=200&&a.status<300||a.status==304||a.status==1223};Dottoro.reWSStr="\\s\\xa0\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u200b\\u2028\\u2029\\u3000";
Dottoro.reWS=RegExp("["+Dottoro.reWSStr+"]");Dottoro.reNonWS=RegExp("[^"+Dottoro.reWSStr+"]");Dottoro.reTrim=RegExp("^["+Dottoro.reWSStr+"]+|["+Dottoro.reWSStr+"]+$","g");Dottoro.FirstWS=function(a,b,c){b||(b=0);if(c==null)c=a.length;a=a.substring(b,c);return b+a.search(Dottoro.reWS)};Dottoro.FirstNonWS=function(a,b,c){b||(b=0);if(c==null)c=a.length;a=a.substring(b,c);return b+a.search(Dottoro.reNonWS)};Dottoro.Trim=function(a){return a.replace(Dottoro.reTrim,"")};
Dottoro.Escape=function(a){a=a.replace(/\\/g,"\\\\");a=a.replace(/'/g,"\\'");return a=a.replace(/"/g,'\\"')};Dottoro.Unescape=function(a){a=a.replace(/\\'/g,"'");a=a.replace(/\\"/g,'"');return a=a.replace(/\\\\/g,"\\")};Dottoro.IsObjEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return false;return true};Dottoro.TwoDigit=function(a){return a<10?"0"+a:""+a};
Dottoro.GetLocalTime=function(a,b,c,d){var e=new Date;if(Dottoro.IsString(a)){var f=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)\s(\d\d):(\d\d):(\d\d)$/);f&&(e.setUTCFullYear(Number(f[1]),Number(f[2])-1,Number(f[3])),e.setUTCHours(Number(f[4]),Number(f[5]),Number(f[6])))}else e.setTime(a);var f=e.getFullYear(),g=Dottoro.TwoDigit(e.getMonth()+1),h=Dottoro.TwoDigit(e.getDate()),j=Dottoro.TwoDigit(e.getHours()),k=Dottoro.TwoDigit(e.getMinutes()),e=Dottoro.TwoDigit(e.getSeconds());b||(b="date");switch(b){case "date":a=
f+"-"+g+"-"+h;break;case "time":a=j+":"+k+":"+e;break;case "datetime":a=f+"-"+g+"-"+h+" "+j+":"+k+":"+e}c&&(d||(d=document),d.write(a));return a};Dottoro.ParseString=function(a){for(var b=0;b<2;b++)a=a.replace(/((^|[^\\])(\\\\)*)'/g,"$1\\'"),a=a.replace(/((^|[^\\])(\\\\)*)\r/g,"$1\\\r"),a=a.replace(/((^|[^\\\r])(\\\\)*)\n/g,"$1\\\n"),a=a.replace(/((^|[^\\])(\\\\)*)\0/g,"$1\\\x00");return(new Function("return '"+a+"'"))()};
Dottoro.SplitSettings=function(a){var b={};if(!a)return b;for(var c=a.length,d=0,e=0,f,g=true;e<c;)if(g)if(a.charAt(e)==":"){f=a.substring(d,e);f=Dottoro.Trim(f);f=f.toLowerCase();var e=d=e+1,g=false,h=""}else e++;else{e=Dottoro.FirstNonWS(a,e);e<0&&(e=c);if(e<c){g=",";d=e;a.charAt(d)=="'"?(g="'",d++):a.charAt(d)=='"'&&(g='"',d++);for(e=d;e<c;){h=a.charAt(e);if(h==g)break;h=="\\"&&(g=="'"||g=='"')&&e++;e++}h=a.substring(d,e);if(g==",")h=Dottoro.Trim(h);else for(h=Dottoro.ParseString(h);e<c&&a.charAt(e)!=
",";)e++;e=d=e+1}f.length>0&&(b[f]=h);g=true}return b};Dottoro.GetChildFrameWindows=function(a,b){a||(a=window);b||(b=[]);try{if("frames"in a)for(var c=0;c<a.frames.length;c++)b.push(a.frames[c]),Dottoro.GetChildFrameWindows(a.frames[c],b);else for(var d=["frame","iframe"],e=0;e<d.length;e++)for(var f=a.getElementsByTagName(d[e]),c=0;c<f.length;c++){var g=f[c].contentWindow;b.push(g);Dottoro.GetChildFrameWindows(g,b)}}catch(h){}return b};
Dottoro.GetAllFrameWindows=function(a,b){a||(a=window);b||(b=[]);var c=a.top;b.push(c);Dottoro.GetChildFrameWindows(c,b);return b};Dottoro.IsWin=function(a){return"window"in a&&a.window==a};Dottoro.GetWinFromDoc=function(a){return!a?null:a.defaultView?a.defaultView:a.parentWindow};Dottoro.GetWin=function(a){if(Dottoro.IsWin(a))return a;if("ownerDocument"in a&&a.ownerDocument)a=a.ownerDocument;return Dottoro.GetWinFromDoc(a)};
Dottoro.GetElement=function(a,b){return Dottoro.IsString(a)?(b||(b=document),b.getElementById(a)):a};Dottoro.RemoveNode=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)};
Dottoro.CreateElement=function(a,b,c,d){var e=document;if(b=Dottoro.GetElement(b))"nodeType"in b&&b.nodeType==9?(e=b,b=null):e=b.ownerDocument;var a=e.createElement(a),f;if(c)for(f in c)if(c[f]!==void 0)f=="enctype"?a.setAttribute(f,c[f]):(a[f]=c[f],f=="checked"&&(a.defaultChecked=c[f]));if(d)for(f in d)d[f]!==void 0&&(a.style[f]=d[f]);b&&b.appendChild(a);return a};
Dottoro.CreateSelect=function(a,b,c,d,e){a=Dottoro.CreateElement("select",a,b,c);Dottoro.CreateOptions(a,d,e);if(b&&"value"in b)a.value=b.value;return a};
Dottoro.CreateOptions=function(a,b,c){c=c?c:"";if(Dottoro.IsArray(b))for(var d=0;d<b.length;d++){var e=b[d],f={},g=null,h=0;if(Dottoro.IsString(e))f.value=e,f.text=e;else if(Dottoro.IsArray(e)){if(e.length>0)f.value=e[0],f.text=e.length>1?e[1]:f.value,c&&e.length>2&&(h=e[2])}else{if("value"in e)f.value=e.value,f.text=f.value;if("text"in e&&(f.text=e.text,!("value"in e)))f.value=f.text;c&&"depth"in e&&(h=e.depth);if("styles"in e)g=e.styles}for(;h>0;)f.text=c+f.text,h--;f.label=f.text;Dottoro.CreateElement("option",
a,f,g)}else for(d in b)e=Dottoro.CreateElement("optgroup",a,{label:d}),Dottoro.CreateOptions(e,b[d],c)};Dottoro.CreateDummyElem=function(a,b){a||(a=document);b||(b="div");var c=a.createElement(b);c.style.position="static";c.style.left="0px";c.style.top="0px";c.style.width="0px";c.style.height="0px";c.style.margin="0px";c.style.border="0px";c.style.padding="0px";c.style.overflow="hidden";c.style.visibility="hidden";return c};Dottoro.GetElemText=function(a){return"textContent"in a?a.textContent:a.innerText};
Dottoro.SetElemText=function(a,b){"textContent"in a?a.textContent=b:a.innerText=b};Dottoro.CopyElemSettings=function(a,b,c,d){if(c)for(var e=0;e<c.length;e++)b[c[e]]=a[c[e]];if(d)for(e=0;e<d.length;e++)b.style[d[e]]=a.style[d[e]]};Dottoro.CopyElemsSettings=function(a,b,c,d){for(var e in a)e in b&&Dottoro.CopyElemSettings(a[e],b[e],c,d)};Dottoro.GetElemsByIds=function(a,b,c){for(var d=0;d<b.length;d++){var e=document.getElementById(a+b[d]);e&&(c[b[d]]=e)}};
Dottoro.GetFormControlsByAttr=function(a,b,c,d){for(var e=d?d.length:0,a=a.firstChild;a;){if(a.getAttribute){var f=a.getAttribute(b);if(f){var g=f.indexOf("["),h=g>=0;h&&(f=f.substr(0,g));f=Dottoro.Trim(f)}f&&e&&(f=e<=f.length&&f.substr(0,e)===d?f.substr(e):"");if(f)f in c||(c[f]={elems:[]}),c[f].arr=h,c[f].elems.push(a)}Dottoro.GetFormControlsByAttr(a,b,c,d);a=a.nextSibling}};Dottoro.GetOptionValue=function(a){var b=a.getAttributeNode("value");return b&&b.specified?a.value:a.text};
Dottoro.GetFormControlValue=function(a){var b=a.nodeName.toLowerCase(),c=a.type?a.type.toLowerCase():"",d=a.value;if(b==="input"&&(c==="checkbox"||c==="radio"))a.checked||(d="");else if(b==="select")if(a.multiple){d=[];for(b=0;b<a.options.length;b++)c=a.options[b],c.selected&&d.push(Dottoro.GetOptionValue(c))}else a.selectedIndex>=0?(c=a.options[a.selectedIndex],d=Dottoro.GetOptionValue(c)):d="";return d};
Dottoro.ControlsToAssocArray=function(a){var b={};for(key in a)if(a.hasOwnProperty(key)){var c=a[key].arr;b[key]=c?[]:"";for(var d=0;d<a[key].elems.length;d++){var e=Dottoro.GetFormControlValue(a[key].elems[d]);c?Dottoro.IsArray(e)?b[key]=b[key].concat(e):e&&b[key].push(e):(Dottoro.IsArray(e)&&(e=e.length>0?e[0]:""),e&&(b[key]=e))}}return b};Dottoro.FormToAssocArray=function(a,b,c){var d={};Dottoro.GetFormControlsByAttr(a,b?b:"name",d,c);return Dottoro.ControlsToAssocArray(d)};
Dottoro.UpdateControlsByAssocArray=function(a,b,c){for(key in b)if(b.hasOwnProperty(key)){var d=c?c+key:key;if(d in a)if(Dottoro.IsArray(b[key]))for(var e=0;e<a[d].elems.length;e++){var f=a[d].elems[e],g=f.nodeName.toLowerCase(),h=f.type?f.type.toLowerCase():"";if(g==="input"&&(h==="checkbox"||h==="radio"))f.checked=Dottoro.InArray(b[key],f.value);else if(g==="select"&&f.multiple)for(g=0;g<f.options.length;g++)h=f.options[g],h.selected=Dottoro.InArray(b[key],Dottoro.GetOptionValue(h));else{var j=
e<b[key].length?b[key][e]:"";"drInput"in f?f.drInput.SetValue(j):f.value=j}}else for(e=0;e<a[d].elems.length;e++)if(f=a[d].elems[e],g=f.nodeName.toLowerCase(),h=f.type?f.type.toLowerCase():"",g==="input"&&(h==="checkbox"||h==="radio"))f.checked=f.value&&f.value===b[key];else if(g==="select")for(g=0;g<f.options.length;g++)h=f.options[g],j=Dottoro.GetOptionValue(h),h.selected=j&&j===b[key];else j=b[key],"drInput"in f?f.drInput.SetValue(j):f.value=j}};
Dottoro.UpdateFormByAssocArray=function(a,b,c,d){var e={};Dottoro.GetFormControlsByAttr(a,c?c:"name",e);Dottoro.UpdateControlsByAssocArray(e,b,d)};
Dottoro.AddCBoxHiddens=function(a,b){b||(b="");if("dr_cboxinputs"in a){for(var c=0;c<a.dr_cboxinputs.length;c++)Dottoro.RemoveNode(a.dr_cboxinputs[c]);delete a.dr_cboxinputs}for(var d=[],e=a.getElementsByTagName("input"),c=0;c<e.length;c++){var f=e[c];f.type.toLowerCase()=="checkbox"&&f.name&&f.name.indexOf("[")<0&&(f.checked||d.push(f))}e=[];for(c=0;c<d.length;c++){var f=d[c],g=Dottoro.CreateElement("input",null,{type:"hidden",name:f.name,value:b});f.parentNode.insertBefore(g,f);e.push(g)}a.dr_cboxinputs=
e};
Dottoro.GetInputSel=function(a){if("selectionStart"in a)return{start:a.selectionStart,end:a.selectionEnd};var b=a.ownerDocument;if(b.selection){var c=b.selection.createRange();a.nodeName.toLowerCase()=="textarea"?(b=b.body.createTextRange(),b.moveToElementText(a)):b=a.createTextRange();try{if(c.compareEndPoints("EndToStart",b)<=0)return{start:0,end:0};if(c.compareEndPoints("StartToEnd",b)>=0){var d=a.value.length;return{start:d,end:d}}if(c.compareEndPoints("StartToStart",b)<=0)var e=0;else for(var f=b.duplicate(),
e=0;f.moveStart("character",1);)if(a.value.charAt(e)=="\r"&&a.value.charAt(e+1)=="\n"?e+=2:e++,c.compareEndPoints("StartToStart",f)<=0)break;if(c.compareEndPoints("EndToEnd",b)>=0)var g=a.value.length;else{f=b.duplicate();for(g=0;f.moveStart("character",1);)if(a.value.charAt(g)=="\r"&&a.value.charAt(g+1)=="\n"?g+=2:g++,c.compareEndPoints("EndToStart",f)<=0)break}return{start:e,end:g}}catch(h){}}d=a.value.length;return{start:d,end:d}};
Dottoro.SelectInput=function(a,b,c){if("selectionStart"in a)a.selectionStart=b,a.selectionEnd=c;else if(a.createTextRange){var d=a.value.substr(0,b).match(/\r\n/g);d&&(b-=d.length);(d=a.value.substr(0,c).match(/\r\n/g))&&(c-=d.length);a.nodeName.toLowerCase()=="textarea"?(d=a.ownerDocument.body.createTextRange(),d.moveToElementText(a)):d=a.createTextRange();d.moveStart("character",b);d.collapse();d.moveEnd("character",c-b);d.select()}};
Dottoro.SetInputValue=function(a,b){"innerText"in a&&!a.addEventListener?a.innerText=""+b:a.value=""+b};Dottoro.SetControlValue=function(a,b){var c=a.nodeName.toLowerCase(),d=a.type?a.type.toLowerCase():"";c==="input"&&d==="text"||c==="textarea"?Dottoro.SetInputValue(a,b):a.value=""+b};Dottoro.ListenInputChange=function(a,b){new Dottoro.Input(a,b)};
Dottoro.Input=Dottoro.Class.extend({init:function(a,b){this.input=a;a.drInput=this;this.handler=b;this.value=a.value;this.timerId=0;Dottoro.AddAttachEvent(a.addEventListener?Dottoro.isIE9?["input","focus","blur"]:"input":Dottoro.isIE8?["propertychange","focus","blur"]:"propertychange",[this,"OnChanged"],a)},NotifyChange:function(){Dottoro.CallUserFunc(this.handler,[this.input,this])},SetValue:function(a){this.value=""+a;Dottoro.SetInputValue(this.input,a)},CheckValue:function(){if(this.value!=this.input.value)this.NotifyChange(),
this.value=this.input.value},ClearTimer:function(){if(this.timerId)clearInterval(this.timerId),this.timerId=0},OnChanged:function(a){switch(a.type){case "input":this.CheckValue();break;case "propertychange":a.propertyName=="value"&&this.CheckValue();break;case "focus":this.ClearTimer();var b=this;this.timerId=setInterval(function(){b.CheckValue()},100);break;case "blur":this.ClearTimer(),this.CheckValue()}}});
Dottoro.Prompt=function(a,b,c){return Dottoro.isIE?showModalDialog(c?c:Dottoro.LIBPATH+"htm/prompt.htm",{message:a,defValue:b?b:"",drPath:Dottoro.LIBPATH},"center: yes; dialogWidth:356px; dialogHeight:100px; resizable: no; scroll: no; status: no"):prompt(a,b)};Dottoro.JSONDecode=function(a){try{var a=Dottoro.Trim(a),b=window.JSON&&window.JSON.parse?window.JSON.parse(a):(new Function("return "+a))()}catch(c){return}return b};
Dottoro.JSONEncode=function(a){var b="";if(Dottoro.IsObject(a))if(Dottoro.IsArray(a)){b+="[";for(var c=0;c<a.length;c++)c>0&&(b+=","),b+=Dottoro.JSONEncode(a[c]);b+="]"}else if(a===null)b+="null";else{b+="{";var d=true;for(c in a)a.hasOwnProperty(c)&&(d||(b+=","),d=false,b+=Dottoro.JSONEncode(c)+":"+Dottoro.JSONEncode(a[c]));b+="}"}else Dottoro.IsString(a)?(a=a.replace(/\\/g,"\\\\"),a=a.replace(/"/g,'\\"'),b+='"'+a+'"'):b+=a;return b};
Dottoro.SetOpacity=function(a,b){if(a&&a.style)if("opacity"in a.style)a.style.opacity=b/100;else if(a.filters)b>=100?a.style.filter="":a.filters.alpha?a.filters.alpha.opacity=b:a.style.filter="alpha(opacity="+b+")"};Dottoro.StopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=true};Dottoro.PreventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=false;return false};Dottoro.CancelEvent=function(a){Dottoro.StopPropagation(a);return Dottoro.PreventDefault(a)};
Dottoro.FindInArray=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1};Dottoro.InArray=function(a,b){return Dottoro.FindInArray(a,b)>=0};Dottoro.SortArray=function(a,b){var c=[],d;for(d in a)c.push(d);for(d=0;d<c.length;d++){for(var e=d,f=d+1;f<c.length;f++)b?a[c[f]]<a[c[e]]&&(e=f):a[c[f]]>a[c[e]]&&(e=f);e>d&&(f=c[d],c[d]=c[e],c[e]=f)}return c};Dottoro.CopyAssocArray=function(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};
Dottoro.ModifyCSSClass=function(a,b,c){var d=" "+a.className+" ";if(c)if(Dottoro.IsArray(c))for(var e=0;e<c.length;e++)d=d.replace(" "+c[e]+" ","");else d=d.replace(" "+c+" ","");if(b)if(Dottoro.IsArray(b))for(e=0;e<b.length;e++)d.indexOf(" "+b[e]+" ")<0&&(d+=" "+b[e]);else d.indexOf(" "+b+" ")<0&&(d+=" "+b);a.className=Dottoro.Trim(d)};Dottoro.ReplaceCSSClass=function(a,b,c){a.className=(" "+a.className+" ").replace(" "+b+" "," "+c+" ")};
Dottoro.StrToType=function(a,b,c){if(b!==void 0){if(b=="string")return a;if(b=="boolean")return a=="1"||a=="true"||a=="yes"||a=="on";if(b=="number")return Number(a);if(b=="integer")return parseInt(a);c||(c=document);return c.getElementById(a)}};Dottoro.ConvertToPixel=function(a,b,c,d){var e=!a.runtimeStyle[c];e&&(a.runtimeStyle[c]=a.currentStyle[c]);var f=a.style[c];a.style[c]=b;b=a.style[d];a.style[c]=f;e&&(a.runtimeStyle[c]="");return b};
Dottoro.GetStyleParent=function(a,b){if(!a||!a.ownerDocument)return null;var c=a.ownerDocument,d=c.documentElement;b||(b=Dottoro.GetStyle(a,"position"));if(b=="fixed")return d;if(b=="absolute"){c=a.offsetParent;if(!c)return d;pPosType=Dottoro.GetStyle(c,"position");return pPosType=="absolute"||pPosType=="fixed"||pPosType=="relative"?c:d}return!a.parentNode||a.parentNode===c?d:a.parentNode};Dottoro.BorderWidths={};
Dottoro.GetStyle=function(a,b,c){if(!a||!a.ownerDocument)return null;var d=a.ownerDocument,e=d.documentElement;b=="float"&&(b="cssFloat"in a.style?"cssFloat":"styleFloat");var f=null;if(window.getComputedStyle){var g=Dottoro.GetWinFromDoc(d);if(!g)return null;try{var h=g.getComputedStyle(a,null),f=h[b]}catch(j){}b=="opacity"&&f===""&&(f="1");if(c){var k=/^-?\d+(\.\d+)?%$/;if(k.test(f))switch(b){case "backgroundPositionX":f=Math.floor(parseFloat(h.width)*parseFloat(f)/100);break;case "backgroundPositionY":f=
Math.floor(parseFloat(h.height)*parseFloat(f)/100);break;case "left":case "maxWidth":case "minWidth":case "right":case "textIndent":b=Dottoro.GetStyleParent(a);b===e?b=Dottoro.GetClientWinWidth(d):(b=g.getComputedStyle(b,null),b=b.width);f=Math.floor(parseFloat(b)*parseFloat(f)/100);break;case "bottom":case "maxHeight":case "minHeight":case "top":b=Dottoro.GetStyleParent(a);b===e?b=Dottoro.GetClientWinHeight(d):(b=g.getComputedStyle(b,null),b=b.height);f=Math.floor(parseFloat(b)*parseFloat(f)/100);
break;case "verticalAlign":f=Math.floor(parseFloat(h.lineHeight==="normal"?"24px":h.lineHeight)*parseFloat(f)/100)}}}else{if(b=="opacity"&&a.filters)return f=a.filters.alpha?a.filters.alpha.opacity:100,""+f/100;a.currentStyle&&(f=a.currentStyle[b]);if(c){if(e=b=="borderLeftWidth"||b=="borderTopWidth"||b=="borderRightWidth"||b=="borderBottomWidth")if(g=b.substring(6,b.length-5),a.currentStyle["border"+g+"Style"]=="none")f="0px";else if(f=="medium"||f=="thin"||f=="thick"){if(!Dottoro.BorderWidths.hasOwnProperty(f))g=
Dottoro.CreateDummyElem(d),g.style.position="absolute",d.body.appendChild(g),g.style.border="medium solid red",Dottoro.BorderWidths.medium=g.clientTop,g.style.borderWidth="thin",Dottoro.BorderWidths.thin=g.clientTop,g.style.borderWidth="thick",Dottoro.BorderWidths.thick=g.clientTop,d.body.removeChild(g);f=Dottoro.BorderWidths[f]+"px"}if(b=="fontSize")f=Dottoro.ConvertToPixel(a,"1em","left","pixelLeft")+"px";else if(f)if(/^-?\d+(\.\d+)?(cm|mm|in|pt|pc|em|ex)$/i.test(f))f=Dottoro.ConvertToPixel(a,f,
"left","pixelLeft")+"px";else if(k=/^-?\d+(\.\d+)?%$/,k.test(f))switch(b){case "backgroundPositionX":d=Dottoro.CreateDummyElem(a.ownerDocument);d.style.left=f;a.appendChild(d);f=d.style.pixelLeft+"px";a.removeChild(d);break;case "backgroundPositionY":d=Dottoro.CreateDummyElem(a.ownerDocument);d.style.top=f;a.appendChild(d);f=d.style.pixelTop+"px";a.removeChild(d);break;case "left":case "marginBottom":case "marginLeft":case "marginRight":case "marginTop":case "maxWidth":case "minWidth":case "paddingBottom":case "paddingLeft":case "paddingRight":case "paddingTop":case "right":case "textIndent":case "width":f=
Dottoro.ConvertToPixel(a,f,"left","pixelLeft")+"px";break;case "bottom":case "height":case "layoutGridChar":case "layoutGridLine":case "maxHeight":case "minHeight":case "top":f=Dottoro.ConvertToPixel(a,f,"top","pixelTop")+"px";break;case "lineHeight":d=Dottoro.ConvertToPixel(a,"1em","left","pixelLeft");f=d*parseFloat(f)/100+"px";break;case "verticalAlign":d=Dottoro.ConvertToPixel(a,"1em","left","pixelLeft"),f=d*parseFloat(f)/100*parseFloat(f)/100+"px"}if(e&&a.contentWindow&&a.contentWindow.document&&
a.contentWindow.document.documentElement)a=a.contentWindow.document.documentElement,b=b=="borderLeftWidth"||b=="borderRightWidth"?a.clientLeft:a.clientTop,f=parseFloat(f)+b+"px"}}f===void 0&&(f=null);c&&f==="auto"&&(f="0px");return f};Dottoro.GetPixelLength=function(a,b){var c=Dottoro.GetStyle(a,b,true);return Math.round(parseFloat(c))};
Dottoro.GetStyleClip=function(a){var b=Dottoro.GetSize(a),a=Dottoro.GetStyle(a,"clip"),b={top:0,right:b.width,bottom:b.height,left:0};if(a){var c=a.indexOf("("),d=a.lastIndexOf(")");if(c>=0&&d>=0){a=a.substring(c+1,d);for(d=c=0;c<a.length;){var e=Dottoro.FirstNonWS(a,c);if(e<0)break;c=Dottoro.FirstWS(a,e);if(c<0)c=a.length;e=a.substring(e,c);e.indexOf("auto")<0&&(b[Dottoro.CSS_SIDES[d]]=parseFloat(e));d++}}}return b};
Dottoro.JSToCSS=function(a){for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);b+=65<=d&&d<=90?"-"+String.fromCharCode(d+32):a.charAt(c)}return b};Dottoro.RemoveStyleProp=function(a,b){a.removeProperty?a.removeProperty(Dottoro.JSToCSS(b)):a.removeAttribute&&a.removeAttribute(b)};Dottoro.ForceRecalculate=function(a){var b=a.parentNode,c=a.nextSibling;b.removeChild(a);a.style.display="none";b.insertBefore(a,c);a.style.display=""};
Dottoro.GetZoomFactor=function(a){if(!Dottoro.isIE)return 1;a||(a=document);var b=1;if(a.body.currentStyle&&a.body.getBoundingClientRect){var b=a.body.getBoundingClientRect(),b=b.right-b.left,c=a.body.offsetWidth;"zoom"in a.body.currentStyle&&a.body.currentStyle.zoom!="normal"&&(a=parseInt(a.body.currentStyle.zoom),b/=a/100);b=Math.round(b/c*100)/100}return b};
Dottoro.StandardizeRect=function(a){a.hasOwnProperty("left")?a.hasOwnProperty("right")?a.width=a.right-a.left:a.right=a.left+a.width:a.left=a.right-a.width;a.hasOwnProperty("top")?a.hasOwnProperty("bottom")?a.height=a.bottom-a.top:a.bottom=a.top+a.height:a.top=a.bottom-a.height};Dottoro.IsPointInRect=function(a,b){return a.x>=b.left&&a.x<b.right&&a.y>=b.top&&a.y<b.bottom};Dottoro.IsRectInRect=function(a,b){return a.left>=b.left&&a.right<=b.right&&a.top>=b.top&&a.bottom<=b.bottom};
Dottoro.OffsetCoords=function(a,b,c){b&&("x"in a&&(a.x+=b),"left"in a&&(a.left+=b),"right"in a&&(a.right+=b));c&&("y"in a&&(a.y+=c),"top"in a&&(a.top+=c),"bottom"in a&&(a.bottom+=c))};Dottoro.ClientWinToDoc=function(a,b,c){b||(b=document);var d=c?-1:1,c=d*Dottoro.GetDocScrollLeft(b),b=d*Dottoro.GetDocScrollTop(b);Dottoro.OffsetCoords(a,c,b)};
Dottoro.ClientWinToClientWin=function(a,b,c){var d=b?Dottoro.GetWin(b):window.top,e=c?Dottoro.GetWin(c):window.top;if(!d||!e)return false;if(d===e)return true;for(c=[];d&&d.parent!==d;)c.push(d.frameElement),d=d.parent;for(b=[];e&&e.parent!==e;)b.push(e.frameElement),e=e.parent;if(d!==e)return false;d=c.length-1;for(e=b.length-1;d>=0&&e>=0&&c[d]===b[e];)d--,e--;for(var f=0;f<=d;f++){var g=c[f];if(!g)return false;g=Dottoro.GetLeftTopInClient(g,Dottoro.BOX_SCROLLBAR);Dottoro.OffsetCoords(a,g.left,g.top)}for(f=
0;f<=e;f++){g=b[f];if(!g)return false;g=Dottoro.GetLeftTopInClient(g,Dottoro.BOX_SCROLLBAR);Dottoro.OffsetCoords(a,-g.left,-g.top)}return true};
Dottoro.ClientWinToAbsolute=function(a,b,c,d){var e=b.ownerDocument;if(e){var f=b.offsetParent;if(f){var g={left:0,top:0},h=Dottoro.GetStyle(f,"position");h=="absolute"||h=="relative"||h=="fixed"?(g=Dottoro.GetLeftTopInClient(f,Dottoro.BOX_PADDING),Dottoro.OffsetCoords(g,-f.scrollLeft,-f.scrollTop)):(g.left-=Dottoro.GetDocScrollLeft(e),g.top-=Dottoro.GetDocScrollTop(e));d||(d={});if(!d.hasOwnProperty("left"))d.left=Dottoro.GetPixelLength(b,"marginLeft");if(!d.hasOwnProperty("top"))d.top=Dottoro.GetPixelLength(b,
"marginTop");g.left+=d.left;g.top+=d.top;b=c?-1:1;Dottoro.OffsetCoords(a,b*g.left,b*g.top)}}};
Dottoro.GetSize=function(a,b){var c=a.ownerDocument;if(!c)return{width:0,height:0};if(a===c.documentElement){var d=Dottoro.GetClientWinWidth(c),c=Dottoro.GetClientWinHeight(c);return{width:d,height:c}}if(!b)b=Dottoro.BOX_BORDER;if(b==Dottoro.BOX_INNER||b==Dottoro.BOX_PADDING){d={width:a.clientWidth,height:a.clientHeight};d.width==0&&d.height==0&&a.currentStyle&&a.currentStyle.hasLayout===false&&(d=Dottoro.GetSize(a,Dottoro.BOX_SCROLLBAR));if(Dottoro.isIE&&(c=a.nodeName.toLowerCase(),c=="img"||c==
"input"&&a.type.toLowerCase()=="image"))d=Dottoro.GetSize(a,Dottoro.BOX_SCROLLBAR);b==Dottoro.BOX_INNER&&(d.width-=Dottoro.GetPixelLength(a,"paddingLeft")+Dottoro.GetPixelLength(a,"paddingRight"),d.height-=Dottoro.GetPixelLength(a,"paddingTop")+Dottoro.GetPixelLength(a,"paddingBottom"))}else{if(a.getBoundingClientRect)d=a.getBoundingClientRect(),d={width:d.right-d.left,height:d.bottom-d.top},c=Dottoro.GetZoomFactor(c),d.width=Math.round(d.width/c),d.height=Math.round(d.height/c);else if(d={width:a.offsetWidth,
height:a.offsetHeight},c.documentElement===a)c=Dottoro.GetZoomFactor(c),d.width=Math.round(d.width/c),d.height=Math.round(d.height/c);switch(b){case Dottoro.BOX_SCROLLBAR:d.width-=Dottoro.GetPixelLength(a,"borderLeftWidth")+Dottoro.GetPixelLength(a,"borderRightWidth");d.height-=Dottoro.GetPixelLength(a,"borderTopWidth")+Dottoro.GetPixelLength(a,"borderBottomWidth");break;case Dottoro.BOX_MARGIN:d.width+=Dottoro.GetPixelLength(a,"marginLeft")+Dottoro.GetPixelLength(a,"marginRight"),d.height+=Dottoro.GetPixelLength(a,
"marginTop")+Dottoro.GetPixelLength(a,"marginBottom")}}return d};
Dottoro.GetLeftTopInClient=function(a,b){var c=a.ownerDocument;if(!c)return{left:0,top:0};if(a===c.documentElement)return{left:0,top:0};if(a.getBoundingClientRect){var d=a.getBoundingClientRect(),e=d.left,d=d.top;Dottoro.isIE&&(e-=c.documentElement.clientLeft,d-=c.documentElement.clientTop,c=Dottoro.GetZoomFactor(c),c!=1&&(e=Math.round(e/c),d=Math.round(d/c)));e=Math.round(e);d=Math.round(d);e={left:e,top:d}}else e=Dottoro.GetOffsetLeftTopInClient(a),c=Dottoro.GetScrollLeftTopInClient(a),e={left:e.left-
c.left,top:e.top-c.top};if(!b)b=Dottoro.BOX_BORDER;switch(b){case Dottoro.BOX_INNER:case Dottoro.BOX_PADDING:c=a.clientLeft;d=a.clientTop;c==0&&d==0&&a.currentStyle&&a.currentStyle.hasLayout===false&&(c=Dottoro.GetPixelLength(a,"borderLeftWidth"),d=Dottoro.GetPixelLength(a,"borderTopWidth"));b==Dottoro.BOX_INNER&&(c+=Dottoro.GetPixelLength(a,"paddingLeft"),d+=Dottoro.GetPixelLength(a,"paddingTop"));e.left+=c;e.top+=d;break;case Dottoro.BOX_SCROLLBAR:e.left+=Dottoro.GetPixelLength(a,"borderLeftWidth");
e.top+=Dottoro.GetPixelLength(a,"borderTopWidth");break;case Dottoro.BOX_MARGIN:e.left-=Dottoro.GetPixelLength(a,"marginLeft"),e.top-=Dottoro.GetPixelLength(a,"marginTop")}return e};Dottoro.RepairBodyLeftTopOffset={};Dottoro.RepairLeftTopOffset={};Dottoro.RepairCellLeftTopOffset={};
Dottoro.GetOffsetLeftTopInClient=function(a){var b=a.ownerDocument;if(!b)return{left:0,top:0};if(a===b.documentElement)return{left:0,top:0};if(a===b.body){var b=Dottoro.GetPixelLength(a,"marginLeft"),c=Dottoro.GetPixelLength(a,"marginTop"),d=Dottoro.GetStyle(a,"position");if(d=="absolute"||d=="relative"||d=="fixed")b+=Dottoro.GetPixelLength(a,"left"),c+=Dottoro.GetPixelLength(a,"top");return{left:b,top:c}}var e={left:a.offsetLeft,top:a.offsetTop},f=a.offsetParent;if(!f)return e;d=Dottoro.GetStyle(a,
"position");if(d=="fixed")return e;var a=Dottoro.GetOffsetLeftTopInClient(f),c=Dottoro.GetStyle(f,"position"),g=c=="absolute"||c=="relative"||c=="fixed",h=Dottoro.GetStyle(f,"overflow");if(d=="absolute"&&f===b.body&&!g)return e;var j=null;if(f===b.body)Dottoro.RepairBodyLeftTopOffset.hasOwnProperty(d)||(Dottoro.RepairBodyLeftTopOffset[d]={}),Dottoro.RepairBodyLeftTopOffset[d].hasOwnProperty(c)||(Dottoro.RepairBodyLeftTopOffset[d][c]={}),j=Dottoro.RepairBodyLeftTopOffset[d][c];else if(g)Dottoro.RepairLeftTopOffset.hasOwnProperty(d)||
(Dottoro.RepairLeftTopOffset[d]={}),Dottoro.RepairLeftTopOffset[d].hasOwnProperty(h)||(Dottoro.RepairLeftTopOffset[d][h]={}),j=Dottoro.RepairLeftTopOffset[d][h];else if(f.tagName.toLowerCase()=="td"||f.tagName.toLowerCase()=="th")Dottoro.RepairCellLeftTopOffset.hasOwnProperty(d)||(Dottoro.RepairCellLeftTopOffset[d]={}),Dottoro.RepairCellLeftTopOffset[d].hasOwnProperty(h)||(Dottoro.RepairCellLeftTopOffset[d][h]={}),j=Dottoro.RepairCellLeftTopOffset[d][h];if(j){if(!j.hasOwnProperty("margin")){if(f===
b.body){h=Dottoro.CreateDummyElem(b,"iframe");h.style.position="absolute";b.body.appendChild(h);var k=h.contentWindow.document;k.open();k.write("<html><head></head><body></body></html>");k.close();g=k.body;g.style.marginLeft="2px";g.style.borderLeft="10px solid black";g.style.left="50px";g.style.position=c;c=Dottoro.CreateDummyElem(k,"div");c.style.position=d;g.appendChild(c);d=c.offsetLeft-10;b.body.removeChild(h)}else g?(c=Dottoro.CreateDummyElem(b,"div"),c.style.position="absolute",c.style.overflow=
h,c.style.marginLeft="2px",c.style.borderLeft="10px solid black",c.style.left="50px"):(c=Dottoro.CreateDummyElem(b,"td"),c.style.overflow=h,c.style.marginLeft="2px",c.style.borderLeft="10px solid black"),h=Dottoro.CreateDummyElem(b,"div"),h.style.position=d,c.appendChild(h),b.body.appendChild(c),d=h.offsetLeft-10,b.body.removeChild(c);j.margin=0;j.border=0;j.pos=0;for(b=-2;b<=2;b++)for(c=-2;c<=2;c++)for(h=-2;h<=2;h++)if(d==b*2+c*10+h*50){j.margin=b;j.border=c;j.pos=h;break}}j.margin&&(b=Dottoro.GetPixelLength(f,
"marginLeft"),c=Dottoro.GetPixelLength(f,"marginTop"),a.left-=j.margin*b,a.top-=j.margin*c);j.border&&(d=Dottoro.GetPixelLength(f,"borderLeftWidth"),b=Dottoro.GetPixelLength(f,"borderTopWidth"),a.left-=j.border*d,a.top-=j.border*b);j.pos&&(d=Dottoro.GetPixelLength(f,"left"),f=Dottoro.GetPixelLength(f,"top"),a.left-=j.pos*d,a.top-=j.pos*f)}Dottoro.OffsetCoords(e,a.left,a.top);return e};
Dottoro.GetScrollLeftTopInClient=function(a){var b,c,d=a.ownerDocument;if(!d)return{left:0,top:0};if(a===d.documentElement)return{left:0,top:0};var e=Dottoro.GetStyle(a,"position");if(e=="fixed")return{left:0,top:0};return(a=e=="absolute"?a.offsetParent:a.parentNode)?(a===d.documentElement?(b=Dottoro.GetDocScrollLeft(d),c=Dottoro.GetDocScrollTop(d)):!Dottoro.isIE&&a===d.body?(b=0,c=0):(b=a.scrollLeft,c=a.scrollTop),d=Dottoro.GetScrollLeftTopInClient(a),{left:b+d.left,top:c+d.top}):{left:0,top:0}};
Dottoro.GetBox=function(a,b){var c=Dottoro.GetSize(a,b),d=Dottoro.GetLeftTopInClient(a,b);return{left:d.left,top:d.top,width:c.width,height:c.height,right:d.left+c.width,bottom:d.top+c.height}};Dottoro.RepairScrollLength={};
Dottoro.GetScrollMax=function(a){var b=a.ownerDocument;if(!b)return{x:0,y:0};var c=Dottoro.GetSize(a,Dottoro.BOX_PADDING),d=Dottoro.GetSize(a,Dottoro.BOX_SCROLLBAR),e=d.height-c.height,d=d.width-c.width;if(!e&&!d)return{x:0,y:0};if(!Dottoro.RepairScrollLength.hasOwnProperty("width")){var f=Dottoro.CreateDummyElem(b,"div");f.style.position="absolute";f.style.overflow="scroll";f.style.width="100px";f.style.height="100px";var g=Dottoro.CreateDummyElem(b,"div");g.style.width="1000px";g.style.height="1000px";
f.appendChild(g);b.body.appendChild(f);var h=Dottoro.GetSize(a,Dottoro.BOX_PADDING),j=Dottoro.GetSize(a,Dottoro.BOX_SCROLLBAR),g=j.height-h.height,h=j.width-h.width;if(g&&h){Dottoro.RepairScrollLength.width=0;if((f.scrollWidth-1E3)%g==0)Dottoro.RepairScrollLength.width=(f.scrollWidth-1E3)/h;Dottoro.RepairScrollLength.height=0;if((f.scrollHeight-1E3)%h==0)Dottoro.RepairScrollLength.height=(f.scrollHeight-1E3)/g}b.body.removeChild(f)}b=a.scrollWidth-Dottoro.RepairScrollLength.width*d;a=a.scrollHeight-
Dottoro.RepairScrollLength.height*e;e=e?Math.max(b-c.width,0):0;c=d?Math.max(a-c.height,0):0;return{x:e,y:c}};Dottoro.GetClientWinWidth=function(a){a||(a=document);var b=Dottoro.GetZoomFactor(a);return Math.round(a.documentElement.clientWidth/b)};Dottoro.GetClientWinHeight=function(a){a||(a=document);var b=Dottoro.GetZoomFactor(a);return Math.round(a.documentElement.clientHeight/b)};
Dottoro.GetDocScrollLeft=function(a){a||(a=document);var b=Dottoro.GetWinFromDoc(a);if("pageXOffset"in b)return b.pageXOffset;b=Dottoro.GetZoomFactor(a);return Math.round(a.documentElement.scrollLeft/b)};Dottoro.GetDocScrollTop=function(a){a||(a=document);var b=Dottoro.GetWinFromDoc(a);if("pageYOffset"in b)return b.pageYOffset;b=Dottoro.GetZoomFactor(a);return Math.round(a.documentElement.scrollTop/b)};
Dottoro.GetDocScrollMax=function(a){a||(a=document);var b=Dottoro.GetWinFromDoc(a);if("scrollMaxX"in b)var c=b.scrollMaxX,a=b.scrollMaxY;else c=a.documentElement.scrollWidth-a.documentElement.clientWidth,a=a.documentElement.scrollHeight-a.documentElement.clientHeight;return{x:c,y:a}};
Dottoro.GetMouseClientCoords=function(a,b){var c={x:a.clientX,y:a.clientY};if(Dottoro.isIE){b||(b=a.srcElement&&a.srcElement.ownerDocument?a.srcElement.ownerDocument:document);c.x-=b.documentElement.clientLeft;c.y-=b.documentElement.clientTop;var d=Dottoro.GetZoomFactor(b);if(d!=1)c.x=Math.round(c.x/d),c.y=Math.round(c.y/d)}return c};
Dottoro.Ajax={URLEncodeArray:function(a){var b="",c=true;for(i in a)c||(b+="&"),c=false,b+=Dottoro.IsObject(a[i])?encodeURIComponent(i)+"="+encodeURIComponent(Dottoro.JSONEncode(a[i])):encodeURIComponent(i)+"="+encodeURIComponent(""+a[i]);return b},PostRequest:function(a,b,c,d){c||(c={});c.method="POST";return Dottoro.Ajax.SendRequest(a,b,c,d)},GetRequest:function(a,b,c,d){c||(c={});c.method="GET";return Dottoro.Ajax.SendRequest(a,b,c,d)},SendRequest:function(a,b,c,d){var e={method:"POST",async:false,
contentType:"application/x-www-form-urlencoded",silent:false,callback:null,callbackOnError:null,responseType:"json"};if(c)for(var f in c)e[f]=c[f];f=e.method.toLowerCase()=="get";d||(d=Dottoro.CreateHTTPRequestObject());if(!d)return e.silent||alert("Sorry, your browser does not support this service!"),Dottoro.Ajax.CallUserFunc(true,{error:"cannot_create_http"},d,e),null;c=null;b&&(c=Dottoro.IsObject(b)?Dottoro.Ajax.URLEncodeArray(b):b);f&&(c&&(a+=a.indexOf("?")>=0?"&"+c:"?"+c),c=null);b=true;try{d.open(e.method,
a,e.async);d.setRequestHeader("Content-Type",e.contentType);if(e.async)d.onreadystatechange=function(){Dottoro.Ajax.OnReadyStateChanged(d,e)};d.send(c)}catch(g){b=false}return!b?(Dottoro.Ajax.DisplayConnectError(d,e),Dottoro.Ajax.CallUserFunc(true,{error:"cannot_connect"},d,e),null):e.async?b:Dottoro.Ajax.GetResponse(d,e)},DisplayConnectError:function(a,b){if(!b.silent){var c="Cannot get data from the server.";c+="\n Maybe no connection to the Internet is currently available or the target url is temporarily unavailable.";
c+="\n\n (status code: "+a.status+", status text: "+a.statusText+")";alert(c)}},GetResponse:function(a,b){if(!Dottoro.IsRequestSuccessful(a)||!a.responseText)return Dottoro.Ajax.DisplayConnectError(a,b),Dottoro.Ajax.CallUserFunc(true,{error:"no_response"},a,b),null;if(b.responseType=="xml"){var c=a.responseXML;if(!c||!c.documentElement){Dottoro.Ajax.CallUserFunc(true,{error:"invalid_response"},a,b);return}Dottoro.Ajax.CallUserFunc(false,c,a,b);return c}if(b.responseType=="json"){c=Dottoro.JSONDecode(a.responseText);
if(c!==void 0){if("error"in c){Dottoro.Ajax.CallUserFunc(true,c,a,b);return"errordetails"in c&&!b.silent?(alert(c.errordetails),null):c}if("body"in c)return Dottoro.Ajax.CallUserFunc(false,c.body,a,b),c}Dottoro.Ajax.CallUserFunc(true,{error:"invalid_response"},a,b)}else return c=a.responseText,Dottoro.Ajax.CallUserFunc(false,c,a,b),c},OnReadyStateChanged:function(a,b){a.readyState==4&&Dottoro.Ajax.GetResponse(a,b)},CallUserFunc:function(a,b,c,d){a?d.callbackOnError&&Dottoro.CallUserFunc(d.callbackOnError,
[b,c,d]):d.callback&&Dottoro.CallUserFunc(d.callback,[b,c,d])}};Dottoro.domReadyHandlers=[];Dottoro.domReadyInterID=null;Dottoro.domReadyMethods=[];Dottoro.collectedTags={};Dottoro.collectedTagNames=["a"];Dottoro.isDOMReady=false;Dottoro.CollectTagsByTagNames=function(a,b){b||(b=document);for(var c={},d=0;d<a.length;d++)c[a[d]]=b.getElementsByTagName(a[d]);return c};Dottoro.HideFocus=function(a){if(a)for(var b=0;b<a.length;b++)a[b].hideFocus=true};
Dottoro.OnDOMReady=function(){if(!(Dottoro.domReadyInterID!==null&&(!document.body||document.readyState!="complete"&&document.readyState!="loaded"))){Dottoro.isDOMReady=true;Dottoro.RemoveDetachEvent(Dottoro.domReadyHandlers);Dottoro.domReadyHandlers=[];if(Dottoro.domReadyInterID!==null)clearInterval(Dottoro.domReadyInterID),Dottoro.domReadyInterID=null;Dottoro.collectedTags=Dottoro.CollectTagsByTagNames(Dottoro.collectedTagNames);for(var a=0;a<Dottoro.domReadyMethods.length;a++){var b=Dottoro.domReadyMethods[a];
if(Dottoro.IsArray(b))b[0][b[1]]();else b()}Dottoro.domReadyMethods=[];Dottoro.collectedTags={}}};Dottoro.domReadyHandlers.push(Dottoro.AddAttachEvent("load",Dottoro.OnDOMReady,window));
if(document.addEventListener)Dottoro.domReadyHandlers.push(Dottoro.AddAttachEvent("DOMContentLoaded",Dottoro.OnDOMReady,document));else if(document.attachEvent)Dottoro.domReadyHandlers.push(Dottoro.AddAttachEvent("readystatechange",Dottoro.OnDOMReady,document)),Dottoro.domReadyInterID=setInterval(Dottoro.OnDOMReady,1);Dottoro.AddAttachEvent("unload",Dottoro.RemoveHandlersOnUnload,window);
Dottoro.Effect=Dottoro.ClassEvents.extend({init:function(a,b){this._super();this.type="";this.timerID=null;this.back=false;this.SetElem(a);this.SetMotion(b)},GetType:function(){return this.type},SetElem:function(a){this.elem=a},GetElem:function(){return this.elem},SetMotion:function(a){this.motion=a},GetMotion:function(){return this.motion},Start:function(a){if(!this.fireDrEvent("effect_start")){this.Stop();if(!a){var b=this;this.timerID=setInterval(function(){b.Next()},15)}this.Update()}},Stop:function(){if(this.timerID&&
!this.fireDrEvent("effect_stop"))clearInterval(this.timerID),this.timerID=null},Next:function(){if(this.fireDrEvent("effect_beforestep"))return false;if(!this.DoNext())return false;this.Update();this.fireDrEvent("effect_afterstep");return true},DoNext:function(){return(this.back?this.motion.Prev():this.motion.Next())===null?(this.Stop(),false):true},IsRunning:function(){return this.timerID!=null},TurnBack:function(){this.back=!this.back},SetBack:function(a){this.back=a},Now:function(){return this.motion.Now()},
IsStartState:function(){return this.motion.IsStartState()},Update:function(){}});Dottoro.Effect_Move=Dottoro.Effect.extend({init:function(a,b,c){this._super(a,b);this.type="move";this.corner=c?c:"lt"},Update:function(){var a=this.Now();this.corner=="lt"||this.corner=="lb"?this.elem.style.left=a.x+"px":this.elem.style.right=a.x+"px";this.corner=="lt"||this.corner=="rt"?this.elem.style.top=a.y+"px":this.elem.style.bottom=a.y+"px"}});
Dottoro.Effect_Resize=Dottoro.Effect.extend({init:function(a,b){this._super(a,b);this.type="resize"},Update:function(){var a=this.Now();this.elem.style.width=a.x+"px";this.elem.style.height=a.y+"px"}});
Dottoro.Effect_Clip=Dottoro.Effect.extend({init:function(a,b,c){this._super(a,{lt:b,rb:c});this.type="clip"},DoNext:function(){var a=this.back?this.motion.lt.Prev():this.motion.lt.Next(),b=this.back?this.motion.rb.Prev():this.motion.rb.Next();return!a&&!b?(this.Stop(),false):true},Now:function(){lt=this.motion.lt.Now();rb=this.motion.rb.Now();return{left:lt.x,top:lt.y,right:rb.x,bottom:rb.y}},IsStartState:function(){return this.motion.lt.IsStartState()&&this.motion.rb.IsStartState()},Update:function(){var a=
this.Now();this.elem.style.clip="rect("+a.top+"px "+a.right+"px "+a.bottom+"px "+a.left+"px)"}});Dottoro.Effect_Fade=Dottoro.Effect.extend({init:function(a,b){this._super(a,b);this.type="fade"},Update:function(){var a=this.Now();Dottoro.SetOpacity(this.elem,a)}});
Dottoro.EffectGroup=Dottoro.ClassEvents.extend({init:function(a){this._super();this.SetEffects(a)},SetEffects:function(a){this.effects=a},GetEffects:function(){return this.effects},Start:function(){if(!this.fireDrEvent("effectgroup_start")){for(var a=0;a<this.effects.length;a++)this.effects[a].Start(true);var b=this;this.timerID=setInterval(function(){b.Next()},15)}},Stop:function(){if(this.timerID&&!this.fireDrEvent("effectgroup_stop"))clearInterval(this.timerID),this.timerID=null},Next:function(){if(this.fireDrEvent("effectgroup_beforestep"))return false;
for(var a=true,b=0;b<this.effects.length;b++)this.effects[b].Next()&&(a=false);if(a)this.Stop();else return this.fireDrEvent("effectgroup_afterstep"),true},IsRunning:function(){return this.timerID!=null},TurnBack:function(){for(var a=0;a<this.effects.length;a++)this.effects[a].TurnBack()},SetBack:function(a){for(var b=0;b<this.effects.length;b++)this.effects[b].SetBack(a)},IsStartState:function(){for(var a=0;a<this.effects.length;a++)if(!this.effects[a].IsStartState())return false;return true}});
Dottoro.Gallery=Dottoro.ClassEventsSettings.extend({init:function(){this._super();this.initSettings();this.groupImgs=[];this.images=[];this.magnifier_anims=[];this.on_show=false;this.curr_step=this.img_idx=0;this.prev_idx=null;this.duringResize=false;this.initW=300;this.initH=130;this.preloader_bg_x=0;this.eventHandlers=[];this.mag_interval=this.preloader_interval=this.interval=this.mediaTag=null;return this},initSettings:function(){this.settings.magnifier_width=0;this.settings.magnifier_height=0;
this.settings.stepnum=20;this.settings.playinterval=6;this.settings.autoplay=true;this.settings.magnifier=true},Activate:function(){this.buildFrame();this.createPreloader();this.createModal();this.initValues()},addImage:function(a){this.images.push(a)},buildFrame:function(){this.eventHandlers.push(Dottoro.AddAttachEvent("resize",[this,"onBodyResize"],document));this.eventHandlers.push(Dottoro.AddAttachEvent("resize",[this,"onBodyResize"],document.body));this.eventHandlers.push(Dottoro.AddAttachEvent("resize",
[this,"onBodyResize"],window));this.eventHandlers.push(Dottoro.AddAttachEvent("scroll",[this,"onBodyScroll"],document));this.eventHandlers.push(Dottoro.AddAttachEvent("scroll",[this,"onBodyScroll"],document.body));this.eventHandlers.push(Dottoro.AddAttachEvent("scroll",[this,"onBodyScroll"],window));this.eventHandlers.push(Dottoro.AddAttachEvent("mousewheel",[this,"onBodyScroll"],document));this.eventHandlers.push(Dottoro.AddAttachEvent("mousewheel",[this,"onBodyScroll"],document.body));this.eventHandlers.push(Dottoro.AddAttachEvent("DOMScroll",
[this,"onBodyScroll"],document));this.gallery=Dottoro.CreateElement("table",null,{className:"dr_gallery",cellPadding:0,cellSpacing:0,border:0});this.eventHandlers.push(Dottoro.AddAttachEvent("scroll",Dottoro.CancelEvent,this.gallery));this.eventHandlers.push(Dottoro.AddAttachEvent("mousewheel",Dottoro.CancelEvent,this.gallery));this.eventHandlers.push(Dottoro.AddAttachEvent("DOMScroll",Dottoro.CancelEvent,this.gallery));var a=Dottoro.CreateElement("tbody",this.gallery),b=a.insertRow(0).insertCell(0);
this.img_wrapper=Dottoro.CreateElement("div",b,{className:"dr_gallery_img_wrapper"},{width:this.initW+"px",height:this.initH+"px"});this.images.length>1&&this.createPrevNextButton();this.eventHandlers.push(Dottoro.AddAttachEvent("mouseover",[this,"displayButtons"],this.img_wrapper));this.eventHandlers.push(Dottoro.AddAttachEvent("mouseout",[this,"displayButtons"],this.img_wrapper));this.buildTitleBar(a.insertRow(1).insertCell(0));this.buildBottomBar(a.insertRow(2).insertCell(0))},buildTitleBar:function(a){this.title_bar=
Dottoro.CreateElement("div",a,{className:"dr_gallery_title"});this.title_a=Dottoro.CreateElement("a",this.title_bar,{},{border:"none","text-decoration":"none",cursor:"pointer"})},setTitle:function(a,b){if(b){var c=window.location.host,d=this.getHostname(b);this.title_a.setAttribute("target",d&&d!=""?d.indexOf(c)==0?"_self":"_blank":"_self");this.title_a.setAttribute("href",b);this.title_a.style.cursor="pointer"}else this.title_a.removeAttribute("target"),this.title_a.removeAttribute("href"),this.title_a.style.cursor=
"text",this.title_a.style.textDecoration="none";this.title_a.innerHTML=a},getHostname:function(a){return(a=a.match(/^(?:f|ht)tp(?:s)?:\/\/([^/]+)/im))&&a.length>0?a[1].toString():""},buildBottomBar:function(a){this.bottom_bar=Dottoro.CreateElement("div",a,{className:"dr_gallery_bottom_bar"});this.bottom_table=Dottoro.CreateElement("table",this.bottom_bar,{cellPadding:0,cellSpacing:0,border:0,width:"100%"});var b=Dottoro.CreateElement("tbody",this.bottom_table).insertRow(0),a=b.insertCell(0);this.bottom_autoplay=
Dottoro.CreateElement("a",a,{className:this.settings.autoplay?"dr_gallery_bottom_pause":"dr_gallery_bottom_play"});this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"toggleAutoplay"],this.bottom_autoplay));a=b.insertCell(1);this.bottom_prev_button=Dottoro.CreateElement("a",a,{className:"dr_gallery_bottom_prev_button"});this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"showPrevImage"],this.bottom_prev_button));a=b.insertCell(2);this.bottom_counter=Dottoro.CreateElement("span",
a,{className:"dr_gallery_bottom_counter"});a=b.insertCell(3);this.bottom_next_button=Dottoro.CreateElement("a",a,{className:"dr_gallery_bottom_next_button"});this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"showNextImage"],this.bottom_next_button));a=Dottoro.CreateElement("td",b,{align:"right"},{width:"100%",textAlign:"right"});this.bottom_close=Dottoro.CreateElement("a",a,{className:"dr_gallery_bottom_close"});this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"Hide"],this.bottom_close))},
createPrevNextButton:function(){this.prev_button=Dottoro.CreateElement("div",this.img_wrapper,{className:"dr_gallery_prev_button"},{display:"none"});this.next_button=Dottoro.CreateElement("div",this.img_wrapper,{className:"dr_gallery_next_button"},{display:"none"});this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"showPrevImage"],this.prev_button));this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"showNextImage"],this.next_button))},createPreloader:function(){this.preloader=
Dottoro.CreateElement("div",this.img_wrapper,{className:"dr_gallery_preloader"})},addPreloader:function(){this.preloader.style.left=Math.round(this.img_wrapper.offsetWidth-this.preloaderW)/2+"px";this.preloader.style.top=Math.round(this.img_wrapper.offsetHeight-this.preloaderH)/2+"px";this.img_wrapper.appendChild(this.preloader);if(this.preloader_interval==null){var a=this;this.preloader_interval=window.setInterval(function(){a.animatePreloader()},100)}},animatePreloader:function(){this.preloader_bg_x-=
this.preloaderW;this.preloader_bg_x=this.preloader_bg_x<=-12*this.preloaderW?0:this.preloader_bg_x;this.preloader.style.backgroundPosition=this.preloader_bg_x+"px 0px"},resetPreloader:function(){Dottoro.RemoveNode(this.preloader);this.preloader_bg_x=0;this.preloader.style.backgroundPosition="0px 0px";window.clearInterval(this.preloader_interval);this.preloader_interval=null},createModal:function(){this.modalBG=Dottoro.CreateElement("div",null,{className:"dr_gallery_modal_bg"});this.eventHandlers.push(Dottoro.AddAttachEvent("click",
[this,"Hide"],this.modalBG));this.eventHandlers.push(Dottoro.AddAttachEvent("scroll",Dottoro.CancelEvent,this.modalBG));this.eventHandlers.push(Dottoro.AddAttachEvent("mousewheel",Dottoro.CancelEvent,this.modalBG));this.eventHandlers.push(Dottoro.AddAttachEvent("DOMScroll",Dottoro.CancelEvent,this.modalBG))},resizeModal:function(){this.modalBG.style.position="absolute";this.modalBG.style.width=document.documentElement.scrollWidth+"px";this.modalBG.style.height=document.documentElement.scrollHeight+
"px";this.modalBG.style.display="block"},initValues:function(){this.gallery.style.left="-10000px";document.body.appendChild(this.gallery);this.extraW=this.gallery.offsetWidth-this.initW;this.extraH=this.gallery.offsetHeight-this.initH;this.title_init_H=this.title_bar.offsetHeight;this.title_H=0;this.preloaderW=this.preloader.offsetWidth;this.preloaderH=this.preloader.offsetHeight;this.resetPreloader();Dottoro.RemoveNode(this.gallery)},showGroup:function(a){Dottoro.CancelEvent(a);this.hideMagnifiers();
this.on_show=true;this.Show();return false},GetGroupImages:function(a){this.groupImgs=[];this.img_idx=0;var b=a.settings.group;if(b)for(var b=b.split(","),c=0;c<this.images.length;c++){if(!a.settings.add_to_gallery){var d=this.images[c].settings.src,e=this.images[c].settings.image_id;if(d&&d==a.settings.src||e>0&&e==a.settings.image_id)this.img_idx=this.groupImgs.length}if(this.images[c]===a)this.img_idx=this.groupImgs.length;d=this.images[c].settings.group;d=d.split(",");for(e=0;e<b.length;e++)for(var f=
0;f<d.length;f++)if(b[e]==d[f]){this.groupImgs.push(this.images[c]);e=b.length;break}}},InArray:function(a,b){var c="";for(c in b)if(b[c]===a)return true;return false},Show:function(){this.changeCounter();this.getClientRect();this.alignToCenter(0,0);Dottoro.isIE6&&this.resizeModal();document.body.appendChild(this.modalBG);document.body.appendChild(this.gallery);this.gallery.style.display="";this.modalBG.style.display="";this.addPreloader();this.loadImage()},Hide:function(){this.gallery.style.display=
"none";this.modalBG.style.display="none";this.ClearInterval();Dottoro.RemoveNode(this.gallery);Dottoro.RemoveNode(this.modalBG);if(this.mediaTag){for(var a=this.mediaTag.getElementsByTagName("object"),b=0;b<a.length;b++)for(var c in a[b])if(typeof a[b][c]=="function")try{a[b][c]=null}catch(d){}try{this.mediaTag.innerHTML=""}catch(e){}if(this.mediaTag.parentNode==this.img_wrapper)this.img_wrapper.removeChild(this.mediaTag),this.img_wrapper.style.width=this.initW+"px",this.img_wrapper.style.height=
this.initH+"px"}this.mediaTag=null;this.on_show=false},loadImage:function(){this.mediaTag=null;var a=this.groupImgs[this.img_idx],b=a.settings.src;if(b){var c=a.settings.width?a.settings.width:400,d=a.settings.height?a.settings.height:200,e=a.settings.wmode?a.settings.wmode:"opaque";switch(a.type){case "image":this.mediaTag=new Image;this.eventHandlers.push(Dottoro.AddAttachEvent("load",[this,"onImageLoad"],this.mediaTag));this.mediaTag.setAttribute("src",b);break;case "flash":var a=Dottoro.CreateElement("div",
null,{className:"dr_gallery_flash"}),f='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+c+'" height="'+d+'" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab">',g={allowfullscreen:true,allowscriptaccess:"always",movie:b,wmode:e},h;for(h in g)f+='<param name="'+h+'" value="'+g[h]+'" />';f+='<embed src="'+b+'" width="'+c+'" height="'+d+'" wmode="'+e+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
f+="</object>";a.innerHTML=f;this.mediaTag=a;this.InitFrameResize();break;case "quicktime":a=Dottoro.CreateElement("div",null,{className:"dr_gallery_quicktime"});f='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+c+'" height="'+d+'" codebase="http://www.apple.com/qtactivex/qtplugin.cab" style="visibility:hidden">';g={src:b,autoplay:true,type:"video/quicktime",scale:"tofit",wmode:e};for(h in g)f+='<param name="'+h+'" value="'+g[h]+'" />';f+='<embed src="'+b+'" width="'+c+'" height="'+
d+'" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" autoplay="true" style="visibility:hidden"></embed>';f+="</object>";a.innerHTML=f;this.mediaTag=a;this.InitFrameResize();break;case "iframe":this.mediaTag=Dottoro.CreateElement("iframe",null,{className:"dr_gallery_iframe"},{frameBorder:"no",src:b,width:c,height:d});break;case "inline":this.mediaTag=Dottoro.CreateElement("div",null,{className:"dr_gallery_inline"}),this.mediaTag.innerHTML=b}}},onImageLoad:function(a,b){var c=
this.groupImgs[this.img_idx];if(!c.settings.width||c.settings.width=="")c.settings.width=b.width;if(!c.settings.height||c.settings.height=="")c.settings.height=b.height;this.InitFrameResize()},displayButtons:function(a){if(this.groupImgs.length>1)a.type.toLowerCase()=="mouseover"?(this.prev_button.style.display="block",this.next_button.style.display="block"):(this.prev_button.style.display="none",this.next_button.style.display="none")},showPrevImage:function(){this.ClearInterval();this.prev_idx=this.img_idx;
this.img_idx=this.img_idx>=1?this.img_idx-1:this.groupImgs.length-1;this.changeImage()},showNextImage:function(){this.ClearInterval();this.prev_idx=this.img_idx;this.img_idx=this.img_idx<this.groupImgs.length-1?this.img_idx+1:0;this.changeImage()},toggleAutoplay:function(){this.settings.autoplay?(this.bottom_autoplay.className="dr_gallery_bottom_play",this.settings.autoplay=false,this.duringResize||this.ClearInterval()):(this.bottom_autoplay.className="dr_gallery_bottom_pause",this.startAutoplay())},
startAutoplay:function(){this.settings.autoplay=true;var a=this;this.interval=window.setInterval(function(){a.showNextImage()},this.settings.playinterval*1E3)},changeImage:function(){if(this.mediaTag){if(this.mediaTag.parentNode==this.img_wrapper&&(this.img_wrapper.removeChild(this.mediaTag),this.mediaTag.innerHTML))this.mediaTag.innerHTML="";this.addPreloader();this.loadImage()}},InitFrameResize:function(){var a=this.groupImgs[this.img_idx];a.settings.title_as_link?this.setTitle(a.settings.title,
a.settings.permalink):this.setTitle(a.settings.title,null);this.startSizes={width:this.prev_idx===null?this.initW:this.img_wrapper.offsetWidth,height:this.prev_idx===null?this.initH:this.img_wrapper.offsetHeight};if(this.interval==null){var b=this;this.interval=window.setInterval(function(){b.resizeFrame()},20);this.duringResize=true}},resizeFrame:function(){var a=this.curr_step==this.settings.stepnum;this.getClientRect();this.calculateNewSize();if(a){var b=this.endSizes.width,c=this.endSizes.height;
this.changeCounter()}else c=this.curr_step/this.settings.stepnum,b=this.startSizes.width+Math.round((this.endSizes.width-this.startSizes.width)*c),c=this.startSizes.height+Math.round((this.endSizes.height-this.startSizes.height)*c);this.alignToCenter(b+this.extraW,c+this.extraH+this.title_H);this.img_wrapper.style.width=b+"px";this.img_wrapper.style.height=c+"px";this.preloader.style.left=Math.round(b-this.preloaderW)/2+"px";this.preloader.style.top=Math.round(c-this.preloaderH)/2+"px";if(a){this.preloader.parentNode&&
this.preloader.parentNode===this.img_wrapper&&this.resetPreloader();if(!this.mediaTag){this.ClearInterval();this.duringResize=false;this.setTitle(null,null);return}this.mediaTag.style.width=b+"px";this.mediaTag.style.height=c+"px";this.img_wrapper.appendChild(this.mediaTag);if(this.groupImgs[this.img_idx].type=="quicktime"){var d=this;window.setTimeout(function(){d.repairQuickTime()},1)}this.ClearInterval();this.duringResize=false;if(this.settings.autoplay&&this.groupImgs.length>1)a=this.groupImgs[this.img_idx].type,
a!="flash"&&a!="quicktime"?this.startAutoplay():this.toggleAutoplay()}this.curr_step++},repairQuickTime:function(){var a=this.mediaTag.getElementsByTagName("object");if(a.length>0)a[0].style.visibility="visible";a=this.mediaTag.getElementsByTagName("embed");if(a.length>0)a[0].style.visibility="visible"},alignToCenter:function(a,b){this.getClientRect();var b=b==0?this.extraH+this.initH+this.title_H:b,a=a==0?this.extraW+this.initW:a,c=this.scrollT+(this.clientH-b)/2;this.gallery.style.left=this.scrollL+
(this.clientW-a)/2+"px";this.gallery.style.top=c+"px"},onBodyScroll:function(){this.gallery.parentNode==document.body&&(this.getClientRect(),this.alignToCenter(this.gallery.offsetWidth,this.gallery.offsetHeight))},onBodyResize:function(){if(this.gallery.parentNode==document.body&&(this.getClientRect(),this.alignToCenter(this.gallery.offsetWidth,this.gallery.offsetHeight),Dottoro.isIE6)){this.modalBG.style.display="none";var a=this;window.setTimeout(function(){a.resizeModal()},1)}},changeCounter:function(){this.bottom_counter.innerHTML=
this.img_idx+1+" / "+this.groupImgs.length},getClientRect:function(){this.clientW=Dottoro.GetClientWinWidth(document);this.clientH=Dottoro.GetClientWinHeight(document);this.scrollT=Dottoro.GetDocScrollTop(document);this.scrollL=Dottoro.GetDocScrollLeft(document)},calculateNewSize:function(){var a=this.groupImgs[this.img_idx].settings;this.title_H=this.title_bar.offsetHeight-this.title_init_H;var b=a.width/(this.clientW-this.extraW),c=a.height/(this.clientH-this.extraH-this.title_H);this.endSizes=
b<=1&&c<=1?{width:a.width,height:a.height}:b>c?{width:Math.floor(a.width/b),height:Math.floor(a.height/b)}:{width:Math.floor(a.width/c),height:Math.floor(a.height/c)}},addToMagnifierAnims:function(a){for(var b=false,c=0;c<this.magnifier_anims.length;c++)if(a==this.magnifier_anims[c]){b=true;break}b||this.magnifier_anims.push(a);if(this.mag_interval==null){var d=this;this.mag_interval=window.setInterval(function(){d.changeMagnifierOpacity()},20)}},changeMagnifierOpacity:function(){var a=this.magnifier_anims;
if(a.length>0)for(var b=0;b<a.length;b++)a[b].changeMagnifierOpacity()||(this.magnifier_anims.splice(b,1),b--);else window.clearInterval(this.mag_interval),this.mag_interval=null},hideMagnifiers:function(){for(var a=0;a<this.images.length;a++)this.images[a].hideMagnifier(null);this.magnifier_anims=[]},ClearInterval:function(){window.clearInterval(this.interval);this.interval=null;this.curr_step=0},OnUnload:function(){this.modalBG=null}});
Dottoro.GalleryImage=Dottoro.ClassEventsSettings.extend({init:function(a){this._super();this.initSettings();this.galleryObj=a;this.magnifier=this.paren=null;this.opac_state=0;this.mag_show=true;this.img=this.type=null;this.eventHandlers=[];this.quicktime_exts="mov,avi,flc,dv,aac,ac3,caf,amr,gsm,midi,wave,aiff,mp3,mpeg,mpg,3gpp,3gpp2,sd,amc,aac".split(",");this.image_exts=["jpg","jpeg","png","bmp","gif"]},initSettings:function(){this.settings.group="dr_gallery";this.settings.src="";this.settings.image_id=
-1;this.settings["for"]="";this.settings.width=0;this.settings.height=0;this.settings.autoplay=true;this.settings.show_magnifier=true;this.settings.magnifier_width=0;this.settings.magnifier_height=0;this.settings.title="";this.settings.title_as_link=true;this.settings.permalink="";this.settings.add_to_gallery=false},initGalleryImage:function(){this.repairImageDatas();this.magnifier=this.generateMagnifier("magnifier");this.settings.show_magnifier&&this.magnifier?(this.img&&this.eventHandlers.push(Dottoro.AddAttachEvent("mouseover",
[this,"refreshMagnifier"],this.img)),this.eventHandlers.push(Dottoro.AddAttachEvent("mouseover",[this,"showMagnifier"],this.magnifier)),this.eventHandlers.push(Dottoro.AddAttachEvent("mouseout",[this,"hideMagnifier"],this.magnifier)),this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"showGallery"],this.magnifier))):this.eventHandlers.push(Dottoro.AddAttachEvent("click",[this,"showGallery"],this.paren))},generateMagnifier:function(){if(!this.settings.show_magnifier)return null;var a=this.paren;
if(this.img=this.getImage()){var b=this.getImageDims(this.img),c={position:"absolute"};"opacity"in document.body.style?c.opacity=0:c.filter="alpha(opacity=0)";a=Dottoro.CreateElement("div",a,{},c);this.setMagnifierDims(a,b);return a}return null},getImageDims:function(a){var b={},c=Dottoro.GetBox(this.paren),a=Dottoro.GetBox(a,Dottoro.BOX_INNER);b.left=a.left-c.left;b.top=a.top-c.top;b.width=this.settings.magnifier_width?this.settings.magnifier_width:a.width;b.height=this.settings.magnifier_height?
this.settings.magnifier_height:a.height;return b},setMagnifierDims:function(a,b){if(b.width&&b.width>0&&b.height&&b.height>0)a.style.left=b.left+"px",a.style.top=b.top+"px",a.style.width=b.width+"px",a.style.height=b.height+"px",a.className=b.width>140&&b.height>140?this.type=="flash"?"dr_gallery_flash":this.type=="quicktime"?"dr_gallery_player":"dr_gallery_magnifier":this.type=="flash"?"dr_gallery_flash_small":this.type=="quicktime"?"dr_gallery_player_small":"dr_gallery_magnifier_small"},refreshMagnifier:function(){this.magnifier&&
this.setMagnifierDims(this.magnifier,this.getImageDims(this.img))},getImage:function(){var a=this.paren,b=Dottoro.GetStyle(a,"position");if(b!="relative"&&b!="absolute"&&b!="static")a.style.position="relative",a.style.left="0px",a.style.top="0px";a.style.textDecoration="none";a.style.border=0;for(var a=this.paren.childNodes,b=null,c=0;c<a.length;c++){var d=a[c].nodeName.toLowerCase();if(d=="img"||d=="div"){b=a[c];break}}return b},repairImageDatas:function(){this.paren&&this.settings.src==""&&(this.settings.src=
this.paren.getAttribute("href"));if(this.settings.src){this.type=this.getFileType();var a=this.settings.width,b=this.settings.height,c=this.settings.src;if(c.indexOf("youtube.com")>-1)a=a?a:640,b=b?b:385,this.settings.src=c.replace("watch?v=","v/"),this.settings.autoplay&&c.indexOf("&autoplay")==-1&&(this.settings.src+="&autoplay=1");if(c.indexOf("vimeo.com")>-1)a=a?a:640,b=b?b:480,c.indexOf("http://vimeo.com/")>-1&&(this.settings.src=c.substring(0,17)+"moogaloop.swf?clip_id="+c.substring(17)),this.settings.autoplay&&
c.indexOf("&autoplay")==-1&&(this.settings.src+="&autoplay=1");this.type=="quicktime"&&(a=a?a:640,b=b?b:385);this.type=="flash"&&(a=a?a:550,b=b?b:400);this.settings.width=a;this.settings.height=b}},getFileType:function(){if(src=this.settings.src){if(src.indexOf("youtube.com")>-1)return"flash";if(src.indexOf("vimeo.com")>-1)return"flash";var a=src.lastIndexOf(".")+1,b=src.indexOf("?",a),a=b>-1?src.substring(a,b):src.substring(a),a=a.toLowerCase();if(a=="swf")return"flash";for(b=0;b<this.image_exts.length;b++)if(a==
this.image_exts[b])return"image";for(b=0;b<this.quicktime_exts.length;b++)if(a==this.quicktime_exts[b])return"quicktime"}return null},showGallery:function(a){this.galleryObj.GetGroupImages(this);if(this.galleryObj.groupImgs.length>0){this.paren.style.cursor="pointer";if(this.magnifier)this.magnifier.style.cursor="pointer";this.galleryObj.showGroup(a,this)}else if(this.paren.style.cursor="default",this.magnifier)this.magnifier.style.cursor="default"},showMagnifier:function(){this.galleryObj.GetGroupImages(this);
if(this.galleryObj.groupImgs.length>0){this.paren.style.cursor="pointer";if(this.magnifier)this.magnifier.style.cursor="pointer";this.mag_show=true;this.galleryObj.addToMagnifierAnims(this)}else if(this.paren.style.cursor="default",this.magnifier)this.magnifier.style.cursor="default"},hideMagnifier:function(){this.mag_show=false;this.galleryObj.addToMagnifierAnims(this)},quickHideMagnifier:function(){Dottoro.SetOpacity(this.magnifier,0);this.opac_state=0},changeMagnifierOpacity:function(){this.mag_show?
this.opac_state+=4:this.opac_state-=4;Dottoro.SetOpacity(this.magnifier,this.opac_state);return this.mag_show&&this.opac_state>=50||!this.mag_show&&this.opac_state<=0?(this.mag_show?this.opac_state=50:(this.opac_state=0,Dottoro.SetOpacity(this.magnifier,0)),false):true},SetParen:function(a){this.paren=Dottoro.GetElement(a)},GetParen:function(){return this.paren}});
Dottoro.Gallery.CollectOwnTags=function(){for(var a=Dottoro.collectedTags.a,b=0,c=0;c<a.length;c++){var d=a[c].getAttribute("data-dr_name");if(d&&d=="gallery"){if(b==0)var e=new Dottoro.Gallery;var d=new Dottoro.GalleryImage(e),f=a[c].getAttribute("data-dr_params");d.ReadSettings(f);d.settings.src=a[c].getAttribute("href");f=null;d.settings["for"]&&(f=document.getElementById(d.settings["for"]));f?(d.paren=f,f.dr_galleryimage=d):d.paren=a[c];a[c].dr_galleryimage=d;d.initGalleryImage();d.settings.add_to_gallery&&
d.settings.src&&e.addImage(d);b++}}b>0&&e.Activate()};Dottoro.domReadyMethods.push(Dottoro.Gallery.CollectOwnTags);
Dottoro.Motion=Dottoro.Class.extend({init:function(){},Start:function(){this.Restart()},Restart:function(){this.now=this.from;this.steps=[this.now]},Next:function(){this.steps.push(this.now);return this.now},Prev:function(){if(this.steps.length>1)return this.steps.pop(),this.now=this.steps[this.steps.length-1];this.now=this.from;return null},Now:function(){return this.now},IsStartState:function(){return this.steps.length<2}});
Dottoro.Motion_1D_Uniform=Dottoro.Motion.extend({init:function(a,b,c){this._super();this.Start(a,b,c)},Start:function(a,b,c){this.from=a;this.to=b;this.stepNum=c;this._super()},Restart:function(){this._super()},Next:function(){if(this.stepNum<this.steps.length)return null;this.now=this.from+(this.to-this.from)/this.stepNum*this.steps.length;return this._super()}});
Dottoro.Motion_1D_UniformAccel=Dottoro.Motion.extend({init:function(a,b,c,d,e){this._super();this.Start(a,b,c,d,e)},Start:function(a,b,c,d,e){this.from=a;this.a=c;e&&(c=Math.abs(this.to-this.from),this.a*=c);b===void 0||b===null?(this.dir=d===void 0||d===null?1:d<0?-1:1,this.to=null):(this.dir=b-a<0?-1:1,this.to=b);d===void 0||d===null?this.to===null?this.v0=0:this.a>=0?this.v0=0:(c=Math.abs(this.to-this.from),this.v0=Math.sqrt(-2*this.a*c)):(this.v0=Math.abs(d),e&&(c=Math.abs(this.to-this.from),
this.v0*=c));this.stepNum=-1;this.a<0&&Math.ceil(this.v0/Math.abs(this.a));if(this.a==0&&this.v0==0)this.stepNum=0;else if(this.to!==null)if(c=Math.abs(this.to-this.from),this.a==0)this.stepNum=Math.ceil(c/this.v0);else if(this.v0*this.v0>=-2*this.a*c)this.stepNum=Math.ceil((Math.sqrt(this.v0*this.v0+2*this.a*c)-this.v0)/this.a);this._super()},Restart:function(){this._super()},Next:function(){if(this.stepNum>=0&&this.stepNum<this.steps.length)return null;this.now=this.stepNum==this.steps.length?this.to:
this.from+this.dir*(this.a/2*this.steps.length*this.steps.length+this.v0*this.steps.length);return this._super()}});
Dottoro.Motion_1D_GeomSequence=Dottoro.Motion.extend({init:function(a,b,c,d,e){this._super();this.Start(a,b,c,d,e)},Start:function(a,b,c,d,e){this.from=a;this.to=b;this.quot=c?c:0.1;this.minMove=d?d:0;e&&(this.minMove*=Math.abs(this.to-this.from));this._super()},Restart:function(){this._super();this.nextMove=this.to-this.from},Next:function(){if(this.quot<1&&this.now==this.to)return null;if(this.quot<1){var a=Math.abs(this.to-this.now);if(a<this.minMove)this.now=this.to;else{a*=this.quot;if(a<this.minMove)a=
this.minMove;this.to<this.now&&(a*=-1);this.now+=a}}else this.now+=this.nextMove,this.nextMove*=this.quot;return this._super()}});
Dottoro.Motion_1D_Popping=Dottoro.Motion.extend({init:function(a,b,c,d,e,f,g,h,j){this._super();this.Start(a,b,c,d,e,f,g,h,j)},Start:function(a,b,c,d,e,f,g,h,j){this.from=a;this.to=b;this.g=c;this.v0=e?e:0;this.airDrag=d?d:d===0?0:0.1;this.elast=f?f:f===0?0:0.8;this.exitV=g?g:g===0?0:2;this.collDelay=h?h:h===0?0:0.2;this.dir=this.to>=this.from?1:-1;j&&(a=Math.abs(this.to-this.from),this.g*=a,this.airDrag*=a,this.v0*=a,this.exitV*=a);this._super()},Restart:function(){this._super();this.v=this.v0;this.collRestTime=
0},Next:function(){if(this.now==this.to&&this.v==0)return null;for(var a=1;a>0;){if(this.collRestTime>0){if(this.collRestTime>a)return this.collRestTime--,this.now;a-=this.collRestTime;this.collRestTime=0}if(this.v<0){var b=this.g+this.airDrag,c=-1*this.v/b;if(a<=c){var d=b/2*a*a+this.v*a;this.now+=this.dir*d;this.v+=a*b;return this.now}d=-1*this.v*this.v/(2*b);this.now+=this.dir*d;a-=c;this.v=0}b=this.g-this.airDrag;d=Math.abs(this.to-this.now);c=(Math.sqrt(2*d*b+this.v*this.v)-this.v)/b;if(a<c)return d=
b/2*a*a+this.v*a,this.now+=this.dir*d,this.v+=a*b,this.now;this.now=this.to;b=Math.sqrt(2*d*b+this.v*this.v);if(b<this.exitV)return this.v=0,this.now;a-=c;this.v=-1*b*this.elast;this.collRestTime=this.collDelay}return this._super()}});
Dottoro.Motion_1D_Vibration=Dottoro.Motion.extend({init:function(a,b,c,d,e,f){this._super();this.Start(a,b,c,d,e,f)},Start:function(a,b,c,d,e,f){this.from=a;this.around=b;this.a=Math.abs(c);this.amp=Math.abs(this.from-this.around);this.dir=this.around<this.from?1:-1;this.f=d?d:d===0?0:0.001;this.minAmp=e?e:e===0?0:1;f&&(this.a*=this.amp,this.f*=this.amp,this.minAmp*=this.amp);this.omega=this.amp>0?Math.sqrt(this.a/this.amp):0;this._super()},Restart:function(){this._super();this.actAmp=this.amp},Next:function(){if(this.actAmp==
0)return null;var a=Math.pow(1-this.f,this.steps.length)*this.amp;this.actAmp=a*Math.sin(this.omega*this.steps.length+Math.PI/2);if(a<this.minAmp)this.actAmp=0;this.now=this.around+this.dir*this.actAmp;return this._super()}});
Dottoro.Motion_1D_Shake=Dottoro.Motion.extend({init:function(a,b,c,d,e){this._super();this.Start(a,b,c,d,e)},Start:function(a,b,c,d,e){this.around=a;this.amp=b;this.ratio=c?c:0.8;this.keepAmp=d?d:0;this.minAmp=e?e:e===0?0:1;this.from=this.around+this.amp;this._super()},Restart:function(){this._super();this.actAmp=this.amp},Next:function(){if(this.actAmp==0)return null;this.actAmp*=-1;this.steps.length>this.keepAmp&&(this.actAmp*=this.ratio);if(Math.abs(this.actAmp)<this.minAmp)this.actAmp=0;this.now=
this.around+this.actAmp;return this._super()}});
Dottoro.Motion_2D_Linear=Dottoro.Motion.extend({init:function(a,b,c,d,e){this._super();this.Start(a,b,c,d,e)},Start:function(a,b,c,d,e){this.from={x:a,y:b};this.fromTo={x:c-this.from.x,y:d-this.from.y};this.motionTime=e;this._super()},Restart:function(){this._super();this.motionTime.Restart()},Next:function(){var a=this.motionTime.Next();if(a===null)return null;this.now={x:this.from.x+a*this.fromTo.x,y:this.from.y+a*this.fromTo.y};return this._super()},Prev:function(){this.motionTime.Prev();return this._super()}});
Dottoro.Motion_2D_UniAccelBezierCurve=Dottoro.Motion.extend({init:function(a,b,c,d,e,f){this._super();this.Start(a,b,c,d,e,f)},Start:function(a,b,c,d,e,f){this.from={x:a,y:b};this.motionTime=e;var e=c-a,g=d-b,h=f?f.length:0;this.points=[];this.points[0]={x:a,y:b};for(var j=0;j<h;j++)this.points[j+1]={x:a+e*f[j].x,y:b+g*f[j].y};this.points[h+1]={x:c,y:d};this._super()},Restart:function(){this._super();this.motionTime.Restart()},Next:function(){var a=this.motionTime.Next();if(a===null)return null;this.now=
this.GetBezierPoint(a,this.points);return this._super()},GetBezierPoint:function(a,b){var c=b.length;if(c==1)return b[0];for(var d=[],e=0;e<c-1;e++)d[e]={x:b[e].x*(1-a)+b[e+1].x*a,y:b[e].y*(1-a)+b[e+1].y*a};return this.GetBezierPoint(a,d)}});
Dottoro.Motion_2D_Shake=Dottoro.Motion.extend({init:function(a,b,c,d,e,f){this._super();this.shake1D=new Dottoro.Motion_1D_Shake;this.Start(a,b,c,d,e,f)},Start:function(a,b,c,d,e,f){this.from={x:a,y:b};this.shake1D.Start(0,c,d,e,f);this._super()},Restart:function(){this._super();this.shake1D.Restart();this.angle=0},Next:function(){var a=this.shake1D.Next();if(a===null)return null;this.angle=Math.random()*Math.PI-Math.PI/2;this.now={x:this.from.x+a*Math.cos(this.angle),y:this.from.y+a*Math.sin(this.angle)};
return this._super()}});
Dottoro.Menu=Dottoro.Class.extend({init:function(a){this.effectSettings={fade:true,growing:true,slide:true,opacFilters:true};this.menu=document.getElementById(a);if(!this.menu)return this;this.RegisterListeners();return this},SetEffectSettings:function(a){for(var b in a)this.effectSettings[b]=a[b]},RegisterListeners:function(){var a=this.menu.getElementsByTagName("ul");if(a.length>0){this.mainUL=a[0];for(var a=this.menu.getElementsByTagName("li"),b=0;b<a.length;b++){var c=a[b];Dottoro.AddAttachEvent("mouseover",
[this,"OnCellOver"],c);Dottoro.AddAttachEvent("mouseenter",[this,"OnCellOver"],c);Dottoro.AddAttachEvent("mouseleave",[this,"OnCellOut"],c);Dottoro.AddAttachEvent("mouseout",[this,"OnCellOut"],c)}}},GetULFromCell:function(a){a=a.getElementsByTagName("ul");return a.length>0?a[0]:null},CreateEffect:function(a,b,c,d,e){var f,g,h,j,k,n,o,p,q,r,m=Dottoro.GetBox(a),l={left:-1*m.left,top:-1*m.top,right:d-m.left,bottom:e-m.top},d=[];if(this.effectSettings.fade&&(this.effectSettings.opacFilters||"opacity"in
a.style))h=new Dottoro.Motion_1D_UniformAccel(0,100,-0.18),e=new Dottoro.Effect_Fade(a,h),d.push(e);if(this.effectSettings.growing)b?(o=l.top,p=l.right,q=0,r=l.left,j=l.top,e=l.right,k=m.height,n=l.left):c?(o=l.top,p=0,q=0,r=l.left,j=l.top,e=m.width,k=m.height,n=l.left):(o=l.top,p=l.right,q=0,r=m.width,j=l.top,e=l.right,k=m.height,n=0),h=new Dottoro.Motion_1D_GeomSequence(0,1,0.2,0.001),j=new Dottoro.Motion_2D_Linear(r,o,n,j,h),n=new Dottoro.Motion_1D_GeomSequence(0,1,0.2,0.001),e=new Dottoro.Motion_2D_Linear(p,
q,e,k,n),d.push(new Dottoro.Effect_Clip(a,j,e));if(this.effectSettings.slide)k=Dottoro.GetPixelLength(a,"left"),e=Dottoro.GetPixelLength(a,"top"),b?(b=k,h=e-m.height,f=k,g=e,o=m.height,p=l.right,q=l.bottom,r=l.left,j=0,e=l.right,k=l.bottom,n=l.left):(b=c?k-m.width:k+m.width,h=e,f=k,g=e,c?(o=0,p=l.right,q=l.bottom,r=m.width,j=0,e=l.right,k=l.bottom,n=0):(o=0,p=0,q=l.bottom,r=l.left,j=0,e=m.width,k=l.bottom,n=l.left)),c=new Dottoro.Motion_1D_GeomSequence(0,1,0.2,0.001),h=new Dottoro.Motion_2D_Linear(b,
h,f,g,c),d.push(new Dottoro.Effect_Move(a,h)),h=new Dottoro.Motion_1D_GeomSequence(0,1,0.2,0.001),j=new Dottoro.Motion_2D_Linear(r,o,n,j,h),n=new Dottoro.Motion_1D_GeomSequence(0,1,0.2,0.001),e=new Dottoro.Motion_2D_Linear(p,q,e,k,n),d.push(new Dottoro.Effect_Clip(a,j,e));var c=new Dottoro.EffectGroup(d),s=this;c.AddListener("dr_effectgroup_stop",function(a,b){s.OnEffectStop(a,b,l)});a.dr_effect=c},OnEffectStop:function(a,b,c){a=b.GetEffects();for(b=0;b<a.length;b++){var d=a[b],e=d.GetElem();switch(d.GetType()){case "clip":e.style.removeAttribute?
e.style.clip="rect("+c.top+"px "+c.right+"px "+c.bottom+"px "+c.left+"px)":Dottoro.RemoveStyleProp(e.style,"clip")}if(d.IsStartState())e.style.display="none"}},OnCellOver:function(a,b){var c=b.parentNode===this.mainUL;if(b.outTimer)clearTimeout(b.outTimer),b.outTimer=null;else{var d=this.GetULFromCell(b);if(d&&!d.dr_blocked_show){if("dr_effect"in d&&!d.dr_effect.IsStartState())d.dr_effect.SetBack(false);else{"dr_effect"in d&&d.dr_effect.Stop();var e=Dottoro.GetClientWinWidth(d.ownerDocument),f=Dottoro.GetClientWinHeight(d.ownerDocument);
d.style.visibility="hidden";d.style.display="block";var g=Dottoro.GetBox(b);c?(d.style.left="0px",d.style.top=g.height+"px"):(d.style.left=g.width+"px",d.style.top="0px");var g=true,h=Dottoro.GetBox(d);if(h&&h.right>e)d.style.left=(c?e-h.right:-1*h.width)+"px",g=false;d.style.visibility="visible";this.CreateEffect(d,c,g,e,f);d.dr_effect.Start()}d.style.zIndex="10001";if(Dottoro.isIE7)d.parentNode.style.zIndex="10001"}}},OnCellOut:function(a,b){var c=this;b.outTimer=setTimeout(function(){c.OnDelayedCellOut(b)},
0)},OnDelayedCellOut:function(a){if(a.outTimer)clearTimeout(a.outTimer),a.outTimer=null;if((a=this.GetULFromCell(a))&&!a.dr_blocked_show)if("dr_effect"in a&&a.dr_effect.GetEffects().length>0){if(a.dr_effect.SetBack(true),a.dr_effect.IsRunning()||a.dr_effect.Start(),a.style.zIndex="10000",Dottoro.isIE7)a.parentNode.style.zIndex="10000"}else a.style.display="none"}});
Dottoro.Menu_Helper={ShowSubmenu:function(a){"dr_effect"in a&&a.dr_effect.Stop();a.dr_blocked_show=true;a.style.display="block";Dottoro.RemoveStyleProp(a.style,"opacity");Dottoro.RemoveStyleProp(a.style,"filter");Dottoro.RemoveStyleProp(a.style,"width");Dottoro.RemoveStyleProp(a.style,"height")},HideSubmenu:function(a){a.dr_blocked_show=false;a.style.display=""}};
Dottoro.Tabmenu=Dottoro.ClassEventsSettings.extend({init:function(){this._super();this.initSettings();this.slides=[];this.active_idx=this.settings.active_tab_idx;this.slide_change_num=0;this.anims=[];this.filter_childs=[];this.timer_slide_change=this.timer_init_slide_change=null;this.eventHandlers=[];return this},initSettings:function(){this.settings.id_prefix="";this.settings.autoplay=true;this.settings.delay=5E3;this.settings.loop=true;this.settings.active_tab_idx=0;this.settings.active_img="";
this.settings.inactive_img="";this.settings.active_tab_class="";this.settings.inactive_tab_class="";this.settings.eventtype="click";this.settings.trans_speed=30;this.settings.trans_type="blend";this.settings.stop_on_mouseover=false},initTabmenu:function(){for(var a=0;;){var b=document.getElementById(this.settings.id_prefix+"_box_"+a);if(b){var c=document.getElementById(this.settings.id_prefix+"_img_"+a),d=false;if(c)var d=c.getAttribute("src"),e=c.getAttribute("data-src"),d=d==e||!e;var e=document.getElementById(this.settings.id_prefix+
"_excerpt_"+a),f=document.getElementById(this.settings.id_prefix+"_excerpt_bg_"+a),g=document.getElementById(this.settings.id_prefix+"_tab_"+a);g&&this.eventHandlers.push(Dottoro.AddAttachEvent(this.settings.eventtype,[this,"OnTabClick"],g,Dottoro.CAPTURE_NO,a));this.slides.push({box:b,excerpt:e,excerpt_bg:f,img:c,tab:g,idx:a,opac_state:this.active_idx==a?100:0,image_is_set:d})}else break;a++}if(a>0)a=this.slides.length-1,b=this.active_idx,this.active_idx=this.active_idx==a?a-1:a,this.initSlideChange(b,
true)},initSlideChange:function(a){if(a!=this.active_idx){if(this.slides[this.active_idx])this.slides[this.active_idx].box.style.position="absolute";for(var b=0;b<this.anims;b++)if(a==this.anims[b])return false;a===void 0&&(a=this.active_idx<this.slides.length-1?this.active_idx+1:0);b=this.slides[a];if(!b.image_is_set){if(b.img){var c=b.img.getAttribute("data-src");if(c)return this.imageLoader=new Image,this.eventHandlers.push(Dottoro.AddAttachEvent("load",[this,"OnImageLoad"],this.imageLoader,Dottoro.CAPTURE_NO,
a)),this.imageLoader.setAttribute("src",c),false}b.image_is_set=true}if(!(this.active_idx<0)){if(b=this.slides[this.active_idx].tab)if(b.className=this.settings.inactive_tab_class,this.settings.inactive_img)b.src=this.settings.inactive_img;c=false;for(b=0;b<this.anims;b++)this.active_idx==this.anims[b]&&(c=true);c||(this.anims.push(this.active_idx),this.RemoveChildFilter(this.slides[this.active_idx].box));this.active_idx=a;if(a=this.slides[this.active_idx].tab)if(a.className=this.settings.active_tab_class,
this.settings.active_img)a.src=this.settings.active_img;this.anims.push(this.active_idx);if(this.timer_slide_change===null){var d=this;this.timer_slide_change=window.setInterval(function(){d.ChangeSlide()},this.settings.trans_speed)}}}},Activate:function(){if(this.fireDrEvent("tabmenu_beforeactivate"))return false;this.initTabmenu();return this.fireDrEvent("tabmenu_afteractivate")?(this.Deactivate(),false):true},ChangeSlide:function(){var a=this.anims;if(a.length>0)for(var b=0;b<a.length;b++){var c=
a[b],d=this.slides[c];d.box.style.display="block";var e=this.active_idx==c;if(e)d.box.style.zIndex=2,d.opac_state+=5;else{if(d.excerpt)d.excerpt.style.display="none";if(d.excerpt_bg)d.excerpt_bg.style.display="none";d.box.style.zIndex=1;d.opac_state-=5}d.opac_state=d.opac_state>100?100:d.opac_state;Dottoro.SetOpacity(d.box,d.opac_state);this.ResizeParent(d.box,d.opac_state,e);if(e&&d.opac_state>=100||!e&&d.opac_state<=0){if(e){d.opac_state=100;var f=this;this.excerpt_idx=c;window.setTimeout(function(){f.ShowExcerpt()},
400)}else d.opac_state=0,d.box.style.display="none";this.RecoverChildFilter(d);this.anims.splice(b,1);b--}}else{if(this.timer_slide_change)window.clearInterval(this.timer_slide_change),this.timer_slide_change=null;if(this.timer_init_slide_change!==null)window.clearTimeout(this.timer_init_slide_change),this.timer_init_slide_change=null;this.slide_change_num++;this.AutoPlay()}},ShowExcerpt:function(){if(this.excerpt_idx==this.active_idx){var a=this.slides[this.active_idx];if(a.excerpt)a.excerpt.style.display=
"block";if(a.excerpt_bg)a.excerpt_bg.style.display="block"}},RecoverChildFilter:function(){if(this.filter_childs)for(var a=0;a<this.filter_childs.length;a++){var b=this.filter_childs[a];b.elem.style.display=b.display}this.filter_childs=[]},RemoveChildFilter:function(a){for(var a=a.childNodes,b=0;b<a.length;b++){this.RemoveChildFilter(a[b]);try{if(a[b].filters&&a[b].filters.length>0){var c={};c.elem=a[b];c.display=Dottoro.GetStyle(a[b],"display");this.filter_childs.push(c);a[b].style.display="none"}}catch(d){}}},
OnImageLoad:function(a,b,c){a=this.slides[c];this.imageLoader=null;a.img.src=a.img.getAttribute("data-src");a.image_is_set=true;this.initSlideChange(c)},ResizeParent:function(a,b,c){if(c)c=a.parentNode.clientHeight,b=Math.round(c+(a.offsetHeight-c)*b/100),a.parentNode.style.height=b+"px"},AutoPlay:function(){if(this.settings.autoplay)if(!this.settings.loop&&this.slide_change_num>this.slides.length-1)this.settings.autoplay=false;else{var a=this;this.timer_init_slide_change=window.setTimeout(function(){a.initSlideChange()},
this.settings.delay)}},OnTabClick:function(a,b,c){Dottoro.CancelEvent(a);if(this.timer_init_slide_change!==null)window.clearTimeout(this.timer_init_slide_change),this.timer_init_slide_change=null;this.settings.autoplay=false;this.initSlideChange(c);return false}});
Dottoro.Tabmenu.CollectOwnTags=function(){for(var a=Dottoro.collectedTags.a,b=0;b<a.length;b++){var c=a[b].getAttribute("data-dr_name");if(c&&c=="dottoro_tabmenu"){var c=new Dottoro.Tabmenu,d=a[b].getAttribute("data-dr_params");c.ReadSettings(d);d=c.GetSetting("ownerelem");d||(d=a[b],c.SetSetting("ownerelem",d));c.Activate();d.dr_tabmenu=c}}};Dottoro.domReadyMethods.push(Dottoro.Tabmenu.CollectOwnTags);
Dottoro.Toggle=Dottoro.ClassEventsSettings.extend({init:function(){this._super();this.initSettings();this.isVisible=false;this.sizes=this.action=null;this.step=0;this.display=null;this.currentHeight=this.currentWidth=0;this.ownerEventHandlers=[];this.timerIDs=[];this.showAnimTimerID=null;return this},initSettings:function(){this.settings.ownerelem=null;this.settings.toggleelem=null;this.settings.steps=30;this.settings.direction="bottom";this.settings.eventtype="click";this.settings.openedclass="opened";
this.settings.closedclass="closed"},initToggle:function(){var a=this.settings.toggleelem.style;this.display=Dottoro.GetStyle(this.settings.toggleelem,"display",false);if(this.display!="none")a.display="none";var b=Dottoro.GetStyle(this.settings.toggleelem,"position",false);if(b!="absolute"&&b!="relative"&&b!="fixed")a.position="relative",a.top="0px",a.left="0px";a.overflow="hidden";a.height="0px";a.display=this.display!="none"?this.display:"";a.position=b;this.settings.direction=="bottom"?a.height=
"0px":a.width="0px"},showHideAnim:function(){var a=this.settings.steps-this.step;this.action=="show"?(this.currentWidth+=(this.content_sizes.width-this.currentWidth)/a,this.currentHeight+=(this.content_sizes.height-this.currentHeight)/a):(this.currentWidth-=this.currentWidth/a,this.currentHeight-=this.currentHeight/a);this.settings.direction=="bottom"?this.settings.toggleelem.style.height=this.currentHeight+"px":this.settings.toggleelem.style.width=this.currentWidth+"px";this.step++;if(this.settings.steps==
this.step){this.action=="show"?this.changeOwnerClass("show"):this.changeOwnerClass("hide");if(this.showAnimTimerID!==null)clearInterval(this.showAnimTimerID),this.showAnimTimerID=null;this.step=0}},changeOwnerClass:function(a){var b=this.settings.ownerelem.className;a=="show"?(a=b.indexOf(this.settings.closedclass),a>-1&&(b=b.substr(0,a)+b.substr(a+this.settings.closedclass.length)),b+=" "+this.settings.openedclass):(a=b.indexOf(this.settings.openedclass),a>-1&&(b=b.substr(0,a)+b.substr(a+this.settings.openedclass.length)),
b+=" "+this.settings.closedclass);this.settings.ownerelem.className=Dottoro.Trim(b)},Activate:function(){if(this.fireDrEvent("toggle_beforeactivate"))return false;this.Deactivate();this.initToggle();this.ownerEventHandlers.push(Dottoro.AddAttachEvent(this.settings.eventtype,[this,"ShowHide"],this.settings.ownerelem));return this.fireDrEvent("toggle_afteractivate")?(this.Deactivate(),false):true},Deactivate:function(){},ShowHide:function(){this.action=this.action==null||this.action=="hide"?"show":
"hide";if(this.step>0)this.step=this.settings.steps-this.step;if(this.showAnimTimerID==null){this.content_sizes=Dottoro.GetSize(this.settings.toggleelem.firstChild);var a=this;this.showAnimTimerID=setInterval(function(){a.showHideAnim()},15)}},Show:function(){this.ShowHide()},Hide:function(){this.ShowHide()},IsVisible:function(){return this.isVisible},ReDraw:function(){return this.isVisible?!this.Hide()?false:this.Show(this.mouseX,this.mouseY):true}});
Dottoro.Toggle.CollectOwnTags=function(){for(var a=Dottoro.collectedTags.a,b=0;b<a.length;b++){var c=a[b].getAttribute("data-dr_name");if(c&&c=="dottoro_toggle"){var c=new Dottoro.Toggle,d=a[b].getAttribute("data-dr_params");c.ReadSettings(d);d=c.GetSetting("ownerelem");d||(d=a[b],c.SetSetting("ownerelem",d));c.Activate();d.dr_toggle=c}}};Dottoro.domReadyMethods.push(Dottoro.Toggle.CollectOwnTags);
Dottoro.Tooltip=Dottoro.ClassEventsSettings.extend({init:function(){this._super();this.initSettings();this.xmlns="http://www.w3.org/2000/svg";this.tip_arrow=this.tip_content=this.tip_body=this.container=null;this.isVisible=false;this.boxHeight=this.boxWidth=0;this.ownerEventHandlers=[];this.tipEventHandlers=[];this.timerIDs=[];this.dirs={up:["up","down","left","right"],down:["down","up","left","right"],left:["left","right","down","up"],right:["right","left","down","up"]};this.delayHideTimerID=this.delayShowTimerID=
null;return this},initSettings:function(){this.settings.ownerelem=null;this.settings.tooltipelem=null;this.settings.delayhide=0;this.settings.delayshow=0;this.settings.direction="down";this.settings.hideonmouseout=true;this.settings.hideontipmouseout=true;this.settings.keepvisibleovertip=true;this.settings.offsetvertical=8;this.settings.offsethorizontal=8;this.settings.maxWidth=300;this.settings.timelimit=0;this.settings.zindex=100001},createContainer:function(){this.ownerDoc=this.settings.tooltipelem.ownerDocument;
if(!this.ownerDoc)this.ownerDoc=document;this.container=Dottoro.CreateElement("div",this.ownerDoc.body,{className:"dr_tooltip"},{position:"absolute",left:"-10000px",top:"-10000px"});this.tip_body=Dottoro.CreateElement("div",this.container,{className:"dr_tooltip_body"});this.tip_content=Dottoro.CreateElement("div",this.tip_body,{className:"dr_tooltip_content"});this.tip_arrow=Dottoro.CreateElement("div",this.container,{className:"dr_tooltip_arrow"});this.settings.tooltipelem.style.position="static";
this.tip_content.appendChild(this.settings.tooltipelem);this.settings.tooltipelem.style.visibility="visible";this.settings.tooltipelem.style.display="";this.container.style.display="block";this.container.className="dr_tooltip dr_tooltip_left";this.hor_arrow_size=Dottoro.GetSize(this.tip_arrow);this.container.className="dr_tooltip dr_tooltip_up";this.ver_arrow_size=Dottoro.GetSize(this.tip_arrow);this.container.style.zIndex=this.settings.zindex},detectDirection:function(){this.settings.direction!=
"up"&&this.settings.direction!="left"&&this.settings.direction!="right"&&(this.settings.direction="down");var a=this.dirs[this.settings.direction],b=null,c=Dottoro.GetClientWinWidth(this.ownerDoc),d=Dottoro.GetClientWinHeight(this.ownerDoc),e=Dottoro.GetBox(this.settings.ownerelem),f=Dottoro.GetSize(this.tip_body);if(f.width>this.settings.maxWidth)this.tip_body.style.width=this.settings.maxWidth+"px",this.tip_body.style.whiteSpace="normal";for(var f=Dottoro.GetSize(this.tip_body),g=-1,h=-1,j=0;j<
a.length&&!b;j++)switch(a[j]){case "up":h=e.top-(this.settings.offsetvertical+f.height+this.ver_arrow_size.height);h>=0&&(b="up");break;case "down":h=e.bottom+this.settings.offsetvertical;d>=h+f.height+this.ver_arrow_size.height&&(b="down");break;case "left":g=e.left-(this.settings.offsethorizontal+f.width+this.hor_arrow_size.width);g>=0&&(b="left");break;case "right":g=e.right+this.settings.offsethorizontal,c>=g+(f.width+this.hor_arrow_size.width)&&(b="right")}if(!b)return false;b=="up"||b=="down"?
(g=Math.round(e.left+e.width/2-f.width/2),c<g+f.width&&(g=c-f.width),g<0&&(g=0)):(h=Math.round(e.top+e.height/2-f.height/2),d<h+f.height&&(h=d-f.height),h<0&&(h=0));this.container.style.visibility="hidden";this.ownerDoc.body.appendChild(this.container);this.container.style.left=g+"px";this.container.style.top=h+"px";a=Dottoro.GetBox(this.container);if(a.left!=g)this.container.style.left=g+(g-a.left)+"px";if(a.top!=h)this.container.style.top=h+(h-a.top)+"px";a=Dottoro.GetBox(this.container);b=="left"||
b=="right"?(this.container.style.width=f.width+this.hor_arrow_size.width-1+"px",this.container.style.height=f.height+"px",c=this.hor_arrow_size.height,e=e.top+Math.round(e.height/2-c/2),e+c>d&&(e=d-c),e<0&&(e=0),this.tip_arrow.style.bottom="auto",this.tip_arrow.style.top=e-a.top+"px",b=="left"?(this.tip_arrow.style.left="auto",this.container.className="dr_tooltip dr_tooltip_left visible"):(this.tip_arrow.style.left="0px",this.container.className="dr_tooltip dr_tooltip_right visible")):(this.container.style.width=
f.width+"px",this.container.style.height=f.height+this.ver_arrow_size.height-1+"px",d=this.hor_arrow_size.width,e=e.left+Math.round(e.width/2-d/2),e+d>c&&(e=c-d),e<0&&(e=0),this.tip_arrow.style.left=e-a.left+"px",b=="up"?(this.tip_arrow.style.top="auto",this.tip_arrow.style.bottom="0px",this.container.className="dr_tooltip dr_tooltip_up visible"):(this.tip_arrow.style.bottom="auto",this.tip_arrow.style.top="auto",this.container.className="dr_tooltip dr_tooltip_down visible"));if(Dottoro.isIE7||Dottoro.isIE8){this.container.className+=
" ie_xp";try{this.container.filters["DXImageTransform.Microsoft.Fade"]&&(this.container.filters["DXImageTransform.Microsoft.Fade"].apply(),this.container.filters["DXImageTransform.Microsoft.Fade"].play())}catch(k){}}this.container.style.visibility="visible";this.ownerDoc.body.appendChild(this.container)},onMouseOver_Owner:function(){this.overOwner=true;this.isVisible||this.Show()},onMouseOut_Owner:function(){this.overOwner=false;if(this.isVisible&&this.settings.hideonmouseout){var a=this;this.delayHideTimerID=
setTimeout(function(){a.conditionalHide()},a.settings.delayhide)}if(this.delayShowTimerID!==null)clearTimeout(this.delayShowTimerID),this.delayShowTimerID=null},onMouseOver_Tip:function(){this.overTip=true},onMouseOut_Tip:function(){this.overTip=false;var a=this;this.timerIDs.push(setTimeout(function(){a.conditionalHide()},0))},delayShow:function(){this.Show()},conditionalHide:function(){(!this.overTip||!this.settings.keepvisibleovertip)&&this.settings.hideontipmouseout&&(this.boring||!this.overOwner)&&
this.Hide()},becameBoring:function(){this.boring=true;(!this.overTip||!this.settings.keepvisibleovertip)&&this.Hide()},Activate:function(){if(this.fireDrEvent("tooltip_beforeactivate"))return false;this.Deactivate();this.ownerEventHandlers.push(Dottoro.AddAttachEvent("mouseover",[this,"onMouseOver_Owner"],this.settings.ownerelem));this.ownerEventHandlers.push(Dottoro.AddAttachEvent("mouseout",[this,"onMouseOut_Owner"],this.settings.ownerelem));return this.fireDrEvent("tooltip_afteractivate")?(this.Deactivate(),
false):true},Deactivate:function(){if(this.fireDrEvent("tooltip_beforedeactivate"))return false;this.Hide();Dottoro.RemoveDetachEvent(this.ownerEventHandlers);this.ownerEventHandlers=[];this.fireDrEvent("tooltip_afterdeactivate");return true},IsActivated:function(){return this.ownerEventHandlers.length>0},Show:function(){if(this.fireDrEvent("tooltip_beforeshow"))return false;if(!this.settings.tooltipelem)return false;if(this.isVisible)return true;this.createContainer();this.detectDirection();this.container.display=
"block";this.tipEventHandlers.push(Dottoro.AddAttachEvent("mouseover",[this,"onMouseOver_Tip"],this.container));this.tipEventHandlers.push(Dottoro.AddAttachEvent("mouseout",[this,"onMouseOut_Tip"],this.container));this.isVisible=true;this.boring=this.overTip=false;if(this.settings.timelimit>0){var a=this;this.timerIDs.push(setTimeout(function(){a.becameBoring()},this.settings.timelimit))}return this.fireDrEvent("tooltip_aftershow")?(this.Hide(),false):true},Hide:function(){if(this.isVisible){if(this.fireDrEvent("tooltip_beforehide"))return false;
for(var a=0;a<this.timerIDs.length;a++)clearTimeout(this.timerIDs[a]);this.timerIDs=[];if(this.delayShowTimerID!==null)clearTimeout(this.delayShowTimerID),this.delayShowTimerID=null;if(this.delayHideTimerID!==null)clearTimeout(this.delayHideTimerID),this.delayHideTimerID=null;Dottoro.RemoveDetachEvent(this.tipEventHandlers);this.tipEventHandlers=[];Dottoro.RemoveNode(this.container);this.container=null;this.isVisible=false;this.fireDrEvent("tooltip_afterhide")}return true},IsVisible:function(){return this.isVisible},
ReDraw:function(){return this.isVisible?!this.Hide()?false:this.Show():true}});Dottoro.Tooltip.BuildFromTags=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=c.getAttribute("data-dr_name");if(d&&d=="dottoro_tooltip"){var d=new Dottoro.Tooltip,e=c.getAttribute("data-dr_params");d.ReadSettings(e);e=d.GetSetting("ownerelem");e||(e=c,d.SetSetting("ownerelem",e));d.Activate();e.dr_tooltip=d}}};Dottoro.Tooltip.CollectOwnTags=function(){Dottoro.Tooltip.BuildFromTags(Dottoro.collectedTags.a)};Dottoro.domReadyMethods.push(Dottoro.Tooltip.CollectOwnTags);
