;(function($){jQuery.extend(jQuery.expr[':'],{data:"jQuery.data(a, m[3])"});$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},disableSelection:function(el){$(el).attr('unselectable','on').css('MozUserSelect','none').bind('selectstart',function(){return false;});},enableSelection:function(el){$(el).attr('unselectable','off').css('MozUserSelect','').unbind('selectstart');},hasScroll:function(e,a){var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(e[scroll]>0){return true;}
e[scroll]=1;has=(e[scroll]>0);e[scroll]=0;return has;}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args);}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options));}});};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value);}).bind('getData.'+name,function(e,key){return self.getData(key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName);},getData:function(key){return this.options[key];},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this.setData('disabled',false);},disable:function(){this.setData('disabled',true);},trigger:function(type,e,data){var eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);e=e||$.event.fix({type:eventName,target:this.element[0]});return this.element.triggerHandler(eventName,[e,data],this.options[type]);}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e);});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true;}
this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true;},this.options.delay);}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}}
this._mouseMoveDelegate=function(e){return self.mouseMove(e);};this._mouseUpDelegate=function(e){return self.mouseUp(e);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e);}
if(this._mouseStarted){this.mouseDrag(e);return false;}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e));}
return!this._mouseStarted;},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e);}
return false;},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},mouseDelayMet:function(e){return this._mouseDelayMet;},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){var PROP_NAME='datepicker';function Datepicker(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId='ui-datepicker-div';this._inlineClass='ui-datepicker-inline';this._appendClass='ui-datepicker-append';this._triggerClass='ui-datepicker-trigger';this._dialogClass='ui-datepicker-dialog';this._promptClass='ui-datepicker-prompt';this._disableClass='ui-datepicker-disabled';this._unselectableClass='ui-datepicker-unselectable';this._currentClass='ui-datepicker-current-day';this.regional=[];this.regional['']={clearText:'Clear',clearStatus:'Erase the current date',closeText:'Close',closeStatus:'Close without change',prevText:'&#x3c;Prev',prevStatus:'Show the previous month',prevBigText:'&#x3c;&#x3c;',prevBigStatus:'Show the previous year',nextText:'Next&#x3e;',nextStatus:'Show the next month',nextBigText:'&#x3e;&#x3e;',nextBigStatus:'Show the next year',currentText:'Today',currentStatus:'Show the current month',monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],monthStatus:'Show a different month',yearStatus:'Show a different year',weekHeader:'Wk',weekStatus:'Week of the year',dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dayStatus:'Set DD as first week day',dateStatus:'Select DD, M d',dateFormat:'mm/dd/yy',firstDay:0,initStatus:'Select a date',isRTL:false};this._defaults={showOn:'focus',showAnim:'show',showOptions:{},defaultDate:null,appendText:'',buttonText:'...',buttonImage:'',buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,showBigPrevNext:false,gotoCurrent:false,changeMonth:true,changeYear:true,showMonthAfterYear:false,yearRange:'-10:+10',changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:'+10',showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:'normal',beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,rangeSelect:false,rangeSeparator:' - ',altField:'',altFormat:''};$.extend(this._defaults,this.regional['']);this.dpDiv=$('<div id="'+this._mainDivId+'" style="display: none;"></div>');}
$.extend(Datepicker.prototype,{markerClassName:'hasDatepicker',log:function(){if(this.debug)
console.log.apply('',arguments);},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var inlineSettings=null;for(attrName in this._defaults){var attrValue=target.getAttribute('date:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}catch(err){inlineSettings[attrName]=attrValue;}}}
var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=='div'||nodeName=='span');if(!target.id)
target.id='dp'+new Date().getTime();var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=='input'){this._connectDatepicker(target,inst);}else if(inline){this._inlineDatepicker(target,inst);}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,'\\\\$1');id=id.replace(/\'/g,"\\\\'");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+'"></div>'))};},_connectDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName))
return;var appendText=this._get(inst,'appendText');var isRTL=this._get(inst,'isRTL');if(appendText)
input[isRTL?'before':'after']('<span class="'+this._appendClass+'">'+appendText+'</span>');var showOn=this._get(inst,'showOn');if(showOn=='focus'||showOn=='both')
input.focus(this._showDatepicker);if(showOn=='button'||showOn=='both'){var buttonText=this._get(inst,'buttonText');var buttonImage=this._get(inst,'buttonImage');var trigger=$(this._get(inst,'buttonImageOnly')?$('<img/>').addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==''?buttonText:$('<img/>').attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?'before':'after'](trigger);trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target)
$.datepicker._hideDatepicker();else
$.datepicker._showDatepicker(target);return false;});}
input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);},_inlineDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName))
return;input.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);},_inlineShow:function(inst){var numMonths=this._getNumberOfMonths(inst);inst.dpDiv.width(numMonths[1]*$('.ui-datepicker',inst.dpDiv[0]).width());},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id='dp'+new Date().getTime();this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$('body').append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst);}
extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}
this._dialogInput.css('left',this._pos[0]+'px').css('top',this._pos[1]+'px');inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI)
$.blockUI(this.dpDiv);$.data(this._dialogInput[0],PROP_NAME,inst);return this;},_destroyDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return;}
var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=='input'){$target.siblings('.'+this._appendClass).remove().end().siblings('.'+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind('focus',this._showDatepicker).unbind('keydown',this._doKeyDown).unbind('keypress',this._doKeyPress);}else if(nodeName=='div'||nodeName=='span')
$target.removeClass(this.markerClassName).empty();},_enableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return;}
var nodeName=target.nodeName.toLowerCase();if(nodeName=='input'){target.disabled=false;$target.siblings('button.'+this._triggerClass).each(function(){this.disabled=false;}).end().siblings('img.'+this._triggerClass).css({opacity:'1.0',cursor:''});}
else if(nodeName=='div'||nodeName=='span'){$target.children('.'+this._disableClass).remove();}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});},_disableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return;}
var nodeName=target.nodeName.toLowerCase();if(nodeName=='input'){target.disabled=true;$target.siblings('button.'+this._triggerClass).each(function(){this.disabled=true;}).end().siblings('img.'+this._triggerClass).css({opacity:'0.5',cursor:'default'});}
else if(nodeName=='div'||nodeName=='span'){var inline=$target.children('.'+this._inlineClass);var offset=inline.offset();var relOffset={left:0,top:0};inline.parents().each(function(){if($(this).css('position')=='relative'){relOffset=$(this).offset();return false;}});$target.prepend('<div class="'+this._disableClass+'" style="'+
($.browser.msie?'background-color: transparent; ':'')+'width: '+inline.width()+'px; height: '+inline.height()+'px; left: '+(offset.left-relOffset.left)+'px; top: '+(offset.top-relOffset.top)+'px;"></div>');}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});this._disabledInputs[this._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target)
return false;for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target)
return true;}
return false;},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=='string'){settings={};settings[name]=value;}
var inst=$.data(target,PROP_NAME);if(inst){if(this._curInst==inst){this._hideDatepicker(null);}
extendRemove(inst.settings,settings);var date=new Date();extendRemove(inst,{rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date,endDate){var inst=$.data(target,PROP_NAME);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);}},_getDateDatepicker:function(target){var inst=$.data(target,PROP_NAME);if(inst&&!inst.inline)
this._setDateFromField(inst);return(inst?this._getDate(inst):null);},_doKeyDown:function(e){var inst=$.data(e.target,PROP_NAME);var handled=true;if($.datepicker._datepickerShowing)
switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,'');break;case 13:$.datepicker._selectDay(e.target,inst.selectedMonth,inst.selectedYear,$('td.ui-datepicker-days-cell-over',inst.dpDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,'duration'));break;case 33:$.datepicker._adjustDate(e.target,(e.ctrlKey?-$.datepicker._get(inst,'stepBigMonths'):-$.datepicker._get(inst,'stepMonths')),'M');break;case 34:$.datepicker._adjustDate(e.target,(e.ctrlKey?+$.datepicker._get(inst,'stepBigMonths'):+$.datepicker._get(inst,'stepMonths')),'M');break;case 35:if(e.ctrlKey)$.datepicker._clearDate(e.target);handled=e.ctrlKey;break;case 36:if(e.ctrlKey)$.datepicker._gotoToday(e.target);handled=e.ctrlKey;break;case 37:if(e.ctrlKey)$.datepicker._adjustDate(e.target,-1,'D');handled=e.ctrlKey;break;case 38:if(e.ctrlKey)$.datepicker._adjustDate(e.target,-7,'D');handled=e.ctrlKey;break;case 39:if(e.ctrlKey)$.datepicker._adjustDate(e.target,+1,'D');handled=e.ctrlKey;break;case 40:if(e.ctrlKey)$.datepicker._adjustDate(e.target,+7,'D');handled=e.ctrlKey;break;default:handled=false;}
else if(e.keyCode==36&&e.ctrlKey)
$.datepicker._showDatepicker(this);else
handled=false;if(handled){e.preventDefault();e.stopPropagation();}},_doKeyPress:function(e){var inst=$.data(e.target,PROP_NAME);var chars=$.datepicker._possibleChars($.datepicker._get(inst,'dateFormat'));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<' '||!chars||chars.indexOf(chr)>-1);},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!='input')
input=$('input',input.parentNode)[0];if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input)
return;var inst=$.data(input,PROP_NAME);var beforeShow=$.datepicker._get(inst,'beforeShow');extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,'');$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog)
input.value='';if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight;}
var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css('position')=='fixed';return!isFixed;});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop;}
var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:'absolute',display:'block',top:'-1000px'});$.datepicker._updateDatepicker(inst);inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1]*$('.ui-datepicker',inst.dpDiv[0])[0].offsetWidth);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?'static':(isFixed?'fixed':'absolute')),display:'none',left:offset.left+'px',top:offset.top+'px'});if(!inst.inline){var showAnim=$.datepicker._get(inst,'showAnim')||'show';var duration=$.datepicker._get(inst,'duration');var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version)<7)
$('iframe.ui-datepicker-cover').css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4});};if($.effects&&$.effects[showAnim])
inst.dpDiv.show(showAnim,$.datepicker._get(inst,'showOptions'),duration,postProcess);else
inst.dpDiv[showAnim](duration,postProcess);if(duration=='')
postProcess();if(inst.input[0].type!='hidden')
inst.input[0].focus();$.datepicker._curInst=inst;}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};inst.dpDiv.empty().append(this._generateHTML(inst)).find('iframe.ui-datepicker-cover').css({width:dims.width,height:dims.height});var numMonths=this._getNumberOfMonths(inst);inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?'add':'remove')+'Class']('ui-datepicker-multi');inst.dpDiv[(this._get(inst,'isRTL')?'add':'remove')+'Class']('ui-datepicker-rtl');if(inst.input&&inst.input[0].type!='hidden')
$(inst.input[0]).focus();},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,'isRTL')||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth)
offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-
(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0));else
offset.left-=(isFixed?scrollX:0);if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight)
offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-
(isFixed&&$.browser.opera?document.documentElement.scrollTop:0));else
offset.top-=(isFixed?scrollY:0);return offset;},_findPos:function(obj){while(obj&&(obj.type=='hidden'||obj.nodeType!=1)){obj=obj.nextSibling;}
var position=$(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME)))
return;var rangeSelect=this._get(inst,'rangeSelect');if(rangeSelect&&inst.stayOpen)
this._selectDate('#'+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,'duration'));var showAnim=this._get(inst,'showAnim');var postProcess=function(){$.datepicker._tidyDialog(inst);};if(duration!=''&&$.effects&&$.effects[showAnim])
inst.dpDiv.hide(showAnim,$.datepicker._get(inst,'showOptions'),duration,postProcess);else
inst.dpDiv[(duration==''?'hide':(showAnim=='slideDown'?'slideUp':(showAnim=='fadeIn'?'fadeOut':'hide')))](duration,postProcess);if(duration=='')
this._tidyDialog(inst);var onClose=this._get(inst,'onClose');if(onClose)
onClose.apply((inst.input?inst.input[0]:null),[this._getDate(inst),inst]);this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:'absolute',left:'0',top:'-100px'});if($.blockUI){$.unblockUI();$('body').append(this.dpDiv);}}
this._inDialog=false;}
this._curInst=null;},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker');$('.'+this._promptClass,inst.dpDiv).remove();},_checkExternalClick:function(event){if(!$.datepicker._curInst)
return;var $target=$(event.target);if(($target.parents('#'+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI))
$.datepicker._hideDatepicker(null,'');},_adjustDate:function(id,offset,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst);},_gotoToday:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,'gotoCurrent')&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear;}
else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();}
this._notifyChange(inst);this._adjustDate(target);},_selectMonthYear:function(id,select,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst._selectingMonthYear=false;inst['selected'+(period=='M'?'Month':'Year')]=inst['draw'+(period=='M'?'Month':'Year')]=parseInt(select.options[select.selectedIndex].value);this._notifyChange(inst);this._adjustDate(target);},_clickMonthYear:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie)
inst.input[0].focus();inst._selectingMonthYear=!inst._selectingMonthYear;},_changeFirstDay:function(id,day){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst.settings.firstDay=day;this._updateDatepicker(inst);},_selectDay:function(id,month,year,td){if($(td).hasClass(this._unselectableClass))
return;var target=$(id);var inst=$.data(target[0],PROP_NAME);var rangeSelect=this._get(inst,'rangeSelect');if(rangeSelect){inst.stayOpen=!inst.stayOpen;if(inst.stayOpen){$('.ui-datepicker td',inst.dpDiv).removeClass(this._currentClass);$(td).addClass(this._currentClass);}}
inst.selectedDay=inst.currentDay=$('a',td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null;}
else if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear;}
this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=new Date(inst.currentYear,inst.currentMonth,inst.currentDay);this._updateDatepicker(inst);}
else if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline)
this._updateDatepicker(inst);}},_clearDate:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,'mandatory'))
return;inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,'');},_selectDate:function(id,dateStr){var target=$(id);var inst=$.data(target[0],PROP_NAME);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,'rangeSelect')&&dateStr)
dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,'rangeSeparator')+dateStr;if(inst.input)
inst.input.val(dateStr);this._updateAlternate(inst);var onSelect=this._get(inst,'onSelect');if(onSelect)
onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);else if(inst.input)
inst.input.trigger('change');if(inst.inline)
this._updateDatepicker(inst);else if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,'duration'));this._lastInput=inst.input[0];if(typeof(inst.input[0])!='object')
inst.input[0].focus();this._lastInput=null;}},_updateAlternate:function(inst){var altField=this._get(inst,'altField');if(altField){var altFormat=this._get(inst,'altFormat');var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?'':this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+
this._get(inst,'rangeSeparator')+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):this.formatDate(altFormat,date,this._getFormatConfig(inst)));$(altField).each(function(){$(this).val(dateStr);});}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),''];},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate(),(date.getTimezoneOffset()/-60));var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate);}else if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate);}}
return Math.floor(((checkDate-firstMon)/86400000)/7)+1;},dateStatus:function(date,inst){return $.datepicker.formatDate($.datepicker._get(inst,'dateStatus'),date,$.datepicker._getFormatConfig(inst));},parseDate:function(format,value,settings){if(format==null||value==null)
throw'Invalid arguments';value=(typeof value=='object'?value.toString():value+'');if(value=='')
return null;var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches)
iFormat++;return matches;};var getNumber=function(match){lookAhead(match);var origSize=(match=='@'?14:(match=='y'?4:(match=='o'?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>='0'&&value.charAt(iValue)<='9'){num=num*10+parseInt(value.charAt(iValue++));size--;}
if(size==origSize)
throw'Missing number at position '+iValue;return num;};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++)
size=Math.max(size,names[j].length);var name='';var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++)
if(name==names[i])
return i+1;size--;}
throw'Unknown name at position '+iInit;};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat))
throw'Unexpected literal at position '+iValue;iValue++;};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal)
if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
literal=false;else
checkLiteral();else
switch(format.charAt(iFormat)){case'd':day=getNumber('d');break;case'D':getName('D',dayNamesShort,dayNames);break;case'o':doy=getNumber('o');break;case'm':month=getNumber('m');break;case'M':month=getName('M',monthNamesShort,monthNames);break;case'y':year=getNumber('y');break;case'@':var date=new Date(getNumber('@'));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'"))
checkLiteral();else
literal=true;break;default:checkLiteral();}}
if(year<100)
year+=new Date().getFullYear()-new Date().getFullYear()%100+
(year<=shortYearCutoff?0:-100);if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim)
break;month++;day-=dim;}while(true);}
var date=new Date(year,month-1,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day)
throw'Invalid date';return date;},ATOM:'yy-mm-dd',COOKIE:'D, dd M yy',ISO_8601:'yy-mm-dd',RFC_822:'D, d M y',RFC_850:'DD, dd-M-y',RFC_1036:'D, d M y',RFC_1123:'D, d M yy',RFC_2822:'D, d M yy',RSS:'D, d M y',TIMESTAMP:'@',W3C:'yy-mm-dd',formatDate:function(format,date,settings){if(!date)
return'';var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches)
iFormat++;return matches;};var formatNumber=function(match,value,len){var num=''+value;if(lookAhead(match))
while(num.length<len)
num='0'+num;return num;};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);};var output='';var literal=false;if(date)
for(var iFormat=0;iFormat<format.length;iFormat++){if(literal)
if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
literal=false;else
output+=format.charAt(iFormat);else
switch(format.charAt(iFormat)){case'd':output+=formatNumber('d',date.getDate(),2);break;case'D':output+=formatName('D',date.getDay(),dayNamesShort,dayNames);break;case'o':var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--)
doy+=this._getDaysInMonth(date.getFullYear(),m);output+=formatNumber('o',doy,3);break;case'm':output+=formatNumber('m',date.getMonth()+1,2);break;case'M':output+=formatName('M',date.getMonth(),monthNamesShort,monthNames);break;case'y':output+=(lookAhead('y')?date.getFullYear():(date.getYear()%100<10?'0':'')+date.getYear()%100);break;case'@':output+=date.getTime();break;case"'":if(lookAhead("'"))
output+="'";else
literal=true;break;default:output+=format.charAt(iFormat);}}
return output;},_possibleChars:function(format){var chars='';var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++)
if(literal)
if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
literal=false;else
chars+=format.charAt(iFormat);else
switch(format.charAt(iFormat)){case'd':case'm':case'y':case'@':chars+='0123456789';break;case'D':case'M':return null;case"'":if(lookAhead("'"))
chars+="'";else
literal=true;break;default:chars+=format.charAt(iFormat);}
return chars;},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name];},_setDateFromField:function(inst){var dateFormat=this._get(inst,'dateFormat');var dates=inst.input?inst.input.val().split(this._get(inst,'rangeSeparator')):null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);if(dates.length>0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFormat,dates[1],settings)||defaultDate;inst.endDay=date.getDate();inst.endMonth=date.getMonth();inst.endYear=date.getFullYear();}
try{date=this.parseDate(dateFormat,dates[0],settings)||defaultDate;}catch(e){this.log(e);date=defaultDate;}}
inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates[0]?date.getDate():0);inst.currentMonth=(dates[0]?date.getMonth():0);inst.currentYear=(dates[0]?date.getFullYear():0);this._adjustInstDate(inst);},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,'defaultDate'),new Date());var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date;},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setUTCDate(date.getUTCDate()+offset);return date;};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||'d'){case'd':case'D':day+=parseInt(matches[1]);break;case'w':case'W':day+=parseInt(matches[1])*7;break;case'm':case'M':month+=parseInt(matches[1]);day=Math.min(day,getDaysInMonth(year,month));break;case'y':case'Y':year+=parseInt(matches[1]);day=Math.min(day,getDaysInMonth(year,month));break;}
matches=pattern.exec(offset);}
return new Date(year,month,day);};return(date==null?defaultDate:(typeof date=='string'?offsetString(date,this._getDaysInMonth):(typeof date=='number'?offsetNumeric(date):date)));},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(this._get(inst,'rangeSelect')){if(endDate){endDate=this._determineDate(endDate,null);inst.endDay=endDate.getDate();inst.endMonth=endDate.getMonth();inst.endYear=endDate.getFullYear();}else{inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear;}}
if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)
this._notifyChange(inst);this._adjustInstDate(inst);if(inst.input)
inst.input.val(clear?'':this._formatDate(inst)+
(!this._get(inst,'rangeSelect')?'':this._get(inst,'rangeSeparator')+
this._formatDate(inst,inst.endDay,inst.endMonth,inst.endYear)));},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=='')?null:new Date(inst.currentYear,inst.currentMonth,inst.currentDay));if(this._get(inst,'rangeSelect')){return[inst.rangeStart||startDate,(!inst.endYear?inst.rangeStart||startDate:new Date(inst.endYear,inst.endMonth,inst.endDay))];}else
return startDate;},_generateHTML:function(inst){var today=defaultDate;today=new Date(today.getFullYear(),today.getMonth(),today.getDate());var showStatus=this._get(inst,'showStatus');var initStatus=this._get(inst,'initStatus')||'&#xa0;';var isRTL=this._get(inst,'isRTL');var clear=(this._get(inst,'mandatory')?'':'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+inst.id+'\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'clearStatus'),initStatus)+'>'+
this._get(inst,'clearText')+'</a></div>');var controls='<div class="ui-datepicker-control">'+(isRTL?'':clear)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+
this._addStatus(showStatus,inst.id,this._get(inst,'closeStatus'),initStatus)+'>'+
this._get(inst,'closeText')+'</a></div>'+(isRTL?clear:'')+'</div>';var prompt=this._get(inst,'prompt');var closeAtTop=this._get(inst,'closeAtTop');var hideIfNoPrevNext=this._get(inst,'hideIfNoPrevNext');var navigationAsDateFormat=this._get(inst,'navigationAsDateFormat');var showBigPrevNext=this._get(inst,'showBigPrevNext');var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,'showCurrentAtPos');var stepMonths=this._get(inst,'stepMonths');var stepBigMonths=this._get(inst,'stepBigMonths');var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=(!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay));var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--;}
if(maxDate){var maxDraw=new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate());maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(new Date(drawYear,drawMonth,1)>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}
var prevText=this._get(inst,'prevText');prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,new Date(drawYear,drawMonth-stepMonths,1),this._getFormatConfig(inst)));var prevBigText=(showBigPrevNext?this._get(inst,'prevBigText'):'');prevBigText=(!navigationAsDateFormat?prevBigText:this.formatDate(prevBigText,new Date(drawYear,drawMonth-stepBigMonths,1),this._getFormatConfig(inst)));var prev='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?(showBigPrevNext?'<a onclick="jQuery.datepicker._adjustDate(\'#'+inst.id+'\', -'+stepBigMonths+', \'M\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'prevBigStatus'),initStatus)+'>'+prevBigText+'</a>':'')+'<a onclick="jQuery.datepicker._adjustDate(\'#'+inst.id+'\', -'+stepMonths+', \'M\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'prevStatus'),initStatus)+'>'+prevText+'</a>':(hideIfNoPrevNext?'':'<label>'+prevBigText+'</label><label>'+prevText+'</label>'))+'</div>';var nextText=this._get(inst,'nextText');nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,new Date(drawYear,drawMonth+stepMonths,1),this._getFormatConfig(inst)));var nextBigText=(showBigPrevNext?this._get(inst,'nextBigText'):'');nextBigText=(!navigationAsDateFormat?nextBigText:this.formatDate(nextBigText,new Date(drawYear,drawMonth+stepBigMonths,1),this._getFormatConfig(inst)));var next='<div class="ui-datepicker-next">'+(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate(\'#'+inst.id+'\', +'+stepMonths+', \'M\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'nextStatus'),initStatus)+'>'+nextText+'</a>'+
(showBigPrevNext?'<a onclick="jQuery.datepicker._adjustDate(\'#'+inst.id+'\', +'+stepBigMonths+', \'M\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'nextBigStatus'),initStatus)+'>'+nextBigText+'</a>':''):(hideIfNoPrevNext?'':'<label>'+nextText+'</label><label>'+nextBigText+'</label>'))+'</div>';var currentText=this._get(inst,'currentText');var gotoDate=(this._get(inst,'gotoCurrent')&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var html=(prompt?'<div class="'+this._promptClass+'">'+prompt+'</div>':'')+
(closeAtTop&&!inst.inline?controls:'')+'<div class="ui-datepicker-links">'+(isRTL?next:prev)+
(this._isInRange(inst,gotoDate)?'<div class="ui-datepicker-current">'+'<a onclick="jQuery.datepicker._gotoToday(\'#'+inst.id+'\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'currentStatus'),initStatus)+'>'+
currentText+'</a></div>':'')+(isRTL?prev:next)+'</div>';var firstDay=this._get(inst,'firstDay');var changeFirstDay=this._get(inst,'changeFirstDay');var dayNames=this._get(inst,'dayNames');var dayNamesShort=this._get(inst,'dayNamesShort');var dayNamesMin=this._get(inst,'dayNamesMin');var monthNames=this._get(inst,'monthNames');var beforeShowDay=this._get(inst,'beforeShowDay');var highlightWeek=this._get(inst,'highlightWeek');var showOtherMonths=this._get(inst,'showOtherMonths');var showWeeks=this._get(inst,'showWeeks');var calculateWeek=this._get(inst,'calculateWeek')||this.iso8601Week;var weekStatus=this._get(inst,'weekStatus');var status=(showStatus?this._get(inst,'dayStatus')||initStatus:'');var dateStatus=this._get(inst,'statusForDate')||this.dateStatus;var endDate=inst.endDay?new Date(inst.endYear,inst.endMonth,inst.endDay):currentDate;for(var row=0;row<numMonths[0];row++)
for(var col=0;col<numMonths[1];col++){var selectedDate=new Date(drawYear,drawMonth,inst.selectedDay);html+='<div class="ui-datepicker-one-month'+(col==0?' ui-datepicker-new-row':'')+'">'+
this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,showStatus,initStatus,monthNames)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead>'+'<tr class="ui-datepicker-title-row">'+
(showWeeks?'<td'+this._addStatus(showStatus,inst.id,weekStatus,initStatus)+'>'+
this._get(inst,'weekHeader')+'</td>':'');for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var dayStatus=(status.indexOf('DD')>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+='<td'+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end-cell"':'')+'>'+
(!changeFirstDay?'<span':'<a onclick="jQuery.datepicker._changeFirstDay(\'#'+inst.id+'\', '+day+');"')+
this._addStatus(showStatus,inst.id,dayStatus,initStatus)+' title="'+dayNames[day]+'">'+
dayNamesMin[day]+(changeFirstDay?'</a>':'</span>')+'</td>';}
html+='</tr></thead><tbody>';var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth)
inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var tzDate=new Date(drawYear,drawMonth,1-leadDays);var utcDate=new Date(drawYear,drawMonth,1-leadDays);var printDate=utcDate;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="ui-datepicker-days-row">'+
(showWeeks?'<td class="ui-datepicker-week-col"'+
this._addStatus(showStatus,inst.id,weekStatus,initStatus)+'>'+
calculateWeek(printDate)+'</td>':'');for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,'']);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="ui-datepicker-days-cell'+
((dow+firstDay+6)%7>=5?' ui-datepicker-week-end-cell':'')+
(otherMonth?' ui-datepicker-other-month':'')+
(printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth?' ui-datepicker-days-cell-over':'')+
(unselectable?' '+this._unselectableClass:'')+
(otherMonth&&!showOtherMonths?'':' '+daySettings[1]+
(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?' '+this._currentClass:'')+
(printDate.getTime()==today.getTime()?' ui-datepicker-today':''))+'"'+
((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':'')+
(unselectable?(highlightWeek?' onmouseover="jQuery(this).parent().addClass(\'ui-datepicker-week-over\');"'+' onmouseout="jQuery(this).parent().removeClass(\'ui-datepicker-week-over\');"':''):' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\')'+
(highlightWeek?'.parent().addClass(\'ui-datepicker-week-over\')':'')+';'+
(!showStatus||(otherMonth&&!showOtherMonths)?'':'jQuery(\'#ui-datepicker-status-'+
inst.id+'\').html(\''+(dateStatus.apply((inst.input?inst.input[0]:null),[printDate,inst])||initStatus)+'\');')+'"'+' onmouseout="jQuery(this).removeClass(\'ui-datepicker-days-cell-over\')'+
(highlightWeek?'.parent().removeClass(\'ui-datepicker-week-over\')':'')+';'+
(!showStatus||(otherMonth&&!showOtherMonths)?'':'jQuery(\'#ui-datepicker-status-'+
inst.id+'\').html(\''+initStatus+'\');')+'" onclick="jQuery.datepicker._selectDay(\'#'+
inst.id+'\','+drawMonth+','+drawYear+', this);"')+'>'+
(otherMonth?(showOtherMonths?printDate.getDate():'&#xa0;'):(unselectable?printDate.getDate():'<a>'+printDate.getDate()+'</a>'))+'</td>';tzDate.setDate(tzDate.getDate()+1);utcDate.setUTCDate(utcDate.getUTCDate()+1);printDate=(tzDate>utcDate?tzDate:utcDate);}
html+='</tr>';}
drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}
html+='</tbody></table></div>';}
html+=(showStatus?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+inst.id+'" class="ui-datepicker-status">'+initStatus+'</div>':'')+
(!closeAtTop&&!inst.inline?controls:'')+'<div style="clear: both;"></div>'+
($.browser.msie&&parseInt($.browser.version)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':'');return html;},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,initStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var showMonthAfterYear=this._get(inst,'showMonthAfterYear');var html='<div class="ui-datepicker-header">';var monthHtml='';if(secondary||!this._get(inst,'changeMonth'))
monthHtml+=monthNames[drawMonth]+'&#xa0;';else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-new-month" '+'onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+'\', this, \'M\');" '+'onclick="jQuery.datepicker._clickMonthYear(\'#'+inst.id+'\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'monthStatus'),initStatus)+'>';for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth()))
monthHtml+='<option value="'+month+'"'+
(month==drawMonth?' selected="selected"':'')+'>'+monthNames[month]+'</option>';}
monthHtml+='</select>';}
if(!showMonthAfterYear)
html+=monthHtml;if(secondary||!this._get(inst,'changeYear'))
html+=drawYear;else{var years=this._get(inst,'yearRange').split(':');var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10;}else if(years[0].charAt(0)=='+'||years[0].charAt(0)=='-'){year=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=parseInt(years[1],10);}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10);}
year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-new-year" '+'onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+'\', this, \'Y\');" '+'onclick="jQuery.datepicker._clickMonthYear(\'#'+inst.id+'\');"'+
this._addStatus(showStatus,inst.id,this._get(inst,'yearStatus'),initStatus)+'>';for(;year<=endYear;year++){html+='<option value="'+year+'"'+
(year==drawYear?' selected="selected"':'')+'>'+year+'</option>';}
html+='</select>';}
if(showMonthAfterYear)
html+=monthHtml;html+='</div>';return html;},_addStatus:function(showStatus,id,text,initStatus){return(showStatus?' onmouseover="jQuery(\'#ui-datepicker-status-'+id+'\').html(\''+(text||initStatus)+'\');" '+'onmouseout="jQuery(\'#ui-datepicker-status-'+id+'\').html(\''+initStatus+'\');"':'');},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=='Y'?offset:0);var month=inst.drawMonth+(period=='M'?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+
(period=='D'?offset:0);var date=new Date(year,month,day);var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=='M'||period=='Y')
this._notifyChange(inst);},_notifyChange:function(inst){var onChange=this._get(inst,'onChangeMonthYear');if(onChange)
onChange.apply((inst.input?inst.input[0]:null),[new Date(inst.selectedYear,inst.selectedMonth,1),inst]);},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,'numberOfMonths');return(numMonths==null?[1,1]:(typeof numMonths=='number'?[1,numMonths]:numMonths));},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+'Date'),null);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);}
return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date));},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1);if(offset<0)
date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));return this._isInRange(inst,date);},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,'min');var maxDate=this._getMinMaxDate(inst,'max');return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate));},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,'shortYearCutoff');shortYearCutoff=(typeof shortYearCutoff!='string'?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,'dayNamesShort'),dayNames:this._get(inst,'dayNames'),monthNamesShort:this._get(inst,'monthNamesShort'),monthNames:this._get(inst,'monthNames')};},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear;}
var date=(day?(typeof day=='object'?day:new Date(year,month,day)):new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return this.formatDate(this._get(inst,'dateFormat'),date,this._getFormatConfig(inst));}});function extendRemove(target,props){$.extend(target,props);for(var name in props)
if(props[name]==null||props[name]==undefined)
target[name]=props[name];return target;};function isArray(a){return(a&&(($.browser.safari&&typeof a=='object'&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))));};$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick);$.datepicker.initialized=true;}
var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=='string'&&(options=='isDisabled'||options=='getDate'))
return $.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this[0]].concat(otherArgs));return this.each(function(){typeof options=='string'?$.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$.datepicker.initialized=false;})(jQuery);;(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}
$.fn._fadeIn=$.fn.fadeIn;var mode=document.documentMode||0;var setExpr=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout==undefined)timeout=3000;$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,'position')=='static')
this.style.position='relative';if($.browser.msie)
this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.23;$.blockUI.defaults={message:'<h1>Please wait...</h1>',css:{padding:0,margin:0,width:'30%',top:'40%',left:'35%',textAlign:'center',color:'#000',border:'3px solid #aaa',backgroundColor:'#fff',cursor:'wait'},overlayCSS:{backgroundColor:'#000',opacity:0.6,cursor:'wait'},growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:null,color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)
remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)
data.parent.removeChild(node);}
var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3=full?$('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>'):$('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');if(msg)
lyr3.css(css);if(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform)))
lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if($.browser.msie||opts.forceIframe)
lyr1.css('opacity',0.0);$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full?'body':el);var expr=setExpr&&(!$.boxModel||$('object,embed',full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.boxModel)
$('html,body').css('height','100%');if((ie6||!$.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}
$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position='absolute';if(i<2){full?s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression('height','this.parentNode.offsetHeight + "px"');full?s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}
else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}
else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}
if(msg){lyr3.append(msg);if(msg.jquery||msg.nodeType)
$(msg).show();}
if(($.browser.msie||opts.forceIframe)&&opts.showOverlay)
lyr1.show();if(opts.fadeIn){if(opts.showOverlay)
lyr2._fadeIn(opts.fadeIn);if(msg)
lyr3.fadeIn(opts.fadeIn);}
else{if(opts.showOverlay)
lyr2.show();if(msg)
lyr3.show();}
bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(':input:enabled:visible',pageBlock);if(opts.focusInput)
setTimeout(focus,20);}
else
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}};function remove(el,opts){var full=el==window;var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}
opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els=full?$('body').children().filter('.blockUI'):$('.blockUI',el);if(full)
pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}
else
reset(els,data,opts,el);};function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode)
this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent)
data.parent.appendChild(data.el);$(data.el).removeData('blockUI.history');}
if(typeof opts.onUnblock=='function')
opts.onUnblock(el,opts);};function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))
return;if(!full)
$el.data('blockUI.isBlocked',b);if(!opts.bindEvents||(b&&!opts.showOverlay))
return;var events='mousedown mouseup keydown keypress';b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);};function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target==els[els.length-1];var back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false;}}}
if($(e.target).parents('div.blockMsg').length>0)
return true;return $(e.target).parents().children().filter('div.blockUI').length==0;};function focus(back){if(!pageBlockEls)
return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)
e.focus();};function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';};function sz(el,p){return parseInt($.css(el,p))||0;};})(jQuery);jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};(function($){jQuery.extend({createUploadIframe:function(id,uri)
{var frameId='jUploadFrame'+id;if(window.ActiveXObject){var io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');if(typeof uri=='boolean'){io.src='javascript:false';}
else if(typeof uri=='string'){io.src=uri;}}
else{var io=document.createElement('iframe');io.id=frameId;io.name=frameId;}
io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);return io},createUploadForm:function(id,fileElementId)
{var formId='jUploadForm'+id;var fileId='jUploadFile'+id;var form=$('<form  action="" method="POST" name="'+formId+'" id="'+formId+'" enctype="multipart/form-data"></form>');var oldElement=$('#'+fileElementId);var newElement=$(oldElement).clone(true);$(oldElement).attr('id',fileId);$(oldElement).before(newElement);$(oldElement).appendTo(form);$(form).css('position','absolute');$(form).css('top','-1200px');$(form).css('left','-1200px');$(form).appendTo('body');return form;},ajaxFileUpload:function(s){s=jQuery.extend({},jQuery.ajaxSettings,s);var id=new Date().getTime()
var form=jQuery.createUploadForm(id,s.fileElementId);var io=jQuery.createUploadIframe(id,s.secureuri);var frameId='jUploadFrame'+id;var formId='jUploadForm'+id;if(s.global&&!jQuery.active++)
{jQuery.event.trigger("ajaxStart");}
var requestDone=false;var xml={}
if(s.global)
jQuery.event.trigger("ajaxSend",[xml,s]);var uploadCallback=function(isTimeout)
{var io=document.getElementById(frameId);try
{if(io.contentWindow)
{xml.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;xml.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}
else if(io.contentDocument)
{xml.responseText=io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null;xml.responseXML=io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document;}}
catch(e)
{jQuery.handleError(s,xml,null,e);}
if(xml||isTimeout=="timeout")
{requestDone=true;var status;try{status=isTimeout!="timeout"?"success":"error";if(status!="error")
{var data=jQuery.uploadHttpData(xml,s.dataType);if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xml,s]);}
else{jQuery.handleError(s,xml,status);}}
catch(e)
{status="error";jQuery.handleError(s,xml,status,e);}
if(s.global)
jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");if(s.complete)
s.complete(xml,status);jQuery(io).unbind();setTimeout(function(){try
{$(io).remove();$(form).remove();}
catch(e)
{jQuery.handleError(s,xml,null,e);}},100);xml=null;}}
if(s.timeout>0)
{setTimeout(function(){if(!requestDone)uploadCallback("timeout");},s.timeout);}
try
{var form=$('#'+formId);$(form).attr('action',s.url);$(form).attr('method','POST');$(form).attr('target',frameId);if(form.encoding)
{form.encoding='multipart/form-data';}
else
{form.enctype='multipart/form-data';}
$(form).submit();}
catch(e)
{jQuery.handleError(s,xml,null,e);}
if(window.attachEvent){document.getElementById(frameId).attachEvent('onload',uploadCallback);}
else{document.getElementById(frameId).addEventListener('load',uploadCallback,false);}
return{abort:function(){}};},uploadHttpData:function(r,type){var data=!type;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script")
jQuery.globalEval(data);if(type=="json")
eval("data = "+data);if(type=="html")
jQuery("<div>").html(data).evalScripts();return data;}})})(jQuery);(function($){$.highlight=function(el){if($(el).hasClass('rowSelected')){return false;}
$(el).parents('table').find('tr').removeClass('rowSelected');$('div.rowSelected').removeClass('rowSelected');$(el).addClass('rowSelected');return true;}
$.hasSVGViewer=function(){var hasSvg=true;if($.browser.msie){try{new ActiveXObject("Adobe.SVGCtl");}catch(e){hasSvg=false;}}
return hasSvg;}
$.fn.enable=function(){return this.each(function(){$(this).removeAttr('disabled');if($(this).hasClass('disabledBtn')){$(this).removeClass("disabledBtn").addClass("btn");}});}
$.fn.disable=function(){return this.each(function(){$(this).attr('disabled',true);if($(this).hasClass('btn')){$(this).removeClass("btn").addClass("disabledBtn");}});}
$.fn.collapsibleTable=function(collapsed){$("tr.collapserRow .collapser",this).click(function(){$(this).toggleClass('collapsed');$("~ tr",$(this).parents("tr.collapserRow")).not("tr.alwaysVisible").not($("~ tr.collapserRow ~ tr",$(this).parents("tr.collapserRow"))).not("tr.collapserRow").toggle();});if(collapsed){$("tr.collapserRow .collapser",this).click();}
return this;}
$.fn.collapsibleDiv=function(collapsed){$(".collapser",this).click(function(){$(this).toggleClass('collapsed');$("~ div",$(this).parents("div.collapserRow")).not($("~ .collapserRow ~ div",$(this).parents("div.collapserRow"))).not(".collapserRow").toggle();});if(collapsed){$(".collapserRow .collapser",this).click();}
return this;}
$.fn.expand=function(){if($(this).hasClass('collapsed')){$(this).click();}}
$.fn.collapse=function(){if(!$(this).hasClass('collapsed')){$(this).click();}}
$.fn.tableHighlighter=function(){$("tr:not(:has(th))",this).click(function(){$.highlight(this);});return this;}
$.fn.dataTree=function(){$('li.branch :checkbox:enabled',$(this)).click(function(){if($(this).attr('checked')){$(this).parent().siblings('ul').find('>li:not(.branch) :checkbox:enabled').each(function(){$(this).attr('checked',false);});}});$('li:not(.branch) :checkbox:enabled',$(this)).click(function(){if($(this).attr('checked')){$(this).parents('ul:first').siblings().find(':checkbox:enabled').attr('checked',false);}});return this;}
$.fn.checkboxToggler=function(toggleTargets){var container=$(this);$('.parent:checkbox:enabled',container).click(function(){var checked=this.checked;$('.child:checkbox:enabled',container).each(function(){this.checked=checked;});});var setParentStatus=function(){var totalChildren=$('.child:checkbox:enabled',container).size();var checkedChildren=$('.child:checkbox:enabled:checked',container).size();var isChecked=totalChildren>0&&checkedChildren==totalChildren;$('.parent:checkbox:enabled',container).attr('checked',isChecked);};if($('.child:checkbox:enabled',container).size()==0){$('.parent:checkbox',container).disable();}
setParentStatus();$('.child:checkbox:enabled',container).click(setParentStatus);if(toggleTargets){var setTargetStatus=function(){if($('.child:checkbox:enabled:checked',container).size()==0){if(typeof toggleTargets=='string'){$(toggleTargets).disable();}else{toggleTargets.disable();}}else{if(typeof toggleTargets=='string'){$(toggleTargets).enable();}else{toggleTargets.enable();}}};setTargetStatus();$(':checkbox:enabled',container).click(setTargetStatus);}
return this;}
$.fn.limitTextAreaInput=function(maxSize){var container=$(this);container.add("<div id='charleft'>&nbsp;</div>").insertAfter(this);var cssObj={'font-size':'10px','font-family':'Tahoma,sans-serif','color':'#939393','text-align':'right'};container.siblings('#charleft').css(cssObj);container.bind('paste',function(event){setTimeout(function(){limitTextAreaContent();},10);});container.bind('keyup',function(event){limitTextAreaContent();});container.bind('mousemove',function(event){limitTextAreaContent();});function limitTextAreaContent(){var content=container.val();var contentLength=content.length;if(contentLength>=maxSize){content=content.substring(0,maxSize);}
var count=0;for(var i=0;i<contentLength;i++){if(content.charAt(i)=='\n'){count++;}}
if(contentLength>(maxSize-count)){var originalScrollTopPosition=this.scrollTop;container.val(content.substring(0,(maxSize-count)));this.scrollTop=originalScrollTopPosition;}
if((maxSize-count)-contentLength<=20){container.siblings('#charleft').css({"color":"#EC5E53"});}else{container.siblings('#charleft').css({"color":"#939393"});}
container.siblings('#charleft').html((container.val().length+count)+"/"+maxSize);}}
$.checkSpecialCharacterInput=function(){$('input[type="text"]').keyup(function(event){var thisObj=$(this);if(thisObj.val().match('\"')){var noSpCharValue=thisObj.val().replace('\"','');thisObj.val(noSpCharValue);if(thisObj.siblings('#specialCharacterError').size()==0){thisObj.add("<div id='specialCharacterError'>The input cannot contain double quotation: \".</div>").insertAfter(this);}
var offset=thisObj.offset();thisObj.siblings('#specialCharacterError').css("left",offset.left);if($.browser.msie){thisObj.siblings('#specialCharacterError').css("margin-top",20);}
thisObj.siblings('#specialCharacterError').show('fast',function(){thisObj.focus();});}});$('input[type="text"]').keydown(function(event){if($(this).val().match('\"')){if($(this).siblings('#specialCharacterError').size()!=0){$(this).siblings('#specialCharacterError').show();}}else{if($(this).siblings('#specialCharacterError').size()!=0){$(this).siblings('#specialCharacterError').hide();}}});$('input[type="text"]').blur(function(){if($(this).siblings('#specialCharacterError').size()!=0){$(this).siblings('#specialCharacterError').hide();}});}})(jQuery);(function($){$.superfish={};$.superfish.o=[];$.superfish.op={};$.superfish.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',delay:800,animation:{opacity:'show'},speed:'normal',oldJquery:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.superfish=function(op){var bcClass='sfbreadcrumb',over=function(){var $$=$(this),menu=getMenu($$);getOpts(menu,true);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$);var o=getOpts(menu,true);clearTimeout(menu.sfTimer);if(!$$.is('.'+bcClass)){menu.sfTimer=setTimeout(function(){$$.hideSuperfishUl();if(o.$path.length){over.call(o.$path);}},o.delay);}},getMenu=function($el){return $el.parents('ul.superfish:first')[0];},getOpts=function(el,menuFound){el=menuFound?el:getMenu(el);return $.superfish.op=$.superfish.o[el.serial];},hasUl=function(){return $.superfish.op.oldJquery?'li[ul]':'li:has(ul)';};return this.each(function(){var s=this.serial=$.superfish.o.length;var o=$.extend({},$.superfish.defaults,op);o.$path=$('li.'+o.pathClass,this).each(function(){$(this).addClass(o.hoverClass+' '+bcClass).filter(hasUl()).removeClass(o.pathClass);});$.superfish.o[s]=$.superfish.op=o;$(hasUl(),this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).not('.'+bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).addClass('superfish');};$.fn.extend({hideSuperfishUl:function(){var o=$.superfish.op,$ul=$('li.'+o.hoverClass,this).add(this).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=$.superfish.op,$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){o.onShow.call(this);});return this;}});$(window).unload(function(){$('ul.superfish').each(function(){$('li',this).unbind('mouseover','mouseout','mouseenter','mouseleave');});});})(jQuery);function dtmlXMLLoaderObject(funcObject,dhtmlObject,async,rSeed){this.xmlDoc="";if(arguments.length==2)
this.async=true;else
this.async=async;this.onloadAction=funcObject||null;this.mainObject=dhtmlObject||null;this.waitCall=null;this.rSeed=rSeed||false;return this;};dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){this.check=function(){if((dhtmlObject)&&(dhtmlObject.onloadAction!=null)){if((!dhtmlObject.xmlDoc.readyState)||(dhtmlObject.xmlDoc.readyState==4)){dhtmlObject.onloadAction(dhtmlObject.mainObject,null,null,null,dhtmlObject);if(dhtmlObject.waitCall){dhtmlObject.waitCall();dhtmlObject.waitCall=null;}
dhtmlObject=null;}}};return this.check;};dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName){if(this.xmlDoc.responseXML){var temp=this.xmlDoc.responseXML.getElementsByTagName(tagName);var z=temp[0];}else
var z=this.xmlDoc.documentElement;if(z){this._retry=false;return z;}
if((_isIE)&&(!this._retry)){var xmlString=this.xmlDoc.responseText;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc.loadXML(xmlString);return this.getXMLTopNode(tagName);}
dhtmlxError.throwError("LoadXML","Incorrect XML",[this.xmlDoc,this.mainObject]);return document.createElement("DIV");};dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString){try
{var parser=new DOMParser();this.xmlDoc=parser.parseFromString(xmlString,"text/xml");}
catch(e){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc.loadXML(xmlString);}
this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall){this.waitCall();this.waitCall=null;}}
dtmlXMLLoaderObject.prototype.loadXML=function(filePath,postMode,postVars,rpc){this.filePath=filePath;if(this.rSeed)filePath+=((filePath.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf();if((!_isIE)&&(window.XMLHttpRequest))
this.xmlDoc=new XMLHttpRequest();else{if(document.implementation&&document.implementation.createDocument)
{this.xmlDoc=document.implementation.createDocument("","",null);this.xmlDoc.onload=new this.waitLoadFunction(this);this.xmlDoc.load(filePath);return;}
else
this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");}
this.xmlDoc.open(postMode?"POST":"GET",filePath,this.async);if(rpc){this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type","text/xml");}else
if(postMode)this.xmlDoc.setRequestHeader('Content-type','application/x-www-form-urlencoded');this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.send(null||postVars);};dtmlXMLLoaderObject.prototype.destructor=function(){this.onloadAction=null;this.mainObject=null;this.xmlDoc=null;return null;}
function callerFunction(funcObject,dhtmlObject){this.handler=function(e){if(!e)e=window.event;funcObject(e,dhtmlObject);return true;};return this.handler;};function getAbsoluteLeft(htmlObject){var xPos=htmlObject.offsetLeft;var temp=htmlObject.offsetParent;while(temp!=null){xPos+=temp.offsetLeft;temp=temp.offsetParent;}
return xPos;}
function getAbsoluteTop(htmlObject){var yPos=htmlObject.offsetTop;var temp=htmlObject.offsetParent;while(temp!=null){yPos+=temp.offsetTop;temp=temp.offsetParent;}
return yPos;}
function convertStringToBoolean(inputString){if(typeof(inputString)=="string")inputString=inputString.toLowerCase();switch(inputString){case"1":case"true":case"yes":case"y":case 1:case true:return true;break;default:return false;}}
function getUrlSymbol(str){if(str.indexOf("?")!=-1)
return"&"
else
return"?"}
function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;this.lastLanding=0;this.dragNode=0;this.dragStartNode=0;this.dragStartObject=0;this.tempDOMU=null;this.tempDOMM=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this;};dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){htmlNode.onmousedown=null;htmlNode.dragStarter=null;htmlNode.dragLanding=null;}
dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode,dhtmlObject){htmlNode.onmousedown=this.preCreateDragCopy;htmlNode.dragStarter=dhtmlObject;this.addDragLanding(htmlNode,dhtmlObject);}
dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode,dhtmlObject){htmlNode.dragLanding=dhtmlObject;}
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e)
{if(window.dhtmlDragAndDrop.waitDrag){window.dhtmlDragAndDrop.waitDrag=0;document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;return false;}
window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;if((e)&&(e.preventDefault)){e.preventDefault();return false;}
return false;};dhtmlDragAndDropObject.prototype.callDrag=function(e){if(!e)e=window.event;dragger=window.dhtmlDragAndDrop;if((e.button==0)&&(_isIE))return dragger.stopDrag();if(!dragger.dragNode){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,e);if(!dragger.dragNode)return dragger.stopDrag();dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=0;dragger.dragNode.pWindow=window;dragger.initFrameRoute();}
if(dragger.dragNode.parentNode!=window.document.body){var grd=dragger.gldragNode;if(dragger.gldragNode.old)grd=dragger.gldragNode.old;grd.parentNode.removeChild(grd);var oldBody=dragger.dragNode.pWindow;if(_isIE){var div=document.createElement("Div");div.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=div.childNodes[0];}
else dragger.dragNode=dragger.dragNode.cloneNode(true);dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);oldBody.dhtmlDragAndDrop.dragNode=dragger.dragNode;}
dragger.dragNode.style.left=e.clientX+15
+(dragger.fx?dragger.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=e.clientY+3
+(dragger.fy?dragger.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";if(!e.srcElement)var z=e.target;else z=e.srcElement;dragger.checkLanding(z,e);}
dhtmlDragAndDropObject.prototype.calculateFramePosition=function(n){if(window.name){var el=parent.frames[window.name].frameElement.offsetParent;var fx=0;var fy=0;while(el){fx+=el.offsetLeft;fy+=el.offsetTop;el=el.offsetParent;}
if((parent.dhtmlDragAndDrop)){var ls=parent.dhtmlDragAndDrop.calculateFramePosition(1);fx+=ls.split('_')[0]*1;fy+=ls.split('_')[1]*1;}
if(n)return fx+"_"+fy;else this.fx=fx;this.fy=fy;}
return"0_0";}
dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject,e){if((htmlObject)&&(htmlObject.dragLanding)){if(this.lastLanding)
this.lastLanding.dragLanding._dragOut(this.lastLanding);this.lastLanding=htmlObject;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,e.clientX,e.clientY,e);this.lastLanding_scr=(_isIE?e.srcElement:e.target);}
else{if((htmlObject)&&(htmlObject.tagName!="BODY"))this.checkLanding(htmlObject.parentNode,e);else{if(this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding,e.clientX,e.clientY,e);this.lastLanding=0;if(this._onNotFound)this._onNotFound();}}}
dhtmlDragAndDropObject.prototype.stopDrag=function(e,mode){dragger=window.dhtmlDragAndDrop;if(!mode)
{dragger.stopFrameRoute();var temp=dragger.lastLanding;dragger.lastLanding=null;if(temp)temp.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,temp,(_isIE?event.srcElement:e.target));}
dragger.lastLanding=null;if((dragger.dragNode)&&(dragger.dragNode.parentNode==document.body))dragger.dragNode.parentNode.removeChild(dragger.dragNode);dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0;}
dhtmlDragAndDropObject.prototype.stopFrameRoute=function(win){if(win)
window.dhtmlDragAndDrop.stopDrag(1,1);for(var i=0;i<window.frames.length;i++)
if((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
window.frames[i].dhtmlDragAndDrop.stopFrameRoute(window);if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
parent.dhtmlDragAndDrop.stopFrameRoute(window);}
dhtmlDragAndDropObject.prototype.initFrameRoute=function(win,mode){if(win){window.dhtmlDragAndDrop.preCreateDragCopy();window.dhtmlDragAndDrop.dragStartNode=win.dhtmlDragAndDrop.dragStartNode;window.dhtmlDragAndDrop.dragStartObject=win.dhtmlDragAndDrop.dragStartObject;window.dhtmlDragAndDrop.dragNode=win.dhtmlDragAndDrop.dragNode;window.dhtmlDragAndDrop.gldragNode=win.dhtmlDragAndDrop.dragNode;window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;window.waitDrag=0;if(((!_isIE)&&(mode))&&((!_isFF)||(_FFrv<1.8)))
window.dhtmlDragAndDrop.calculateFramePosition();}
if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
parent.dhtmlDragAndDrop.initFrameRoute(window);for(var i=0;i<window.frames.length;i++)
if((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
window.frames[i].dhtmlDragAndDrop.initFrameRoute(window,((!win||mode)?1:0));}
var _isFF=false;var _isIE=false;var _isOpera=false;var _isKHTML=false;var _isMacOS=false;if(navigator.userAgent.indexOf('Macintosh')!=-1)_isMacOS=true;if((navigator.userAgent.indexOf('Safari')!=-1)||(navigator.userAgent.indexOf('Konqueror')!=-1))
_isKHTML=true;else if(navigator.userAgent.indexOf('Opera')!=-1){_isOpera=true;_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Opera')+6,3));}
else if(navigator.appName.indexOf("Microsoft")!=-1)
_isIE=true;else{_isFF=true;var _FFrv=parseFloat(navigator.userAgent.split("rv:")[1])}
function isIE(){if(navigator.appName.indexOf("Microsoft")!=-1)
if(navigator.userAgent.indexOf('Opera')==-1)
return true;return false;}
dtmlXMLLoaderObject.prototype.doXPath=function(xpathExp,docObj){if((_isOpera)||(_isKHTML))return this.doXPathOpera(xpathExp,docObj);if(_isIE){if(!docObj)
if(!this.xmlDoc.nodeName)
docObj=this.xmlDoc.responseXML
else
docObj=this.xmlDoc;return docObj.selectNodes(xpathExp);}else{var nodeObj=docObj;if(!docObj){if(!this.xmlDoc.nodeName){docObj=this.xmlDoc.responseXML}else{docObj=this.xmlDoc;}}
if(docObj.nodeName.indexOf("document")!=-1){nodeObj=docObj;}else{nodeObj=docObj;docObj=docObj.ownerDocument;}
var rowsCol=new Array();var col=docObj.evaluate(xpathExp,nodeObj,null,XPathResult.ANY_TYPE,null);var thisColMemb=col.iterateNext();while(thisColMemb){rowsCol[rowsCol.length]=thisColMemb;thisColMemb=col.iterateNext();}
return rowsCol;}}
function _dhtmlxError(type,name,params){if(!this.catches)
this.catches=new Array();return this;}
_dhtmlxError.prototype.catchError=function(type,func_name){this.catches[type]=func_name;}
_dhtmlxError.prototype.throwError=function(type,name,params){if(this.catches[type])return this.catches[type](type,name,params);if(this.catches["ALL"])return this.catches["ALL"](type,name,params);alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null;}
window.dhtmlxError=new _dhtmlxError();dtmlXMLLoaderObject.prototype.doXPathOpera=function(xpathExp,docObj){var z=xpathExp.replace(/[\/]+/gi,"/").split('/');var obj=null;var i=1;if(!z.length)return[];if(z[0]==".")
obj=[docObj];else if(z[0]=="")
{obj=this.xmlDoc.responseXML.getElementsByTagName(z[i].replace(/\[[^\]]*\]/g,""));i++;}
else return[];for(i;i<z.length;i++)
obj=this._getAllNamedChilds(obj,z[i]);if(z[i-1].indexOf("[")!=-1)
obj=this._filterXPath(obj,z[i-1]);return obj;}
dtmlXMLLoaderObject.prototype._filterXPath=function(a,b){var c=new Array();var b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var i=0;i<a.length;i++)
if(a[i].getAttribute(b))
c[c.length]=a[i];return c;}
dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a,b){var c=new Array();for(var i=0;i<a.length;i++)
for(var j=0;j<a[i].childNodes.length;j++)
if(a[i].childNodes[j].tagName==b)c[c.length]=a[i].childNodes[j];return c;}
function dhtmlXHeir(a,b){for(c in b)
if(typeof(b[c])=="function")a[c]=b[c];return a;}
function dhtmlxEvent(el,event,handler){if(el.addEventListener)
el.addEventListener(event,handler,false);else if(el.attachEvent)
el.attachEvent("on"+event,handler);}
function dhtmlXTreeObject(htmlObject,width,height,rootId){if(_isIE)try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}
if(typeof(htmlObject)!="object")
this.parentObject=document.getElementById(htmlObject);else
this.parentObject=htmlObject;this._itim_dg=true;this.dlmtr=",";this.dropLower=false;this.enableIEImageFix();this.xmlstate=0;this.mytype="tree";this.smcheck=true;this.width=width;this.height=height;this.rootId=rootId;this.childCalc=null;this.def_img_x="18px";this.def_img_y="18px";this.def_line_img_x="18px";this.def_line_img_y="18px";this._dragged=new Array();this._selected=new Array();this.style_pointer="pointer";if(navigator.appName=='Microsoft Internet Explorer')this.style_pointer="hand";this._aimgs=true;this.htmlcA=" [";this.htmlcB="]";this.lWin=window;this.cMenu=0;this.mlitems=0;this.dadmode=0;this.slowParse=false;this.autoScroll=true;this.hfMode=0;this.nodeCut=new Array();this.XMLsource=0;this.XMLloadingWarning=0;this._idpull={};this._pullSize=0;this.treeLinesOn=true;this.tscheck=false;this.timgen=true;this.dpcpy=false;this._ld_id=null;this.imPath="treeGfx/";this.checkArray=new Array("iconUnCheckAll.gif","iconCheckAll.gif","iconCheckGray.gif","iconUncheckDis.gif","iconCheckDis.gif","iconCheckDis.gif");this.radioArray=new Array("radio_off.gif","radio_on.gif","radio_on.gif","radio_off.gif","radio_on.gif","radio_on.gif");this.lineArray=new Array("line2.gif","line3.gif","line4.gif","blank.gif","blank.gif","line1.gif");this.minusArray=new Array("minus2.gif","minus3.gif","minus4.gif","minus.gif","minus5.gif");this.plusArray=new Array("plus2.gif","plus3.gif","plus4.gif","plus.gif","plus5.gif");this.imageArray=new Array("leaf.gif","folderOpen.gif","folderClosed.gif");this.cutImg=new Array(0,0,0);this.cutImage="but_cut.gif";this.dragger=new dhtmlDragAndDropObject();this.htmlNode=new dhtmlXTreeItemObject(this.rootId,"",0,this);this.htmlNode.htmlNode.childNodes[0].childNodes[0].style.display="none";this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[0].className="hiddenRow";this.allTree=this._createSelf();this.allTree.appendChild(this.htmlNode.htmlNode);if(_isFF)this.allTree.childNodes[0].width="100%";this.allTree.onselectstart=new Function("return false;");this.XMLLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this,true,this.no_cashe);if(_isIE)this.preventIECashing(true);this.selectionBar=document.createElement("DIV");this.selectionBar.className="selectionBar";this.selectionBar.innerHTML="&nbsp;";this.selectionBar.style.display="none";this.allTree.appendChild(this.selectionBar);var self=this;if(window.addEventListener)window.addEventListener("unload",function(){try{self.destructor();}catch(e){}},false);if(window.attachEvent)window.attachEvent("onunload",function(){try{self.destructor();}catch(e){}});this.dhx_Event();return this;};dhtmlXTreeObject.prototype.enableIEImageFix=function(mode){if(!mode){this._getImg=function(id){return document.createElement((id==this.rootId)?"div":"img");}
this._setSrc=function(a,b){a.src=b;}
this._getSrc=function(a){return a.src;}}else{this._getImg=function(){var z=document.createElement("DIV");z.innerHTML="&nbsp;";z.style.width="18px";z.style.height="18px";return z;}
this._setSrc=function(a,b){a.style.backgroundImage="url("+b+")";}
this._getSrc=function(a){var z=a.style.backgroundImage;return a.substr(4,a.length-5);}}}
dhtmlXTreeObject.prototype.destructor=function(){for(var a in this._idpull){var z=this._idpull[a];if(!z)continue;if(!z.parentObject)continue;z.parentObject=null;z.treeNod=null;z.childNodes=null;z.span=null;z.tr.nodem=null;z.tr=null;z.htmlNode.objBelong=null;z.htmlNode=null;this._idpull[a]=null;}
this.allTree.innerHTML="";this.XMLLoader.destructor();for(var a in this){this[a]=null;}}
function cObject(){return this;}
cObject.prototype=new Object;cObject.prototype.clone=function(){function _dummy(){};_dummy.prototype=this;return new _dummy();}
function dhtmlXTreeItemObject(itemId,itemText,parentObject,treeObject,actionHandler,mode){this.htmlNode="";this.acolor="";this.scolor="";this.tr=0;this.childsCount=0;this.tempDOMM=0;this.tempDOMU=0;this.dragSpan=0;this.dragMove=0;this.span=0;this.closeble=1;this.childNodes=new Array();this.userData=new cObject();this.checkstate=0;this.treeNod=treeObject;this.label=itemText;this.parentObject=parentObject;this.actionHandler=actionHandler;this.images=new Array(treeObject.imageArray[0],treeObject.imageArray[1],treeObject.imageArray[2]);this.id=treeObject._globalIdStorageAdd(itemId,this);if(this.treeNod.checkBoxOff)this.htmlNode=this.treeNod._createItem(1,this,mode);else this.htmlNode=this.treeNod._createItem(0,this,mode);this.htmlNode.objBelong=this;return this;};dhtmlXTreeObject.prototype._globalIdStorageAdd=function(itemId,itemObject){if(this._globalIdStorageFind(itemId,1,1)){itemId=itemId+"_"+(new Date()).valueOf();return this._globalIdStorageAdd(itemId,itemObject);}
this._idpull[itemId]=itemObject;this._pullSize++;return itemId;};dhtmlXTreeObject.prototype._globalIdStorageSub=function(itemId){if(this._idpull[itemId]){this._unselectItem(this._idpull[itemId]);this._idpull[itemId]=null;this._pullSize--;}
if((this._locker)&&(this._locker[itemId]))this._locker[itemId]=false;};dhtmlXTreeObject.prototype._globalIdStorageFind=function(itemId,skipXMLSearch,skipParsing,isreparse){var z=this._idpull[itemId]
if(z){if((z.unParsed)&&(!skipParsing))
{this.reParse(z,0);}
if((isreparse)&&(this._edsbpsA)){for(var j=0;j<this._edsbpsA.length;j++)
if(this._edsbpsA[j][2]==itemId){dhtmlxError.throwError("getItem","Requested item still in parsing process.",itemId);return null;}}
return z;}
if((this.slowParse)&&(itemId!=0)&&(!skipXMLSearch))return this.preParse(itemId);else
return null;};dhtmlXTreeObject.prototype._getSubItemsXML=function(temp){var z="";for(var i=0;i<temp.childNodes.length;i++)
{if(temp.childNodes[i].tagName=="item")
{if(!z)z=temp.childNodes[i].getAttribute("id");else z+=this.dlmtr+temp.childNodes[i].getAttribute("id");}}
return z;}
dhtmlXTreeObject.prototype.enableSmartXMLParsing=function(mode){this.slowParse=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.findXML=function(node,par,val){for(var i=0;i<node.childNodes.length;i++)
if(node.childNodes[i].nodeType==1)
{if(node.childNodes[i].getAttribute(par)==val)
return node;var z=this.findXML(node.childNodes[i],par,val);if(z)return(z);}
return false;}
dhtmlXTreeObject.prototype._getAllCheckedXML=function(htmlNode,list,mode){var j=htmlNode.childNodes.length;for(var i=0;i<j;i++)
{var tNode=htmlNode.childNodes[i];if(tNode.tagName=="item")
{var z=tNode.getAttribute("checked");var flag=false;if(mode==2){if(z=="-1")
flag=true;}
else
if(mode==1){if((z)&&(z!="0")&&(z!="-1"))
flag=true;}
else
if(mode==0){if((!z)||(z=="0"))
flag=true;}
if(flag)
{if(list)list+=this.dlmtr+tNode.getAttribute("id");else list=tNode.getAttribute("id");}
list=this._getAllCheckedXML(tNode,list,mode);}};if(list)return list;else return"";};dhtmlXTreeObject.prototype._setSubCheckedXML=function(state,sNode){if(!sNode)return;if(!_isOpera){var val=state?"1":"";var z=this.XMLLoader.doXPath(".//item",sNode);for(var i=0;i<z.length;i++)
z[i].setAttribute("checked",val);}
else
for(var i=0;i<sNode.childNodes.length;i++){var tag=sNode.childNodes[i];if((tag)&&(tag.tagName=="item")){if(state)tag.setAttribute("checked",1);else tag.setAttribute("checked","");this._setSubCheckedXML(state,tag);}}}
dhtmlXTreeObject.prototype._getAllScraggyItemsXML=function(node,x){var z="";var flag=false;for(var i=0;i<node.childNodes.length;i++)
if((node.childNodes[i].tagName=="item")){flag=true;var zb=this._getAllScraggyItemsXML(node.childNodes[i],0);if(zb!="")
if(z)
z+=this.dlmtr+zb;else
z=zb;}
if((!x)&&(!flag))
if(z)
z+=this.dlmtr+node.getAttribute("id");else z=node.getAttribute("id");return z;}
dhtmlXTreeObject.prototype._getAllFatItemsXML=function(node,x){var z="";var flag=false;for(var i=0;i<node.childNodes.length;i++)
if((node.childNodes[i].tagName=="item")){flag=true;var zb=this._getAllFatItemsXML(node.childNodes[i],0);if(zb!="")
if(z)
z+=this.dlmtr+zb;else
z=zb;}
if((!x)&&(flag))
if(z)
z+=this.dlmtr+node.getAttribute("id");else z=node.getAttribute("id");return z;}
dhtmlXTreeObject.prototype._getAllSubItemsXML=function(itemId,z,node){for(var i=0;i<node.childNodes.length;i++)
if(node.childNodes[i].tagName=="item"){if(!z)z=node.childNodes[i].getAttribute("id");else z+=this.dlmtr+node.childNodes[i].getAttribute("id");z=this._getAllSubItemsXML(itemId,z,node.childNodes[i]);}
return z;}
dhtmlXTreeObject.prototype.reParse=function(node){var that=this;if(!this.parsCount)that.callEvent("onXLS",[that,node.id]);this.xmlstate=1;var tmp=node.unParsed;node.unParsed=0;this.XMLloadingWarning=1;var oldpid=this.parsingOn;var oldmd=this.waitUpdateXML;var oldpa=this.parsedArray;this.parsedArray=new Array();this.waitUpdateXML=false;this.parsingOn=node.id;this.parsedArray=new Array();this.setCheckList="";this._parseXMLTree(this,tmp,node.id,2,node);var chArr=this.setCheckList.split(this.dlmtr);for(var i=0;i<this.parsedArray.length;i++)
node.htmlNode.childNodes[0].appendChild(this.parsedArray[i]);this.oldsmcheck=this.smcheck;this.smcheck=false;for(var n=0;n<chArr.length;n++)
if(chArr[n])this.setCheck(chArr[n],1);this.smcheck=this.oldsmcheck;this.parsingOn=oldpid;this.waitUpdateXML=oldmd;this.parsedArray=oldpa;this.XMLloadingWarning=0;this._redrawFrom(this,node);return true;}
dhtmlXTreeObject.prototype.preParse=function(itemId){if(!itemId)return null;var z=this.XMLLoader.getXMLTopNode("tree");var i=0;var k=0;if(!z)return;for(i=0;i<z.childNodes.length;i++)
if(z.childNodes[i].nodeType==1)
{var zNode=this.findXML(z.childNodes[i],"id",itemId);if(zNode!==false)
{var nArr=new Array();while(1){nArr[nArr.length]=zNode.getAttribute("id");z=this._globalIdStorageFind(zNode.getAttribute("id"),true,true,true);if(z)break;zNode=zNode.parentNode;}
for(var i=nArr.length-1;i>=0;i--)
this._globalIdStorageFind(nArr[i],true,false);z=this._globalIdStorageFind(itemId,true,false);if(!z)dhtmlxError.throwError("getItem","The item "+itemId+" not operable. Seems you have non-unique IDs in tree's XML.",itemId);return z;}}
return null;}
dhtmlXTreeObject.prototype._escape=function(str){switch(this.utfesc){case"none":return str;break;case"utf8":return encodeURI(str);break;default:return escape(str);break;}}
dhtmlXTreeObject.prototype._drawNewTr=function(htmlObject,node)
{var tr=document.createElement('tr');var td1=document.createElement('td');var td2=document.createElement('td');td1.appendChild(document.createTextNode(" "));td2.colSpan=3;td2.appendChild(htmlObject);tr.appendChild(td1);tr.appendChild(td2);return tr;};dhtmlXTreeObject.prototype.loadXMLString=function(xmlString,afterCall){var that=this;if(!this.parsCount)this.callEvent("onXLS",[that,null]);this.xmlstate=1;if(afterCall)this.XMLLoader.waitCall=afterCall;this.XMLLoader.loadXMLString(xmlString);};dhtmlXTreeObject.prototype.loadXML=function(file,afterCall){var that=this;if(!this.parsCount)this.callEvent("onXLS",[that,this._ld_id]);this._ld_id=null;this.xmlstate=1;this.XMLLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this,true,this.no_cashe);if(afterCall)this.XMLLoader.waitCall=afterCall;this.XMLLoader.loadXML(file);};dhtmlXTreeObject.prototype._attachChildNode=function(parentObject,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs,beforeNode,afterNode){if(beforeNode)parentObject=beforeNode.parentObject;if(((parentObject.XMLload==0)&&(this.XMLsource))&&(!this.XMLloadingWarning))
{parentObject.XMLload=1;this._loadDynXML(parentObject.id);}
var Count=parentObject.childsCount;var Nodes=parentObject.childNodes;if(afterNode){if(afterNode.tr.previousSibling.previousSibling){beforeNode=afterNode.tr.previousSibling.nodem;}
else
optionStr=optionStr.replace("TOP","")+",TOP";}
if(beforeNode)
{var ik,jk;for(ik=0;ik<Count;ik++)
if(Nodes[ik]==beforeNode)
{for(jk=Count;jk!=ik;jk--)
Nodes[1+jk]=Nodes[jk];break;}
ik++;Count=ik;}
if(optionStr){var tempStr=optionStr.split(",");for(var i=0;i<tempStr.length;i++)
{switch(tempStr[i])
{case"TOP":if(parentObject.childsCount>0){beforeNode=new Object;beforeNode.tr=parentObject.childNodes[0].tr.previousSibling;}
parentObject._has_top=true;for(ik=Count;ik>0;ik--)
Nodes[ik]=Nodes[ik-1];Count=0;break;}};};Nodes[Count]=new dhtmlXTreeItemObject(itemId,itemText,parentObject,this,null,1);itemId=Nodes[Count].id;if(image1)Nodes[Count].images[0]=image1;if(image2)Nodes[Count].images[1]=image2;if(image3)Nodes[Count].images[2]=image3;parentObject.childsCount++;var tr=this._drawNewTr(Nodes[Count].htmlNode);if((this.XMLloadingWarning)||(this._hAdI))
Nodes[Count].htmlNode.parentNode.parentNode.style.display="none";if((beforeNode)&&(beforeNode.tr.nextSibling))
parentObject.htmlNode.childNodes[0].insertBefore(tr,beforeNode.tr.nextSibling);else
if(this.parsingOn==parentObject.id){this.parsedArray[this.parsedArray.length]=tr;}
else
parentObject.htmlNode.childNodes[0].appendChild(tr);if((beforeNode)&&(!beforeNode.span))beforeNode=null;if(this.XMLsource)if((childs)&&(childs!=0))Nodes[Count].XMLload=0;else Nodes[Count].XMLload=1;Nodes[Count].tr=tr;tr.nodem=Nodes[Count];if(parentObject.itemId==0)
tr.childNodes[0].className="hiddenRow";if((parentObject._r_logic)||(this._frbtr))
this._setSrc(Nodes[Count].htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0],this.imPath+this.radioArray[0]);if(optionStr){var tempStr=optionStr.split(",");for(var i=0;i<tempStr.length;i++)
{switch(tempStr[i])
{case"SELECT":this.selectItem(itemId,false);break;case"CALL":this.selectItem(itemId,true);break;case"CHILD":Nodes[Count].XMLload=0;break;case"CHECKED":if(this.XMLloadingWarning)
this.setCheckList+=this.dlmtr+itemId;else
this.setCheck(itemId,1);break;case"HCHECKED":this._setCheck(Nodes[Count],"unsure");break;case"OPEN":Nodes[Count].openMe=1;break;}};};if(!this.XMLloadingWarning)
{if((this._getOpenState(parentObject)<0)&&(!this._hAdI))this.openItem(parentObject.id);if(beforeNode)
{this._correctPlus(beforeNode);this._correctLine(beforeNode);}
this._correctPlus(parentObject);this._correctLine(parentObject);this._correctPlus(Nodes[Count]);if(parentObject.childsCount>=2)
{this._correctPlus(Nodes[parentObject.childsCount-2]);this._correctLine(Nodes[parentObject.childsCount-2]);}
if(parentObject.childsCount!=2)this._correctPlus(Nodes[0]);if(this.tscheck)this._correctCheckStates(parentObject);if(this._onradh){if(this.xmlstate==1){var old=this.onXLE;this.onXLE=function(id){this._onradh(itemId);if(old)old(id);}}
else
this._onradh(itemId);}}
if(this.cMenu)this.cMenu.setContextZone(Nodes[Count].span,Nodes[Count].id);return Nodes[Count];};dhtmlXTreeObject.prototype.enableContextMenu=function(menu){if(menu)this.cMenu=menu;};dhtmlXTreeObject.prototype.setItemContextMenu=function(itemId,cMenu){var l=itemId.toString().split(this.dlmtr);for(var i=0;i<l.length;i++)
{var temp=this._globalIdStorageFind(l[i]);if(!temp)continue;cMenu.setContextZone(temp.span,temp.id);}}
dhtmlXTreeObject.prototype.insertNewItem=function(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs){var parentObject=this._globalIdStorageFind(parentId);if(!parentObject)return(-1);var nodez=this._attachChildNode(parentObject,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs);if((!this.XMLloadingWarning)&&(this.childCalc))this._fixChildCountLabel(parentObject);return nodez;};dhtmlXTreeObject.prototype.insertNewChild=function(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs){return this.insertNewItem(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs);}
dhtmlXTreeObject.prototype._parseXMLTree=function(dhtmlObject,node,parentId,level,xml_obj,start){if(!xml_obj)xml_obj=dhtmlObject.XMLLoader;dhtmlObject.skipLock=true;if(!dhtmlObject.parsCount)dhtmlObject.parsCount=1;else dhtmlObject.parsCount++;dhtmlObject.XMLloadingWarning=1;var nodeAskingCall="";if(!node){node=xml_obj.getXMLTopNode("tree");parentId=node.getAttribute("id");if(node.getAttribute("radio"))
dhtmlObject.htmlNode._r_logic=true;dhtmlObject.parsingOn=parentId;dhtmlObject.parsedArray=new Array();dhtmlObject.setCheckList="";}
var temp=dhtmlObject._globalIdStorageFind(parentId);if((temp.childsCount)&&(!start)&&(!dhtmlObject._edsbps)&&(!temp._has_top))
var preNode=temp.childNodes[temp.childsCount-1];else
var preNode=0;if(node.getAttribute("order"))
dhtmlObject._reorderXMLBranch(node);var npl=0;for(var i=start||0;i<node.childNodes.length;i++)
{if((node.childNodes[i].nodeType==1)&&(node.childNodes[i].tagName=="item"))
{temp.XMLload=1;if((dhtmlObject._epgps)&&(dhtmlObject._epgpsC==npl)){this._setNextPageSign(temp,npl+1*(start||0),level,node);break;}
var nodx=node.childNodes[i];var name=nodx.getAttribute("text");if((name===null)||(typeof(name)=="unknown"))
for(var ci=0;ci<nodx.childNodes.length;ci++)
if(nodx.childNodes[ci].tagName=="itemtext"){name=nodx.childNodes[ci].firstChild.data;break;}
var cId=nodx.getAttribute("id");if((typeof(dhtmlObject.waitUpdateXML)=="object")&&(!dhtmlObject.waitUpdateXML[cId])){dhtmlObject._parseXMLTree(dhtmlObject,node.childNodes[i],cId,1,xml_obj);continue;}
var im0=nodx.getAttribute("im0");var im1=nodx.getAttribute("im1");var im2=nodx.getAttribute("im2");var aColor=nodx.getAttribute("aCol");var sColor=nodx.getAttribute("sCol");var chd=nodx.getAttribute("child");var imw=nodx.getAttribute("imwidth");var imh=nodx.getAttribute("imheight");var atop=nodx.getAttribute("top");var aradio=nodx.getAttribute("radio");var topoffset=nodx.getAttribute("topoffset");var aopen=nodx.getAttribute("open");var aselect=nodx.getAttribute("select");var acall=nodx.getAttribute("call");var achecked=nodx.getAttribute("checked");var closeable=nodx.getAttribute("closeable");var tooltip=nodx.getAttribute("tooltip");var nocheckbox=nodx.getAttribute("nocheckbox");var disheckbox=nodx.getAttribute("disabled");var style=nodx.getAttribute("style");var locked=nodx.getAttribute("locked");var zST="";if(aselect)zST+=",SELECT";if(atop)zST+=",TOP";if(acall)nodeAskingCall=cId;if(achecked==-1)zST+=",HCHECKED";else if(achecked)zST+=",CHECKED";if(aopen)zST+=",OPEN";if(dhtmlObject.waitUpdateXML){if(dhtmlObject._globalIdStorageFind(cId))
var newNode=dhtmlObject.updateItem(cId,name,im0,im1,im2,achecked);else{if(npl==0)zST+=",TOP";else preNode=temp.childNodes[npl];var newNode=dhtmlObject._attachChildNode(temp,cId,name,0,im0,im1,im2,zST,chd,0,preNode);preNode=null;}}
else
var newNode=dhtmlObject._attachChildNode(temp,cId,name,0,im0,im1,im2,zST,chd,0,preNode);if(tooltip)
if(dhtmlObject._dhxTT)dhtmlxTooltip.setTooltip(newNode.span.parentNode.parentNode,tooltip);else
newNode.span.parentNode.parentNode.title=tooltip;if(style)
if(newNode.span.style.cssText)
newNode.span.style.cssText+=(";"+style);else
newNode.span.setAttribute("style",newNode.span.getAttribute("style")+"; "+style);if(aradio)newNode._r_logic=true;if(nocheckbox){newNode.span.parentNode.previousSibling.previousSibling.childNodes[0].style.display='none';newNode.nocheckbox=true;}
if(disheckbox){if(achecked!=null)dhtmlObject._setCheck(newNode,convertStringToBoolean(achecked));dhtmlObject.disableCheckbox(newNode,1);}
newNode._acc=chd||0;if(dhtmlObject.parserExtension)dhtmlObject.parserExtension._parseExtension(node.childNodes[i],dhtmlObject.parserExtension,cId,parentId);dhtmlObject.setItemColor(newNode,aColor,sColor);if(locked=="1")dhtmlObject._lockItem(newNode,true,true);if((imw)||(imh))dhtmlObject.setIconSize(imw,imh,newNode);if((closeable=="0")||(closeable=="1"))dhtmlObject.setItemCloseable(newNode,closeable);var zcall="";if(topoffset)dhtmlObject.setItemTopOffset(newNode,topoffset);if((!dhtmlObject.slowParse)&&(!dhtmlObject.waitUpdateXML))
zcall=dhtmlObject._parseXMLTree(dhtmlObject,node.childNodes[i],cId,1,xml_obj);else{if(node.childNodes[i].childNodes.length>0){for(var a=0;a<node.childNodes[i].childNodes.length;a++)
if(node.childNodes[i].childNodes[a].tagName=="item"){if(!newNode.childsCount)newNode.unParsed=node.childNodes[i];}
else
dhtmlObject.checkUserData(node.childNodes[i].childNodes[a],newNode.id);}}
if(zcall!="")nodeAskingCall=zcall;if((dhtmlObject._edsbps)&&(npl==dhtmlObject._edsbpsC)){dhtmlObject._distributedStart(node,i+1,parentId,level,temp.childsCount);break;}
npl++;}
else
dhtmlObject.checkUserData(node.childNodes[i],parentId);};if(!level){if(dhtmlObject.waitUpdateXML){dhtmlObject.waitUpdateXML=false;for(var i=temp.childsCount-1;i>=0;i--)
if(temp.childNodes[i]._dmark)
dhtmlObject.deleteItem(temp.childNodes[i].id);}
var parsedNodeTop=dhtmlObject._globalIdStorageFind(dhtmlObject.parsingOn);for(var i=0;i<dhtmlObject.parsedArray.length;i++)
parsedNodeTop.htmlNode.childNodes[0].appendChild(dhtmlObject.parsedArray[i]);dhtmlObject.lastLoadedXMLId=parentId;dhtmlObject.XMLloadingWarning=0;var chArr=dhtmlObject.setCheckList.split(dhtmlObject.dlmtr);for(var n=0;n<chArr.length;n++)
if(chArr[n])dhtmlObject.setCheck(chArr[n],1);if((dhtmlObject.XMLsource)&&(dhtmlObject.tscheck)&&(dhtmlObject.smcheck)&&(temp.id!=dhtmlObject.rootId)){if(temp.checkstate===0)
dhtmlObject._setSubChecked(0,temp);else if(temp.checkstate===1)
dhtmlObject._setSubChecked(1,temp);}
if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("5.5")!=-1){window.setTimeout(function(){dhtmlObject._redrawFrom(dhtmlObject,null,start)},10);}else{dhtmlObject._redrawFrom(dhtmlObject,null,start)}
if(nodeAskingCall!="")dhtmlObject.selectItem(nodeAskingCall,true);if(dhtmlObject._branchUpdate)dhtmlObject._branchUpdateNext(node);}
if(dhtmlObject.parsCount==1){if((dhtmlObject.slowParse)&&(dhtmlObject.parsingOn==dhtmlObject.rootId))
{var nodelist=xml_obj.doXPath("//item[@open]",xml_obj.xmlDoc.responseXML||xml_obj.xmlDoc);for(var i=0;i<nodelist.length;i++)
dhtmlObject.openItem(nodelist[i].getAttribute("id"));}
dhtmlObject.parsingOn=null;if((!dhtmlObject._edsbps)||(!dhtmlObject._edsbpsA.length)){window.setTimeout(function(){if(dhtmlObject.onXLE)dhtmlObject.onXLE(dhtmlObject,parentId);dhtmlObject.callEvent("onXLE",[dhtmlObject,parentId]);},1);dhtmlObject.xmlstate=0;}
dhtmlObject.skipLock=false;}
dhtmlObject.parsCount--;if(dhtmlObject._edsbps)window.setTimeout(function(){dhtmlObject._distributedStep(parentId);},dhtmlObject._edsbpsD);if((dhtmlObject._epgps)&&(start))
this._setPrevPageSign(temp,(start||0),level,node);return nodeAskingCall;};dhtmlXTreeObject.prototype._branchUpdateNext=function(node){var items=this.XMLLoader.doXPath("./item",node);for(var i=0;i<items.length;i++){this._branchUpdate++;this.smartRefreshItem(items[i].getAttribute("id"),items[i]);}
this._branchUpdate--;}
dhtmlXTreeObject.prototype.checkUserData=function(node,parentId){if((node.nodeType==1)&&(node.tagName=="userdata"))
{var name=node.getAttribute("name");if((name)&&(node.childNodes[0]))
this.setUserData(parentId,name,node.childNodes[0].data);}}
dhtmlXTreeObject.prototype._redrawFrom=function(dhtmlObject,itemObject,start,visMode){if(!itemObject){var tempx=dhtmlObject._globalIdStorageFind(dhtmlObject.lastLoadedXMLId);dhtmlObject.lastLoadedXMLId=-1;if(!tempx)return 0;}
else tempx=itemObject;var acc=0;for(var i=(start?start-1:0);i<tempx.childsCount;i++)
{if((!this._branchUpdate)||(this._getOpenState(tempx)==1))
if((!itemObject)||(visMode==1))tempx.childNodes[i].htmlNode.parentNode.parentNode.style.display="";if(tempx.childNodes[i].openMe==1)
{this._openItem(tempx.childNodes[i]);tempx.childNodes[i].openMe=0;}
dhtmlObject._redrawFrom(dhtmlObject,tempx.childNodes[i]);if(this.childCalc!=null){if((tempx.childNodes[i].unParsed)||((!tempx.childNodes[i].XMLload)&&(this.XMLsource)))
{if(tempx.childNodes[i]._acc)
tempx.childNodes[i].span.innerHTML=tempx.childNodes[i].label+this.htmlcA+tempx.childNodes[i]._acc+this.htmlcB;else
tempx.childNodes[i].span.innerHTML=tempx.childNodes[i].label;}
if((tempx.childNodes[i].childNodes.length)&&(this.childCalc))
{if(this.childCalc==1)
{tempx.childNodes[i].span.innerHTML=tempx.childNodes[i].label+this.htmlcA+tempx.childNodes[i].childsCount+this.htmlcB;}
if(this.childCalc==2)
{var zCount=tempx.childNodes[i].childsCount-(tempx.childNodes[i].pureChilds||0);if(zCount)
tempx.childNodes[i].span.innerHTML=tempx.childNodes[i].label+this.htmlcA+zCount+this.htmlcB;if(tempx.pureChilds)tempx.pureChilds++;else tempx.pureChilds=1;}
if(this.childCalc==3)
{tempx.childNodes[i].span.innerHTML=tempx.childNodes[i].label+this.htmlcA+tempx.childNodes[i]._acc+this.htmlcB;}
if(this.childCalc==4)
{var zCount=tempx.childNodes[i]._acc;if(zCount)
tempx.childNodes[i].span.innerHTML=tempx.childNodes[i].label+this.htmlcA+zCount+this.htmlcB;}}
else if(this.childCalc==4){acc++;}
acc+=tempx.childNodes[i]._acc;if(this.childCalc==3){acc++;}}};if((!tempx.unParsed)&&((tempx.XMLload)||(!this.XMLsource)))
tempx._acc=acc;dhtmlObject._correctLine(tempx);dhtmlObject._correctPlus(tempx);if((this.childCalc)&&(!itemObject))dhtmlObject._fixChildCountLabel(tempx);};dhtmlXTreeObject.prototype._createSelf=function(){var div=document.createElement('div');div.className="containerTableStyle";div.style.width=this.width;div.style.height=this.height;this.parentObject.appendChild(div);return div;};dhtmlXTreeObject.prototype._xcloseAll=function(itemObject)
{if(itemObject.unParsed)return;if(this.rootId!=itemObject.id){var Nodes=itemObject.htmlNode.childNodes[0].childNodes;var Count=Nodes.length;for(var i=1;i<Count;i++)
Nodes[i].style.display="none";this._correctPlus(itemObject);}
for(var i=0;i<itemObject.childsCount;i++)
if(itemObject.childNodes[i].childsCount)
this._xcloseAll(itemObject.childNodes[i]);};dhtmlXTreeObject.prototype._xopenAll=function(itemObject)
{this._HideShow(itemObject,2);for(var i=0;i<itemObject.childsCount;i++)
this._xopenAll(itemObject.childNodes[i]);};dhtmlXTreeObject.prototype._correctPlus=function(itemObject){var imsrc=itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[0].lastChild;var imsrc2=itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[2].childNodes[0];var workArray=this.lineArray;if((this.XMLsource)&&(!itemObject.XMLload))
{var workArray=this.plusArray;this._setSrc(imsrc2,this.imPath+itemObject.images[2]);if(this._txtimg)return(imsrc.innerHTML="[+]");}
else
if((itemObject.childsCount)||(itemObject.unParsed))
{if((itemObject.htmlNode.childNodes[0].childNodes[1])&&(itemObject.htmlNode.childNodes[0].childNodes[1].style.display!="none"))
{if(!itemObject.wsign)var workArray=this.minusArray;this._setSrc(imsrc2,this.imPath+itemObject.images[1]);if(this._txtimg)return(imsrc.innerHTML="[-]");}
else
{if(!itemObject.wsign)var workArray=this.plusArray;this._setSrc(imsrc2,this.imPath+itemObject.images[2]);if(this._txtimg)return(imsrc.innerHTML="[+]");}}
else
{this._setSrc(imsrc2,this.imPath+itemObject.images[0]);}
var tempNum=2;if(!itemObject.treeNod.treeLinesOn)this._setSrc(imsrc,this.imPath+workArray[3]);else{if(itemObject.parentObject)tempNum=this._getCountStatus(itemObject.id,itemObject.parentObject);this._setSrc(imsrc,this.imPath+workArray[tempNum]);}};dhtmlXTreeObject.prototype._correctLine=function(itemObject){var sNode=itemObject.parentObject;if(sNode)
if((this._getLineStatus(itemObject.id,sNode)==0)||(!this.treeLinesOn))
for(var i=1;i<=itemObject.childsCount;i++)
{itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundImage="";itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundRepeat="";}
else
for(var i=1;i<=itemObject.childsCount;i++)
{itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundImage="url("+this.imPath+this.lineArray[5]+")";itemObject.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundRepeat="repeat-y";}};dhtmlXTreeObject.prototype._getCountStatus=function(itemId,itemObject){if(itemObject.childsCount<=1){if(itemObject.id==this.rootId)return 4;else return 0;}
if(itemObject.childNodes[0].id==itemId)if(!itemObject.id)return 2;else return 1;if(itemObject.childNodes[itemObject.childsCount-1].id==itemId)return 0;return 1;};dhtmlXTreeObject.prototype._getLineStatus=function(itemId,itemObject){if(itemObject.childNodes[itemObject.childsCount-1].id==itemId)return 0;return 1;}
dhtmlXTreeObject.prototype._HideShow=function(itemObject,mode){if((this.XMLsource)&&(!itemObject.XMLload)){if(mode==1)return;itemObject.XMLload=1;this._loadDynXML(itemObject.id);return;};if(itemObject.unParsed)this.reParse(itemObject);var Nodes=itemObject.htmlNode.childNodes[0].childNodes;var Count=Nodes.length;if(Count>1){if(((Nodes[1].style.display!="none")||(mode==1))&&(mode!=2)){this.allTree.childNodes[0].border="1";this.allTree.childNodes[0].border="0";nodestyle="none";}
else nodestyle="";for(var i=1;i<Count;i++)
Nodes[i].style.display=nodestyle;}
this._correctPlus(itemObject);}
dhtmlXTreeObject.prototype._getOpenState=function(itemObject){var z=itemObject.htmlNode.childNodes[0].childNodes;if(z.length<=1)return 0;if(z[1].style.display!="none")return 1;else return-1;}
dhtmlXTreeObject.prototype.onRowClick2=function(){if(!this.parentObject.treeNod.callEvent("onDblClick",[this.parentObject.id,this.parentObject.treeNod]))return 0;if((this.parentObject.closeble)&&(this.parentObject.closeble!="0"))
this.parentObject.treeNod._HideShow(this.parentObject);else
this.parentObject.treeNod._HideShow(this.parentObject,2);};dhtmlXTreeObject.prototype.onRowClick=function(){var that=this.parentObject.treeNod;if(!that.callEvent("onOpenStart",[this.parentObject.id,that._getOpenState(this.parentObject)]))return 0;if((this.parentObject.closeble)&&(this.parentObject.closeble!="0"))
that._HideShow(this.parentObject);else
that._HideShow(this.parentObject,2);if(that.checkEvent("onOpenEnd"))
if(!that.xmlstate)
that.callEvent("onOpenEnd",[this.parentObject.id,that._getOpenState(this.parentObject)]);else{that._oie_onXLE=that.onXLE;that.onXLE=that._epnFHe;}};dhtmlXTreeObject.prototype._epnFHe=function(that,id,flag){this.callEvent("onOpenEnd",[id,that.getOpenState(id)]);that.onXLE=that._oie_onXLE;if(!flag)
if(that.onXLE)that.onXLE(that,id);}
dhtmlXTreeObject.prototype.onRowClickDown=function(e){e=e||window.event;var that=this.parentObject.treeNod;that._selectItem(this.parentObject,e);};dhtmlXTreeObject.prototype.getSelectedItemId=function()
{var str=new Array();for(var i=0;i<this._selected.length;i++)str[i]=this._selected[i].id;return(str.join(this.dlmtr));};dhtmlXTreeObject.prototype._selectItem=function(node,e){if(this._onSSCF)this._onSSCFold=this.getSelectedItemId();if((!this._amsel)||(!e)||((!e.ctrlKey)&&(!e.shiftKey)))
this._unselectItems();if((node.i_sel)&&(this._amsel)&&(e)&&(e.ctrlKey))
this._unselectItem(node);else
if((!node.i_sel)&&((!this._amselS)||(this._selected.length==0)||(this._selected[0].parentObject==node.parentObject)))
if((this._amsel)&&(e)&&(e.shiftKey)&&(this._selected.length!=0)&&(this._selected[this._selected.length-1].parentObject==node.parentObject)){var a=this._getIndex(this._selected[this._selected.length-1]);var b=this._getIndex(node);if(b<a){var c=a;a=b;b=c;}
for(var i=a;i<=b;i++)
if(!node.parentObject.childNodes[i].i_sel)
this._markItem(node.parentObject.childNodes[i]);}
else
this._markItem(node);if(this._onSSCF){var z=this.getSelectedItemId();if(z!=this._onSSCFold)
this.callEvent("onSelect",[z]);}}
dhtmlXTreeObject.prototype._markItem=function(node){if(node.scolor)node.span.style.color=node.scolor;node.span.className="selectedTreeRow";node.i_sel=true;this._selected[this._selected.length]=node;}
dhtmlXTreeObject.prototype.getIndexById=function(itemId){var z=this._globalIdStorageFind(itemId);if(!z)return null;return this._getIndex(z);};dhtmlXTreeObject.prototype._getIndex=function(w){var z=w.parentObject;for(var i=0;i<z.childsCount;i++)
if(z.childNodes[i]==w)return i;};dhtmlXTreeObject.prototype._unselectItem=function(node){if((node)&&(node.i_sel))
{node.span.className="standartTreeRow";if(node.acolor)node.span.style.color=node.acolor;node.i_sel=false;for(var i=0;i<this._selected.length;i++)
if(!this._selected[i].i_sel){this._selected.splice(i,1);break;}}}
dhtmlXTreeObject.prototype._unselectItems=function(){for(var i=0;i<this._selected.length;i++){var node=this._selected[i];node.span.className="standartTreeRow";if(node.acolor)node.span.style.color=node.acolor;node.i_sel=false;}
this._selected=new Array();}
dhtmlXTreeObject.prototype.onRowSelect=function(e,htmlObject,mode){e=e||window.event;var obj=this.parentObject;if(htmlObject)obj=htmlObject.parentObject;var that=obj.treeNod;var lastId=that.getSelectedItemId();if((!e)||(!e.skipUnSel))
that._selectItem(obj,e);if(!mode){if((e)&&(e.button==2))
that.callEvent("onRightClick",[obj.id,e]);if(obj.actionHandler)obj.actionHandler(obj.id,lastId);else that.callEvent("onClick",[obj.id,lastId]);}};dhtmlXTreeObject.prototype._correctCheckStates=function(dhtmlObject){if(!this.tscheck)return;if(dhtmlObject.id==this.rootId)return;var act=dhtmlObject.childNodes;var flag1=0;var flag2=0;if(dhtmlObject.childsCount==0)return;for(var i=0;i<dhtmlObject.childsCount;i++){if(act[i].dscheck)continue;if(act[i].checkstate==0)flag1=1;else if(act[i].checkstate==1)flag2=1;else{flag1=1;flag2=1;break;}}
if((flag1)&&(flag2))this._setCheck(dhtmlObject,"unsure");else if(flag1)this._setCheck(dhtmlObject,false);else this._setCheck(dhtmlObject,true);this._correctCheckStates(dhtmlObject.parentObject);}
dhtmlXTreeObject.prototype.onCheckBoxClick=function(e){if(this.parentObject.dscheck)return true;if(this.treeNod.tscheck)
if(this.parentObject.checkstate==1)this.treeNod._setSubChecked(false,this.parentObject);else this.treeNod._setSubChecked(true,this.parentObject);else
if(this.parentObject.checkstate==1)this.treeNod._setCheck(this.parentObject,false);else this.treeNod._setCheck(this.parentObject,true);this.treeNod._correctCheckStates(this.parentObject.parentObject);return this.treeNod.callEvent("onCheck",[this.parentObject.id,this.parentObject.checkstate]);};dhtmlXTreeObject.prototype._createItem=function(acheck,itemObject,mode){var table=document.createElement('table');table.cellSpacing=0;table.cellPadding=0;table.border=0;if(this.hfMode)table.style.tableLayout="fixed";table.style.margin=0;table.style.padding=0;var tbody=document.createElement('tbody');var tr=document.createElement('tr');var td1=document.createElement('td');td1.className="standartTreeImage";if(this._txtimg){var img0=document.createElement("div");td1.appendChild(img0);img0.className="dhx_tree_textSign";}
else
{var img0=this._getImg(itemObject.id);img0.border="0";if(img0.tagName=="IMG")img0.align="absmiddle";td1.appendChild(img0);img0.style.padding=0;img0.style.margin=0;img0.style.width=this.def_line_img_x;img0.style.height=this.def_line_img_y;}
var td11=document.createElement('td');var inp=this._getImg(this.cBROf?this.rootId:itemObject.id);inp.checked=0;this._setSrc(inp,this.imPath+this.checkArray[0]);inp.style.width="16px";inp.style.height="16px";if(!acheck)(((_isOpera)||(_isKHTML))?td11:inp).style.display="none";td11.appendChild(inp);if((!this.cBROf)&&(inp.tagName=="IMG"))inp.align="absmiddle";inp.onclick=this.onCheckBoxClick;inp.treeNod=this;inp.parentObject=itemObject;td11.width="20px";var td12=document.createElement('td');td12.className="standartTreeImage";var img=this._getImg(itemObject.id);img.onmousedown=this._preventNsDrag;img.ondragstart=this._preventNsDrag;img.border="0";if(this._aimgs){img.parentObject=itemObject;if(img.tagName=="IMG")img.align="absmiddle";img.onclick=this.onRowSelect;}
if(!mode)this._setSrc(img,this.imPath+this.imageArray[0]);td12.appendChild(img);img.style.padding=0;img.style.margin=0;if(this.timgen)
{img.style.width=this.def_img_x;img.style.height=this.def_img_y;}
else
{img.style.width="0px";img.style.height="0px";if(_isOpera)td12.style.display="none";}
var td2=document.createElement('td');td2.className="standartTreeRow";itemObject.span=document.createElement('span');itemObject.span.className="standartTreeRow";if(this.mlitems){itemObject.span.style.width=this.mlitems;itemObject.span.style.display="block";}
else td2.noWrap=true;if(!_isKHTML)td2.style.width="100%";itemObject.span.innerHTML=itemObject.label;td2.appendChild(itemObject.span);td2.parentObject=itemObject;td1.parentObject=itemObject;td2.onclick=this.onRowSelect;td1.onclick=this.onRowClick;td2.ondblclick=this.onRowClick2;if(this.ettip)
if(this._dhxTT)dhtmlxTooltip.setTooltip(tr,itemObject.label);else
tr.title=itemObject.label;if(this.dragAndDropOff){if(this._aimgs){this.dragger.addDraggableItem(td12,this);td12.parentObject=itemObject;}
this.dragger.addDraggableItem(td2,this);}
itemObject.span.style.paddingLeft="5px";itemObject.span.style.paddingRight="5px";td2.style.verticalAlign="";td2.style.fontSize="10pt";td2.style.cursor=this.style_pointer;tr.appendChild(td1);tr.appendChild(td11);tr.appendChild(td12);tr.appendChild(td2);tbody.appendChild(tr);table.appendChild(tbody);if(this.ehlt){tr.onmousemove=this._itemMouseIn;tr[(_isIE)?"onmouseleave":"onmouseout"]=this._itemMouseOut;}
if(this.checkEvent&&this.checkEvent("onRightClick"))
tr.oncontextmenu=Function("e","this.childNodes[0].parentObject.treeNod.callEvent('onRightClick',[this.childNodes[0].parentObject.id,(e||window.event)]); return false;");return table;};dhtmlXTreeObject.prototype.setImagePath=function(newPath){this.imPath=newPath;};dhtmlXTreeObject.prototype._getLeafCount=function(itemNode){var a=0;for(var b=0;b<itemNode.childsCount;b++)
if(itemNode.childNodes[b].childsCount==0)a++;return a;}
dhtmlXTreeObject.prototype._getChildCounterValue=function(itemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;if((temp.unParsed)||((!temp.XMLload)&&(this.XMLsource)))
return temp._acc
switch(this.childCalc)
{case 1:return temp.childsCount;break;case 2:return this._getLeafCount(temp);break;case 3:return temp._acc;break;case 4:return temp._acc;break;}}
dhtmlXTreeObject.prototype._fixChildCountLabel=function(itemNode,index){if(this.childCalc==null)return;if((itemNode.unParsed)||((!itemNode.XMLload)&&(this.XMLsource)))
{if(itemNode._acc)
itemNode.span.innerHTML=itemNode.label+this.htmlcA+itemNode._acc+this.htmlcB;else
itemNode.span.innerHTML=itemNode.label;return;}
switch(this.childCalc){case 1:if(itemNode.childsCount!=0)
itemNode.span.innerHTML=itemNode.label+this.htmlcA+itemNode.childsCount+this.htmlcB;else itemNode.span.innerHTML=itemNode.label;break;case 2:var z=this._getLeafCount(itemNode);if(z!=0)
itemNode.span.innerHTML=itemNode.label+this.htmlcA+z+this.htmlcB;else itemNode.span.innerHTML=itemNode.label;break;case 3:if(itemNode.childsCount!=0)
{var bcc=0;for(var a=0;a<itemNode.childsCount;a++){if(!itemNode.childNodes[a]._acc)itemNode.childNodes[a]._acc=0;bcc+=itemNode.childNodes[a]._acc*1;}
bcc+=itemNode.childsCount*1;itemNode.span.innerHTML=itemNode.label+this.htmlcA+bcc+this.htmlcB;itemNode._acc=bcc;}
else{itemNode.span.innerHTML=itemNode.label;itemNode._acc=1;}
if((itemNode.parentObject)&&(itemNode.parentObject!=this.htmlNode))
this._fixChildCountLabel(itemNode.parentObject);break;case 4:if(itemNode.childsCount!=0)
{var bcc=0;for(var a=0;a<itemNode.childsCount;a++){if(!itemNode.childNodes[a]._acc)itemNode.childNodes[a]._acc=1;bcc+=itemNode.childNodes[a]._acc*1;}
itemNode.span.innerHTML=itemNode.label+this.htmlcA+bcc+this.htmlcB;itemNode._acc=bcc;}
else{itemNode.span.innerHTML=itemNode.label;itemNode._acc=1;}
if((itemNode.parentObject)&&(itemNode.parentObject!=this.htmlNode))
this._fixChildCountLabel(itemNode.parentObject);break;}}
dhtmlXTreeObject.prototype.setChildCalcMode=function(mode){switch(mode){case"child":this.childCalc=1;break;case"leafs":this.childCalc=2;break;case"childrec":this.childCalc=3;break;case"leafsrec":this.childCalc=4;break;case"disabled":this.childCalc=null;break;default:this.childCalc=4;}}
dhtmlXTreeObject.prototype.setChildCalcHTML=function(htmlA,htmlB){this.htmlcA=htmlA;this.htmlcB=htmlB;}
dhtmlXTreeObject.prototype.setOnRightClickHandler=function(func){this.attachEvent("onRightClick",func);};dhtmlXTreeObject.prototype.setOnClickHandler=function(func){this.attachEvent("onClick",func);};dhtmlXTreeObject.prototype.setOnSelectStateChange=function(func){this.attachEvent("onSelect",func);this._onSSCF=true;};dhtmlXTreeObject.prototype.setXMLAutoLoading=function(filePath){this.XMLsource=filePath;};dhtmlXTreeObject.prototype.setOnCheckHandler=function(func){this.attachEvent("onCheck",func);};dhtmlXTreeObject.prototype.setOnOpenHandler=function(func){this.attachEvent("onOpenStart",func);};dhtmlXTreeObject.prototype.setOnOpenStartHandler=function(func){this.attachEvent("onOpenStart",func);};dhtmlXTreeObject.prototype.setOnOpenEndHandler=function(func){this.attachEvent("onOpenEnd",func);};dhtmlXTreeObject.prototype.setOnDblClickHandler=function(func){this.attachEvent("onDblClick",func);};dhtmlXTreeObject.prototype.openAllItems=function(itemId)
{var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;this._xopenAll(temp);};dhtmlXTreeObject.prototype.getOpenState=function(itemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return"";return this._getOpenState(temp);};dhtmlXTreeObject.prototype.closeAllItems=function(itemId)
{if(itemId===window.undefined)itemId=this.rootId;var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;this._xcloseAll(temp);this.allTree.childNodes[0].border="1";this.allTree.childNodes[0].border="0";};dhtmlXTreeObject.prototype.setUserData=function(itemId,name,value){var sNode=this._globalIdStorageFind(itemId,0,true);if(!sNode)return;if(name=="hint")
if(this._dhxTT)dhtmlxTooltip.setTooltip(sNode.htmlNode.childNodes[0].childNodes[0],value);else
sNode.htmlNode.childNodes[0].childNodes[0].title=value;if(sNode.userData["t_"+name]===undefined){if(!sNode._userdatalist)sNode._userdatalist=name;else sNode._userdatalist+=","+name;}
sNode.userData["t_"+name]=value;};dhtmlXTreeObject.prototype.getUserData=function(itemId,name){var sNode=this._globalIdStorageFind(itemId,0,true);if(!sNode)return;return sNode.userData["t_"+name];};dhtmlXTreeObject.prototype.getItemColor=function(itemId)
{var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;var res=new Object();if(temp.acolor)res.acolor=temp.acolor;if(temp.acolor)res.scolor=temp.scolor;return res;};dhtmlXTreeObject.prototype.setItemColor=function(itemId,defaultColor,selectedColor)
{if((itemId)&&(itemId.span))
var temp=itemId;else
var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;else{if(temp.i_sel)
{if(selectedColor)temp.span.style.color=selectedColor;}
else
{if(defaultColor)temp.span.style.color=defaultColor;}
if(selectedColor)temp.scolor=selectedColor;if(defaultColor)temp.acolor=defaultColor;}};dhtmlXTreeObject.prototype.getItemText=function(itemId)
{var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;return(temp.htmlNode.childNodes[0].childNodes[0].childNodes[3].childNodes[0].innerHTML);};dhtmlXTreeObject.prototype.getParentId=function(itemId)
{var temp=this._globalIdStorageFind(itemId);if((!temp)||(!temp.parentObject))return"";return temp.parentObject.id;};dhtmlXTreeObject.prototype.changeItemId=function(itemId,newItemId)
{var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;temp.id=newItemId;temp.span.contextMenuId=newItemId;this._idpull[newItemId]=this._idpull[itemId];this._idpull[itemId]=null;};dhtmlXTreeObject.prototype.doCut=function(){if(this.nodeCut)this.clearCut();this.nodeCut=(new Array()).concat(this._selected);for(var i=0;i<this.nodeCut.length;i++){var tempa=this.nodeCut[i];tempa._cimgs=new Array();tempa._cimgs[0]=tempa.images[0];tempa._cimgs[1]=tempa.images[1];tempa._cimgs[2]=tempa.images[2];tempa.images[0]=tempa.images[1]=tempa.images[2]=this.cutImage;this._correctPlus(tempa);}};dhtmlXTreeObject.prototype.doPaste=function(itemId){var tobj=this._globalIdStorageFind(itemId);if(!tobj)return 0;for(var i=0;i<this.nodeCut.length;i++){if(this._checkPNodes(tobj,this.nodeCut[i]))continue;this._moveNode(this.nodeCut[i],tobj);}
this.clearCut();};dhtmlXTreeObject.prototype.clearCut=function(){for(var i=0;i<this.nodeCut.length;i++)
{var tempa=this.nodeCut[i];tempa.images[0]=tempa._cimgs[0];tempa.images[1]=tempa._cimgs[1];tempa.images[2]=tempa._cimgs[2];this._correctPlus(tempa);}
this.nodeCut=new Array();};dhtmlXTreeObject.prototype._moveNode=function(itemObject,targetObject){var mode=this.dadmodec;if(mode==1)
{var z=targetObject;if(this.dadmodefix<0)
{while(true){z=this._getPrevNode(z);if((z==-1)){z=this.htmlNode;break;}
if((z.tr==0)||(z.tr.style.display=="")||(!z.parentObject))break;}
var nodeA=z;var nodeB=targetObject;}
else
{while(true){z=this._getNextNode(z);if((z==-1)){z=this.htmlNode;break;}
if((z.tr.style.display=="")||(!z.parentObject))break;}
var nodeB=z;var nodeA=targetObject;}
if(this._getNodeLevel(nodeA,0)>this._getNodeLevel(nodeB,0))
{if(!this.dropLower)
return this._moveNodeTo(itemObject,nodeA.parentObject);else
if(nodeB.id!=this.rootId)
return this._moveNodeTo(itemObject,nodeB.parentObject,nodeB);else
return this._moveNodeTo(itemObject,this.htmlNode,null);}
else
{return this._moveNodeTo(itemObject,nodeB.parentObject,nodeB);}}
else
return this._moveNodeTo(itemObject,targetObject);}
dhtmlXTreeObject.prototype._fixNodesCollection=function(target,zParent){var flag=0;var icount=0;var Nodes=target.childNodes;var Count=target.childsCount-1;if(zParent==Nodes[Count])return;for(var i=0;i<Count;i++)
if(Nodes[i]==Nodes[Count]){Nodes[i]=Nodes[i+1];Nodes[i+1]=Nodes[Count];}
for(var i=0;i<Count+1;i++)
{if(flag){var temp=Nodes[i];Nodes[i]=flag;flag=temp;}
else
if(Nodes[i]==zParent){flag=Nodes[i];Nodes[i]=Nodes[Count];}}};dhtmlXTreeObject.prototype._recreateBranch=function(itemObject,targetObject,beforeNode,level){var i;var st="";if(beforeNode){for(i=0;i<targetObject.childsCount;i++)
if(targetObject.childNodes[i]==beforeNode)break;if(i!=0)
beforeNode=targetObject.childNodes[i-1];else{st="TOP";beforeNode="";}}
var newNode=this._attachChildNode(targetObject,itemObject.id,itemObject.label,0,itemObject.images[0],itemObject.images[1],itemObject.images[2],st,0,beforeNode);newNode._userdatalist=itemObject._userdatalist;newNode.userData=itemObject.userData.clone();newNode.XMLload=itemObject.XMLload;if(itemObject.unParsed)
{newNode.unParsed=itemObject.unParsed;this._correctPlus(newNode);}
else
for(var i=0;i<itemObject.childsCount;i++)
this._recreateBranch(itemObject.childNodes[i],newNode,0,1);if((!level)&&(this.childCalc)){this._redrawFrom(this,targetObject);}
return newNode;}
dhtmlXTreeObject.prototype._moveNodeTo=function(itemObject,targetObject,beforeNode){if(itemObject.treeNod._nonTrivialNode)
return itemObject.treeNod._nonTrivialNode(this,targetObject,beforeNode,itemObject);if(targetObject.mytype)
var framesMove=(itemObject.treeNod.lWin!=targetObject.lWin);else
var framesMove=(itemObject.treeNod.lWin!=targetObject.treeNod.lWin);if(!this.callEvent("onDrag",[itemObject.id,targetObject.id,(beforeNode?beforeNode.id:null),itemObject.treeNod,targetObject.treeNod]))return false;if((targetObject.XMLload==0)&&(this.XMLsource))
{targetObject.XMLload=1;this._loadDynXML(targetObject.id);}
this.openItem(targetObject.id);var oldTree=itemObject.treeNod;var c=itemObject.parentObject.childsCount;var z=itemObject.parentObject;if((framesMove)||(oldTree.dpcpy)){var _otiid=itemObject.id;itemObject=this._recreateBranch(itemObject,targetObject,beforeNode);if(!oldTree.dpcpy)oldTree.deleteItem(_otiid);}
else
{var Count=targetObject.childsCount;var Nodes=targetObject.childNodes;Nodes[Count]=itemObject;itemObject.treeNod=targetObject.treeNod;targetObject.childsCount++;var tr=this._drawNewTr(Nodes[Count].htmlNode);if(!beforeNode)
{targetObject.htmlNode.childNodes[0].appendChild(tr);if(this.dadmode==1)this._fixNodesCollection(targetObject,beforeNode);}
else
{targetObject.htmlNode.childNodes[0].insertBefore(tr,beforeNode.tr);this._fixNodesCollection(targetObject,beforeNode);Nodes=targetObject.childNodes;}}
if((!oldTree.dpcpy)&&(!framesMove)){var zir=itemObject.tr;if((document.all)&&(navigator.appVersion.search(/MSIE\ 5\.0/gi)!=-1))
{window.setTimeout(function(){zir.parentNode.removeChild(zir);},250);}
else
itemObject.parentObject.htmlNode.childNodes[0].removeChild(itemObject.tr);if((!beforeNode)||(targetObject!=itemObject.parentObject)){for(var i=0;i<z.childsCount;i++){if(z.childNodes[i].id==itemObject.id){z.childNodes[i]=0;break;}}}
else z.childNodes[z.childsCount-1]=0;oldTree._compressChildList(z.childsCount,z.childNodes);z.childsCount--;}
if((!framesMove)&&(!oldTree.dpcpy)){itemObject.tr=tr;tr.nodem=itemObject;itemObject.parentObject=targetObject;if(oldTree!=targetObject.treeNod){if(itemObject.treeNod._registerBranch(itemObject,oldTree))return;this._clearStyles(itemObject);this._redrawFrom(this,itemObject.parentObject);};this._correctPlus(targetObject);this._correctLine(targetObject);this._correctLine(itemObject);this._correctPlus(itemObject);if(beforeNode)
{this._correctPlus(beforeNode);}
else
if(targetObject.childsCount>=2)
{this._correctPlus(Nodes[targetObject.childsCount-2]);this._correctLine(Nodes[targetObject.childsCount-2]);}
this._correctPlus(Nodes[targetObject.childsCount-1]);if(this.tscheck)this._correctCheckStates(targetObject);if(oldTree.tscheck)oldTree._correctCheckStates(z);}
if(c>1){oldTree._correctPlus(z.childNodes[c-2]);oldTree._correctLine(z.childNodes[c-2]);}
oldTree._correctPlus(z);oldTree._correctLine(z);this._fixChildCountLabel(targetObject);oldTree._fixChildCountLabel(z);this.callEvent("onDrop",[itemObject.id,targetObject.id,(beforeNode?beforeNode.id:null),oldTree,targetObject.treeNod]);return itemObject.id;};dhtmlXTreeObject.prototype._clearStyles=function(itemObject){var td1=itemObject.htmlNode.childNodes[0].childNodes[0].childNodes[1];var td3=td1.nextSibling.nextSibling;itemObject.span.innerHTML=itemObject.label;itemObject.i_sel=false;if(itemObject._aimgs)
this.dragger.removeDraggableItem(td1.nextSibling);if(this.checkBoxOff){td1.childNodes[0].style.display="";td1.childNodes[0].onclick=this.onCheckBoxClick;this._setSrc(td1.childNodes[0],this.imPath+this.checkArray[itemObject.checkstate]);}
else td1.childNodes[0].style.display="none";td1.childNodes[0].treeNod=this;if(this.cMenu){itemObject.onmousedown=itemObject.contextOnclick||null;this.cMenu.setContextZone(itemObject.span,itemObject.id);}
else
itemObject.span.onmousedown=function(){};this.dragger.removeDraggableItem(td3);if(this.dragAndDropOff)this.dragger.addDraggableItem(td3,this);if(this._aimgs)this.dragger.addDraggableItem(td1.nextSibling,this);td3.childNodes[0].className="standartTreeRow";td3.onclick=this.onRowSelect;td3.ondblclick=this.onRowClick2;td1.previousSibling.onclick=this.onRowClick;this._correctLine(itemObject);this._correctPlus(itemObject);for(var i=0;i<itemObject.childsCount;i++)this._clearStyles(itemObject.childNodes[i]);};dhtmlXTreeObject.prototype._registerBranch=function(itemObject,oldTree){itemObject.id=this._globalIdStorageAdd(itemObject.id,itemObject);itemObject.treeNod=this;if(oldTree)oldTree._globalIdStorageSub(itemObject.id);for(var i=0;i<itemObject.childsCount;i++)
this._registerBranch(itemObject.childNodes[i],oldTree);return 0;};dhtmlXTreeObject.prototype.enableThreeStateCheckboxes=function(mode){this.tscheck=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.setOnMouseInHandler=function(func){this.ehlt=true;this.attachEvent("onMouseIn",func);};dhtmlXTreeObject.prototype.setOnMouseOutHandler=function(func){this.ehlt=true;this.attachEvent("onMouseOut",func);};dhtmlXTreeObject.prototype.enableMercyDrag=function(mode){this.dpcpy=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.enableTreeImages=function(mode){this.timgen=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.enableFixedMode=function(mode){this.hfMode=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.enableCheckBoxes=function(mode,hidden){this.checkBoxOff=convertStringToBoolean(mode);this.cBROf=(!(this.checkBoxOff||convertStringToBoolean(hidden)));};dhtmlXTreeObject.prototype.setStdImages=function(image1,image2,image3){this.imageArray[0]=image1;this.imageArray[1]=image2;this.imageArray[2]=image3;};dhtmlXTreeObject.prototype.enableTreeLines=function(mode){this.treeLinesOn=convertStringToBoolean(mode);}
dhtmlXTreeObject.prototype.setImageArrays=function(arrayName,image1,image2,image3,image4,image5){switch(arrayName){case"plus":this.plusArray[0]=image1;this.plusArray[1]=image2;this.plusArray[2]=image3;this.plusArray[3]=image4;this.plusArray[4]=image5;break;case"minus":this.minusArray[0]=image1;this.minusArray[1]=image2;this.minusArray[2]=image3;this.minusArray[3]=image4;this.minusArray[4]=image5;break;}};dhtmlXTreeObject.prototype.openItem=function(itemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;else return this._openItem(temp);};dhtmlXTreeObject.prototype._openItem=function(item){var state=this._getOpenState(item);if((state<0)||(((this.XMLsource)&&(!item.XMLload)))){if(!this.callEvent("onOpenStart",[item.id,state]))return 0;this._HideShow(item,2);if(this._epnFH){if(this.onXLE==this._epnFHe)this._epnFHe(this,item.id,true);if(!this.xmlstate)
this._epnFH(item.id,this._getOpenState(item));else{this._oie_onXLE=this.onXLE;this.onXLE=this._epnFHe;}}}
if(item.parentObject)this._openItem(item.parentObject);};dhtmlXTreeObject.prototype.closeItem=function(itemId){if(this.rootId==itemId)return 0;var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;if(temp.closeble)
this._HideShow(temp,1);};dhtmlXTreeObject.prototype.getLevel=function(itemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;return this._getNodeLevel(temp,0);};dhtmlXTreeObject.prototype.setItemCloseable=function(itemId,flag)
{flag=convertStringToBoolean(flag);if((itemId)&&(itemId.span))
var temp=itemId;else
var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;temp.closeble=flag;};dhtmlXTreeObject.prototype._getNodeLevel=function(itemObject,count){if(itemObject.parentObject)return this._getNodeLevel(itemObject.parentObject,count+1);return(count);};dhtmlXTreeObject.prototype.hasChildren=function(itemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;else
{if((this.XMLsource)&&(!temp.XMLload))return true;else
return temp.childsCount;};};dhtmlXTreeObject.prototype._getLeafCount=function(itemNode){var a=0;for(var b=0;b<itemNode.childsCount;b++)
if(itemNode.childNodes[b].childsCount==0)a++;return a;}
dhtmlXTreeObject.prototype.setItemText=function(itemId,newLabel,newTooltip)
{var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;temp.label=newLabel;temp.span.innerHTML=newLabel;if(this.childCalc)this._fixChildCountLabel(temp);if(this._dhxTT)
dhtmlxTooltip.setTooltip(temp.span.parentNode.parentNode,(newTooltip||""));else
temp.span.parentNode.parentNode.title=newTooltip||"";};dhtmlXTreeObject.prototype.getItemTooltip=function(itemId){var temp=this._globalIdStorageFind(itemId);if(!temp)return"";return(temp.span.parentNode.parentNode.title||"");};dhtmlXTreeObject.prototype.refreshItem=function(itemId){if(!itemId)itemId=this.rootId;var temp=this._globalIdStorageFind(itemId);this.deleteChildItems(itemId);this._loadDynXML(itemId);};dhtmlXTreeObject.prototype.setItemImage2=function(itemId,image1,image2,image3){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;temp.images[1]=image2;temp.images[2]=image3;temp.images[0]=image1;this._correctPlus(temp);};dhtmlXTreeObject.prototype.setItemImage=function(itemId,image1,image2)
{var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;if(image2)
{temp.images[1]=image1;temp.images[2]=image2;}
else temp.images[0]=image1;this._correctPlus(temp);};dhtmlXTreeObject.prototype.getSubItems=function(itemId)
{var temp=this._globalIdStorageFind(itemId,0,1);if(!temp)return 0;if(temp.unParsed)
return(this._getSubItemsXML(temp.unParsed));var z="";for(i=0;i<temp.childsCount;i++){if(!z)z=temp.childNodes[i].id;else z+=this.dlmtr+temp.childNodes[i].id;}
return z;};dhtmlXTreeObject.prototype._getAllScraggyItems=function(node)
{var z="";for(var i=0;i<node.childsCount;i++)
{if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0))
{if(node.childNodes[i].unParsed)
var zb=this._getAllScraggyItemsXML(node.childNodes[i].unParsed,1);else
var zb=this._getAllScraggyItems(node.childNodes[i])
if(zb)
if(z)z+=this.dlmtr+zb;else z=zb;}
else
if(!z)z=node.childNodes[i].id;else z+=this.dlmtr+node.childNodes[i].id;}
return z;};dhtmlXTreeObject.prototype._getAllFatItems=function(node)
{var z="";for(var i=0;i<node.childsCount;i++)
{if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0))
{if(!z)z=node.childNodes[i].id;else z+=this.dlmtr+node.childNodes[i].id;if(node.childNodes[i].unParsed)
var zb=this._getAllFatItemsXML(node.childNodes[i].unParsed,1);else
var zb=this._getAllFatItems(node.childNodes[i])
if(zb)z+=this.dlmtr+zb;}}
return z;};dhtmlXTreeObject.prototype._getAllSubItems=function(itemId,z,node)
{if(node)temp=node;else{var temp=this._globalIdStorageFind(itemId);};if(!temp)return 0;z="";for(var i=0;i<temp.childsCount;i++)
{if(!z)z=temp.childNodes[i].id;else z+=this.dlmtr+temp.childNodes[i].id;var zb=this._getAllSubItems(0,z,temp.childNodes[i])
if(zb)z+=this.dlmtr+zb;}
if(temp.unParsed)
z=this._getAllSubItemsXML(itemId,z,temp.unParsed);return z;};dhtmlXTreeObject.prototype.selectItem=function(itemId,mode,preserve){mode=convertStringToBoolean(mode);var temp=this._globalIdStorageFind(itemId);if((!temp)||(!temp.parentObject))return 0;if(this.XMLloadingWarning)
temp.parentObject.openMe=1;else
this._openItem(temp.parentObject);var ze=null;if(preserve){ze=new Object;ze.ctrlKey=true;if(temp.i_sel)ze.skipUnSel=true;}
if(mode)
this.onRowSelect(ze,temp.htmlNode.childNodes[0].childNodes[0].childNodes[3],false);else
this.onRowSelect(ze,temp.htmlNode.childNodes[0].childNodes[0].childNodes[3],true);};dhtmlXTreeObject.prototype.getSelectedItemText=function()
{var str=new Array();for(var i=0;i<this._selected.length;i++)str[i]=this._selected[i].span.innerHTML;return(str.join(this.dlmtr));};dhtmlXTreeObject.prototype._compressChildList=function(Count,Nodes)
{Count--;for(var i=0;i<Count;i++)
{if(Nodes[i]==0){Nodes[i]=Nodes[i+1];Nodes[i+1]=0;}};};dhtmlXTreeObject.prototype._deleteNode=function(itemId,htmlObject,skip){if((!htmlObject)||(!htmlObject.parentObject))return 0;var tempos=0;var tempos2=0;if(htmlObject.tr.nextSibling)tempos=htmlObject.tr.nextSibling.nodem;if(htmlObject.tr.previousSibling)tempos2=htmlObject.tr.previousSibling.nodem;var sN=htmlObject.parentObject;var Count=sN.childsCount;var Nodes=sN.childNodes;for(var i=0;i<Count;i++)
{if(Nodes[i].id==itemId){if(!skip)sN.htmlNode.childNodes[0].removeChild(Nodes[i].tr);Nodes[i]=0;break;}}
this._compressChildList(Count,Nodes);if(!skip){sN.childsCount--;}
if(tempos){this._correctPlus(tempos);this._correctLine(tempos);}
if(tempos2){this._correctPlus(tempos2);this._correctLine(tempos2);}
if(this.tscheck)this._correctCheckStates(sN);if(!skip){this._globalIdStorageRecSub(htmlObject);}};dhtmlXTreeObject.prototype.setCheck=function(itemId,state){var sNode=this._globalIdStorageFind(itemId,0,1);if(!sNode)return;if(state==="unsure")
this._setCheck(sNode,state);else
{state=convertStringToBoolean(state);if((this.tscheck)&&(this.smcheck))this._setSubChecked(state,sNode);else this._setCheck(sNode,state);}
if(this.smcheck)
this._correctCheckStates(sNode.parentObject);};dhtmlXTreeObject.prototype._setCheck=function(sNode,state){if(((sNode.parentObject._r_logic)||(this._frbtr))&&(state))
if(this._frbtrs){if(this._frbtrL)this._setCheck(this._frbtrL,0);this._frbtrL=sNode;}else
for(var i=0;i<sNode.parentObject.childsCount;i++)
this._setCheck(sNode.parentObject.childNodes[i],0);var z=sNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];if(state=="unsure")sNode.checkstate=2;else if(state)sNode.checkstate=1;else sNode.checkstate=0;if(sNode.dscheck)sNode.checkstate=sNode.dscheck;this._setSrc(z,this.imPath+((sNode.parentObject._r_logic||this._frbtr)?this.radioArray:this.checkArray)[sNode.checkstate]);};dhtmlXTreeObject.prototype.setSubChecked=function(itemId,state){var sNode=this._globalIdStorageFind(itemId);this._setSubChecked(state,sNode);this._correctCheckStates(sNode.parentObject);}
dhtmlXTreeObject.prototype._setSubChecked=function(state,sNode){state=convertStringToBoolean(state);if(!sNode)return;if(((sNode.parentObject._r_logic)||(this._frbtr))&&(state))
for(var i=0;i<sNode.parentObject.childsCount;i++)
this._setSubChecked(0,sNode.parentObject.childNodes[i]);if(sNode.unParsed)
this._setSubCheckedXML(state,sNode.unParsed)
if(sNode._r_logic||this._frbtr)
this._setSubChecked(state,sNode.childNodes[0]);else
for(var i=0;i<sNode.childsCount;i++)
{this._setSubChecked(state,sNode.childNodes[i]);};var z=sNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];if(state)sNode.checkstate=1;else sNode.checkstate=0;if(sNode.dscheck)sNode.checkstate=sNode.dscheck;this._setSrc(z,this.imPath+((sNode.parentObject._r_logic||this._frbtr)?this.radioArray:this.checkArray)[sNode.checkstate]);};dhtmlXTreeObject.prototype.isItemChecked=function(itemId){var sNode=this._globalIdStorageFind(itemId);if(!sNode)return;return sNode.checkstate;};dhtmlXTreeObject.prototype.deleteChildItems=function(itemId)
{var sNode=this._globalIdStorageFind(itemId);if(!sNode)return;var j=sNode.childsCount;for(var i=0;i<j;i++)
{this._deleteNode(sNode.childNodes[0].id,sNode.childNodes[0]);};};dhtmlXTreeObject.prototype.deleteItem=function(itemId,selectParent){if((!this._onrdlh)||(this._onrdlh(itemId))){var z=this._deleteItem(itemId,selectParent);this._fixChildCountLabel(z);}
this.allTree.childNodes[0].border="1";this.allTree.childNodes[0].border="0";}
dhtmlXTreeObject.prototype._deleteItem=function(itemId,selectParent,skip){selectParent=convertStringToBoolean(selectParent);var sNode=this._globalIdStorageFind(itemId);if(!sNode)return;var pid=this.getParentId(itemId);var zTemp=sNode.parentObject;this._deleteNode(itemId,sNode,skip);this._correctPlus(zTemp);this._correctLine(zTemp);if((selectParent)&&(pid!=this.rootId))this.selectItem(pid,1);return zTemp;};dhtmlXTreeObject.prototype._globalIdStorageRecSub=function(itemObject){for(var i=0;i<itemObject.childsCount;i++)
{this._globalIdStorageRecSub(itemObject.childNodes[i]);this._globalIdStorageSub(itemObject.childNodes[i].id);};this._globalIdStorageSub(itemObject.id);var z=itemObject;z.span=null;z.tr.nodem=null;z.tr=null;z.htmlNode=null;};dhtmlXTreeObject.prototype.insertNewNext=function(itemId,newItemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs){var sNode=this._globalIdStorageFind(itemId);if((!sNode)||(!sNode.parentObject))return(0);var nodez=this._attachChildNode(0,newItemId,itemText,itemActionHandler,image1,image2,image3,optionStr,childs,sNode);if((!this.XMLloadingWarning)&&(this.childCalc))this._fixChildCountLabel(sNode.parentObject);return nodez;};dhtmlXTreeObject.prototype.getItemIdByIndex=function(itemId,index){var z=this._globalIdStorageFind(itemId);if((!z)||(index>z.childsCount))return null;return z.childNodes[index].id;};dhtmlXTreeObject.prototype.getChildItemIdByIndex=function(itemId,index){var z=this._globalIdStorageFind(itemId);if((!z)||(index>=z.childsCount))return null;return z.childNodes[index].id;};dhtmlXTreeObject.prototype.setDragHandler=function(func){this.attachEvent("onDrag",func);};dhtmlXTreeObject.prototype._clearMove=function(){if(this._lastMark){this._lastMark.className=this._lastMark.className.replace(/dragAndDropRow/g,"");this._lastMark=null;}
this.selectionBar.style.display="none";this.allTree.className=this.allTree.className.replace(" selectionBox","");};dhtmlXTreeObject.prototype.enableDragAndDrop=function(mode,rmode){if(mode=="temporary_disabled"){this.dADTempOff=false;mode=true;}
else
this.dADTempOff=true;this.dragAndDropOff=convertStringToBoolean(mode);if(this.dragAndDropOff)this.dragger.addDragLanding(this.allTree,this);if(arguments.length>1)
this._ddronr=(!convertStringToBoolean(rmode));};dhtmlXTreeObject.prototype._setMove=function(htmlNode,x,y){if(htmlNode.parentObject.span){var a1=getAbsoluteTop(htmlNode);var a2=getAbsoluteTop(this.allTree);this.dadmodec=this.dadmode;this.dadmodefix=0;if(this.dadmode==2)
{var z=y-a1+this.allTree.scrollTop+(document.body.scrollTop||document.documentElement.scrollTop)-2-htmlNode.offsetHeight/2;if((Math.abs(z)-htmlNode.offsetHeight/6)>0)
{this.dadmodec=1;if(z<0)
this.dadmodefix=0-htmlNode.offsetHeight;}
else this.dadmodec=0;}
if(this.dadmodec==0)
{var zN=htmlNode.parentObject.span;zN.className+=" dragAndDropRow";this._lastMark=zN;}
else{this._clearMove();this.selectionBar.style.top=(a1-a2+((parseInt(htmlNode.parentObject.span.parentNode.previousSibling.childNodes[0].style.height)||18)-1)+this.dadmodefix)+"px";this.selectionBar.style.left="5px";if(this.allTree.offsetWidth>20)
this.selectionBar.style.width=(this.allTree.offsetWidth-(_isFF?30:25))+"px";this.selectionBar.style.display="";}
this._autoScroll(null,a1,a2);}};dhtmlXTreeObject.prototype._autoScroll=function(node,a1,a2){if(this.autoScroll)
{if(node){a1=getAbsoluteTop(node);a2=getAbsoluteTop(this.allTree);}
if((a1-a2-parseInt(this.allTree.scrollTop))>(parseInt(this.allTree.offsetHeight)-50))
this.allTree.scrollTop=parseInt(this.allTree.scrollTop)+20;if((a1-a2)<(parseInt(this.allTree.scrollTop)+30))
this.allTree.scrollTop=parseInt(this.allTree.scrollTop)-20;}}
dhtmlXTreeObject.prototype._createDragNode=function(htmlObject,e){if(!this.dADTempOff)return null;var obj=htmlObject.parentObject;if(!obj.i_sel)
this._selectItem(obj,e);this._checkMSelectionLogic();var dragSpan=document.createElement('div');var text=new Array();if(this._itim_dg)
for(var i=0;i<this._selected.length;i++)
text[i]="<table cellspacing='0' cellpadding='0'><tr><td><img width='18px' height='18px' src='"+this._getSrc(this._selected[i].span.parentNode.previousSibling.childNodes[0])+"'></td><td>"+this._selected[i].span.innerHTML+"</td></tr><table>";else
text=this.getSelectedItemText().split(this.dlmtr);dragSpan.innerHTML=text.join("");dragSpan.style.position="absolute";dragSpan.className="dragSpanDiv";dragSpan.id="dragItem";this._dragged=(new Array()).concat(this._selected);return dragSpan;}
dhtmlXTreeObject.prototype._focusNode=function(item){var z=getAbsoluteTop(item.htmlNode)-getAbsoluteTop(this.allTree);if((z>(this.allTree.scrollTop+this.allTree.offsetHeight-30))||(z<this.allTree.scrollTop))
this.allTree.scrollTop=z;};dhtmlXTreeObject.prototype._preventNsDrag=function(e){if((e)&&(e.preventDefault)){e.preventDefault();return false;}
return false;}
dhtmlXTreeObject.prototype._drag=function(sourceHtmlObject,dhtmlObject,targetHtmlObject){if(this._autoOpenTimer)clearTimeout(this._autoOpenTimer);if(!targetHtmlObject.parentObject){targetHtmlObject=this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];this.dadmodec=0;}
this._clearMove();var z=sourceHtmlObject.parentObject.treeNod;if((z)&&(z._clearMove))z._clearMove("");if((!this.dragMove)||(this.dragMove()))
{if((!z)||(!z._clearMove)||(!z._dragged))var col=new Array(sourceHtmlObject.parentObject);else var col=z._dragged;var trg=targetHtmlObject.parentObject;for(var i=0;i<col.length;i++){var newID=this._moveNode(col[i],trg);if((this.dadmodec)&&(newID!==false))trg=this._globalIdStorageFind(newID,true,true);if((newID)&&(!this._sADnD))this.selectItem(newID,0,1);}}
if(z)z._dragged=new Array();}
dhtmlXTreeObject.prototype._dragIn=function(htmlObject,shtmlObject,x,y){if(!this.dADTempOff)return 0;var fobj=shtmlObject.parentObject;var tobj=htmlObject.parentObject;if((!tobj)&&(this._ddronr))return;if(!this.callEvent("onDragIn",[fobj.id,tobj?tobj.id:null,fobj.treeNod,this]))
return 0;if(!tobj)
this.allTree.className+=" selectionBox";else
{if(fobj.childNodes==null){this._setMove(htmlObject,x,y);return htmlObject;}
var stree=fobj.treeNod;for(var i=0;i<stree._dragged.length;i++)
if(this._checkPNodes(tobj,stree._dragged[i])){this._autoScroll(htmlObject);return 0;}
this.selectionBar.parentNode.removeChild(this.selectionBar);tobj.span.parentNode.appendChild(this.selectionBar);this._setMove(htmlObject,x,y);if(this._getOpenState(tobj)<=0){this._autoOpenId=tobj.id;this._autoOpenTimer=window.setTimeout(new callerFunction(this._autoOpenItem,this),1000);}}
return htmlObject;}
dhtmlXTreeObject.prototype._autoOpenItem=function(e,treeObject){treeObject.openItem(treeObject._autoOpenId);};dhtmlXTreeObject.prototype._dragOut=function(htmlObject){this._clearMove();if(this._autoOpenTimer)clearTimeout(this._autoOpenTimer);}
dhtmlXTreeObject.prototype._getNextNode=function(item,mode){if((!mode)&&(item.childsCount))return item.childNodes[0];if(item==this.htmlNode)
return-1;if((item.tr)&&(item.tr.nextSibling)&&(item.tr.nextSibling.nodem))
return item.tr.nextSibling.nodem;return this._getNextNode(item.parentObject,true);};dhtmlXTreeObject.prototype._lastChild=function(item){if(item.childsCount)
return this._lastChild(item.childNodes[item.childsCount-1]);else return item;};dhtmlXTreeObject.prototype._getPrevNode=function(node,mode){if((node.tr)&&(node.tr.previousSibling)&&(node.tr.previousSibling.nodem))
return this._lastChild(node.tr.previousSibling.nodem);if(node.parentObject)
return node.parentObject;else return-1;};dhtmlXTreeObject.prototype.findItem=function(searchStr,direction,top){var z=this._findNodeByLabel(searchStr,direction,(top?this.htmlNode:null));if(z){this.selectItem(z.id,true);this._focusNode(z);return z.id;}
else return null;}
dhtmlXTreeObject.prototype.findItemIdByLabel=function(searchStr,direction,top){var z=this._findNodeByLabel(searchStr,direction,(top?this.htmlNode:null));if(z)
return z.id
else return null;}
dhtmlXTreeObject.prototype.findStrInXML=function(node,field,cvalue){for(var i=0;i<node.childNodes.length;i++)
{if(node.childNodes[i].nodeType==1)
{var z=node.childNodes[i].getAttribute(field);if((z)&&(z.toLowerCase().search(cvalue)!=-1))
return true;if(this.findStrInXML(node.childNodes[i],field,cvalue))return true;}}
return false;}
dhtmlXTreeObject.prototype._findNodeByLabel=function(searchStr,direction,fromNode){var searchStr=searchStr.replace(new RegExp("^( )+"),"").replace(new RegExp("( )+$"),"");searchStr=new RegExp(searchStr.replace(/([\*\+\\\[\]\(\)]{1})/gi,"\\$1").replace(/ /gi,".*"),"gi");if(!fromNode)
{fromNode=this._selected[0];if(!fromNode)fromNode=this.htmlNode;}
var startNode=fromNode;if(!direction){if((fromNode.unParsed)&&(this.findStrInXML(fromNode.unParsed,"text",searchStr)))
this.reParse(fromNode);fromNode=this._getNextNode(startNode);if(fromNode==-1)fromNode=this.htmlNode.childNodes[0];}
else
{var z2=this._getPrevNode(startNode);if(z2==-1)z2=this._lastChild(this.htmlNode);if((z2.unParsed)&&(this.findStrInXML(z2.unParsed,"text",searchStr)))
{this.reParse(z2);fromNode=this._getPrevNode(startNode);}
else fromNode=z2;if(fromNode==-1)fromNode=this._lastChild(this.htmlNode);}
while((fromNode)&&(fromNode!=startNode)){if((fromNode.label)&&(fromNode.label.search(searchStr)!=-1))
return(fromNode);if(!direction){if(fromNode==-1){if(startNode==this.htmlNode)break;fromNode=this.htmlNode.childNodes[0];}
if((fromNode.unParsed)&&(this.findStrInXML(fromNode.unParsed,"text",searchStr)))
this.reParse(fromNode);fromNode=this._getNextNode(fromNode);}
else
{var z2=this._getPrevNode(fromNode);if(z2==-1)z2=this._lastChild(this.htmlNode);if((z2.unParsed)&&(this.findStrInXML(z2.unParsed,"text",searchStr)))
{this.reParse(z2);fromNode=this._getPrevNode(fromNode);}
else fromNode=z2;if(fromNode==-1)fromNode=this._lastChild(this.htmlNode);}}
return null;};dhtmlXTreeObject.prototype.setDragBehavior=function(mode,select){this._sADnD=(!convertStringToBoolean(select));switch(mode){case"child":this.dadmode=0;break;case"sibling":this.dadmode=1;break;case"complex":this.dadmode=2;break;}};dhtmlXTreeObject.prototype.moveItem=function(itemId,mode,targetId,targetTree)
{var sNode=this._globalIdStorageFind(itemId);if(!sNode)return(0);switch(mode){case"right":alert('Not supported yet');break;case"item_child":var tNode=(targetTree||this)._globalIdStorageFind(targetId);if(!tNode)return(0);(targetTree||this)._moveNodeTo(sNode,tNode,0);break;case"item_sibling":var tNode=(targetTree||this)._globalIdStorageFind(targetId);if(!tNode)return(0);(targetTree||this)._moveNodeTo(sNode,tNode.parentObject,tNode);break;case"item_sibling_next":var tNode=(targetTree||this)._globalIdStorageFind(targetId);if(!tNode)return(0);if((tNode.tr)&&(tNode.tr.nextSibling)&&(tNode.tr.nextSibling.nodem))
(targetTree||this)._moveNodeTo(sNode,tNode.parentObject,tNode.tr.nextSibling.nodem);else
(targetTree||this)._moveNodeTo(sNode,tNode.parentObject);break;case"left":if(sNode.parentObject.parentObject)
this._moveNodeTo(sNode,sNode.parentObject.parentObject,sNode.parentObject);break;case"up":var z=this._getPrevNode(sNode);if((z==-1)||(!z.parentObject))return;this._moveNodeTo(sNode,z.parentObject,z);break;case"up_strict":var z=this._getIndex(sNode);if(z!=0)
this._moveNodeTo(sNode,sNode.parentObject,sNode.parentObject.childNodes[z-1]);break;case"down_strict":var z=this._getIndex(sNode);var count=sNode.parentObject.childsCount-2;if(z==count)
this._moveNodeTo(sNode,sNode.parentObject);else if(z<count)
this._moveNodeTo(sNode,sNode.parentObject,sNode.parentObject.childNodes[z+2]);break;case"down":var z=this._getNextNode(this._lastChild(sNode));if((z==-1)||(!z.parentObject))return;if(z.parentObject==sNode.parentObject)
var z=this._getNextNode(z);if(z==-1){this._moveNodeTo(sNode,sNode.parentObject);}
else
{if((z==-1)||(!z.parentObject))return;this._moveNodeTo(sNode,z.parentObject,z);}
break;}}
dhtmlXTreeObject.prototype._loadDynXML=function(id,src){src=src||this.XMLsource;var sn=(new Date()).valueOf();this._ld_id=id;if(this.xmlalb=="function"){if(src)src(this._escape(id));}
else
if(this.xmlalb=="name")
this.loadXML(src+this._escape(id));else
if(this.xmlalb=="xmlname")
this.loadXML(src+this._escape(id)+".xml?uid="+sn);else
this.loadXML(src+getUrlSymbol(src)+"uid="+sn+"&id="+this._escape(id));};dhtmlXTreeObject.prototype.enableMultiselection=function(mode,strict){this._amsel=convertStringToBoolean(mode);this._amselS=convertStringToBoolean(strict);};dhtmlXTreeObject.prototype._checkMSelectionLogic=function(){var usl=new Array();for(var i=0;i<this._selected.length;i++)
for(var j=0;j<this._selected.length;j++)
if((i!=j)&&(this._checkPNodes(this._selected[j],this._selected[i])))
usl[usl.length]=this._selected[j];for(var i=0;i<usl.length;i++)
this._unselectItem(usl[i]);};dhtmlXTreeObject.prototype._checkPNodes=function(item1,item2){if(item2==item1)return 1
if(item1.parentObject)return this._checkPNodes(item1.parentObject,item2);else return 0;};dhtmlXTreeObject.prototype.enableDistributedParsing=function(mode,count,delay){this._edsbps=convertStringToBoolean(mode);this._edsbpsA=new Array();this._edsbpsC=count||10;this._edsbpsD=delay||250;}
dhtmlXTreeObject.prototype.getDistributedParsingState=function(){return(!((!this._edsbpsA)||(!this._edsbpsA.length)));}
dhtmlXTreeObject.prototype.getItemParsingState=function(itemId){var z=this._globalIdStorageFind(itemId,true,true)
if(!z)return 0;if(this._edsbpsA)
for(var i=0;i<this._edsbpsA.length;i++)
if(this._edsbpsA[i][2]==itemId)return-1;return 1;}
dhtmlXTreeObject.prototype._distributedStart=function(node,start,parentId,level,start2){if(!this._edsbpsA)
this._edsbpsA=new Array();this._edsbpsA[this._edsbpsA.length]=[node,start,parentId,level,start2];}
dhtmlXTreeObject.prototype._distributedStep=function(pId){var self=this;if((!this._edsbpsA)||(!this._edsbpsA.length)){self.XMLloadingWarning=0;return;}
var z=this._edsbpsA[0];this.parsedArray=new Array();this._parseXMLTree(this,z[0],z[2],z[3],null,z[1]);var zkx=this._globalIdStorageFind(z[2]);this._redrawFrom(this,zkx,z[4],this._getOpenState(zkx));var chArr=this.setCheckList.split(this.dlmtr);for(var n=0;n<chArr.length;n++)
if(chArr[n])this.setCheck(chArr[n],1);this._edsbpsA=(new Array()).concat(this._edsbpsA.slice(1));if((!this._edsbpsA.length)){window.setTimeout(function(){if(self.onXLE)self.onXLE(self,pId);self.callEvent("onXLE",[self,pId]);},1);self.xmlstate=0;}}
dhtmlXTreeObject.prototype.enablePaging=function(mode,page_size){this._epgps=convertStringToBoolean(mode);this._epgpsC=page_size||50;}
dhtmlXTreeObject.prototype._setPrevPageSign=function(node,pos,level,xmlnode){var z=document.createElement("DIV");z.innerHTML="Previous "+this._epgpsC+" items";z.className="dhx_next_button";var self=this;z.onclick=function(){self._prevPageCall(this);}
z._pageData=[node,pos,level,xmlnode];var w=node.childNodes[0];var w2=w.span.parentNode.parentNode.parentNode.parentNode.parentNode;w2.insertBefore(z,w2.firstChild);}
dhtmlXTreeObject.prototype._setNextPageSign=function(node,pos,level,xmlnode){var z=document.createElement("DIV");z.innerHTML="Next "+this._epgpsC+" items";z.className="dhx_next_button";var self=this;z.onclick=function(){self._nextPageCall(this);}
z._pageData=[node,pos,level,xmlnode];var w=node.childNodes[node.childsCount-1];w.span.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(z);}
dhtmlXTreeObject.prototype._nextPageCall=function(node){tree.deleteChildItems(node._pageData[0].id);node.parentNode.removeChild(node);var f=this._getOpenState(node._pageData[0]);this._parseXMLTree(this,node._pageData[3],node._pageData[0].id,node._pageData[2],null,node._pageData[1]);this._redrawFrom(this,node._pageData[0],0);if(f>-1)this._openItem(node._pageData[0]);node._pageData=null;}
dhtmlXTreeObject.prototype._prevPageCall=function(node){tree.deleteChildItems(node._pageData[0].id);node.parentNode.removeChild(node);var f=this._getOpenState(node._pageData[0]);var xz=node._pageData[1]-this._epgpsC;if(xz<0)xz=0;this._parseXMLTree(this,node._pageData[3],node._pageData[0].id,node._pageData[2],null,xz);this._redrawFrom(this,node._pageData[0],0);if(f>-1)this._openItem(node._pageData[0]);node._pageData=null;}
dhtmlXTreeObject.prototype.enableTextSigns=function(mode){this._txtimg=convertStringToBoolean(mode);}
dhtmlXTreeObject.prototype.preventIECashing=function(mode){this.no_cashe=convertStringToBoolean(mode);this.XMLLoader.rSeed=this.no_cashe;}
dhtmlXTreeObject.prototype.smartRefreshBranch=function(itemId,source){this._branchUpdate=1;this.smartRefreshItem(itemId,source);}
dhtmlXTreeObject.prototype.smartRefreshItem=function(itemId,source){var sNode=this._globalIdStorageFind(itemId);for(var i=0;i<sNode.childsCount;i++)
sNode.childNodes[i]._dmark=true;this.waitUpdateXML=true;if((source)&&(source.tagName))
this._parseXMLTree(this,source,itemId);else
this._loadDynXML(itemId,source);};dhtmlXTreeObject.prototype.refreshItems=function(itemIdList,source){var z=itemIdList.toString().split(this.dlmtr);this.waitUpdateXML=new Array();for(var i=0;i<z.length;i++)
this.waitUpdateXML[z[i]]=true;this.loadXML((source||this.XMLsource)+getUrlSymbol(source||this.XMLsource)+"ids="+this._escape(itemIdList));};dhtmlXTreeObject.prototype.updateItem=function(itemId,name,im0,im1,im2,achecked){var sNode=this._globalIdStorageFind(itemId);sNode.userData=new cObject();if(name)sNode.label=name;sNode.images=new Array(im0||this.imageArray[0],im1||this.imageArray[1],im2||this.imageArray[2]);this.setItemText(itemId,name);if(achecked)this._setCheck(sNode,true);this._correctPlus(sNode);sNode._dmark=false;return sNode;};dhtmlXTreeObject.prototype.setDropHandler=function(func){this.attachEvent("onDrop",func);};dhtmlXTreeObject.prototype.setOnLoadingStart=function(func){this.attachEvent("onXLS",func);};dhtmlXTreeObject.prototype.setOnLoadingEnd=function(func){this.attachEvent("onXLE",func);};dhtmlXTreeObject.prototype.disableCheckbox=function(itemId,mode){if(typeof(itemId)!="object")
var sNode=this._globalIdStorageFind(itemId,0,1);else
var sNode=itemId;if(!sNode)return;sNode.dscheck=convertStringToBoolean(mode)?(((sNode.checkstate||0)%3)+3):((sNode.checkstate>2)?(sNode.checkstate-3):sNode.checkstate);this._setCheck(sNode);if(sNode.dscheck<3)sNode.dscheck=false;};dhtmlXTreeObject.prototype.setXMLAutoLoadingBehaviour=function(mode){this.xmlalb=mode;};dhtmlXTreeObject.prototype.enableSmartCheckboxes=function(mode){this.smcheck=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.getXMLState=function(){return(this.xmlstate==1);};dhtmlXTreeObject.prototype.setItemTopOffset=function(itemId,value){if(typeof(itemId)=="string")
var node=this._globalIdStorageFind(itemId);else
var node=itemId;var z=node.span.parentNode.parentNode;for(var i=0;i<z.childNodes.length;i++){if(i!=0)
z.childNodes[i].style.height=18+parseInt(value)+"px";else{var w=z.childNodes[i].firstChild;if(z.childNodes[i].firstChild.tagName!='DIV'){w=document.createElement("DIV");z.childNodes[i].insertBefore(w,z.childNodes[i].firstChild);}
w.style.height=parseInt(value)+"px";w.style.backgroundImage="url("+this.imPath+this.lineArray[5]+")";w.innerHTML="&nbsp;";w.style.overflow='hidden';if(parseInt(value)==0)
z.childNodes[i].removeChild(w);}
z.childNodes[i].vAlign="bottom";}}
dhtmlXTreeObject.prototype.setIconSize=function(newWidth,newHeight,itemId)
{if(itemId){if((itemId)&&(itemId.span))
var sNode=itemId;else
var sNode=this._globalIdStorageFind(itemId);if(!sNode)return(0);var img=sNode.span.parentNode.previousSibling.childNodes[0];img.style.width=newWidth;img.style.height=newHeight;}
else{this.def_img_x=newWidth;this.def_img_y=newHeight;}}
dhtmlXTreeObject.prototype.getItemImage=function(itemId,imageInd,fullPath){var node=this._globalIdStorageFind(itemId);if(!node)return"";var img=node.images[imageInd||0];if(fullPath)img=this.imPath+img;return img;}
dhtmlXTreeObject.prototype.enableRadioButtons=function(itemId,mode){if(arguments.length==1){this._frbtr=convertStringToBoolean(itemId);this.checkBoxOff=this.checkBoxOff||this._frbtr;return;}
var node=this._globalIdStorageFind(itemId);if(!node)return"";mode=convertStringToBoolean(mode);if((mode)&&(!node._r_logic)){node._r_logic=true;for(var i=0;i<node.childsCount;i++)
this._setCheck(node.childNodes[i],node.childNodes[i].checkstate);}
if((!mode)&&(node._r_logic)){node._r_logic=false;for(var i=0;i<node.childsCount;i++)
this._setCheck(node.childNodes[i],node.childNodes[i].checkstate);}}
dhtmlXTreeObject.prototype.enableSingleRadioMode=function(mode){this._frbtrs=convertStringToBoolean(mode);}
dhtmlXTreeObject.prototype.openOnItemAdding=function(mode){this._hAdI=!convertStringToBoolean(mode);}
dhtmlXTreeObject.prototype.enableMultiLineItems=function(width){if(width===true)this.mlitems="100%";else this.mlitems=width;}
dhtmlXTreeObject.prototype.enableAutoTooltips=function(mode){this.ettip=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.enableDHTMLXTooltips=function(mode){this._dhxTT=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.clearSelection=function(itemId){if(itemId)
this._unselectItem(this._globalIdStorageFind(itemId));else
this._unselectItems();}
dhtmlXTreeObject.prototype.showItemSign=function(itemId,state){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;var z=temp.span.parentNode.previousSibling.previousSibling.previousSibling;if(!convertStringToBoolean(state)){this._openItem(temp)
temp.closeble=false;temp.wsign=true;}
else
{temp.closeble=true;temp.wsign=false;}
this._correctPlus(temp);}
dhtmlXTreeObject.prototype.showItemCheckbox=function(itemId,state){if(!itemId)
for(var a in this._idpull)
this.showItemCheckbox(this._idpull[a],state);if(typeof(itemId)!="object")
itemId=this._globalIdStorageFind(itemId,0,1);if(!itemId)return 0;itemId.nocheckbox=!convertStringToBoolean(state);itemId.span.parentNode.previousSibling.previousSibling.childNodes[0].style.display=(!itemId.nocheckbox)?"":"none";}
dhtmlXTreeObject.prototype.setListDelimeter=function(separator){this.dlmtr=separator;}
dhtmlXTreeObject.prototype.setEscapingMode=function(mode){this.utfesc=mode;}
dhtmlXTreeObject.prototype.enableHighlighting=function(mode){this.ehlt=true;this.ehlta=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype._itemMouseOut=function(){var that=this.childNodes[3].parentObject;var tree=that.treeNod;tree.callEvent("onMouseOut",[that.id]);if(that.id==tree._l_onMSI)tree._l_onMSI=null;if(!tree.ehlt)return;that.span.className=that.span.className.replace("_lor","");}
dhtmlXTreeObject.prototype._itemMouseIn=function(){var that=this.childNodes[3].parentObject;var tree=that.treeNod;if(tree._l_onMSI!=that.id)tree.callEvent("onMouseIn",[that.id]);tree._l_onMSI=that.id;if(!tree.ehlt)return;that.span.className=that.span.className.replace("_lor","");that.span.className=that.span.className.replace(/((standart|selected)TreeRow)/,"$1_lor");}
dhtmlXTreeObject.prototype.enableActiveImages=function(mode){this._aimgs=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.focusItem=function(itemId){var sNode=this._globalIdStorageFind(itemId);if(!sNode)return(0);this._focusNode(sNode);};dhtmlXTreeObject.prototype.getAllSubItems=function(itemId){return this._getAllSubItems(itemId);}
dhtmlXTreeObject.prototype.getAllChildless=function(){return this._getAllScraggyItems(this.htmlNode);}
dhtmlXTreeObject.prototype.getAllLeafs=dhtmlXTreeObject.prototype.getAllChildless;dhtmlXTreeObject.prototype._getAllScraggyItems=function(node)
{var z="";for(var i=0;i<node.childsCount;i++)
{if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0))
{if(node.childNodes[i].unParsed)
var zb=this._getAllScraggyItemsXML(node.childNodes[i].unParsed,1);else
var zb=this._getAllScraggyItems(node.childNodes[i])
if(zb)
if(z)z+=this.dlmtr+zb;else z=zb;}
else
if(!z)z=node.childNodes[i].id;else z+=this.dlmtr+node.childNodes[i].id;}
return z;};dhtmlXTreeObject.prototype._getAllFatItems=function(node)
{var z="";for(var i=0;i<node.childsCount;i++)
{if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0))
{if(!z)z=node.childNodes[i].id;else z+=this.dlmtr+node.childNodes[i].id;if(node.childNodes[i].unParsed)
var zb=this._getAllFatItemsXML(node.childNodes[i].unParsed,1);else
var zb=this._getAllFatItems(node.childNodes[i])
if(zb)z+=this.dlmtr+zb;}}
return z;};dhtmlXTreeObject.prototype.getAllItemsWithKids=function(){return this._getAllFatItems(this.htmlNode);}
dhtmlXTreeObject.prototype.getAllFatItems=dhtmlXTreeObject.prototype.getAllItemsWithKids;dhtmlXTreeObject.prototype.getAllChecked=function(){return this._getAllChecked("","",1);}
dhtmlXTreeObject.prototype.getAllUnchecked=function(itemId){if(itemId)
itemId=this._globalIdStorageFind(itemId);return this._getAllChecked(itemId,"",0);}
dhtmlXTreeObject.prototype.getAllPartiallyChecked=function(){return this._getAllChecked("","",2);}
dhtmlXTreeObject.prototype.getAllCheckedBranches=function(){var temp=this._getAllChecked("","",1);if(temp!="")temp+=this.dlmtr;return temp+this._getAllChecked("","",2);}
dhtmlXTreeObject.prototype._getAllChecked=function(htmlNode,list,mode){if(!htmlNode)htmlNode=this.htmlNode;if(htmlNode.checkstate==mode)
if(!htmlNode.nocheckbox){if(list)list+=this.dlmtr+htmlNode.id;else list=htmlNode.id;}
var j=htmlNode.childsCount;for(var i=0;i<j;i++)
{list=this._getAllChecked(htmlNode.childNodes[i],list,mode);};if(htmlNode.unParsed)
list=this._getAllCheckedXML(htmlNode.unParsed,list,mode);if(list)return list;else return"";};dhtmlXTreeObject.prototype.setItemStyle=function(itemId,style_string){var temp=this._globalIdStorageFind(itemId);if(!temp)return 0;if(!temp.span.style.cssText)
temp.span.setAttribute("style",temp.span.getAttribute("style")+"; "+style_string);else
temp.span.style.cssText+=(";"+style_string);}
dhtmlXTreeObject.prototype.enableImageDrag=function(mode){this._itim_dg=convertStringToBoolean(mode);}
dhtmlXTreeObject.prototype.setOnDragIn=function(func){this.attachEvent("onDragIn",func);};dhtmlXTreeObject.prototype.enableDragAndDropScrolling=function(mode){this.autoScroll=convertStringToBoolean(mode);};dhtmlXTreeObject.prototype.dhx_Event=function()
{this.dhx_SeverCatcherPath="";this.attachEvent=function(original,catcher,CallObj)
{CallObj=CallObj||this;original='ev_'+original;if((!this[original])||(!this[original].addEvent)){var z=new this.eventCatcher(CallObj);z.addEvent(this[original]);this[original]=z;}
return(original+':'+this[original].addEvent(catcher));}
this.callEvent=function(name,arguments){if(this["ev_"+name])return this["ev_"+name].apply(this,arguments);return true;}
this.checkEvent=function(name){if(this["ev_"+name])return true;return false;}
this.eventCatcher=function(obj)
{var dhx_catch=new Array();var m_obj=obj;var func_server=function(catcher,rpc)
{catcher=catcher.split(":");var postVar="";var postVar2="";var target=catcher[1];if(catcher[1]=="rpc"){postVar='<?xml version="1.0"?><methodCall><methodName>'+catcher[2]+'</methodName><params>';postVar2="</params></methodCall>";target=rpc;}
var z=function(){return true;}
return z;}
var z=function()
{if(dhx_catch)
var res=true;for(var i=0;i<dhx_catch.length;i++){if(dhx_catch[i]!=null){var zr=dhx_catch[i].apply(m_obj,arguments);res=res&&zr;}}
return res;}
z.addEvent=function(ev)
{if(typeof(ev)!="function")
if(ev&&ev.indexOf&&ev.indexOf("server:")===0)
ev=new func_server(ev,m_obj.rpcServer);else
ev=eval(ev);if(ev)
return dhx_catch.push(ev)-1;return false;}
z.removeEvent=function(id)
{dhx_catch[id]=null;}
return z;}
this.detachEvent=function(id)
{if(id!=false){var list=id.split(':');this[list[0]].removeEvent(list[1]);}}}
dhtmlXTreeObject.prototype._serEnts=[["&","&amp;"],["<","&lt;"],[">","&gt;"]];dhtmlXTreeObject.prototype.registerXMLEntity=function(rChar,rEntity){this._serEnts[this._serEnts.length]=[rChar,rEntity,new RegExp(rChar,"g")];};dhtmlXTreeObject.prototype.setSerializationLevel=function(userData,fullXML,escapeEntities,userDataAsCData,DTD){this._xuserData=convertStringToBoolean(userData);this._xfullXML=convertStringToBoolean(fullXML);this._dtd=DTD;this._xescapeEntities=convertStringToBoolean(escapeEntities);if(convertStringToBoolean(userDataAsCData)){this._apreUC="<![CDATA[";this._apstUC="]]>";}else{};for(var i=0;i<this._serEnts.length;i++)this._serEnts[i][2]=new RegExp(this._serEnts[i][0],"g");};dhtmlXTreeObject.prototype.serializeTree=function(){if(this.stopEdit)this.stopEdit();this._apreUC=this._apreUC||"";this._apstUC=this._apstUC||"";var out='<?xml version="1.0"?>';if(this._dtd)out+="<!DOCTYPE tree SYSTEM \""+this._dtd+"\">";out+='<tree id="'+this.rootId+'">';for(var i=0;i<this.htmlNode.childsCount;i++)out+=this._serializeItem(this.htmlNode.childNodes[i]);out+="</tree>";return out;};dhtmlXTreeObject.prototype._serializeItem=function(itemNode){if(itemNode.unParsed)if(document.all)return itemNode.unParsed.xml;else{var xmlSerializer=new XMLSerializer();return xmlSerializer.serializeToString(itemNode.unParsed);};var out="";if(this._selected.length)var lid=this._selected[0].id;else lid="\"";var text=itemNode.span.innerHTML;if(this._xescapeEntities)for(var i=0;i<this._serEnts.length;i++)text=text.replace(this._serEnts[i][2],this._serEnts[i][1]);if(!this._xfullXML)out='<item id="'+itemNode.id+'" '+(this._getOpenState(itemNode)==1?' open="1" ':'')+(lid==itemNode.id?' select="1"':'')+' text="'+text+'"'+(((this.XMLsource)&&(itemNode.XMLload==0))?" child=\"1\" ":"")+'>';else
out='<item id="'+itemNode.id+'" '+(this._getOpenState(itemNode)==1?' open="1" ':'')+(lid==itemNode.id?' select="1"':'')+' text="'+text+'" im0="'+itemNode.images[0]+'" im1="'+itemNode.images[1]+'" im2="'+itemNode.images[2]+'" '+(itemNode.acolor?('aCol="'+itemNode.acolor+'" '):'')+(itemNode.scolor?('sCol="'+itemNode.scolor+'" '):'')+(itemNode.checkstate==1?'checked="1" ':(itemNode.checkstate==2?'checked="-1"':''))+(itemNode.closeable?'closeable="1" ':'')+'>';if((this._xuserData)&&(itemNode._userdatalist))
{var names=itemNode._userdatalist.split(",");for(var i=0;i<names.length;i++)out+="<userdata name=\""+names[i]+"\">"+this._apreUC+itemNode.userData["t_"+names[i]]+this._apstUC+"</userdata>";};for(var i=0;i<itemNode.childsCount;i++)out+=this._serializeItem(itemNode.childNodes[i]);out+="</item>";return out;};dhtmlXTreeObject.prototype.saveSelectedItem=function(name,cookie_param){name=name||"";this.setCookie("treeStateSelected"+name,this.getSelectedItemId(),cookie_param);};dhtmlXTreeObject.prototype.restoreSelectedItem=function(name){name=name||"";var z=this.getCookie("treeStateSelected"+name);this.selectItem(z,false);};dhtmlXTreeObject.prototype.enableAutoSavingSelected=function(mode,cookieName){this.assMode=convertStringToBoolean(mode);if((this.assMode)&&(!this.oldOnSelect)){this.oldOnSelect=this.onRowSelect;this.onRowSelect=function(e,htmlObject,mode){if(!htmlObject)htmlObject=this;htmlObject.parentObject.treeNod.oldOnSelect(e,htmlObject,mode);if(htmlObject.parentObject.treeNod.assMode)htmlObject.parentObject.treeNod.saveSelectedItem(htmlObject.parentObject.treeNod.assCookieName);};};this.assCookieName=cookieName;};dhtmlXTreeObject.prototype.saveState=function(name,cookie_param){var z=this._escape(this.serializeTree());var kusok=4000;if(z.length>kusok){if(navigator.appName.indexOf("Microsoft")!=-1)
return false;this.setCookie("treeStatex"+name,Math.ceil(z.length/kusok));for(var i=0;i<Math.ceil(z.length/kusok);i++)
{this.setCookie("treeStatex"+name+"x"+i,z.substr(i*kusok,kusok),cookie_param);};}else
this.setCookie("treeStatex"+name,z,cookie_param);var z=this.getCookie("treeStatex"+name);if(!z){this.setCookie("treeStatex"+name,"",cookie_param);return false;};return true;};dhtmlXTreeObject.prototype.loadState=function(name){var z=this.getCookie("treeStatex"+name);if(!z)return false;if(z.length){if(z.toString().length<4)
{var z2="";for(var i=0;i<z;i++){z2+=this.getCookie("treeStatex"+name+"x"+i);};z=z2;};this.loadXMLString((this.utfesc=="utf8")?decodeURI(z):unescape(z));};return true;};dhtmlXTreeObject.prototype.setCookie=function(name,value,cookie_param){var str=name+"="+value+(cookie_param?(";"+cookie_param):"");document.cookie=str;};dhtmlXTreeObject.prototype.getCookie=function(name){var search=name+"=";if(document.cookie.length>0){var offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;var end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;return document.cookie.substring(offset,end);};};};dhtmlXTreeObject.prototype.saveOpenStates=function(name,cookie_param){var z="";for(var i=0;i<this.htmlNode.childsCount;i++)z=this._collectOpenStates(this.htmlNode.childNodes[i],z);z=z.replace(/\,\,/g,"");this.setCookie("treeOpenStatex"+name,z,cookie_param);};dhtmlXTreeObject.prototype.loadOpenStates=function(name){for(var i=0;i<this.htmlNode.childsCount;i++)this._xcloseAll(this.htmlNode.childNodes[i]);this.allTree.childNodes[0].border="1";this.allTree.childNodes[0].border="0";var z=getCookie("treeOpenStatex"+name);if(z){var arr=z.split(this.dlmtr);for(var i=0;i<arr.length;i++){var zNode=this._globalIdStorageFind(arr[i]);if(zNode){if((!zNode.XMLload)&&(zNode.id!=this.rootId)){this._delayedLoad(zNode,"loadOpenStates('"+name+"')");return;}else
this.openItem(arr[i]);};};};};dhtmlXTreeObject.prototype._delayedLoad=function(node,name){this.afterLoadMethod=name;this.onLoadReserve=this.onXLE;tree.onXLE=this._delayedLoadStep2;this.loadXML(this.XMLsource+getUrlSymbol(this.XMLsource)+"id="+this._escape(node.id));};dhtmlXTreeObject.prototype._delayedLoadStep2=function(tree){tree.onXLE=tree.onLoadReserve;window.setTimeout(function(){eval("tree."+tree.afterLoadMethod);},100);if(tree.onXLE)tree.onXLE(tree);tree.callEvent("onXLE",[tree]);};dhtmlXTreeObject.prototype._collectOpenStates=function(node,list){if(this._getOpenState(node)==1)
{list+=this.dlmtr+node.id;for(var i=0;i<node.childsCount;i++)list=this._collectOpenStates(node.childNodes[i],list);};return list;};function setCookie(name,value){document.cookie=name+'='+value;};function getCookie(name){var search=name+"=";if(document.cookie.length>0){var offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;var end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;return(document.cookie.substring(offset,end));};};};dhtmlXTreeObject.prototype.openAllItemsDynamic=function(itemId)
{this.ClosedElem=new Array();this.G_node=null;var itemNode=this._globalIdStorageFind(itemId||this.rootId);this._openAllNodeChilds(itemNode,0);if(this.ClosedElem.length>0){this.onLoadReserve=this.onXLE;this.setOnLoadingEnd(this._loadAndOpen);this._loadAndOpen(this);};};dhtmlXTreeObject.prototype._openAllNodeChilds=function(itemNode)
{if((itemNode.XMLload==0)||(itemNode.unParsed))this.ClosedElem.push(itemNode);for(var i=0;i<itemNode.childsCount;i++){if(this._getOpenState(itemNode.childNodes[i])<0)this._HideShow(itemNode.childNodes[i],2);if(itemNode.childNodes[i].childsCount>0)this._openAllNodeChilds(itemNode.childNodes[i]);if((itemNode.childNodes[i].XMLload==0)||(itemNode.childNodes[i].unParsed))this.ClosedElem.push(itemNode.childNodes[i]);};};dhtmlXTreeObject.prototype._loadAndOpen=function(that)
{if(that.G_node){that._openItem(that.G_node);that._openAllNodeChilds(that.G_node);that.G_node=null;};if(that.ClosedElem.length>0)that.G_node=that.ClosedElem.shift();if(that.G_node)if(that.G_node.unParsed)that.reParse(that.G_node);else
window.setTimeout(function(){that._loadDynXML(that.G_node.id);},100);else
{that.onXLE=that.onLoadReserve;if(that.onXLE)that.onXLE(that);that.callEvent("onXLE",[that]);};};dhtmlXTreeObject.prototype.openItemsDynamic=function(list,flag){this._opnItmsDnmcFlg=convertStringToBoolean(flag);this.onLoadReserve=this.onXLE;this.setOnLoadingEnd(this._stepOpen);this.ClosedElem=list.split(",").reverse();this._stepOpen(this);};dhtmlXTreeObject.prototype._stepOpen=function(that){if(!that.ClosedElem.length){that.onXLE=that.onLoadReserve;if(that._opnItmsDnmcFlg)that.selectItem(that.G_node,true);if((that.onXLE)&&(arguments[1]))that.onXLE.apply(that,arguments);return;};that.G_node=that.ClosedElem.pop();var temp=that._globalIdStorageFind(that.G_node);if(temp.XMLload===0)that.openItem(that.G_node);else{that.openItem(that.G_node);that._stepOpen(that);};};function dhtmlXTreeFromHTML(obj){if(typeof(obj)!="object")
obj=document.getElementById(obj);var n=obj;var id=n.id;var cont="";for(var j=0;j<obj.childNodes.length;j++)if(obj.childNodes[j].nodeType=="1"){if(obj.childNodes[j].tagName=="XMP"){var cHead=obj.childNodes[j];for(var m=0;m<cHead.childNodes.length;m++)cont+=cHead.childNodes[m].data;}else if(obj.childNodes[j].tagName.toLowerCase()=="ul")
cont=dhx_li2trees(obj.childNodes[j],new Array(),0);break;};obj.innerHTML="";var t=new dhtmlXTreeObject(obj,"100%","100%",0);var z_all=new Array();for(b in t)z_all[b.toLowerCase()]=b;var atr=obj.attributes;for(var a=0;a<atr.length;a++)if((atr[a].name.indexOf("set")==0)||(atr[a].name.indexOf("enable")==0)){var an=atr[a].name;if(!t[an])an=z_all[atr[a].name];t[an].apply(t,atr[a].value.split(","));};if(typeof(cont)=="object"){t.XMLloadingWarning=1;for(var i=0;i<cont.length;i++){var n=t.insertNewItem(cont[i][0],(i+1),cont[i][1]);if(cont[i][2])t._setCheck(n,true);};t.XMLloadingWarning=0;t.lastLoadedXMLId=0;t._redrawFrom(t);}else
t.loadXMLString("<tree id='0'>"+cont+"</tree>");window[id]=t;return t;};function dhx_init_trees(){var z=document.getElementsByTagName("div");for(var i=0;i<z.length;i++)if(z[i].className=="dhtmlxTree")dhtmlXTreeFromHTML(z[i])};function dhx_li2trees(tag,data,ind){for(var i=0;i<tag.childNodes.length;i++){var z=tag.childNodes[i];if((z.nodeType==1)&&(z.tagName.toLowerCase()=="li")){var c="";var ul=null;var check=z.getAttribute("checked");for(var j=0;j<z.childNodes.length;j++){var zc=z.childNodes[j];if(zc.nodeType==3)c+=zc.data;else if(zc.tagName.toLowerCase()!="ul")c+=zc.outerHTML?zc.outerHTML:zc.innerHTML;else ul=zc;};data[data.length]=[ind,c,check];if(ul)data=dhx_li2trees(ul,data,data.length);};};return data;};if(window.addEventListener)window.addEventListener("load",dhx_init_trees,false);else if(window.attachEvent)window.attachEvent("onload",dhx_init_trees);var _N_Dia=0,_N_Bar=0,_N_Box=0,_N_Dot=0,_N_Pix=0,_N_Line=0,_N_Area=0,_N_Arrow=0,_N_Pie=0,_zIndex=0;var _dSize=(navigator.appName=="Microsoft Internet Explorer")?1:-1;if(navigator.userAgent.search("Opera")>=0)_dSize=-1;var _IE=0;if(_dSize==1)
{_IE=1;if(window.document.documentElement.clientHeight)_dSize=-1;}
var _nav4=(document.layers)?1:0;var _DiagramTarget=window;var _BFont="font-family:Verdana;font-weight:bold;font-size:10pt;line-height:13pt;"
var _PathToScript="";function Diagram()
{this.xtext="";this.ytext="";this.title="";this.XScale=1;this.YScale=1;this.XScalePosition="bottom";this.YScalePosition="left";this.Font="font-family:Verdana;font-weight:normal;font-size:10pt;line-height:13pt;";this.ID="Dia"+_N_Dia;_N_Dia++;_zIndex++;this.zIndex=_zIndex;this.logsub=new Array(0.301,0.477,0.602,0.699,0.778,0.845,0.903,0.954);this.SetFrame=_SetFrame;this.SetBorder=_SetBorder;this.SetText=_SetText;this.SetGridColor=_SetGridColor;this.SetXGridColor=_SetXGridColor;this.SetYGridColor=_SetYGridColor;this.ScreenX=_ScreenX;this.ScreenY=_ScreenY;this.RealX=_RealX;this.RealY=_RealY;this.XGrid=new Array(3);this.GetXGrid=_GetXGrid;this.YGrid=new Array(3);this.GetYGrid=_GetYGrid;this.XGridDelta=0;this.YGridDelta=0;this.XSubGrids=0;this.YSubGrids=0;this.SubGrids=0;this.XGridColor="";this.YGridColor="";this.XSubGridColor="";this.YSubGridColor="";this.MaxGrids=0;this.DateInterval=_DateInterval;this.Draw=_Draw;this.SetVisibility=_SetVisibility;this.SetTitle=_SetTitle;this.Delete=_Delete;return(this);}
function _SetFrame(theLeft,theTop,theRight,theBottom)
{this.left=theLeft;this.right=theRight;this.top=theTop;this.bottom=theBottom;}
function _SetBorder(theLeftX,theRightX,theBottomY,theTopY)
{this.xmin=theLeftX;this.xmax=theRightX;this.ymin=theBottomY;this.ymax=theTopY;}
function _SetText(theScaleX,theScaleY,theTitle)
{this.xtext=theScaleX;this.ytext=theScaleY;this.title=theTitle;}
function _SetGridColor(theGridColor,theSubGridColor)
{this.XGridColor=theGridColor;this.YGridColor=theGridColor;if((theSubGridColor)||(theSubGridColor==""))
{this.XSubGridColor=theSubGridColor;this.YSubGridColor=theSubGridColor;}}
function _SetXGridColor(theGridColor,theSubGridColor)
{this.XGridColor=theGridColor;if((theSubGridColor)||(theSubGridColor==""))
this.XSubGridColor=theSubGridColor;}
function _SetYGridColor(theGridColor,theSubGridColor)
{this.YGridColor=theGridColor;if((theSubGridColor)||(theSubGridColor==""))
this.YSubGridColor=theSubGridColor;}
function _ScreenX(theRealX)
{return(Math.round((theRealX-this.xmin)/(this.xmax-this.xmin)*(this.right-this.left)+this.left));}
function _ScreenY(theRealY)
{return(Math.round((this.ymax-theRealY)/(this.ymax-this.ymin)*(this.bottom-this.top)+this.top));}
function _RealX(theScreenX)
{return(this.xmin+(this.xmax-this.xmin)*(theScreenX-this.left)/(this.right-this.left));}
function _RealY(theScreenY)
{return(this.ymax-(this.ymax-this.ymin)*(theScreenY-this.top)/(this.bottom-this.top));}
function _sign(rr)
{if(rr<0)return(-1);else return(1);}
function _DateInterval(vv)
{var bb=140*24*60*60*1000;this.SubGrids=4;if(vv>=bb)
{bb=8766*60*60*1000;if(vv<bb)
return(bb/12);if(vv<bb*2)
return(bb/6);if(vv<bb*5/2)
{this.SubGrids=6;return(bb/4);}
if(vv<bb*5)
{this.SubGrids=6;return(bb/2);}
if(vv<bb*10)
return(bb);if(vv<bb*20)
return(bb*2);if(vv<bb*50)
{this.SubGrids=5;return(bb*5);}
if(vv<bb*100)
{this.SubGrids=5;return(bb*10);}
if(vv<bb*200)
return(bb*20);if(vv<bb*500)
{this.SubGrids=5;return(bb*50);}
this.SubGrids=5;return(bb*100);}
bb/=2;if(vv>=bb){this.SubGrids=7;return(bb/5);}
bb/=2;if(vv>=bb){this.SubGrids=7;return(bb/5);}
bb/=7;bb*=4;if(vv>=bb)return(bb/5);bb/=2;if(vv>=bb)return(bb/5);bb/=2;if(vv>=bb)return(bb/5);bb/=2;if(vv>=bb)return(bb/5);bb*=3;bb/=5;if(vv>=bb){this.SubGrids=6;return(bb/6);}
bb/=2;if(vv>=bb){this.SubGrids=6;return(bb/6);}
bb*=2;bb/=3;if(vv>=bb)return(bb/6);bb/=2;if(vv>=bb)return(bb/6);bb/=2;if(vv>=bb){this.SubGrids=6;return(bb/6);}
bb/=2;if(vv>=bb){this.SubGrids=5;return(bb/6);}
bb*=2;bb/=3;if(vv>=bb){this.SubGrids=5;return(bb/6);}
bb/=3;if(vv>=bb){this.SubGrids=5;return(bb/4);}
bb/=2;if(vv>=bb)return(bb/5);bb/=2;if(vv>=bb)return(bb/5);bb*=3;bb/=2;if(vv>=bb){this.SubGrids=6;return(bb/6);}
bb/=2;if(vv>=bb){this.SubGrids=5;return(bb/6);}
bb*=2;bb/=3;if(vv>=bb){this.SubGrids=5;return(bb/6);}
bb/=3;if(vv>=bb){this.SubGrids=5;return(bb/4);}
bb/=2;if(vv>=bb)return(bb/5);return(bb/10);}
function _DayOfYear(dd,mm,yy)
{DOM=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var ii,nn=dd;for(ii=0;ii<mm-1;ii++)nn+=DOM[ii];if((mm>2)&&(yy%4==0))nn++;return(nn);}
function _GetKWT(dd,mm,yy)
{var ss=new Date(yy,0,1);var ww=ss.getDay();ww=(ww+2)%7-3;ww+=(_DayOfYear(dd,mm,yy)-1);if(ww<0)return(_GetKWT(31+dd,12,yy-1));if((mm==12)&&(dd>28))
{if(ww%7+29<=dd)return("01/"+eval(ww%7+1));}
ss=Math.floor(ww/7+1);if(ss<10)ss="0"+ss;return(ss+"/"+eval(ww%7+1));}
function _DateFormat(vv,ii,ttype)
{var yy,mm,dd,hh,nn,ss,vv_date=new Date(vv);Month=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");Weekday=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");if(ii>15*24*60*60*1000)
{if(ii<365*24*60*60*1000)
{vv_date.setTime(vv+15*24*60*60*1000);yy=vv_date.getUTCFullYear()%100;if(yy<10)yy="0"+yy;mm=vv_date.getUTCMonth()+1;if(ttype==5);if(ttype==4)return(Month[mm-1]);if(ttype==3)return(Month[mm-1]+" "+yy);return(mm+"/"+yy);}
vv_date.setTime(vv+183*24*60*60*1000);yy=vv_date.getUTCFullYear();return(yy);}
vv_date.setTime(vv);yy=vv_date.getUTCFullYear();mm=vv_date.getUTCMonth()+1;dd=vv_date.getUTCDate();ww=vv_date.getUTCDay();hh=vv_date.getUTCHours();nn=vv_date.getUTCMinutes();ss=vv_date.getUTCSeconds();if(ii>=86400000)
{if(ttype==5);if(ttype==4)return(Weekday[ww]);if(ttype==3)return(mm+"/"+dd);return(dd+"."+mm+".");}
if(ii>=21600000)
{if(hh==0)
{if(ttype==5);if(ttype==4)return(Weekday[ww]);if(ttype==3)return(mm+"/"+dd);return(dd+"."+mm+".");}
else
{if(ttype==5);if(ttype==4)return((hh<=12)?hh+"am":hh%12+"pm");if(ttype==3)return((hh<=12)?hh+"am":hh%12+"pm");return(hh+":00");}}
if(ii>=60000)
{if(nn<10)nn="0"+nn;if(ttype==5);if(ttype==4)return((hh<=12)?hh+"."+nn+"am":hh%12+"."+nn+"pm");if(nn=="00")nn="";else nn=":"+nn;if(ttype==3)return((hh<=12)?hh+nn+"am":hh%12+nn+"pm");if(nn=="")nn=":00";return(hh+nn);}
if(ss<10)ss="0"+ss;return(nn+":"+ss);}
function _GetXGrid()
{var x0,i,j,l,x,r,dx,xr,invdifx,deltax;dx=(this.xmax-this.xmin);if(Math.abs(dx)>0)
{invdifx=(this.right-this.left)/(this.xmax-this.xmin);if((this.XScale==1)||(isNaN(this.XScale)))
{r=1;while(Math.abs(dx)>=100){dx/=10;r*=10;}
while(Math.abs(dx)<10){dx*=10;r/=10;}
if(Math.abs(dx)>=50){this.SubGrids=5;deltax=10*r*_sign(dx);}
else
{if(Math.abs(dx)>=20){this.SubGrids=5;deltax=5*r*_sign(dx);}
else{this.SubGrids=4;deltax=2*r*_sign(dx);}}}
else deltax=this.DateInterval(Math.abs(dx))*_sign(dx);if(this.XGridDelta!=0)deltax=this.XGridDelta;if(this.XSubGrids!=0)this.SubGrids=this.XSubGrids;x=Math.floor(this.xmin/deltax)*deltax;i=0;this.XGrid[1]=deltax;if(deltax!=0)this.MaxGrids=Math.floor(Math.abs((this.xmax-this.xmin)/deltax))+2;else this.MaxGrids=0;for(j=this.MaxGrids;j>=-1;j--)
{xr=x+j*deltax;x0=Math.round(this.left+(-this.xmin+xr)*invdifx);if((x0>=this.left)&&(x0<=this.right))
{if(i==0)this.XGrid[2]=xr;this.XGrid[0]=xr;i++;}}}
return(this.XGrid);}
function _GetYGrid()
{var y0,i,j,l,y,r,dy,yr,invdify,deltay;dy=this.ymax-this.ymin;if(Math.abs(dy)>0)
{invdify=(this.bottom-this.top)/(this.ymax-this.ymin);if((this.YScale==1)||(isNaN(this.YScale)))
{r=1;while(Math.abs(dy)>=100){dy/=10;r*=10;}
while(Math.abs(dy)<10){dy*=10;r/=10;}
if(Math.abs(dy)>=50){this.SubGrids=5;deltay=10*r*_sign(dy);}
else
{if(Math.abs(dy)>=20){this.SubGrids=5;deltay=5*r*_sign(dy);}
else{this.SubGrids=4;deltay=2*r*_sign(dy);}}}
else deltay=this.DateInterval(Math.abs(dy))*_sign(dy);if(this.YGridDelta!=0)deltay=this.YGridDelta;if(this.YSubGrids!=0)this.SubGrids=this.YSubGrids;y=Math.floor(this.ymax/deltay)*deltay;this.YGrid[1]=deltay;i=0;if(deltay!=0)this.MaxGrids=Math.floor(Math.abs((this.ymax-this.ymin)/deltay))+2;else this.MaxGrids=0;for(j=-1;j<=this.MaxGrids;j++)
{yr=y-j*deltay;y0=Math.round(this.top+(this.ymax-yr)*invdify);if((y0>=this.top)&&(y0<=this.bottom))
{if(i==0)this.YGrid[2]=yr;this.YGrid[0]=yr;i++;}}}
return(this.YGrid);}
function _nvl(vv,rr)
{if(vv==null)return(rr);var ss=String(vv);while(ss.search("'")>=0)ss=ss.replace("'","&#39;");return(ss);}
function _cursor(aa)
{if(aa)
{if(_dSize==1)return("cursor:hand;");else return("cursor:pointer;");}
return("");}
function _GetArrayMin(aa)
{var ii,mm=aa[0];for(ii=1;ii<aa.length;ii++)
{if(mm>aa[ii])mm=aa[ii];}
return(mm);}
function _GetArrayMax(aa)
{var ii,mm=aa[0];for(ii=1;ii<aa.length;ii++)
{if(mm<aa[ii])mm=aa[ii];}
return(mm);}
function _IsImage(ss)
{if(!ss)return(false);var tt=String(ss).toLowerCase().split(".");if(tt.length!=2)return(false);switch(tt[1])
{case"gif":return(true);case"png":return(true);case"jpg":return(true);case"jpg":return(true);return(false);}}
function _Draw(theDrawColor,theTextColor,isScaleText,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{var x0,y0,i,j,itext,l,x,y,r,u,fn,dx,dy,xr,yr,invdifx,invdify,deltax,deltay,id=this.ID,lay=0,selObj="",divtext="",ii=0,oo,k,sub,sshift;var c151="&#151;",nbsp=(_IE)?"&nbsp;":"";var EventActions="";if(_nvl(theOnClickAction,"")!="")EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";lay--;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);if(selObj)lay--;if(lay<-1)
selObj.title=_nvl(theTooltipText,"");else
_DiagramTarget.document.writeln("<div id='"+this.ID+"' title='"+_nvl(theTooltipText,"")+"'>");if(_IsImage(theDrawColor))
divtext="<div id='"+this.ID+"i"+eval(ii++)+"' "+EventActions+"style='"+_cursor(theOnClickAction)+"position:absolute; left:"+eval(this.left)+"px; width:"+eval(this.right-this.left+_dSize)+"px; top:"+eval(this.top)+"px; height:"+eval(this.bottom-this.top+_dSize)+"px; color:"+theTextColor+"; border-style:solid; border-width:1px; z-index:"+this.zIndex+"'><img src='"+theDrawColor+"' width="+eval(this.right-this.left-1)+" height="+eval(this.bottom-this.top-1)+"></div>";else
divtext="<div id='"+this.ID+"i"+eval(ii++)+"' "+EventActions+"style='"+_cursor(theOnClickAction)+"position:absolute; left:"+eval(this.left)+"px; width:"+eval(this.right-this.left+_dSize)+"px; top:"+eval(this.top)+"px; height:"+eval(this.bottom-this.top+_dSize)+"px; background-color:"+theDrawColor+"; color:"+theTextColor+"; border-style:solid; border-width:1px; z-index:"+this.zIndex+"'>&nbsp;</div>";if((this.XScale==1)||(isNaN(this.XScale)))
{u="";fn="";if(isNaN(this.XScale))
{if(this.XScale.substr(0,9)=="function ")fn=eval("window."+this.XScale.substr(9));else u=this.XScale;}
dx=(this.xmax-this.xmin);if(Math.abs(dx)>0)
{invdifx=(this.right-this.left)/(this.xmax-this.xmin);r=1;while(Math.abs(dx)>=100){dx/=10;r*=10;}
while(Math.abs(dx)<10){dx*=10;r/=10;}
if(Math.abs(dx)>=50){this.SubGrids=5;deltax=10*r*_sign(dx);}
else
{if(Math.abs(dx)>=20){this.SubGrids=5;deltax=5*r*_sign(dx);}
else{this.SubGrids=4;deltax=2*r*_sign(dx);}}
if(this.XGridDelta!=0)deltax=this.XGridDelta;if(this.XSubGrids!=0)this.SubGrids=this.XSubGrids;sub=deltax*invdifx/this.SubGrids;sshift=0;if((this.XScalePosition=="top-left")||(this.XScalePosition=="bottom-left"))sshift=-Math.abs(deltax*invdifx/2);if((this.XScalePosition=="top-right")||(this.XScalePosition=="bottom-right"))sshift=Math.abs(deltax*invdifx/2);x=Math.floor(this.xmin/deltax)*deltax;itext=0;if(deltax!=0)this.MaxGrids=Math.floor(Math.abs((this.xmax-this.xmin)/deltax))+2;else this.MaxGrids=0;for(j=this.MaxGrids;j>=-1;j--)
{xr=x+j*deltax;x0=Math.round(this.left+(-this.xmin+xr)*invdifx);if(this.XSubGridColor)
{for(k=1;k<this.SubGrids;k++)
{if((x0-k*sub>this.left+1)&&(x0-k*sub<this.right-1))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+Math.round(x0-k*sub)+"px; top:"+eval(this.top+1)+"px; z-index:"+this.zIndex+"; width:1px; height:"+eval(this.bottom-this.top-1)+"px; background-color:"+this.XSubGridColor+"; font-size:1pt'></div>";}
if(this.SubGrids==-1)
for(k=0;k<8;k++)
{if((x0-this.logsub[k]*sub*_sign(deltax)>this.left+1)&&(x0-this.logsub[k]*sub*_sign(deltax)<this.right-1))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+Math.round(x0-this.logsub[k]*sub*_sign(deltax))+"px; top:"+eval(this.top+1)+"px; z-index:"+this.zIndex+"; width:1px; height:"+eval(this.bottom-this.top-1)+"px; background-color:"+this.XSubGridColor+"; font-size:1pt'></div>";}}
if((x0>=this.left)&&(x0<=this.right))
{itext++;if((itext!=2)||(!isScaleText))
{if(r>1)
{if(fn)l=fn(xr)+"";else l=xr+""+u;}
else
{if(fn)l=fn(Math.round(10*xr/r)/Math.round(10/r))+"";else l=Math.round(10*xr/r)/Math.round(10/r)+""+u;}
if(l.charAt(0)==".")l="0"+l;if(l.substr(0,2)=="-.")l="-0"+l.substr(1,100);}
else l=this.xtext;if(this.XScalePosition.substr(0,3)!="top")
{if((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=center style='position:absolute; left:"+eval(x0-50+sshift)+"px; width:102px; top:"+eval(this.bottom+8)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+x0+"px; top:"+eval(this.bottom-5)+"px; z-index:"+this.zIndex+"; width:1px; height:12px; background-color:"+theTextColor+"; font-size:1pt'></div>";}
else
{if((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=center style='position:absolute; left:"+eval(x0-50+sshift)+"px; width:102px; top:"+eval(this.top-24)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+x0+"px; top:"+eval(this.top-5)+"px; z-index:"+this.zIndex+"; width:1px; height:12px; background-color:"+theTextColor+"; font-size:1pt'></div>";}
if((this.XGridColor)&&(x0>this.left)&&(x0<this.right))divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+x0+"px; top:"+eval(this.top+1)+"px; z-index:"+this.zIndex+"; width:1px; height:"+eval(this.bottom-this.top-1)+"px; background-color:"+this.XGridColor+"; font-size:1pt'></div>";}}}}
if((!isNaN(this.XScale))&&(this.XScale>1))
{dx=(this.xmax-this.xmin);if(Math.abs(dx)>0)
{invdifx=(this.right-this.left)/(this.xmax-this.xmin);deltax=this.DateInterval(Math.abs(dx))*_sign(dx);if(this.XGridDelta!=0)deltax=this.XGridDelta;if(this.XSubGrids!=0)this.SubGrids=this.XSubGrids;sub=deltax*invdifx/this.SubGrids;sshift=0;if((this.XScalePosition=="top-left")||(this.XScalePosition=="bottom-left"))sshift=-Math.abs(deltax*invdifx/2);if((this.XScalePosition=="top-right")||(this.XScalePosition=="bottom-right"))sshift=Math.abs(deltax*invdifx/2);x=Math.floor(this.xmin/deltax)*deltax;itext=0;if(deltax!=0)this.MaxGrids=Math.floor(Math.abs((this.xmax-this.xmin)/deltax))+2;else this.MaxGrids=0;for(j=this.MaxGrids;j>=-2;j--)
{xr=x+j*deltax;x0=Math.round(this.left+(-this.xmin+x+j*deltax)*invdifx);if(this.XSubGridColor)
{for(k=1;k<this.SubGrids;k++)
{if((x0-k*sub>this.left+1)&&(x0-k*sub<this.right-1))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+Math.round(x0-k*sub)+"px; top:"+eval(this.top+1)+"px; z-index:"+this.zIndex+"; width:1px; height:"+eval(this.bottom-this.top-1)+"px; background-color:"+this.XSubGridColor+"; font-size:1pt'></div>";}}
if((x0>=this.left)&&(x0<=this.right))
{itext++;if((itext!=2)||(!isScaleText))l=_DateFormat(xr,Math.abs(deltax),this.XScale);else l=this.xtext;if(this.XScalePosition.substr(0,3)!="top")
{if((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=center style='position:absolute; left:"+eval(x0-50+sshift)+"px; width:102px; top:"+eval(this.bottom+8)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+x0+"px; top:"+eval(this.bottom-5)+"px; z-index:"+this.zIndex+"; width:1px; height:12px; background-color:"+theTextColor+"; font-size:1pt'></div>";}
else
{if((x0+sshift>=this.left)&&(x0+sshift<=this.right))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=center style='position:absolute; left:"+eval(x0-50+sshift)+"px; width:102px; top:"+eval(this.top-24)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+x0+"px; top:"+eval(this.top-5)+"px; z-index:"+this.zIndex+"; width:1px; height:12px; background-color:"+theTextColor+"; font-size:1pt'></div>";}
if((this.XGridColor)&&(x0>this.left)&&(x0<this.right))divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+x0+"px; top:"+eval(this.top+1)+"px; z-index:"+this.zIndex+"; width:1px; height:"+eval(this.bottom-this.top-1)+"px; background-color:"+this.XGridColor+"; font-size:1pt'></div>";}}}}
if((this.YScale==1)||(isNaN(this.YScale)))
{u="";fn="";if(isNaN(this.YScale))
{if(this.YScale.substr(0,9)=="function ")fn=eval("window."+this.YScale.substr(9));else u=this.YScale;}
dy=this.ymax-this.ymin;if(Math.abs(dy)>0)
{invdify=(this.bottom-this.top)/(this.ymax-this.ymin);r=1;while(Math.abs(dy)>=100){dy/=10;r*=10;}
while(Math.abs(dy)<10){dy*=10;r/=10;}
if(Math.abs(dy)>=50){this.SubGrids=5;deltay=10*r*_sign(dy);}
else
{if(Math.abs(dy)>=20){this.SubGrids=5;deltay=5*r*_sign(dy);}
else{this.SubGrids=4;deltay=2*r*_sign(dy);}}
if(this.YGridDelta!=0)deltay=this.YGridDelta;if(this.YSubGrids!=0)this.SubGrids=this.YSubGrids;sub=deltay*invdify/this.SubGrids;sshift=0;if((this.YScalePosition=="left-top")||(this.YScalePosition=="right-top"))sshift=-Math.abs(deltay*invdify/2);if((this.YScalePosition=="left-bottom")||(this.YScalePosition=="right-bottom"))sshift=Math.abs(deltay*invdify/2);y=Math.floor(this.ymax/deltay)*deltay;itext=0;if(deltay!=0)this.MaxGrids=Math.floor(Math.abs((this.ymax-this.ymin)/deltay))+2;else this.MaxGrids=0;for(j=-1;j<=this.MaxGrids;j++)
{yr=y-j*deltay;y0=Math.round(this.top+(this.ymax-yr)*invdify);if(this.YSubGridColor)
{for(k=1;k<this.SubGrids;k++)
{if((y0+k*sub>this.top+1)&&(y0+k*sub<this.bottom-1))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.left+1)+"px; top:"+Math.round(y0+k*sub)+"px; z-index:"+this.zIndex+"; height:1px; width:"+eval(this.right-this.left-1)+"px; background-color:"+this.YSubGridColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}
if(this.SubGrids==-1)
{for(k=0;k<8;k++)
{if((y0+this.logsub[k]*sub*_sign(deltay)>this.top+1)&&(y0+this.logsub[k]*sub*_sign(deltay)<this.bottom-1))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.left+1)+"px; top:"+Math.round(y0+this.logsub[k]*sub*_sign(deltay))+"px; z-index:"+this.zIndex+"; height:1px; width:"+eval(this.right-this.left-1)+"px; background-color:"+this.YSubGridColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}}}
if((y0>=this.top)&&(y0<=this.bottom))
{itext++;if((itext!=2)||(!isScaleText))
{if(r>1)
{if(fn)l=fn(yr)+"";else l=yr+""+u;}
else
{if(fn)l=fn(Math.round(10*yr/r)/Math.round(10/r))+"";else l=Math.round(10*yr/r)/Math.round(10/r)+""+u;}
if(l.charAt(0)==".")l="0"+l;if(l.substr(0,2)=="-.")l="-0"+l.substr(1,100);}
else l=this.ytext;if(this.YScalePosition.substr(0,5)!="right")
{if((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=right style='position:absolute; left:"+eval(this.left-100)+"px; width:89px; top:"+eval(y0-9+sshift)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.left-5)+"px; top:"+eval(y0)+"px; z-index:"+this.zIndex+"; height:1px; width:11px; background-color:"+theTextColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}
else
{if((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=left style='position:absolute; left:"+eval(this.right+10)+"px; width:89px; top:"+eval(y0-9+sshift)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.right-5)+"px; top:"+eval(y0)+"px; z-index:"+this.zIndex+"; height:1px; width:11px; background-color:"+theTextColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}
if((this.YGridColor)&&(y0>this.top)&&(y0<this.bottom))divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.left+1)+"px; top:"+eval(y0)+"px; z-index:"+this.zIndex+"; height:1px; width:"+eval(this.right-this.left-1)+"px; background-color:"+this.YGridColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}}}}
if((!isNaN(this.YScale))&&(this.YScale>1))
{dy=this.ymax-this.ymin;if(Math.abs(dy)>0)
{invdify=(this.bottom-this.top)/(this.ymax-this.ymin);deltay=this.DateInterval(Math.abs(dy))*_sign(dy);if(this.YGridDelta!=0)deltay=this.YGridDelta;if(this.YSubGrids!=0)this.SubGrids=this.YSubGrids;sub=deltay*invdify/this.SubGrids;sshift=0;if((this.YScalePosition=="left-top")||(this.YScalePosition=="right-top"))sshift=-Math.abs(deltay*invdify/2);if((this.YScalePosition=="left-bottom")||(this.YScalePosition=="right-bottom"))sshift=Math.abs(deltay*invdify/2);y=Math.floor(this.ymax/deltay)*deltay;itext=0;if(deltay!=0)this.MaxGrids=Math.floor(Math.abs((this.ymax-this.ymin)/deltay))+2;else this.MaxGrids=0;for(j=-2;j<=this.MaxGrids;j++)
{yr=y-j*deltay;y0=Math.round(this.top+(this.ymax-y+j*deltay)*invdify);if(this.YSubGridColor)
{for(k=1;k<this.SubGrids;k++)
{if((y0+k*sub>this.top+1)&&(y0+k*sub<this.bottom-1))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.left+1)+"px; top:"+Math.round(y0+k*sub)+"px; z-index:"+this.zIndex+"; height:1px; width:"+eval(this.right-this.left-1)+"px; background-color:"+this.YSubGridColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}}
if((y0>=this.top)&&(y0<=this.bottom))
{itext++;if((itext!=2)||(!isScaleText))l=_DateFormat(yr,Math.abs(deltay),this.YScale);else l=this.ytext;if(this.YScalePosition.substr(0,5)!="right")
{if((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=right style='position:absolute; left:"+eval(this.left-100)+"px; width:89px; top:"+eval(y0-9+sshift)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.left-5)+"px; top:"+eval(y0)+"px; z-index:"+this.zIndex+"; height:1px; width:11px; background-color:"+theTextColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}
else
{if((y0+sshift>=this.top)&&(y0+sshift<=this.bottom))
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=left style='position:absolute; left:"+eval(this.right+10)+"px; width:89px; top:"+eval(y0-9+sshift)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+l+"</div>";divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.right-5)+"px; top:"+eval(y0)+"px; z-index:"+this.zIndex+"; height:1px; width:11px; background-color:"+theTextColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}
if((this.YGridColor)&&(y0>this.top)&&(y0<this.bottom))divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' style='position:absolute; left:"+eval(this.left+1)+"px; top:"+eval(y0)+"px; z-index:"+this.zIndex+"; height:1px; width:"+eval(this.right-this.left-1)+"px; background-color:"+this.YGridColor+"; font-size:1pt;line-height:1pt'>"+nbsp+"</div>";}}}}
if(this.XScalePosition.substr(0,3)!="top")
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=center style='position:absolute; left:"+this.left+"px; width:"+eval(this.right-this.left)+"px; top:"+eval(this.top-20)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+this.title+"</div>";else
divtext+="<div id='"+this.ID+"i"+eval(ii++)+"' align=center style='position:absolute; left:"+this.left+"px; width:"+eval(this.right-this.left)+"px; top:"+eval(this.bottom+4)+"px; color:"+theTextColor+";"+this.Font+" z-index:"+this.zIndex+"'>"+this.title+"</div>";if(lay<-1)
selObj.innerHTML=divtext;else
_DiagramTarget.document.writeln(divtext+"</div>");}
function Bar(theLeft,theTop,theRight,theBottom,theDrawColor,theText,theTextColor,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{this.ID="Bar"+_N_Bar;_N_Bar++;_zIndex++;this.left=theLeft;this.top=theTop;this.width=theRight-theLeft;this.height=theBottom-theTop;this.DrawColor=theDrawColor;this.Text=String(theText);this.TextColor=theTextColor;this.BorderWidth="";this.BorderColor="";this.Cursor=_cursor(theOnClickAction);this.SetVisibility=_SetVisibility;this.SetColor=_SetBarColor;this.SetText=_SetBarText;this.SetTitle=_SetTitle;this.MoveTo=_MoveTo;this.ResizeTo=_ResizeTo;this.Delete=_Delete;var EventActions="";if(_nvl(theOnClickAction,"")!="")EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";if(_nvl(theText,"")!="")
{var tt=theText;if(_IsImage(theText))tt="<img src='"+theText+"' width="+eval(theRight-theLeft-1)+" height="+eval(theBottom-theTop-1)+">";_DiagramTarget.document.writeln("<div id='"+this.ID+"' "+EventActions+"style='"+_cursor(theOnClickAction)+"position:absolute;left:"+theLeft+"px;top:"+theTop+"px;width:"+eval(theRight-theLeft)+"px;height:"+eval(theBottom-theTop)+"px;background-color:"+theDrawColor+";color:"+theTextColor+";"+_BFont+"z-index:"+_zIndex+"'; title='"+_nvl(theTooltipText,"")+"' align=center>"+tt+"</div>");}
else
{var vv=(this.height>0)?"":";visibility:hidden";_DiagramTarget.document.writeln("<div id='"+this.ID+"' "+EventActions+"style='"+_cursor(theOnClickAction)+"position:absolute;left:"+theLeft+"px;top:"+theTop+"px;width:"+eval(theRight-theLeft)+"px;height:"+eval(theBottom-theTop)+"px;background-color:"+theDrawColor+";font-size:1pt;line-height:1pt;font-family:Verdana;font-weight:normal;z-index:"+_zIndex+vv+"'; title='"+_nvl(theTooltipText,"")+"'>&nbsp;</div>");}
return(this);}
function Box(theLeft,theTop,theRight,theBottom,theDrawColor,theText,theTextColor,theBorderWidth,theBorderColor,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{this.ID="Box"+_N_Box;_N_Box++;_zIndex++;this.left=theLeft;this.top=theTop;this.width=theRight-theLeft;this.height=theBottom-theTop;this.DrawColor=theDrawColor;this.Text=String(theText);this.TextColor=theTextColor;this.BorderWidth=theBorderWidth;this.BorderColor=theBorderColor;this.Cursor=_cursor(theOnClickAction);this.SetVisibility=_SetVisibility;this.SetColor=_SetBarColor;this.SetText=_SetBarText;this.SetTitle=_SetTitle;this.MoveTo=_MoveTo;this.ResizeTo=_ResizeTo;this.Delete=_Delete;var EventActions="";if(_nvl(theOnClickAction,"")!="")EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";var bb="";var ww=theBorderWidth;if(_nvl(theBorderWidth,"")=="")ww=0;if((_nvl(theBorderWidth,"")!="")&&(_nvl(theBorderColor,"")!=""))
bb="border-style:solid;border-width:"+theBorderWidth+"px;border-color:"+theBorderColor+";";if(_nvl(theText,"")!="")
{var tt=theText;if(_IsImage(theText))tt="<img src='"+theText+"' width="+eval(theRight-theLeft-2*ww)+" height="+eval(theBottom-theTop-2*ww)+">";_DiagramTarget.document.writeln("<div id='"+this.ID+"' "+EventActions+"style='"+_cursor(theOnClickAction)+"position:absolute;left:"+theLeft+"px;top:"+theTop+"px;width:"+eval(theRight-theLeft-ww+ww*_dSize)+"px;height:"+eval(theBottom-theTop-ww+ww*_dSize)+"px;"+bb+"background-color:"+theDrawColor+";color:"+theTextColor+";"+_BFont+"z-index:"+_zIndex+"'; title='"+_nvl(theTooltipText,"")+"' align=center>"+tt+"</div>");}
else
{var vv=(this.height>=2*ww)?"":";visibility:hidden";_DiagramTarget.document.writeln("<div id='"+this.ID+"' "+EventActions+"style='"+_cursor(theOnClickAction)+"position:absolute;left:"+theLeft+"px;top:"+theTop+"px;width:"+eval(theRight-theLeft-ww+ww*_dSize)+"px;height:"+eval(theBottom-theTop-ww+ww*_dSize)+"px;"+bb+"background-color:"+theDrawColor+";font-size:1pt;line-height:1pt;font-family:Verdana;font-weight:normal;z-index:"+_zIndex+vv+"'; title='"+_nvl(theTooltipText,"")+"'>&nbsp;</div>");}
return(this);}
function _SetBarColor(theColor)
{var id=this.ID,selObj;this.DrawColor=theColor;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);selObj.style.backgroundColor=theColor;}
function _SetBarText(theText)
{var id=this.ID,selObj;this.Text=String(theText);if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);var tt=theText;if(_IsImage(theText))
{var ww=0;if(this.BorderWidth)ww=this.BorderWidth;tt="<img src='"+theText+"' width="+eval(this.width-2*ww)+" height="+eval(this.height-2*ww)+">";}
selObj.innerHTML=tt;}
function Dot(theX,theY,theSize,theType,theColor,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{this.Size=theSize;this.ID="Dot"+_N_Dot;_N_Dot++;_zIndex++;this.X=theX;this.Y=theY;this.dX=Math.round(theSize/2);this.dY=Math.round(theSize/2);this.Type=theType;this.Color=theColor;this.Cursor=_cursor(theOnClickAction);this.SetVisibility=_SetVisibility;this.SetColor=_SetDotColor;this.SetTitle=_SetTitle;this.MoveTo=_DotMoveTo;this.Delete=_Delete;var EventActions="";if(_nvl(theOnClickAction,"")!="")EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";_DiagramTarget.document.write("<div id='"+this.ID+"' "+EventActions+"style='"+_cursor(theOnClickAction)+"position:absolute;left:"+Math.round(theX-this.Size/2)+"px;top:"+Math.round(theY-this.Size/2)+"px; width:"+this.Size+"px; height:"+this.Size+"px; z-index:"+_zIndex+"' title='"+_nvl(theTooltipText,"")+"'>");if(isNaN(theType))
{_DiagramTarget.document.write("<div style='position:absolute;left:0px;top:0px;width:"+this.Size+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt;line-height:1pt;'>");_DiagramTarget.document.write("<img src='"+theType+"' width="+this.Size+"px height="+this.Size+"px style='vertical-align:bottom'></div>");}
else
{if(theType%6==0)
{_DiagramTarget.document.write("<div style='position:absolute;left:1px;top:"+Math.round(this.Size/4+0.3)+"px;width:"+eval(this.Size-1)+"px;height:"+eval(this.Size+1-2*Math.round(this.Size/4+0.3))+"px;background-color:"+theColor+";font-size:1pt'></div>");_DiagramTarget.document.write("<div style='position:absolute;left:"+Math.round(this.Size/4+0.3)+"px;top:1px;width:"+eval(this.Size+1-2*Math.round(this.Size/4+0.3))+"px;height:"+eval(this.Size-1)+"px;background-color:"+theColor+";font-size:1pt'></div>");}
if(theType%6==1)
{_DiagramTarget.document.write("<div style='position:absolute;left:"+Math.round(this.Size/2-this.Size/8)+"px;top:0px;width:"+Math.round(this.Size/4)+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>");_DiagramTarget.document.write("<div style='position:absolute;left:0px;top:"+Math.round(this.Size/2-this.Size/8)+"px;width:"+this.Size+"px;height:"+Math.round(this.Size/4)+"px;background-color:"+theColor+";font-size:1pt'></div>");}
if(theType%6==2)
_DiagramTarget.document.write("<div style='position:absolute;left:0px;top:0px;width:"+this.Size+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>");if(theType%6==3)
{_DiagramTarget.document.write("<div style='position:absolute;left:0px;top:"+Math.round(this.Size/4)+"px;width:"+this.Size+"px;height:"+Math.round(this.Size/2)+"px;background-color:"+theColor+";font-size:1pt'></div>");_DiagramTarget.document.write("<div style='position:absolute;left:"+Math.round(this.Size/2-this.Size/8)+"px;top:0px;width:"+Math.round(this.Size/4)+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>");}
if(theType%6==4)
{_DiagramTarget.document.write("<div style='position:absolute;left:"+Math.round(this.Size/4)+"px;top:0px;width:"+Math.round(this.Size/2)+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>");_DiagramTarget.document.write("<div style='position:absolute;left:0px;top:"+Math.round(this.Size/2-this.Size/8)+"px;width:"+this.Size+"px;height:"+Math.round(this.Size/4)+"px;background-color:"+theColor+";font-size:1pt'></div>");}
if(theType%6==5)
{if(_dSize==1)
_DiagramTarget.document.write("<div style='position:absolute;left:0px;top:0px;width:"+this.Size+"px;height:"+this.Size+"px;border-width:"+Math.round(this.Size/6)+"px; border-style:solid;border-color:"+theColor+";font-size:1pt;line-height:1pt'></div>");else
_DiagramTarget.document.write("<div style='position:absolute;left:0px;top:0px;width:"+Math.round(this.Size-this.Size/4)+"px;height:"+Math.round(this.Size-this.Size/4)+"px;border-width:"+Math.round(this.Size/6)+"px; border-style:solid;border-color:"+theColor+";font-size:1pt;line-height:1pt'></div>");}}
_DiagramTarget.document.writeln("</div>");return(this);}
function _SetDotColor(theColor)
{this.Color=theColor;var tt="",selObj;if(document.all)selObj=eval("_DiagramTarget.document.all."+this.ID);else selObj=_DiagramTarget.document.getElementById(this.ID);if(isNaN(this.Type))
{tt+="<div style='position:absolute;left:0px;top:0px;width:"+this.Size+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt;line-height:1pt;'>";tt+="<img src='"+theType+"' width="+this.Size+"px height="+this.Size+"px style='vertical-align:bottom'></div>";}
else
{if(this.Type%6==0)
{tt+="<div style='position:absolute;left:1px;top:"+Math.round(this.Size/4+0.3)+"px;width:"+eval(this.Size-1)+"px;height:"+eval(this.Size+1-2*Math.round(this.Size/4+0.3))+"px;background-color:"+theColor+";font-size:1pt'></div>";tt+="<div style='position:absolute;left:"+Math.round(this.Size/4+0.3)+"px;top:1px;width:"+eval(this.Size+1-2*Math.round(this.Size/4+0.3))+"px;height:"+eval(this.Size-1)+"px;background-color:"+theColor+";font-size:1pt'></div>";}
if(this.Type%6==1)
{tt+="<div style='position:absolute;left:"+Math.round(this.Size/2-this.Size/8)+"px;top:0px;width:"+Math.round(this.Size/4)+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>";tt+="<div style='position:absolute;left:0px;top:"+Math.round(this.Size/2-this.Size/8)+"px;width:"+this.Size+"px;height:"+Math.round(this.Size/4)+"px;background-color:"+theColor+";font-size:1pt'></div>";}
if(this.Type%6==2)
tt+="<div style='position:absolute;left:0px;top:0px;width:"+this.Size+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>";if(this.Type%6==3)
{tt+="<div style='position:absolute;left:0px;top:"+Math.round(this.Size/4)+"px;width:"+this.Size+"px;height:"+Math.round(this.Size/2)+"px;background-color:"+theColor+";font-size:1pt'></div>";tt+="<div style='position:absolute;left:"+Math.round(this.Size/2-this.Size/8)+"px;top:0px;width:"+Math.round(this.Size/4)+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>";}
if(this.Type%6==4)
{tt+="<div style='position:absolute;left:"+Math.round(this.Size/4)+"px;top:0px;width:"+Math.round(this.Size/2)+"px;height:"+this.Size+"px;background-color:"+theColor+";font-size:1pt'></div>";tt+="<div style='position:absolute;left:0px;top:"+Math.round(this.Size/2-this.Size/8)+"px;width:"+this.Size+"px;height:"+Math.round(this.Size/4)+"px;background-color:"+theColor+";font-size:1pt'></div>";}
if(this.Type%6==5)
{if(_dSize==1)
tt+="<div style='position:absolute;left:0px;top:0px;width:"+this.Size+"px;height:"+this.Size+"px;border-width:"+Math.round(this.Size/6)+"px; border-style:solid;border-color:"+theColor+";font-size:1pt;line-height:1pt'></div>";else
tt+="<div style='position:absolute;left:0px;top:0px;width:"+Math.round(this.Size-this.Size/4)+"px;height:"+Math.round(this.Size-this.Size/4)+"px;border-width:"+Math.round(this.Size/6)+"px; border-style:solid;border-color:"+theColor+";font-size:1pt;line-height:1pt'></div>";}}
selObj.innerHTML=tt;}
function _DotMoveTo(theX,theY)
{var id=this.ID,selObj;if(!isNaN(parseInt(theX)))this.X=theX;if(!isNaN(parseInt(theY)))this.Y=theY;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{if(!isNaN(parseInt(theX)))left=eval(theX-this.dX)+"px";if(!isNaN(parseInt(theY)))top=eval(theY-this.dY)+"px";visibility="visible";}}
function Pixel(theX,theY,theColor)
{this.ID="Pix"+_N_Pix;_N_Pix++;_zIndex++;this.left=theX;this.top=theY;this.dX=0;this.dY=0;this.Color=theColor;this.SetVisibility=_SetVisibility;this.SetColor=_SetPixelColor;this.MoveTo=_DotMoveTo;this.Delete=_Delete;_DiagramTarget.document.writeln("<div id='"+this.ID+"' style='position:absolute;left:"+eval(theX-this.dX)+"px;top:"+eval(theY-this.dY)+"px;width:1px;height:2px;background-color:"+theColor+";font-size:1pt;z-index:"+_zIndex+"'></div>");return(this);}
function _SetPixelColor(theColor)
{var id=this.ID,selObj;this.Color=theColor;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);selObj.style.backgroundColor=theColor;}
function _SetVisibility(isVisible)
{var ll,id=this.ID,selObj;if(document.all)
{selObj=eval("_DiagramTarget.document.all."+id);if(isVisible)selObj.style.display="inline";else selObj.style.display="none";}
else
{selObj=_DiagramTarget.document.getElementById(id);if(isVisible)selObj.style.display="inline";else selObj.style.display="none";if(id.substr(0,3)=='Dia')
{var ii=0;selObj=_DiagramTarget.document.getElementById(id+'i'+eval(ii++));while(selObj!=null)
{if(isVisible)selObj.style.display="inline";else selObj.style.display="none";selObj=_DiagramTarget.document.getElementById(id+'i'+eval(ii++));}}}}
function _SetTitle(theTitle)
{var id=this.ID,selObj;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);selObj.title=theTitle;}
function _MoveTo(theLeft,theTop)
{var id=this.ID,selObj,ww=0;if(this.BorderWidth)ww=this.BorderWidth;if(!isNaN(parseInt(theLeft)))this.left=theLeft;if(!isNaN(parseInt(theTop)))this.top=theTop;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{if(!isNaN(parseInt(theLeft)))left=theLeft+"px";if(!isNaN(parseInt(theTop)))top=theTop+"px";if(this.height<=2*ww)visibility="hidden";else visibility="visible";}}
function _ResizeTo(theLeft,theTop,theWidth,theHeight)
{var id=this.ID,selObj,ww=0;if(this.BorderWidth)ww=this.BorderWidth;if(!isNaN(parseInt(theLeft)))this.left=theLeft;if(!isNaN(parseInt(theTop)))this.top=theTop;if(!isNaN(parseInt(theWidth)))this.width=theWidth;if(!isNaN(parseInt(theHeight)))this.height=theHeight;if(_IsImage(this.Text))this.SetText(this.Text);if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{if(!isNaN(parseInt(theLeft)))left=theLeft+"px";if(!isNaN(parseInt(theTop)))top=theTop+"px";if(!isNaN(parseInt(theWidth)))width=eval(theWidth-ww+ww*_dSize)+"px";if(!isNaN(parseInt(theHeight)))height=eval(theHeight-ww+ww*_dSize)+"px";if(this.height<=2*ww)visibility="hidden";else visibility="visible";}}
function _Delete()
{var id=this.ID,selObj;if(document.all)
{selObj=eval("_DiagramTarget.document.all."+id);selObj.outerHTML="";}
else
{selObj=_DiagramTarget.document.getElementById(id);selObj.parentNode.removeChild(selObj);}}
function _SetColor(theColor)
{this.Color=theColor;if((theColor!="")&&(theColor.length<this.Color.length))this.Color="#"+theColor;else this.Color=theColor;this.ResizeTo("","","","");}
function Line(theX0,theY0,theX1,theY1,theColor,theSize,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{this.ID="Line"+_N_Line;_N_Line++;_zIndex++;this.X0=theX0;this.Y0=theY0;this.X1=theX1;this.Y1=theY1;this.Color=theColor;if((theColor!="")&&(theColor.length==6))this.Color="#"+theColor;this.Size=Number(_nvl(theSize,1));this.Cursor=_cursor(theOnClickAction);this.SetVisibility=_SetVisibility;this.SetColor=_SetColor;this.SetTitle=_SetTitle;this.MoveTo=_LineMoveTo;this.ResizeTo=_LineResizeTo;this.Delete=_Delete;this.EventActions="";if(_nvl(theOnClickAction,"")!="")this.EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")this.EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")this.EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";var xx0,yy0,xx1,yy1,ll,rr,tt,bb,ww,hh,ccl,ccr,cct,ccb;var ss2=Math.floor(this.Size/2),nbsp=(_IE)?"&nbsp;":"";var ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(theX0<=theX1){ll=theX0;rr=theX1;}
else{ll=theX1;rr=theX0;}
if(theY0<=theY1){tt=theY0;bb=theY1;}
else{tt=theY1;bb=theY0;}
ww=rr-ll;hh=bb-tt;_DiagramTarget.document.write("<div id='"+this.ID+"' style='visibility:hidden;position:absolute;left:"+eval(ll-ss2)+"px;top:"+eval(tt-ss2)+"px; width:"+eval(ww+this.Size)+"px; height:"+eval(hh+this.Size)+"px; z-index:"+_zIndex+";' title='"+_nvl(theTooltipText,"")+"'>");if((ww==0)||(hh==0))
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:0px;top:0px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+ccl+"px;top:"+cct+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccr)+"px;top:"+cct+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+ccl+"px;top:"+cct+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccl)+"px;top:"+cct+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");ccl++;}}}
_DiagramTarget.document.writeln("</div>");return(this);}
function _LineResizeTo(theX0,theY0,theX1,theY1)
{var xx0,yy0,xx1,yy1,ll,rr,tt,bb,ww,hh,ccl,ccr,cct,ccb,id=this.ID,selObj="",divtext="";var ss2=Math.floor(this.Size/2),nbsp=(_IE)?"&nbsp;":"";if(!isNaN(parseInt(theX0)))this.X0=theX0;if(!isNaN(parseInt(theY0)))this.Y0=theY0;if(!isNaN(parseInt(theX1)))this.X1=theX1;if(!isNaN(parseInt(theY1)))this.Y1=theY1;var ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(this.X0<=this.X1){ll=this.X0;rr=this.X1;}
else{ll=this.X1;rr=this.X0;}
if(this.Y0<=this.Y1){tt=this.Y0;bb=this.Y1;}
else{tt=this.Y1;bb=this.Y0;}
ww=rr-ll;hh=bb-tt;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{left=eval(ll-ss2)+"px";top=eval(tt-ss2)+"px";width=eval(ww+this.Size)+"px";height=eval(hh+this.Size)+"px";}
if((ww==0)||(hh==0))
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:0px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+ccl+"px;top:"+cct+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccr)+"px;top:"+cct+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+ccl+"px;top:"+cct+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccl)+"px;top:"+cct+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";ccl++;}}}
selObj.innerHTML=divtext;}
function _LineMoveTo(theLeft,theTop)
{var id=this.ID,selObj;var ss2=Math.floor(this.Size/2);if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{if(!isNaN(parseInt(theLeft)))left=eval(theLeft-ss2)+"px";if(!isNaN(parseInt(theTop)))top=eval(theTop-ss2)+"px";visibility="visible";}}
function Area(theX0,theY0,theX1,theY1,theColor,theBase,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{this.ID="Area"+_N_Area;_N_Area++;_zIndex++;this.X0=theX0;this.Y0=theY0;this.X1=theX1;this.Y1=theY1;this.Color=theColor;if((theColor!="")&&(theColor.length==6))this.Color="#"+theColor;this.Base=theBase;this.Cursor=_cursor(theOnClickAction);this.SetVisibility=_SetVisibility;this.SetColor=_SetColor;this.SetTitle=_SetTitle;this.MoveTo=_MoveTo;this.ResizeTo=_AreaResizeTo;this.Delete=_Delete;this.EventActions="";if(_nvl(theOnClickAction,"")!="")this.EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")this.EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")this.EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";var ii,dd,ll,rr,tt,bb,ww,hh,nbsp=(_IE)?"&nbsp;":"";if(theX0<=theX1){ll=Math.round(theX0);rr=Math.round(theX1);}
else{ll=Math.round(theX1);rr=Math.round(theX0);}
if(theY0<=theY1){tt=Math.round(theY0);bb=Math.round(theY1);}
else{tt=Math.round(theY1);bb=Math.round(theY0);}
ww=rr-ll;hh=bb-tt;if(theBase<=tt)
_DiagramTarget.document.write("<div id='"+this.ID+"' style='position:absolute;left:"+ll+"px;top:"+theBase+"px; width:"+ww+"px; height:"+hh+"px; z-index:"+_zIndex+"; font-size:1pt; line-height:1pt;' title='"+_nvl(theTooltipText,"")+"'>");else
_DiagramTarget.document.write("<div id='"+this.ID+"' style='position:absolute;left:"+ll+"px;top:"+tt+"px; width:"+ww+"px; height:"+Math.max(hh,theBase-tt)+"px; z-index:"+_zIndex+"; font-size:1pt; line-height:1pt;' title='"+_nvl(theTooltipText,"")+"'>");if(theBase<=tt)
{if((theBase<tt)&&(ww>0))
{_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:0px;width:"+ww+"px;height:"+eval(tt-theBase)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
if(((theY0<theY1)&&(theX0<theX1))||((theY0>theY1)&&(theX0>theX1)))
{for(ii=0;ii<hh;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(ww*(ii+0.5)/hh)+"px;top:"+eval(tt-theBase+ii)+"px;width:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
if(((theY0>theY1)&&(theX0<theX1))||((theY0<theY1)&&(theX0>theX1)))
{for(ii=0;ii<hh;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+eval(tt-theBase+ii)+"px;width:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
if((theBase>tt)&&(theBase<bb))
{dd=Math.round((theBase-tt)/hh*ww);if(((theY0<theY1)&&(theX0<theX1))||((theY0>theY1)&&(theX0>theX1)))
{for(ii=0;ii<theBase-tt;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");for(ii=0;ii<bb-theBase;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+(dd+Math.round(ww*(ii+0.5)/hh))+"px;top:"+eval(theBase-tt+ii)+"px;width:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
if(((theY0>theY1)&&(theX0<theX1))||((theY0<theY1)&&(theX0>theX1)))
{for(ii=0;ii<theBase-tt;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");for(ii=0;ii<bb-theBase;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+eval(theBase-tt+ii)+"px;width:"+(ww-dd-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
if(theBase>=bb)
{if((theBase>bb)&&(ww>0))
{_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+(hh)+"px;width:"+ww+"px;height:"+eval(theBase-bb)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
if(((theY0<theY1)&&(theX0<theX1))||((theY0>theY1)&&(theX0>theX1)))
{for(ii=0;ii<hh;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
if(((theY0>theY1)&&(theX0<theX1))||((theY0<theY1)&&(theX0>theX1)))
{for(ii=0;ii<hh;ii++)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
_DiagramTarget.document.writeln("</div>");}
function _AreaResizeTo(theX0,theY0,theX1,theY1)
{var dd,ll,rr,tt,bb,ww,hh,id=this.ID,selObj="",divtext="",nbsp=(_IE)?"&nbsp;":"";if(!isNaN(parseInt(theX0)))this.X0=theX0;if(!isNaN(parseInt(theY0)))this.Y0=theY0;if(!isNaN(parseInt(theX1)))this.X1=theX1;if(!isNaN(parseInt(theY1)))this.Y1=theY1;if(this.X0<=this.X1){ll=Math.round(this.X0);rr=Math.round(this.X1);}
else{ll=Math.round(this.X1);rr=Math.round(this.X0);}
if(this.Y0<=this.Y1){tt=Math.round(this.Y0);bb=Math.round(this.Y1);}
else{tt=Math.round(this.Y1);bb=Math.round(this.Y0);}
ww=rr-ll;hh=bb-tt;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{if(this.Base<=tt){left=ll+"px";top=this.Base+"px";width=ww+"px";height=hh+"px";}
else{left=ll+"px";top=tt+"px";width=ww+"px";height=Math.max(hh,this.Base-tt)+"px";}}
if(this.Base<=tt)
{if((this.Base<tt)&&(ww>0))
{divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:0px;width:"+ww+"px;height:"+eval(tt-this.Base)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
if(((this.Y0<this.Y1)&&(this.X0<this.X1))||((this.Y0>this.Y1)&&(this.X0>this.X1)))
{for(ii=0;ii<hh;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(ww*(ii+0.5)/hh)+"px;top:"+eval(tt-this.Base+ii)+"px;width:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
if(((this.Y0>this.Y1)&&(this.X0<this.X1))||((this.Y0<this.Y1)&&(this.X0>this.X1)))
{for(ii=0;ii<hh;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+eval(tt-this.Base+ii)+"px;width:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
if((this.Base>tt)&&(this.Base<bb))
{dd=Math.round((this.Base-tt)/hh*ww);if(((this.Y0<this.Y1)&&(this.X0<this.X1))||((this.Y0>this.Y1)&&(this.X0>this.X1)))
{for(ii=0;ii<this.Base-tt;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";for(ii=0;ii<bb-this.Base;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+(dd+Math.round(ww*(ii+0.5)/hh))+"px;top:"+eval(this.Base-tt+ii)+"px;width:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
if(((this.Y0>this.Y1)&&(this.X0<this.X1))||((this.Y0<this.Y1)&&(this.X0>this.X1)))
{for(ii=0;ii<this.Base-tt;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";for(ii=0;ii<bb-this.Base;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+eval(this.Base-tt+ii)+"px;width:"+(ww-dd-Math.round(ww*(ii+0.5)/hh))+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
if(this.Base>=bb)
{if((this.Base>bb)&&(ww>0))
{divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+hh+"px;width:"+ww+"px;height:"+eval(this.Base-bb)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
if(((this.Y0<this.Y1)&&(this.X0<this.X1))||((this.Y0>this.Y1)&&(this.X0>this.X1)))
{for(ii=0;ii<hh;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:0px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
if(((this.Y0>this.Y1)&&(this.X0<this.X1))||((this.Y0<this.Y1)&&(this.X0>this.X1)))
{for(ii=0;ii<hh;ii++)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+(ww-Math.round(ww*(ii+0.5)/hh))+"px;top:"+ii+"px;width:"+Math.round(ww*(ii+0.5)/hh)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
selObj.innerHTML=divtext;}
function Arrow(theX0,theY0,theX1,theY1,theColor,theSize,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{this.ID="Arrow"+_N_Arrow;_N_Arrow++;_zIndex++;this.X0=theX0;this.Y0=theY0;this.X1=theX1;this.Y1=theY1;this.Color=theColor;if((theColor!="")&&(theColor.length==6))this.Color="#"+theColor;this.Size=Number(_nvl(theSize,1));this.Cursor=_cursor(theOnClickAction);this.Border=8*this.Size;this.SetVisibility=_SetVisibility;this.SetColor=_SetColor;this.SetTitle=_SetTitle;this.MoveTo=_ArrowMoveTo;this.ResizeTo=_ArrowResizeTo;this.Delete=_Delete;this.EventActions="";if(_nvl(theOnClickAction,"")!="")this.EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")this.EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")this.EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";var xx0,yy0,xx1,yy1,ll,rr,tt,bb,ww,hh,ccl,ccr,cct,ccb;var ddir,ss2=Math.floor(this.Size/2),nbsp=(_IE)?"&nbsp;":"";ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(this.X0<=this.X1){ll=this.X0;rr=this.X1;}
else{ll=this.X1;rr=this.X0;}
if(this.Y0<=this.Y1){tt=this.Y0;bb=this.Y1;}
else{tt=this.Y1;bb=this.Y0;}
ww=rr-ll;hh=bb-tt;_DiagramTarget.document.write("<div id='"+this.ID+"' style='visibility:hidden;position:absolute;left:"+eval(ll-ss2-this.Border)+"px;top:"+eval(tt-ss2-this.Border)+"px; width:"+eval(ww+this.Size+2*this.Border)+"px; height:"+eval(hh+this.Size+2*this.Border)+"px; z-index:"+_zIndex+";' title='"+_nvl(theTooltipText,"")+"'>");if((ww==0)||(hh==0))
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+this.Border+"px;top:"+this.Border+"px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ccl+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccr+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ccl+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccl+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");ccl++;}}}
var LL=1,ll0=ll,tt0=tt;var ccL=8*theSize+4,ccB=2*theSize+1;var DDX=theX1-theX0,DDY=theY1-theY0;if((DDX!=0)||(DDY!=0))LL=Math.sqrt((DDX*DDX)+(DDY*DDY));this.X0=theX1-Math.round(1/LL*(ccL*DDX-ccB*DDY));this.Y0=theY1-Math.round(1/LL*(ccL*DDY+ccB*DDX));ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(this.X0<=this.X1){ll=this.X0;rr=this.X1;}
else{ll=this.X1;rr=this.X0;}
if(this.Y0<=this.Y1){tt=this.Y0;bb=this.Y1;}
else{tt=this.Y1;bb=this.Y0;}
ww=rr-ll;hh=bb-tt;if((ww==0)||(hh==0))
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(this.Border+ll-ll0)+"px;top:"+eval(this.Border+tt-tt0)+"px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccr+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");ccl++;}}}
this.X0=theX1-Math.round(1/LL*(ccL*DDX+ccB*DDY));this.Y0=theY1-Math.round(1/LL*(ccL*DDY-ccB*DDX));ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(this.X0<=this.X1){ll=this.X0;rr=this.X1;}
else{ll=this.X1;rr=this.X0;}
if(this.Y0<=this.Y1){tt=this.Y0;bb=this.Y1;}
else{tt=this.Y1;bb=this.Y0;}
ww=rr-ll;hh=bb-tt;if((ww==0)||(hh==0))
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(this.Border+ll-ll0)+"px;top:"+eval(this.Border+tt-tt0)+"px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccr+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+_cursor(theOnClickAction)+"position:absolute;left:"+eval(ww-ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");ccl++;}}}
_DiagramTarget.document.writeln("</div>");this.X0=theX0;this.Y0=theY0;return(this);}
function _ArrowResizeTo(theX0,theY0,theX1,theY1)
{var xx0,yy0,xx1,yy1,ll,rr,tt,bb,ww,hh,ccl,ccr,cct,ccb,id=this.ID,selObj="",divtext="";var ss2=Math.floor(this.Size/2),nbsp=(_IE)?"&nbsp;":"";if(!isNaN(parseInt(theX0)))this.X0=theX0;if(!isNaN(parseInt(theY0)))this.Y0=theY0;if(!isNaN(parseInt(theX1)))this.X1=theX1;if(!isNaN(parseInt(theY1)))this.Y1=theY1;var tmpX0=this.X0,tmpY0=this.Y0;var ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(this.X0<=this.X1){ll=this.X0;rr=this.X1;}
else{ll=this.X1;rr=this.X0;}
if(this.Y0<=this.Y1){tt=this.Y0;bb=this.Y1;}
else{tt=this.Y1;bb=this.Y0;}
ww=rr-ll;hh=bb-tt;if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{left=eval(ll-ss2-this.Border)+"px";top=eval(tt-ss2-this.Border)+"px";width=eval(ww+this.Size+2*this.Border)+"px";height=eval(hh+this.Size+2*this.Border)+"px";}
if((ww==0)||(hh==0))
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+this.Border+"px;top:"+this.Border+"px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ccl+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccr+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ccl+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccl+this.Border)+"px;top:"+eval(cct+this.Border)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";ccl++;}}}
var LL=1,ll0=ll,tt0=tt;var ccL=8*this.Size+4,ccB=2*this.Size+1;var DDX=this.X1-tmpX0,DDY=this.Y1-tmpY0;if((DDX!=0)||(DDY!=0))LL=Math.sqrt(0+(DDX*DDX)+(DDY*DDY));this.X0=this.X1-Math.round(1/LL*(ccL*DDX-ccB*DDY));this.Y0=this.Y1-Math.round(1/LL*(ccL*DDY+ccB*DDX));ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(this.X0<=this.X1){ll=this.X0;rr=this.X1;}
else{ll=this.X1;rr=this.X0;}
if(this.Y0<=this.Y1){tt=this.Y0;bb=this.Y1;}
else{tt=this.Y1;bb=this.Y0;}
ww=rr-ll;hh=bb-tt;if((ww==0)||(hh==0))
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(this.Border+ll-ll0)+"px;top:"+eval(this.Border+tt-tt0)+"px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccr+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";ccl++;}}}
this.X0=this.X1-Math.round(1/LL*(ccL*DDX+ccB*DDY));this.Y0=this.Y1-Math.round(1/LL*(ccL*DDY-ccB*DDX));ddir=(((this.Y1>this.Y0)&&(this.X1>this.X0))||((this.Y1<this.Y0)&&(this.X1<this.X0)))?true:false;if(this.X0<=this.X1){ll=this.X0;rr=this.X1;}
else{ll=this.X1;rr=this.X0;}
if(this.Y0<=this.Y1){tt=this.Y0;bb=this.Y1;}
else{tt=this.Y1;bb=this.Y0;}
ww=rr-ll;hh=bb-tt;if((ww==0)||(hh==0))
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(this.Border+ll-ll0)+"px;top:"+eval(this.Border+tt-tt0)+"px;width:"+eval(ww+this.Size)+"px;height:"+eval(hh+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
{if(ww>hh)
{ccr=0;cct=0;while(ccr<ww)
{ccl=ccr;while((2*ccr*hh<=(2*cct+1)*ww)&&(ccr<=ww))ccr++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccr+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+eval(ccr-ccl+this.Size)+"px;height:"+this.Size+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";cct++;}}
else
{ccb=0;ccl=0;while(ccb<hh)
{cct=ccb;while((2*ccb*ww<=(2*ccl+1)*hh)&&(ccb<hh))ccb++;if(ddir)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+eval(ww-ccl+this.Border+ll-ll0)+"px;top:"+eval(cct+this.Border+tt-tt0)+"px;width:"+this.Size+"px;height:"+eval(ccb-cct+this.Size)+"px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";ccl++;}}}
selObj.innerHTML=divtext;this.X0=tmpX0;this.Y0=tmpY0;}
function _ArrowMoveTo(theLeft,theTop)
{var id=this.ID,selObj;var ss2=Math.floor(this.Size/2);if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{if(!isNaN(parseInt(theLeft)))left=eval(theLeft-ss2-this.Border)+"px";if(!isNaN(parseInt(theTop)))top=eval(theTop-ss2-this.Border)+"px";visibility="visible";}}
function Pie(theXCenter,theYCenter,theOffset,theRadius,theAngle0,theAngle1,theColor,theTooltipText,theOnClickAction,theOnMouseoverAction,theOnMouseoutAction)
{this.ID="Pie"+_N_Pie;_N_Pie++;_zIndex++;this.XCenter=theXCenter;this.YCenter=theYCenter;this.Offset=theOffset;this.Radius=theRadius;this.dX=theRadius;this.dY=theRadius;this.Angle0=theAngle0;this.Angle1=theAngle1;this.Color=theColor;if((theColor!="")&&(theColor.length==6))this.Color="#"+theColor;this.Cursor=_cursor(theOnClickAction);this.SetVisibility=_SetVisibility;this.SetColor=_SetColor;this.SetTitle=_SetTitle;this.MoveTo=_PieMoveTo;this.ResizeTo=_PieResizeTo;this.Delete=_Delete;this.EventActions="";if(_nvl(theOnClickAction,"")!="")this.EventActions+="onClick='"+_nvl(theOnClickAction,"")+"' ";if(_nvl(theOnMouseoverAction,"")!="")this.EventActions+="onMouseover='"+_nvl(theOnMouseoverAction,"")+"' ";if(_nvl(theOnMouseoutAction,"")!="")this.EventActions+="onMouseout='"+_nvl(theOnMouseoutAction,"")+"' ";var aa0,aa1,xx,yy,tt,xxo=0,yyo=0,rr2=this.Radius*this.Radius,xx0,yy0,xx1,yy1,pid180=Math.PI/180,ss0,ss1;var nbsp=(_IE)?"&nbsp;":"";aa0=this.Angle0;aa1=this.Angle1;while(aa0>=360)aa0-=360;while(aa0<0)aa0+=360;while(aa1>=360)aa1-=360;while(aa1<0)aa1+=360;if(aa0<aa1)
{xxo=Math.sin((aa0+aa1)*pid180/2)*this.Offset;yyo=-Math.cos((aa0+aa1)*pid180/2)*this.Offset;}
if(aa0>aa1)
{xxo=Math.sin((aa0+aa1+360)*pid180/2)*this.Offset;yyo=-Math.cos((aa0+aa1+360)*pid180/2)*this.Offset;}
_DiagramTarget.document.write("<div id='"+this.ID+"' style='visibility:hidden;position:absolute;left:"+Math.round(this.XCenter-this.Radius+xxo)+"px;top:"+Math.round(this.YCenter-this.Radius+yyo)+"px; width:"+eval(2*this.Radius)+"px; height:"+eval(2*this.Radius)+"px; z-index:"+_zIndex+"; font-size:1pt; line-height:1pt;' title='"+_nvl(theTooltipText,"")+"'>");if(aa0==aa1)
{if(this.Angle0<this.Angle1)
{for(yy=-this.Radius+0.5;yy<this.Radius;yy++)
{xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));tt=Math.round(yy+this.Radius-0.5);_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}}
else
{xx0=Math.sin(aa0*pid180)*this.Radius;yy0=-Math.cos(aa0*pid180)*this.Radius;xx1=Math.sin(aa1*pid180)*this.Radius;yy1=-Math.cos(aa1*pid180)*this.Radius;for(yy=-this.Radius+0.5;yy<0;yy++)
{xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));tt=Math.round(yy+this.Radius-0.5);if((yy0>=0)&&(yy1>=0))
{if(xx0<xx1)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if((yy0<0)&&(yy1<0))
{if((yy<yy0)&&(yy<yy1))
{if(((xx0<0)&&(xx1>0))||((xx0<0)&&(xx1<=xx0))||((xx1>0)&&(xx0>=xx1)))
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if((yy>=yy0)&&(yy>=yy1))
{ss0=Math.round(yy*xx0/yy0);ss1=Math.round(yy*xx1/yy1);if(xx0<xx1)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(ss1-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
{_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss1+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(xx-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
else if(yy>=yy0)
{ss0=yy*xx0/yy0;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(xx-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else
{ss1=yy*xx1/yy1;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss1+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
else if(yy0<0)
{if(yy>=yy0)
{ss0=yy*xx0/yy0;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(xx-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if(xx0<0)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else
{if(yy>=yy1)
{ss1=yy*xx1/yy1;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss1+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if(xx1>0)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
for(yy=0.5;yy<this.Radius;yy++)
{xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));tt=Math.round(yy+this.Radius-0.5);if((yy0<=0)&&(yy1<=0))
{if(xx0>xx1)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if((yy0>0)&&(yy1>0))
{if((yy>yy0)&&(yy>yy1))
{if(((xx1<0)&&(xx0>0))||((xx1<0)&&(xx0<=xx1))||((xx0>0)&&(xx1>=xx0)))
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if((yy<=yy0)&&(yy<=yy1))
{ss0=Math.round(yy*xx0/yy0);ss1=Math.round(yy*xx1/yy1);if(xx0>xx1)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(ss0-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");else
{_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss0+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(xx-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
else if(yy<=yy0)
{ss0=yy*xx0/yy0;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss0+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else
{ss1=yy*xx1/yy1;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(xx-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}
else if(yy0>0)
{if(yy<=yy0)
{ss0=yy*xx0/yy0;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss0+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if(xx0>0)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else
{if(yy<=yy1)
{ss1=yy*xx1/yy1;_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(xx-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}
else if(xx1<0)
_DiagramTarget.document.write("<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>");}}}
_DiagramTarget.document.writeln("</div>");return(this);}
function _PieResizeTo(theXCenter,theYCenter,theOffset,theRadius,theAngle0,theAngle1)
{var id=this.ID,selObj="",divtext="";if(!isNaN(parseInt(theXCenter)))this.XCenter=theXCenter;if(!isNaN(parseInt(theYCenter)))this.YCenter=theYCenter;if(!isNaN(parseInt(theOffset)))this.Offset=theOffset;if(!isNaN(parseInt(theRadius)))this.Radius=theRadius;if(!isNaN(parseInt(theAngle0)))this.Angle0=theAngle0;if(!isNaN(parseInt(theAngle1)))this.Angle1=theAngle1;var aa0,aa1,xx,yy,tt,xxo=0,yyo=0,rr2=this.Radius*this.Radius,xx0,yy0,xx1,yy1,pid180=Math.PI/180,ss0,ss1;var nbsp=(_IE)?"&nbsp;":"";aa0=this.Angle0;aa1=this.Angle1;if(aa0<aa1)
{xxo=Math.sin((aa0+aa1)*pid180/2)*this.Offset;yyo=-Math.cos((aa0+aa1)*pid180/2)*this.Offset;}
if(aa0>aa1)
{xxo=Math.sin((aa0+aa1+360)*pid180/2)*this.Offset;yyo=-Math.cos((aa0+aa1+360)*pid180/2)*this.Offset;}
if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{left=Math.round(this.XCenter-this.Radius+xxo)+"px";top=Math.round(this.YCenter-this.Radius+yyo)+"px";width=eval(2*this.Radius)+"px";height=eval(2*this.Radius)+"px";}
if(aa0==aa1)
{if(this.Angle0<this.Angle1)
{for(yy=-this.Radius+0.5;yy<this.Radius;yy++)
{xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));tt=Math.round(yy+this.Radius-0.5);divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}}
else
{xx0=Math.sin(aa0*pid180)*this.Radius;yy0=-Math.cos(aa0*pid180)*this.Radius;xx1=Math.sin(aa1*pid180)*this.Radius;yy1=-Math.cos(aa1*pid180)*this.Radius;for(yy=-this.Radius+0.5;yy<0;yy++)
{xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));tt=Math.round(yy+this.Radius-0.5);if((yy0>=0)&&(yy1>=0))
{if(xx0<xx1)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if((yy0<0)&&(yy1<0))
{if((yy<yy0)&&(yy<yy1))
{if(((xx0<0)&&(xx1>0))||((xx0<0)&&(xx1<=xx0))||((xx1>0)&&(xx0>=xx1)))
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if((yy>=yy0)&&(yy>=yy1))
{ss0=Math.round(yy*xx0/yy0);ss1=Math.round(yy*xx1/yy1);if(xx0<xx1)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(ss1-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
{divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss1+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(xx-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
else if(yy>=yy0)
{ss0=yy*xx0/yy0;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(xx-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else
{ss1=yy*xx1/yy1;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss1+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
else if(yy0<0)
{if(yy>=yy0)
{ss0=yy*xx0/yy0;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss0)+"px;top:"+tt+"px;width:"+Math.round(xx-ss0)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if(xx0<0)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else
{if(yy>=yy1)
{ss1=yy*xx1/yy1;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss1+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if(xx1>0)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
for(yy=0.5;yy<this.Radius;yy++)
{xx=Math.round(Math.sqrt(rr2-(yy)*(yy)));tt=Math.round(yy+this.Radius-0.5);if((yy0<=0)&&(yy1<=0))
{if(xx0>xx1)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if((yy0>0)&&(yy1>0))
{if((yy>yy0)&&(yy>yy1))
{if(((xx1<0)&&(xx0>0))||((xx1<0)&&(xx0<=xx1))||((xx0>0)&&(xx1>=xx0)))
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if((yy<=yy0)&&(yy<=yy1))
{ss0=Math.round(yy*xx0/yy0);ss1=Math.round(yy*xx1/yy1);if(xx0>xx1)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(ss0-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";else
{divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss0+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(xx-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
else if(yy<=yy0)
{ss0=yy*xx0/yy0;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss0+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else
{ss1=yy*xx1/yy1;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(xx-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}
else if(yy0>0)
{if(yy<=yy0)
{ss0=yy*xx0/yy0;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(ss0+xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if(xx0>0)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else
{if(yy<=yy1)
{ss1=yy*xx1/yy1;divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius+ss1)+"px;top:"+tt+"px;width:"+Math.round(xx-ss1)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}
else if(xx1<0)
divtext+="<div "+this.EventActions+"style='visibility:visible;"+this.Cursor+"position:absolute;left:"+Math.round(this.Radius-xx)+"px;top:"+tt+"px;width:"+Math.round(2*xx)+"px;height:1px;background-color:"+this.Color+";font-size:1pt;line-height:1pt;'>"+nbsp+"</div>";}}}
selObj.innerHTML=divtext;}
function _PieMoveTo(theXCenter,theYCenter,theOffset)
{var xxo=0,yyo=0,pid180=Math.PI/180,id=this.ID,selObj;if(!isNaN(parseInt(theXCenter)))this.XCenter=theXCenter;if(!isNaN(parseInt(theYCenter)))this.YCenter=theYCenter;if(!isNaN(parseInt(theOffset)))this.Offset=theOffset;if(this.Angle0<this.Angle1)
{xxo=Math.sin((this.Angle0+this.Angle1)*pid180/2)*this.Offset;yyo=-Math.cos((this.Angle0+this.Angle1)*pid180/2)*this.Offset;}
if(this.Angle0>this.Angle1)
{xxo=Math.sin((this.Angle0+this.Angle1+360)*pid180/2)*this.Offset;yyo=-Math.cos((this.Angle0+this.Angle1+360)*pid180/2)*this.Offset;}
if(document.all)selObj=eval("_DiagramTarget.document.all."+id);else selObj=_DiagramTarget.document.getElementById(id);with(selObj.style)
{left=Math.round(this.XCenter-this.Radius+xxo)+"px";top=Math.round(this.YCenter-this.Radius+yyo)+"px";width=eval(2*this.Radius)+"px";height=eval(2*this.Radius)+"px";visibility="visible";}}
var domLib_userAgent=navigator.userAgent.toLowerCase();var domLib_isMac=navigator.appVersion.indexOf('Mac')!=-1;var domLib_isWin=domLib_userAgent.indexOf('windows')!=-1;var domLib_isOpera=domLib_userAgent.indexOf('opera')!=-1;var domLib_isOpera7up=domLib_userAgent.match(/opera.(7|8)/i);var domLib_isSafari=domLib_userAgent.indexOf('safari')!=-1;var domLib_isKonq=domLib_userAgent.indexOf('konqueror')!=-1;var domLib_isKHTML=(domLib_isKonq||domLib_isSafari||domLib_userAgent.indexOf('khtml')!=-1);var domLib_isIE=(!domLib_isKHTML&&!domLib_isOpera&&(domLib_userAgent.indexOf('msie 5')!=-1||domLib_userAgent.indexOf('msie 6')!=-1||domLib_userAgent.indexOf('msie 7')!=-1)||domLib_userAgent.indexOf('msie 8')!=-1);var domLib_isIE5up=domLib_isIE;var domLib_isIE50=(domLib_isIE&&domLib_userAgent.indexOf('msie 5.0')!=-1);var domLib_isIE55=(domLib_isIE&&domLib_userAgent.indexOf('msie 5.5')!=-1);var domLib_isIE5=(domLib_isIE50||domLib_isIE55);var domLib_isGecko=domLib_userAgent.indexOf('gecko/')!=-1;var domLib_isMacIE=(domLib_isIE&&domLib_isMac);var domLib_isIE55up=domLib_isIE5up&&!domLib_isIE50&&!domLib_isMacIE;var domLib_isIE6up=domLib_isIE55up&&!domLib_isIE55;var domLib_standardsMode=(document.compatMode&&document.compatMode=='CSS1Compat');var domLib_useLibrary=(domLib_isOpera7up||domLib_isKHTML||domLib_isIE5up||domLib_isGecko||domLib_isMacIE||document.defaultView);var domLib_hasBrokenTimeout=(domLib_isMacIE||(domLib_isKonq&&domLib_userAgent.match(/konqueror\/3.([2-9])/)==null));var domLib_canFade=(domLib_isGecko||domLib_isIE||domLib_isSafari||domLib_isOpera);var domLib_canDrawOverSelect=(domLib_isMac||domLib_isOpera||domLib_isGecko);var domLib_canDrawOverFlash=(domLib_isMac||domLib_isWin);var domLib_eventTarget=domLib_isIE?'srcElement':'currentTarget';var domLib_eventButton=domLib_isIE?'button':'which';var domLib_eventTo=domLib_isIE?'toElement':'relatedTarget';var domLib_stylePointer=domLib_isIE?'hand':'pointer';var domLib_styleNoMaxWidth=domLib_isOpera?'10000px':'none';var domLib_hidePosition='-1000px';var domLib_scrollbarWidth=14;var domLib_autoId=1;var domLib_zIndex=100;var domLib_collisionElements;var domLib_collisionsCached=false;var domLib_timeoutStateId=0;var domLib_timeoutStates=new Hash();if(!document.ELEMENT_NODE)
{document.ELEMENT_NODE=1;document.ATTRIBUTE_NODE=2;document.TEXT_NODE=3;document.DOCUMENT_NODE=9;document.DOCUMENT_FRAGMENT_NODE=11;}
function domLib_clone(obj)
{var copy={};for(var i in obj)
{var value=obj[i];try
{if(value!=null&&typeof(value)=='object'&&value!=window&&!value.nodeType)
{copy[i]=domLib_clone(value);}
else
{copy[i]=value;}}
catch(e)
{copy[i]=value;}}
return copy;}
function Hash()
{this.length=0;this.numericLength=0;this.elementData=[];for(var i=0;i<arguments.length;i+=2)
{if(typeof(arguments[i+1])!='undefined')
{this.elementData[arguments[i]]=arguments[i+1];this.length++;if(arguments[i]==parseInt(arguments[i]))
{this.numericLength++;}}}}
Hash.prototype.get=function(in_key)
{if(typeof(this.elementData[in_key])!='undefined'){return this.elementData[in_key];}
return null;}
Hash.prototype.set=function(in_key,in_value)
{if(typeof(in_value)!='undefined')
{if(typeof(this.elementData[in_key])=='undefined')
{this.length++;if(in_key==parseInt(in_key))
{this.numericLength++;}}
return this.elementData[in_key]=in_value;}
return false;}
Hash.prototype.remove=function(in_key)
{var tmp_value;if(typeof(this.elementData[in_key])!='undefined')
{this.length--;if(in_key==parseInt(in_key))
{this.numericLength--;}
tmp_value=this.elementData[in_key];delete this.elementData[in_key];}
return tmp_value;}
Hash.prototype.size=function()
{return this.length;}
Hash.prototype.has=function(in_key)
{return typeof(this.elementData[in_key])!='undefined';}
Hash.prototype.find=function(in_obj)
{for(var tmp_key in this.elementData)
{if(this.elementData[tmp_key]==in_obj)
{return tmp_key;}}
return null;}
Hash.prototype.merge=function(in_hash)
{for(var tmp_key in in_hash.elementData)
{if(typeof(this.elementData[tmp_key])=='undefined')
{this.length++;if(tmp_key==parseInt(tmp_key))
{this.numericLength++;}}
this.elementData[tmp_key]=in_hash.elementData[tmp_key];}}
Hash.prototype.compare=function(in_hash)
{if(this.length!=in_hash.length)
{return false;}
for(var tmp_key in this.elementData)
{if(this.elementData[tmp_key]!=in_hash.elementData[tmp_key])
{return false;}}
return true;}
function domLib_isDescendantOf(in_object,in_ancestor,in_bannedTags)
{if(in_object==null)
{return false;}
if(in_object==in_ancestor)
{return true;}
if(typeof(in_bannedTags)!='undefined'&&(','+in_bannedTags.join(',')+',').indexOf(','+in_object.tagName+',')!=-1)
{return false;}
while(in_object!=document.documentElement)
{try
{if((tmp_object=in_object.offsetParent)&&tmp_object==in_ancestor)
{return true;}
else if((tmp_object=in_object.parentNode)==in_ancestor)
{return true;}
else
{in_object=tmp_object;}}
catch(e)
{return false;}}
return false;}
function domLib_detectCollisions(in_object,in_recover,in_useCache)
{if(!domLib_collisionsCached)
{var tags=[];if(!domLib_canDrawOverFlash)
{tags[tags.length]='object';}
if(!domLib_canDrawOverSelect)
{tags[tags.length]='select';}
domLib_collisionElements=domLib_getElementsByTagNames(tags,true);domLib_collisionsCached=in_useCache;}
if(in_recover)
{for(var cnt=0;cnt<domLib_collisionElements.length;cnt++)
{var thisElement=domLib_collisionElements[cnt];if(!thisElement.hideList)
{thisElement.hideList=new Hash();}
thisElement.hideList.remove(in_object.id);if(!thisElement.hideList.length)
{domLib_collisionElements[cnt].style.visibility='visible';if(domLib_isKonq)
{domLib_collisionElements[cnt].style.display='';}}}
return;}
else if(domLib_collisionElements.length==0)
{return;}
var objectOffsets=domLib_getOffsets(in_object);for(var cnt=0;cnt<domLib_collisionElements.length;cnt++)
{var thisElement=domLib_collisionElements[cnt];if(domLib_isDescendantOf(thisElement,in_object))
{continue;}
if(domLib_isKonq&&thisElement.tagName=='SELECT'&&(thisElement.size<=1&&!thisElement.multiple))
{continue;}
if(!thisElement.hideList)
{thisElement.hideList=new Hash();}
var selectOffsets=domLib_getOffsets(thisElement);var center2centerDistance=Math.sqrt(Math.pow(selectOffsets.get('leftCenter')-objectOffsets.get('leftCenter'),2)+Math.pow(selectOffsets.get('topCenter')-objectOffsets.get('topCenter'),2));var radiusSum=selectOffsets.get('radius')+objectOffsets.get('radius');if(center2centerDistance<radiusSum)
{if((objectOffsets.get('leftCenter')<=selectOffsets.get('leftCenter')&&objectOffsets.get('right')<selectOffsets.get('left'))||(objectOffsets.get('leftCenter')>selectOffsets.get('leftCenter')&&objectOffsets.get('left')>selectOffsets.get('right'))||(objectOffsets.get('topCenter')<=selectOffsets.get('topCenter')&&objectOffsets.get('bottom')<selectOffsets.get('top'))||(objectOffsets.get('topCenter')>selectOffsets.get('topCenter')&&objectOffsets.get('top')>selectOffsets.get('bottom')))
{thisElement.hideList.remove(in_object.id);if(!thisElement.hideList.length)
{thisElement.style.visibility='visible';if(domLib_isKonq)
{thisElement.style.display='';}}}
else
{thisElement.hideList.set(in_object.id,true);thisElement.style.visibility='hidden';if(domLib_isKonq)
{thisElement.style.display='none';}}}}}
function domLib_getOffsets(in_object,in_preserveScroll)
{if(typeof(in_preserveScroll)=='undefined'){in_preserveScroll=false;}
var originalObject=in_object;var originalWidth=in_object.offsetWidth;var originalHeight=in_object.offsetHeight;var offsetLeft=0;var offsetTop=0;offsetLeft=$(in_object).offset().left;offsetTop=$(in_object).offset().top;if(domLib_isMacIE){offsetLeft+=10;offsetTop+=10;}
return new Hash('left',offsetLeft,'top',offsetTop,'right',offsetLeft+originalWidth,'bottom',offsetTop+originalHeight,'leftCenter',offsetLeft+originalWidth/2,'topCenter',offsetTop+originalHeight/2,'radius',Math.max(originalWidth,originalHeight));}
function domLib_setTimeout(in_function,in_timeout,in_args)
{if(typeof(in_args)=='undefined')
{in_args=[];}
if(in_timeout==-1)
{return 0;}
else if(in_timeout==0)
{in_function(in_args);return 0;}
var args=domLib_clone(in_args);if(!domLib_hasBrokenTimeout)
{return setTimeout(function(){in_function(args);},in_timeout);}
else
{var id=domLib_timeoutStateId++;var data=new Hash();data.set('function',in_function);data.set('args',args);domLib_timeoutStates.set(id,data);data.set('timeoutId',setTimeout('domLib_timeoutStates.get('+id+').get(\'function\')(domLib_timeoutStates.get('+id+').get(\'args\')); domLib_timeoutStates.remove('+id+');',in_timeout));return id;}}
function domLib_clearTimeout(in_id)
{if(!domLib_hasBrokenTimeout)
{if(in_id>0){clearTimeout(in_id);}}
else
{if(domLib_timeoutStates.has(in_id))
{clearTimeout(domLib_timeoutStates.get(in_id).get('timeoutId'))
domLib_timeoutStates.remove(in_id);}}}
function domLib_getEventPosition(in_eventObj)
{var eventPosition=new Hash('x',0,'y',0,'scrollX',0,'scrollY',0);if(domLib_isIE)
{var doc=(domLib_standardsMode?document.documentElement:document.body);if(doc)
{eventPosition.set('x',in_eventObj.clientX+doc.scrollLeft);eventPosition.set('y',in_eventObj.clientY+doc.scrollTop);eventPosition.set('scrollX',doc.scrollLeft);eventPosition.set('scrollY',doc.scrollTop);}}
else
{eventPosition.set('x',in_eventObj.pageX);eventPosition.set('y',in_eventObj.pageY);eventPosition.set('scrollX',in_eventObj.pageX-in_eventObj.clientX);eventPosition.set('scrollY',in_eventObj.pageY-in_eventObj.clientY);}
return eventPosition;}
function domLib_cancelBubble(in_event)
{var eventObj=in_event?in_event:window.event;eventObj.cancelBubble=true;}
function domLib_getIFrameReference(in_frame)
{if(domLib_isGecko||domLib_isIE)
{return in_frame.frameElement;}
else
{var name=in_frame.name;if(!name||!in_frame.parent)
{return null;}
var candidates=in_frame.parent.document.getElementsByTagName('iframe');for(var i=0;i<candidates.length;i++)
{if(candidates[i].name==name)
{return candidates[i];}}
return null;}}
function domLib_getElementsByClass(in_class)
{var elements=domLib_isIE5?document.all:document.getElementsByTagName('*');var matches=[];var cnt=0;for(var i=0;i<elements.length;i++)
{if((" "+elements[i].className+" ").indexOf(" "+in_class+" ")!=-1)
{matches[cnt++]=elements[i];}}
return matches;}
function domLib_getElementsByTagNames(in_list,in_excludeHidden)
{var elements=[];for(var i=0;i<in_list.length;i++)
{var matches=document.getElementsByTagName(in_list[i]);for(var j=0;j<matches.length;j++)
{if(matches[j].tagName=='OBJECT'&&domLib_isGecko)
{var kids=matches[j].childNodes;var skip=false;for(var k=0;k<kids.length;k++)
{if(kids[k].tagName=='EMBED')
{skip=true;break;}}
if(skip)continue;}
if(in_excludeHidden&&domLib_getComputedStyle(matches[j],'visibility')=='hidden')
{continue;}
elements[elements.length]=matches[j];}}
return elements;}
function domLib_getComputedStyle(in_obj,in_property)
{if(domLib_isIE)
{var humpBackProp=in_property.replace(/-(.)/,function(a,b){return b.toUpperCase();});return eval('in_obj.currentStyle.'+humpBackProp);}
else if(domLib_isKonq)
{return eval('in_obj.style.'+in_property);}
else
{return document.defaultView.getComputedStyle(in_obj,null).getPropertyValue(in_property);}}
function makeTrue()
{return true;}
function makeFalse()
{return false;}
var domTT_offsetX=(domLib_isIE?-2:0);var domTT_offsetY=(domLib_isIE?4:2);var domTT_direction='southeast';var domTT_mouseHeight=domLib_isIE?13:19;var domTT_closeLink='X';var domTT_closeAction='hide';var domTT_activateDelay=500;var domTT_maxWidth=false;var domTT_styleClass='domTT';var domTT_fade='neither';var domTT_lifetime=0;var domTT_grid=0;var domTT_trailDelay=200;var domTT_useGlobalMousePosition=true;var domTT_postponeActivation=false;var domTT_tooltipIdPrefix='[domTT]';var domTT_screenEdgeDetection=true;var domTT_screenEdgePadding=4;var domTT_oneOnly=false;var domTT_cloneNodes=false;var domTT_detectCollisions=false;var domTT_bannedTags=['OPTION'];var domTT_draggable=false;if(typeof(domTT_dragEnabled)=='undefined')
{domTT_dragEnabled=false;}
var domTT_predefined=new Hash();var domTT_tooltips=new Hash();var domTT_lastOpened=0;var domTT_documentLoaded=false;var domTT_mousePosition=null;if(domLib_useLibrary&&domTT_useGlobalMousePosition)
{document.onmousemove=function(in_event)
{if(typeof(in_event)=='undefined'){in_event=window.event;}
domTT_mousePosition=domLib_getEventPosition(in_event);if(domTT_dragEnabled&&domTT_dragMouseDown)
{domTT_dragUpdate(in_event);}}}
function domTT_activate(in_this,in_event)
{if(!domLib_useLibrary||(domTT_postponeActivation&&!domTT_documentLoaded)){return false;}
if(typeof(in_event)=='undefined'){in_event=window.event;}
if(in_event!=null){var target=in_event.srcElement?in_event.srcElement:in_event.target;if(target!=null&&(','+domTT_bannedTags.join(',')+',').indexOf(','+target.tagName+',')!=-1)
{return false;}}
var owner=document.body;if(in_event!=null&&in_event.type.match(/key|mouse|click|contextmenu/i))
{if(in_this.nodeType&&in_this.nodeType!=document.DOCUMENT_NODE)
{owner=in_this;}}
else
{if(typeof(in_this)!='object'&&!(owner=domTT_tooltips.get(in_this)))
{var embryo=document.createElement('div');owner=document.body.appendChild(embryo);owner.style.display='none';owner.id=in_this;}}
if(!owner.id)
{owner.id='__autoId'+domLib_autoId++;}
if(domTT_oneOnly&&domTT_lastOpened)
{domTT_deactivate(domTT_lastOpened);}
domTT_lastOpened=owner.id;var tooltip=domTT_tooltips.get(owner.id);if(tooltip)
{if(tooltip.get('eventType')!=in_event.type)
{if(tooltip.get('type')=='greasy')
{tooltip.set('closeAction','destroy');domTT_deactivate(owner.id);}
else if(tooltip.get('status')!='inactive')
{return owner.id;}}
else
{if(tooltip.get('status')=='inactive')
{tooltip.set('status','pending');tooltip.set('activateTimeout',domLib_setTimeout(domTT_runShow,tooltip.get('delay'),[owner.id,in_event]));return owner.id;}
else
{return owner.id;}}}
var options=new Hash('caption','','content','','clearMouse',true,'closeAction',domTT_closeAction,'closeLink',domTT_closeLink,'delay',domTT_activateDelay,'direction',domTT_direction,'draggable',domTT_draggable,'fade',domTT_fade,'fadeMax',100,'grid',domTT_grid,'id',domTT_tooltipIdPrefix+owner.id,'inframe',false,'lifetime',domTT_lifetime,'offsetX',domTT_offsetX,'offsetY',domTT_offsetY,'parent',document.body,'position','absolute','styleClass',domTT_styleClass,'type','greasy','trail',false,'lazy',false);for(var i=2;i<arguments.length;i+=2)
{if(arguments[i]=='predefined')
{var predefinedOptions=domTT_predefined.get(arguments[i+1]);for(var j in predefinedOptions.elementData)
{options.set(j,predefinedOptions.get(j));}}
else
{options.set(arguments[i],arguments[i+1]);}}
options.set('eventType',in_event!=null?in_event.type:null);if(options.has('statusText'))
{try{window.status=options.get('statusText');}catch(e){}}
if(!options.has('content')||options.get('content')==''||options.get('content')==null)
{if(typeof(owner.onmouseout)!='function')
{owner.onmouseout=function(in_event){domTT_mouseout(this,in_event);};}
return owner.id;}
options.set('owner',owner);domTT_create(options);options.set('delay',(in_event!=null&&in_event.type.match(/click|mousedown|contextmenu/i))?0:parseInt(options.get('delay')));domTT_tooltips.set(owner.id,options);domTT_tooltips.set(options.get('id'),options);options.set('status','pending');options.set('activateTimeout',domLib_setTimeout(domTT_runShow,options.get('delay'),[owner.id,in_event]));return owner.id;}
function domTT_create(in_options)
{var tipOwner=in_options.get('owner');var parentObj=in_options.get('parent');var parentDoc=parentObj.ownerDocument||parentObj.document;var embryo=parentDoc.createElement('div');var tipObj=parentObj.appendChild(embryo);tipObj.style.position='absolute';tipObj.style.left='0px';tipObj.style.top='0px';tipObj.style.visibility='hidden';tipObj.id=in_options.get('id');tipObj.className=in_options.get('styleClass');var contentBlock;var tableLayout=false;if(in_options.get('caption')||(in_options.get('type')=='sticky'&&in_options.get('caption')!==false))
{tableLayout=true;var tipLayoutTable=tipObj.appendChild(parentDoc.createElement('table'));tipLayoutTable.style.borderCollapse='collapse';if(domLib_isKHTML)
{tipLayoutTable.cellSpacing=0;}
var tipLayoutTbody=tipLayoutTable.appendChild(parentDoc.createElement('tbody'));var numCaptionCells=0;var captionRow=tipLayoutTbody.appendChild(parentDoc.createElement('tr'));var captionCell=captionRow.appendChild(parentDoc.createElement('td'));captionCell.style.padding='0px';var caption=captionCell.appendChild(parentDoc.createElement('div'));caption.className='caption';if(domLib_isIE50)
{caption.style.height='100%';}
if(in_options.get('caption').nodeType)
{caption.appendChild(domTT_cloneNodes?in_options.get('caption').cloneNode(1):in_options.get('caption'));}
else
{caption.innerHTML=in_options.get('caption');}
if(in_options.get('type')=='sticky')
{var numCaptionCells=2;var closeLinkCell=captionRow.appendChild(parentDoc.createElement('td'));closeLinkCell.style.padding='0px';var closeLink=closeLinkCell.appendChild(parentDoc.createElement('div'));closeLink.className='caption';if(domLib_isIE50)
{closeLink.style.height='100%';}
closeLink.style.textAlign='right';closeLink.style.cursor=domLib_stylePointer;closeLink.style.borderLeftWidth=caption.style.borderRightWidth='0px';closeLink.style.paddingLeft=caption.style.paddingRight='0px';closeLink.style.marginLeft=caption.style.marginRight='0px';if(in_options.get('closeLink').nodeType)
{closeLink.appendChild(in_options.get('closeLink').cloneNode(1));}
else
{closeLink.innerHTML=in_options.get('closeLink');}
closeLink.onclick=function()
{domTT_deactivate(tipOwner.id);};closeLink.onmousedown=function(in_event)
{if(typeof(in_event)=='undefined'){in_event=window.event;}
in_event.cancelBubble=true;};if(domLib_isMacIE)
{closeLinkCell.appendChild(parentDoc.createTextNode("\n"));}}
if(domLib_isMacIE)
{captionCell.appendChild(parentDoc.createTextNode("\n"));}
var contentRow=tipLayoutTbody.appendChild(parentDoc.createElement('tr'));var contentCell=contentRow.appendChild(parentDoc.createElement('td'));contentCell.style.padding='0px';if(numCaptionCells)
{if(domLib_isIE||domLib_isOpera)
{contentCell.colSpan=numCaptionCells;}
else
{contentCell.setAttribute('colspan',numCaptionCells);}}
contentBlock=contentCell.appendChild(parentDoc.createElement('div'));if(domLib_isIE50)
{contentBlock.style.height='100%';}}
else
{contentBlock=tipObj.appendChild(parentDoc.createElement('div'));}
contentBlock.className='contents';var content=in_options.get('content');if(typeof(content)=='function'){content=content(in_options.get('id'));}
if(content!=null&&content.nodeType)
{contentBlock.appendChild(domTT_cloneNodes?content.cloneNode(1):content);}
else
{contentBlock.innerHTML=content;}
if(in_options.has('width'))
{tipObj.style.width=parseInt(in_options.get('width'))+'px';}
var maxWidth=domTT_maxWidth;if(in_options.has('maxWidth'))
{if((maxWidth=in_options.get('maxWidth'))===false)
{tipObj.style.maxWidth=domLib_styleNoMaxWidth;}
else
{maxWidth=parseInt(in_options.get('maxWidth'));tipObj.style.maxWidth=maxWidth+'px';}}
if(maxWidth!==false&&(domLib_isIE||domLib_isKHTML)&&tipObj.offsetWidth>maxWidth)
{tipObj.style.width=maxWidth+'px';}
in_options.set('offsetWidth',tipObj.offsetWidth);in_options.set('offsetHeight',tipObj.offsetHeight);if(domLib_isKonq&&tableLayout&&!tipObj.style.width)
{var left=document.defaultView.getComputedStyle(tipObj,'').getPropertyValue('border-left-width');var right=document.defaultView.getComputedStyle(tipObj,'').getPropertyValue('border-right-width');left=left.substring(left.indexOf(':')+2,left.indexOf(';'));right=right.substring(right.indexOf(':')+2,right.indexOf(';'));var correction=2*((left?parseInt(left):0)+(right?parseInt(right):0));tipObj.style.width=(tipObj.offsetWidth-correction)+'px';}
if(domLib_isIE||domLib_isOpera)
{if(!tipObj.style.width)
{tipObj.style.width=(tipObj.offsetWidth-2)+'px';}
tipObj.style.height=(tipObj.offsetHeight-2)+'px';}
var offsetX,offsetY;if(in_options.get('position')=='absolute'&&!(in_options.has('x')&&in_options.has('y')))
{switch(in_options.get('direction'))
{case'northeast':offsetX=in_options.get('offsetX');offsetY=0-tipObj.offsetHeight-in_options.get('offsetY');break;case'northwest':offsetX=0-tipObj.offsetWidth-in_options.get('offsetX');offsetY=0-tipObj.offsetHeight-in_options.get('offsetY');break;case'north':offsetX=0-parseInt(tipObj.offsetWidth/2);offsetY=0-tipObj.offsetHeight-in_options.get('offsetY');break;case'southwest':offsetX=0-tipObj.offsetWidth-in_options.get('offsetX');offsetY=in_options.get('offsetY');break;case'southeast':offsetX=in_options.get('offsetX');offsetY=in_options.get('offsetY');break;case'south':offsetX=0-parseInt(tipObj.offsetWidth/2);offsetY=in_options.get('offsetY');break;}
if(in_options.get('inframe'))
{var iframeObj=domLib_getIFrameReference(window);if(iframeObj)
{var frameOffsets=domLib_getOffsets(iframeObj);offsetX+=frameOffsets.get('left');offsetY+=frameOffsets.get('top');}}}
else
{offsetX=0;offsetY=0;in_options.set('trail',false);}
in_options.set('offsetX',offsetX);in_options.set('offsetY',offsetY);if(in_options.get('clearMouse')&&in_options.get('direction').indexOf('south')!=-1)
{in_options.set('mouseOffset',domTT_mouseHeight);}
else
{in_options.set('mouseOffset',0);}
if(domLib_canFade&&typeof(Fadomatic)=='function')
{if(in_options.get('fade')!='neither')
{var fadeHandler=new Fadomatic(tipObj,10,0,0,in_options.get('fadeMax'));in_options.set('fadeHandler',fadeHandler);}}
else
{in_options.set('fade','neither');}
if(in_options.get('trail')&&typeof(tipOwner.onmousemove)!='function')
{tipOwner.onmousemove=function(in_event){domTT_mousemove(this,in_event);};}
if(typeof(tipOwner.onmouseout)!='function')
{tipOwner.onmouseout=function(in_event){domTT_mouseout(this,in_event);};}
if(in_options.get('type')=='sticky')
{if(in_options.get('position')=='absolute'&&domTT_dragEnabled&&in_options.get('draggable'))
{if(domLib_isIE)
{captionRow.onselectstart=function(){return false;};}
captionRow.onmousedown=function(in_event){domTT_dragStart(tipObj,in_event);};captionRow.onmousemove=function(in_event){domTT_dragUpdate(in_event);};captionRow.onmouseup=function(){domTT_dragStop();};}}
else if(in_options.get('type')=='velcro')
{tipObj.onmouseout=function(in_event)
{if(typeof(in_event)=='undefined'){in_event=window.event;}
if(!domLib_isDescendantOf(in_event[domLib_eventTo],tipObj,domTT_bannedTags)){domTT_deactivate(tipOwner.id);}};tipObj.onclick=function(in_event)
{domTT_deactivate(tipOwner.id);};}
if(in_options.get('position')=='relative')
{tipObj.style.position='relative';}
in_options.set('node',tipObj);in_options.set('status','inactive');}
function domTT_show(in_id,in_event)
{var tooltip=domTT_tooltips.get(in_id);var status=tooltip.get('status');var tipObj=tooltip.get('node');if(tooltip.get('position')=='absolute')
{var mouseX,mouseY;if(tooltip.has('x')&&tooltip.has('y'))
{mouseX=tooltip.get('x');mouseY=tooltip.get('y');}
else if(!domTT_useGlobalMousePosition||domTT_mousePosition==null||status=='active'||tooltip.get('delay')==0)
{var eventPosition=domLib_getEventPosition(in_event);var eventX=eventPosition.get('x');var eventY=eventPosition.get('y');if(tooltip.get('inframe'))
{eventX-=eventPosition.get('scrollX');eventY-=eventPosition.get('scrollY');}
if(status=='active'&&tooltip.get('trail')!==true)
{var trail=tooltip.get('trail');if(trail=='x')
{mouseX=eventX;mouseY=tooltip.get('mouseY');}
else if(trail=='y')
{mouseX=tooltip.get('mouseX');mouseY=eventY;}}
else
{mouseX=eventX;mouseY=eventY;}}
else
{mouseX=domTT_mousePosition.get('x');mouseY=domTT_mousePosition.get('y');if(tooltip.get('inframe'))
{mouseX-=domTT_mousePosition.get('scrollX');mouseY-=domTT_mousePosition.get('scrollY');}}
if(tooltip.get('grid'))
{if(in_event.type!='mousemove'||(status=='active'&&(Math.abs(tooltip.get('lastX')-mouseX)>tooltip.get('grid')||Math.abs(tooltip.get('lastY')-mouseY)>tooltip.get('grid'))))
{tooltip.set('lastX',mouseX);tooltip.set('lastY',mouseY);}
else
{return false;}}
tooltip.set('mouseX',mouseX);tooltip.set('mouseY',mouseY);var coordinates;if(domTT_screenEdgeDetection)
{coordinates=domTT_correctEdgeBleed(tooltip.get('offsetWidth'),tooltip.get('offsetHeight'),mouseX,mouseY,tooltip.get('offsetX'),tooltip.get('offsetY'),tooltip.get('mouseOffset'),tooltip.get('inframe')?window.parent:window);}
else
{coordinates={'x':mouseX+tooltip.get('offsetX'),'y':mouseY+tooltip.get('offsetY')+tooltip.get('mouseOffset')};}
tipObj.style.left=coordinates.x+'px';tipObj.style.top=coordinates.y+'px';tipObj.style.zIndex=domLib_zIndex++;}
if(status=='pending')
{tooltip.set('status','active');tipObj.style.display='';tipObj.style.visibility='visible';var fade=tooltip.get('fade');if(fade!='neither')
{var fadeHandler=tooltip.get('fadeHandler');if(fade=='out'||fade=='both')
{fadeHandler.haltFade();if(fade=='out')
{fadeHandler.halt();}}
if(fade=='in'||fade=='both')
{fadeHandler.fadeIn();}}
if(tooltip.get('type')=='greasy'&&tooltip.get('lifetime')!=0)
{tooltip.set('lifetimeTimeout',domLib_setTimeout(domTT_runDeactivate,tooltip.get('lifetime'),[tipObj.id]));}}
if(tooltip.get('position')=='absolute'&&domTT_detectCollisions)
{domLib_detectCollisions(tipObj,false,true);}}
function domTT_close(in_handle)
{var id;if(typeof(in_handle)=='object'&&in_handle.nodeType)
{var obj=in_handle;while(!obj.id||!domTT_tooltips.get(obj.id))
{obj=obj.parentNode;if(obj.nodeType!=document.ELEMENT_NODE){return;}}
id=obj.id;}
else
{id=in_handle;}
domTT_deactivate(id);}
function domTT_closeAll()
{for(var id in domTT_tooltips.elementData){domTT_close(id);}}
function domTT_deactivate(in_id)
{var tooltip=domTT_tooltips.get(in_id);if(tooltip)
{var status=tooltip.get('status');if(status=='pending')
{domLib_clearTimeout(tooltip.get('activateTimeout'));tooltip.set('status','inactive');}
else if(status=='active')
{if(tooltip.get('lifetime'))
{domLib_clearTimeout(tooltip.get('lifetimeTimeout'));}
var tipObj=tooltip.get('node');if(tooltip.get('closeAction')=='hide')
{var fade=tooltip.get('fade');if(fade!='neither')
{var fadeHandler=tooltip.get('fadeHandler');if(fade=='out'||fade=='both')
{fadeHandler.fadeOut();}
else
{fadeHandler.hide();}}
else
{tipObj.style.display='none';}}
else
{tooltip.get('parent').removeChild(tipObj);domTT_tooltips.remove(tooltip.get('owner').id);domTT_tooltips.remove(tooltip.get('id'));}
tooltip.set('status','inactive');if(domTT_detectCollisions){domLib_detectCollisions(tipObj,true,true);}}}
domTT_tooltips=new Hash();}
function domTT_mouseout(in_owner,in_event)
{if(!domLib_useLibrary){return false;}
if(typeof(in_event)=='undefined'){in_event=window.event;}
var toChild=domLib_isDescendantOf(in_event[domLib_eventTo],in_owner,domTT_bannedTags);var tooltip=domTT_tooltips.get(in_owner.id);if(tooltip&&(tooltip.get('type')=='greasy'||tooltip.get('status')!='active'))
{if(!toChild)
{domTT_deactivate(in_owner.id);try{window.status=window.defaultStatus;}catch(e){}}}
else if(!toChild)
{try{window.status=window.defaultStatus;}catch(e){}}}
function domTT_mousemove(in_owner,in_event)
{if(!domLib_useLibrary){return false;}
if(typeof(in_event)=='undefined'){in_event=window.event;}
var tooltip=domTT_tooltips.get(in_owner.id);if(tooltip&&tooltip.get('trail')&&tooltip.get('status')=='active')
{if(tooltip.get('lazy'))
{domLib_setTimeout(domTT_runShow,domTT_trailDelay,[in_owner.id,in_event]);}
else
{domTT_show(in_owner.id,in_event);}}}
function domTT_addPredefined(in_id)
{var options=new Hash();for(var i=1;i<arguments.length;i+=2)
{options.set(arguments[i],arguments[i+1]);}
domTT_predefined.set(in_id,options);}
function domTT_correctEdgeBleed(in_width,in_height,in_x,in_y,in_offsetX,in_offsetY,in_mouseOffset,in_window)
{var win,doc;var bleedRight,bleedBottom;var pageHeight,pageWidth,pageYOffset,pageXOffset;var x=in_x+in_offsetX;var y=in_y+in_offsetY+in_mouseOffset;win=(typeof(in_window)=='undefined'?window:in_window);doc=((domLib_standardsMode&&(domLib_isIE||domLib_isGecko))?win.document.documentElement:win.document.body);if(domLib_isIE)
{pageHeight=doc.clientHeight;pageWidth=doc.clientWidth;pageYOffset=doc.scrollTop;pageXOffset=doc.scrollLeft;}
else
{pageHeight=doc.clientHeight;pageWidth=doc.clientWidth;if(domLib_isKHTML)
{pageHeight=win.innerHeight;}
pageYOffset=win.pageYOffset;pageXOffset=win.pageXOffset;}
if((bleedRight=(x-pageXOffset)+in_width-(pageWidth-domTT_screenEdgePadding))>0)
{x-=bleedRight;}
if((x-pageXOffset)<domTT_screenEdgePadding)
{x=domTT_screenEdgePadding+pageXOffset;}
if((bleedBottom=(y-pageYOffset)+in_height-(pageHeight-domTT_screenEdgePadding))>0)
{y=in_y-in_height-in_offsetY;}
if((y-pageYOffset)<domTT_screenEdgePadding)
{y=in_y+domTT_mouseHeight+in_offsetY;}
return{'x':x,'y':y};}
function domTT_isActive(in_id)
{var tooltip=domTT_tooltips.get(in_id);if(!tooltip||tooltip.get('status')!='active')
{return false;}
else
{return true;}}
function domTT_runDeactivate(args){domTT_deactivate(args[0]);}
function domTT_runShow(args){domTT_show(args[0],args[1]);}
function domTT_replaceTitles(in_decorator)
{var elements=domLib_getElementsByClass('tooltip');for(var i=0;i<elements.length;i++)
{if(elements[i].title)
{var content;if(typeof(in_decorator)=='function')
{content=in_decorator(elements[i]);}
else
{content=elements[i].title;}
content=content.replace(new RegExp('\'','g'),'\\\'');elements[i].onmouseover=new Function('in_event',"domTT_activate(this, in_event, 'content', '"+content+"')");elements[i].title='';}}}
function domTT_update(handle,content,type)
{if(typeof(type)=='undefined')
{type='content';}
var tip=domTT_tooltips.get(handle);if(!tip)
{return;}
var tipObj=tip.get('node');var updateNode;if(type=='content')
{updateNode=tipObj.firstChild;if(updateNode.className!='contents')
{updateNode=updateNode.firstChild.firstChild.nextSibling.firstChild.firstChild;}}
else
{updateNode=tipObj.firstChild;if(updateNode.className=='contents')
{return;}
updateNode=updateNode.firstChild.firstChild.firstChild.firstChild;}
updateNode.innerHTML=content;}
var jg_ok,jg_ie,jg_fast,jg_dom,jg_moz;function _chkDHTM(x,i)
{x=document.body||null;jg_ie=x&&typeof x.insertAdjacentHTML!="undefined"&&document.createElement;jg_dom=(x&&!jg_ie&&typeof x.appendChild!="undefined"&&typeof document.createRange!="undefined"&&typeof(i=document.createRange()).setStartBefore!="undefined"&&typeof i.createContextualFragment!="undefined");jg_fast=jg_ie&&document.all&&!window.opera;jg_moz=jg_dom&&typeof x.style.MozOpacity!="undefined";jg_ok=!!(jg_ie||jg_dom);}
function _pntCnvDom()
{var x=this.wnd.document.createRange();x.setStartBefore(this.cnv);x=x.createContextualFragment(jg_fast?this._htmRpc():this.htm);if(this.cnv)this.cnv.appendChild(x);this.htm="";}
function _pntCnvIe()
{if(this.cnv)this.cnv.insertAdjacentHTML("BeforeEnd",jg_fast?this._htmRpc():this.htm);this.htm="";}
function _pntDoc()
{this.wnd.document.write(jg_fast?this._htmRpc():this.htm);this.htm='';}
function _pntN()
{;}
function _mkDiv(x,y,w,h)
{this.htm+='<div style="position:absolute;'+'left:'+x+'px;'+'top:'+y+'px;'+'width:'+w+'px;'+'height:'+h+'px;'+'clip:rect(0,'+w+'px,'+h+'px,0);'+'background-color:'+this.color+
(!jg_moz?';overflow:hidden':'')+';"><\/div>';}
function _mkDivIe(x,y,w,h)
{this.htm+='%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';}
function _mkDivPrt(x,y,w,h)
{this.htm+='<div style="position:absolute;'+'border-left:'+w+'px solid '+this.color+';'+'left:'+x+'px;'+'top:'+y+'px;'+'width:0px;'+'height:'+h+'px;'+'clip:rect(0,'+w+'px,'+h+'px,0);'+'background-color:'+this.color+
(!jg_moz?';overflow:hidden':'')+';"><\/div>';}
var _regex=/%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;function _htmRpc()
{return this.htm.replace(_regex,'<div style="overflow:hidden;position:absolute;background-color:'+'$1;left:$2;top:$3;width:$4;height:$5"></div>\n');}
function _htmPrtRpc()
{return this.htm.replace(_regex,'<div style="overflow:hidden;position:absolute;background-color:'+'$1;left:$2;top:$3;width:$4;height:$5;border-left:$4px solid $1"></div>\n');}
function _mkLin(x1,y1,x2,y2)
{if(x1>x2)
{var _x2=x2;var _y2=y2;x2=x1;y2=y1;x1=_x2;y1=_y2;}
var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1;if(dx>=dy)
{var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;while(dx>0)
{--dx;++x;if(p>0)
{this._mkDiv(ox,y,x-ox,1);y+=yIncr;p+=pru;ox=x;}
else p+=pr;}
this._mkDiv(ox,y,x2-ox+1,1);}
else
{var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;if(y2<=y1)
{while(dy>0)
{--dy;if(p>0)
{this._mkDiv(x++,y,1,oy-y+1);y+=yIncr;p+=pru;oy=y;}
else
{y+=yIncr;p+=pr;}}
this._mkDiv(x2,y2,1,oy-y2+1);}
else
{while(dy>0)
{--dy;y+=yIncr;if(p>0)
{this._mkDiv(x++,oy,1,y-oy);p+=pru;oy=y;}
else p+=pr;}
this._mkDiv(x2,oy,1,y2-oy+1);}}}
function _mkLin2D(x1,y1,x2,y2)
{if(x1>x2)
{var _x2=x2;var _y2=y2;x2=x1;y2=y1;x1=_x2;y1=_y2;}
var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1;var s=this.stroke;if(dx>=dy)
{if(dx>0&&s-3>0)
{var _s=(s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy)/dx;_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;}
else var _s=s;var ad=Math.ceil(s/2);var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;while(dx>0)
{--dx;++x;if(p>0)
{this._mkDiv(ox,y,x-ox+ad,_s);y+=yIncr;p+=pru;ox=x;}
else p+=pr;}
this._mkDiv(ox,y,x2-ox+ad+1,_s);}
else
{if(s-3>0)
{var _s=(s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy)/dy;_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;}
else var _s=s;var ad=Math.round(s/2);var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;if(y2<=y1)
{++ad;while(dy>0)
{--dy;if(p>0)
{this._mkDiv(x++,y,_s,oy-y+ad);y+=yIncr;p+=pru;oy=y;}
else
{y+=yIncr;p+=pr;}}
this._mkDiv(x2,y2,_s,oy-y2+ad);}
else
{while(dy>0)
{--dy;y+=yIncr;if(p>0)
{this._mkDiv(x++,oy,_s,y-oy+ad);p+=pru;oy=y;}
else p+=pr;}
this._mkDiv(x2,oy,_s,y2-oy+ad+1);}}}
function _mkLinDott(x1,y1,x2,y2)
{if(x1>x2)
{var _x2=x2;var _y2=y2;x2=x1;y2=y1;x1=_x2;y1=_y2;}
var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1,drw=true;if(dx>=dy)
{var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx;while(dx>0)
{--dx;if(drw)this._mkDiv(x,y,1,1);drw=!drw;if(p>0)
{y+=yIncr;p+=pru;}
else p+=pr;++x;}}
else
{var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy;while(dy>0)
{--dy;if(drw)this._mkDiv(x,y,1,1);drw=!drw;y+=yIncr;if(p>0)
{++x;p+=pru;}
else p+=pr;}}
if(drw)this._mkDiv(x,y,1,1);}
function _mkOv(left,top,width,height)
{var a=(++width)>>1,b=(++height)>>1,wod=width&1,hod=height&1,cx=left+a,cy=top+b,x=0,y=b,ox=0,oy=b,aa2=(a*a)<<1,aa4=aa2<<1,bb2=(b*b)<<1,bb4=bb2<<1,st=(aa2>>1)*(1-(b<<1))+bb2,tt=(bb2>>1)-aa2*((b<<1)-1),w,h;while(y>0)
{if(st<0)
{st+=bb2*((x<<1)+3);tt+=bb4*(++x);}
else if(tt<0)
{st+=bb2*((x<<1)+3)-aa4*(y-1);tt+=bb4*(++x)-aa2*(((y--)<<1)-3);w=x-ox;h=oy-y;if((w&2)&&(h&2))
{this._mkOvQds(cx,cy,x-2,y+2,1,1,wod,hod);this._mkOvQds(cx,cy,x-1,y+1,1,1,wod,hod);}
else this._mkOvQds(cx,cy,x-1,oy,w,h,wod,hod);ox=x;oy=y;}
else
{tt-=aa2*((y<<1)-3);st-=aa4*(--y);}}
w=a-ox+1;h=(oy<<1)+hod;y=cy-oy;this._mkDiv(cx-a,y,w,h);this._mkDiv(cx+ox+wod-1,y,w,h);}
function _mkOv2D(left,top,width,height)
{var s=this.stroke;width+=s+1;height+=s+1;var a=width>>1,b=height>>1,wod=width&1,hod=height&1,cx=left+a,cy=top+b,x=0,y=b,aa2=(a*a)<<1,aa4=aa2<<1,bb2=(b*b)<<1,bb4=bb2<<1,st=(aa2>>1)*(1-(b<<1))+bb2,tt=(bb2>>1)-aa2*((b<<1)-1);if(s-4<0&&(!(s-2)||width-51>0&&height-51>0))
{var ox=0,oy=b,w,h,pxw;while(y>0)
{if(st<0)
{st+=bb2*((x<<1)+3);tt+=bb4*(++x);}
else if(tt<0)
{st+=bb2*((x<<1)+3)-aa4*(y-1);tt+=bb4*(++x)-aa2*(((y--)<<1)-3);w=x-ox;h=oy-y;if(w-1)
{pxw=w+1+(s&1);h=s;}
else if(h-1)
{pxw=s;h+=1+(s&1);}
else pxw=h=s;this._mkOvQds(cx,cy,x-1,oy,pxw,h,wod,hod);ox=x;oy=y;}
else
{tt-=aa2*((y<<1)-3);st-=aa4*(--y);}}
this._mkDiv(cx-a,cy-oy,s,(oy<<1)+hod);this._mkDiv(cx+a+wod-s,cy-oy,s,(oy<<1)+hod);}
else
{var _a=(width-(s<<1))>>1,_b=(height-(s<<1))>>1,_x=0,_y=_b,_aa2=(_a*_a)<<1,_aa4=_aa2<<1,_bb2=(_b*_b)<<1,_bb4=_bb2<<1,_st=(_aa2>>1)*(1-(_b<<1))+_bb2,_tt=(_bb2>>1)-_aa2*((_b<<1)-1),pxl=new Array(),pxt=new Array(),_pxb=new Array();pxl[0]=0;pxt[0]=b;_pxb[0]=_b-1;while(y>0)
{if(st<0)
{pxl[pxl.length]=x;pxt[pxt.length]=y;st+=bb2*((x<<1)+3);tt+=bb4*(++x);}
else if(tt<0)
{pxl[pxl.length]=x;st+=bb2*((x<<1)+3)-aa4*(y-1);tt+=bb4*(++x)-aa2*(((y--)<<1)-3);pxt[pxt.length]=y;}
else
{tt-=aa2*((y<<1)-3);st-=aa4*(--y);}
if(_y>0)
{if(_st<0)
{_st+=_bb2*((_x<<1)+3);_tt+=_bb4*(++_x);_pxb[_pxb.length]=_y-1;}
else if(_tt<0)
{_st+=_bb2*((_x<<1)+3)-_aa4*(_y-1);_tt+=_bb4*(++_x)-_aa2*(((_y--)<<1)-3);_pxb[_pxb.length]=_y-1;}
else
{_tt-=_aa2*((_y<<1)-3);_st-=_aa4*(--_y);_pxb[_pxb.length-1]--;}}}
var ox=-wod,oy=b,_oy=_pxb[0],l=pxl.length,w,h;for(var i=0;i<l;i++)
{if(typeof _pxb[i]!="undefined")
{if(_pxb[i]<_oy||pxt[i]<oy)
{x=pxl[i];this._mkOvQds(cx,cy,x,oy,x-ox,oy-_oy,wod,hod);ox=x;oy=pxt[i];_oy=_pxb[i];}}
else
{x=pxl[i];this._mkDiv(cx-x,cy-oy,1,(oy<<1)+hod);this._mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);ox=x;oy=pxt[i];}}
this._mkDiv(cx-a,cy-oy,1,(oy<<1)+hod);this._mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);}}
function _mkOvDott(left,top,width,height)
{var a=(++width)>>1,b=(++height)>>1,wod=width&1,hod=height&1,hodu=hod^1,cx=left+a,cy=top+b,x=0,y=b,aa2=(a*a)<<1,aa4=aa2<<1,bb2=(b*b)<<1,bb4=bb2<<1,st=(aa2>>1)*(1-(b<<1))+bb2,tt=(bb2>>1)-aa2*((b<<1)-1),drw=true;while(y>0)
{if(st<0)
{st+=bb2*((x<<1)+3);tt+=bb4*(++x);}
else if(tt<0)
{st+=bb2*((x<<1)+3)-aa4*(y-1);tt+=bb4*(++x)-aa2*(((y--)<<1)-3);}
else
{tt-=aa2*((y<<1)-3);st-=aa4*(--y);}
if(drw&&y>=hodu)this._mkOvQds(cx,cy,x,y,1,1,wod,hod);drw=!drw;}}
function _mkRect(x,y,w,h)
{var s=this.stroke;this._mkDiv(x,y,w,s);this._mkDiv(x+w,y,s,h);this._mkDiv(x,y+h,w+s,s);this._mkDiv(x,y+s,s,h-s);}
function _mkRectDott(x,y,w,h)
{this.drawLine(x,y,x+w,y);this.drawLine(x+w,y,x+w,y+h);this.drawLine(x,y+h,x+w,y+h);this.drawLine(x,y,x,y+h);}
function jsgFont()
{this.PLAIN='font-weight:normal;';this.BOLD='font-weight:bold;';this.ITALIC='font-style:italic;';this.ITALIC_BOLD=this.ITALIC+this.BOLD;this.BOLD_ITALIC=this.ITALIC_BOLD;}
var Font=new jsgFont();function jsgStroke()
{this.DOTTED=-1;}
var Stroke=new jsgStroke();function jsGraphics(cnv,wnd)
{this.setColor=function(x)
{this.color=x.toLowerCase();};this.setStroke=function(x)
{this.stroke=x;if(!(x+1))
{this.drawLine=_mkLinDott;this._mkOv=_mkOvDott;this.drawRect=_mkRectDott;}
else if(x-1>0)
{this.drawLine=_mkLin2D;this._mkOv=_mkOv2D;this.drawRect=_mkRect;}
else
{this.drawLine=_mkLin;this._mkOv=_mkOv;this.drawRect=_mkRect;}};this.setPrintable=function(arg)
{this.printable=arg;if(jg_fast)
{this._mkDiv=_mkDivIe;this._htmRpc=arg?_htmPrtRpc:_htmRpc;}
else this._mkDiv=arg?_mkDivPrt:_mkDiv;};this.setFont=function(fam,sz,sty)
{this.ftFam=fam;this.ftSz=sz;this.ftSty=sty||Font.PLAIN;};this.drawPolyline=this.drawPolyLine=function(x,y)
{for(var i=x.length-1;i;)
{--i;this.drawLine(x[i],y[i],x[i+1],y[i+1]);}};this.fillRect=function(x,y,w,h)
{this._mkDiv(x,y,w,h);};this.drawPolygon=function(x,y)
{this.drawPolyline(x,y);this.drawLine(x[x.length-1],y[x.length-1],x[0],y[0]);};this.drawEllipse=this.drawOval=function(x,y,w,h)
{this._mkOv(x,y,w,h);};this.fillEllipse=this.fillOval=function(left,top,w,h)
{var a=w>>1,b=h>>1,wod=w&1,hod=h&1,cx=left+a,cy=top+b,x=0,y=b,oy=b,aa2=(a*a)<<1,aa4=aa2<<1,bb2=(b*b)<<1,bb4=bb2<<1,st=(aa2>>1)*(1-(b<<1))+bb2,tt=(bb2>>1)-aa2*((b<<1)-1),xl,dw,dh;if(w)while(y>0)
{if(st<0)
{st+=bb2*((x<<1)+3);tt+=bb4*(++x);}
else if(tt<0)
{st+=bb2*((x<<1)+3)-aa4*(y-1);xl=cx-x;dw=(x<<1)+wod;tt+=bb4*(++x)-aa2*(((y--)<<1)-3);dh=oy-y;this._mkDiv(xl,cy-oy,dw,dh);this._mkDiv(xl,cy+y+hod,dw,dh);oy=y;}
else
{tt-=aa2*((y<<1)-3);st-=aa4*(--y);}}
this._mkDiv(cx-a,cy-oy,w,(oy<<1)+hod);};this.fillArc=function(iL,iT,iW,iH,fAngA,fAngZ)
{var a=iW>>1,b=iH>>1,iOdds=(iW&1)|((iH&1)<<16),cx=iL+a,cy=iT+b,x=0,y=b,ox=x,oy=y,aa2=(a*a)<<1,aa4=aa2<<1,bb2=(b*b)<<1,bb4=bb2<<1,st=(aa2>>1)*(1-(b<<1))+bb2,tt=(bb2>>1)-aa2*((b<<1)-1),xEndA,yEndA,xEndZ,yEndZ,iSects=(1<<(Math.floor((fAngA%=360.0)/180.0)<<3))|(2<<(Math.floor((fAngZ%=360.0)/180.0)<<3))|((fAngA>=fAngZ)<<16),aBndA=new Array(b+1),aBndZ=new Array(b+1);fAngA*=Math.PI/180.0;fAngZ*=Math.PI/180.0;xEndA=cx+Math.round(a*Math.cos(fAngA));yEndA=cy+Math.round(-b*Math.sin(fAngA));_mkLinVirt(aBndA,cx,cy,xEndA,yEndA);xEndZ=cx+Math.round(a*Math.cos(fAngZ));yEndZ=cy+Math.round(-b*Math.sin(fAngZ));_mkLinVirt(aBndZ,cx,cy,xEndZ,yEndZ);while(y>0)
{if(st<0)
{st+=bb2*((x<<1)+3);tt+=bb4*(++x);}
else if(tt<0)
{st+=bb2*((x<<1)+3)-aa4*(y-1);ox=x;tt+=bb4*(++x)-aa2*(((y--)<<1)-3);this._mkArcDiv(ox,y,oy,cx,cy,iOdds,aBndA,aBndZ,iSects);oy=y;}
else
{tt-=aa2*((y<<1)-3);st-=aa4*(--y);if(y&&(aBndA[y]!=aBndA[y-1]||aBndZ[y]!=aBndZ[y-1]))
{this._mkArcDiv(x,y,oy,cx,cy,iOdds,aBndA,aBndZ,iSects);ox=x;oy=y;}}}
this._mkArcDiv(x,0,oy,cx,cy,iOdds,aBndA,aBndZ,iSects);if(iOdds>>16)
{if(iSects>>16)
{var xl=(yEndA<=cy||yEndZ>cy)?(cx-x):cx;this._mkDiv(xl,cy,x+cx-xl+(iOdds&0xffff),1);}
else if((iSects&0x01)&&yEndZ>cy)
this._mkDiv(cx-x,cy,x,1);}};this.fillPolygon=function(array_x,array_y)
{var i;var y;var miny,maxy;var x1,y1;var x2,y2;var ind1,ind2;var ints;var n=array_x.length;if(!n)return;miny=array_y[0];maxy=array_y[0];for(i=1;i<n;i++)
{if(array_y[i]<miny)
miny=array_y[i];if(array_y[i]>maxy)
maxy=array_y[i];}
for(y=miny;y<=maxy;y++)
{var polyInts=new Array();ints=0;for(i=0;i<n;i++)
{if(!i)
{ind1=n-1;ind2=0;}
else
{ind1=i-1;ind2=i;}
y1=array_y[ind1];y2=array_y[ind2];if(y1<y2)
{x1=array_x[ind1];x2=array_x[ind2];}
else if(y1>y2)
{y2=array_y[ind1];y1=array_y[ind2];x2=array_x[ind1];x1=array_x[ind2];}
else continue;if((y>=y1)&&(y<y2))
polyInts[ints++]=Math.round((y-y1)*(x2-x1)/(y2-y1)+x1);else if((y==maxy)&&(y>y1)&&(y<=y2))
polyInts[ints++]=Math.round((y-y1)*(x2-x1)/(y2-y1)+x1);}
polyInts.sort(_CompInt);for(i=0;i<ints;i+=2)
this._mkDiv(polyInts[i],y,polyInts[i+1]-polyInts[i]+1,1);}};this.drawString=function(txt,x,y)
{this.htm+='<div style="position:absolute;white-space:nowrap;'+'left:'+x+'px;'+'top:'+y+'px;'+'font-family:'+this.ftFam+';'+'font-size:'+this.ftSz+';'+'color:'+this.color+';'+this.ftSty+'">'+
txt+'<\/div>';};this.drawStringRect=function(txt,x,y,width,halign)
{this.htm+='<div style="position:absolute;overflow:hidden;'+'left:'+x+'px;'+'top:'+y+'px;'+'width:'+width+'px;'+'text-align:'+halign+';'+'font-family:'+this.ftFam+';'+'font-size:'+this.ftSz+';'+'color:'+this.color+';'+this.ftSty+'">'+
txt+'<\/div>';};this.drawImage=function(imgSrc,x,y,w,h,a)
{this.htm+='<div style="position:absolute;'+'left:'+x+'px;'+'top:'+y+'px;'+
(w?('width:'+w+'px;'):'')+
(h?('height:'+h+'px;'):'')+'">'+'<img src="'+imgSrc+'"'+(w?(' width="'+w+'"'):'')+(h?(' height="'+h+'"'):'')+(a?(' '+a):'')+'>'+'<\/div>';};this.clear=function()
{this.htm="";if(this.cnv)this.cnv.innerHTML="";};this._mkOvQds=function(cx,cy,x,y,w,h,wod,hod)
{var xl=cx-x,xr=cx+x+wod-w,yt=cy-y,yb=cy+y+hod-h;if(xr>xl+w)
{this._mkDiv(xr,yt,w,h);this._mkDiv(xr,yb,w,h);}
else
w=xr-xl+w;this._mkDiv(xl,yt,w,h);this._mkDiv(xl,yb,w,h);};this._mkArcDiv=function(x,y,oy,cx,cy,iOdds,aBndA,aBndZ,iSects)
{var xrDef=cx+x+(iOdds&0xffff),y2,h=oy-y,xl,xr,w;if(!h)h=1;x=cx-x;if(iSects&0xff0000)
{y2=cy-y-h;if(iSects&0x00ff)
{if(iSects&0x02)
{xl=Math.max(x,aBndZ[y]);w=xrDef-xl;if(w>0)this._mkDiv(xl,y2,w,h);}
if(iSects&0x01)
{xr=Math.min(xrDef,aBndA[y]);w=xr-x;if(w>0)this._mkDiv(x,y2,w,h);}}
else
this._mkDiv(x,y2,xrDef-x,h);y2=cy+y+(iOdds>>16);if(iSects&0xff00)
{if(iSects&0x0100)
{xl=Math.max(x,aBndA[y]);w=xrDef-xl;if(w>0)this._mkDiv(xl,y2,w,h);}
if(iSects&0x0200)
{xr=Math.min(xrDef,aBndZ[y]);w=xr-x;if(w>0)this._mkDiv(x,y2,w,h);}}
else
this._mkDiv(x,y2,xrDef-x,h);}
else
{if(iSects&0x00ff)
{if(iSects&0x02)
xl=Math.max(x,aBndZ[y]);else
xl=x;if(iSects&0x01)
xr=Math.min(xrDef,aBndA[y]);else
xr=xrDef;y2=cy-y-h;w=xr-xl;if(w>0)this._mkDiv(xl,y2,w,h);}
if(iSects&0xff00)
{if(iSects&0x0100)
xl=Math.max(x,aBndA[y]);else
xl=x;if(iSects&0x0200)
xr=Math.min(xrDef,aBndZ[y]);else
xr=xrDef;y2=cy+y+(iOdds>>16);w=xr-xl;if(w>0)this._mkDiv(xl,y2,w,h);}}};this.setStroke(1);this.setFont("verdana,geneva,helvetica,sans-serif","12px",Font.PLAIN);this.color="#000000";this.htm="";this.wnd=wnd||window;if(!jg_ok)_chkDHTM();if(jg_ok)
{if(cnv)
{if(typeof(cnv)=="string")
this.cont=document.all?(this.wnd.document.all[cnv]||null):document.getElementById?(this.wnd.document.getElementById(cnv)||null):null;else if(cnv==window.document)
this.cont=document.getElementsByTagName("body")[0];else this.cont=cnv;this.cnv=this.wnd.document.createElement("div");this.cnv.style.fontSize=0;this.cont.appendChild(this.cnv);this.paint=jg_dom?_pntCnvDom:_pntCnvIe;}
else
this.paint=_pntDoc;}
else
this.paint=_pntN;this.setPrintable(false);}
function _mkLinVirt(aLin,x1,y1,x2,y2)
{var dx=Math.abs(x2-x1),dy=Math.abs(y2-y1),x=x1,y=y1,xIncr=(x1>x2)?-1:1,yIncr=(y1>y2)?-1:1,p,i=0;if(dx>=dy)
{var pr=dy<<1,pru=pr-(dx<<1);p=pr-dx;while(dx>0)
{--dx;if(p>0)
{aLin[i++]=x;y+=yIncr;p+=pru;}
else p+=pr;x+=xIncr;}}
else
{var pr=dx<<1,pru=pr-(dy<<1);p=pr-dy;while(dy>0)
{--dy;y+=yIncr;aLin[i++]=x;if(p>0)
{x+=xIncr;p+=pru;}
else p+=pr;}}
for(var len=aLin.length,i=len-i;i;)
aLin[len-(i--)]=x;};function _CompInt(x,y)
{return(x-y);}
function createGoogleMap(mapId,center,zoomLevel){var map=new GMap2($('#'+mapId).get(0));map.clearOverlays();map.addControl(new GLargeMapControl3D());map.addControl(new GMapTypeControl());map.addControl(new GScaleControl());map.enableScrollWheelZoom();map.setCenter(center,zoomLevel);return map;}
function createMarker(map,position,draggable){if(draggable){markerOptions={draggable:true};}else{markerOptions={draggable:false};}
var marker=new GMarker(position,markerOptions);map.addOverlay(marker);return marker;}
function createDirectionDetails(map,directionId){var gdir=new GDirections(map,$('#'+directionId).get(0));GEvent.addListener(gdir,"error",handleGdirErrors);return gdir;}
function createStreetOverlay(map){map.addOverlay(new GStreetviewOverlay());}
function createStreetView(streetViewId,position){var streetview=new GStreetviewPanorama($('#'+streetViewId).get(0));$('#'+streetViewId).html('');streetview.setLocationAndPOV(position,{yaw:80.5});GEvent.addListener(streetview,"error",handleFlashError);clearError();return streetview;}
function createStreetViewClient(myPano,position){var panoClient=new GStreetviewClient();panoClient.getNearestPanorama(position,processReturnedDataToAddress);GEvent.addListener(myPano,"initialized",function(panoData){panoClient=new GStreetviewClient();panoClient.getNearestPanorama(panoData.latlng,processReturnedDataToAddress);});}
function processReturnedDataToAddress(panoData){if(panoData.code!=200){var htmlDescription='showPanoData: Server rejected with code: '+panoData.code;$('#googleAddressPanel').html(htmlDescription);return;}
var locationPoint=panoData.location.latlng;var geocoder=new GClientGeocoder();geocoder.getLocations(locationPoint,displayAddressDetailsOnStreetView);}
function displayAddressDetailsOnStreetView(response){if(!$.browser.msie&&!$.browser.mozilla){$('object').children().each(function(){if(this.name=='wmode'){this.value='transparent';}});}
var place=response.Placemark[0];var htmlDescription="<b>"+place.address+"</b><br />";$('#pano').mousedown(function(){$('#googleAddressPanel').html(htmlDescription);});$('#pano').mouseup(function(){$('#googleAddressPanel').html(htmlDescription);});$('#pano').mouseover(function(){$('#googleAddressPanel').html(htmlDescription);$('#googleAddressPanel').show();});$('#pano').mouseout(function(){$('#googleAddressPanel').mouseover(function(){$('#googleAddressPanel').html(htmlDescription);$('#googleAddressPanel').show();});$('#googleAddressPanel').hide();});}
function isInvalidLatLng(lat,lng){return(isNaN(lat)||isNaN(lng)||lat==0||lng==0||lat==30.14513||lng==-23.20313);}
function setDirectionsViaPoints(gdir,srcLatLng,desLatLng){gdir.loadFromWaypoints([srcLatLng,desLatLng],{getPolyline:true,getSteps:true});}
function setDirectionsViaAddress(gdir,srcAddr,desAddr){gdir.load("from: "+srcAddr+" to: "+desAddr,{getPolyline:true,getSteps:true})}
function displayGoogleErrorMsg(errorPanelId,msg){$('#'+errorPanelId).html(msg);}
function handleFlashError(errorCode){if(errorCode==603){displayGoogleErrorMsg('googleError','Error: To view google maps please install Flash plug-in.');}
if(errorCode==600){}
$('#streetViewButton').disable();$('#streetViewButton').addClass('disabledBtn');if(Ext.getCmp('streetViewButton')!=null){disableExtButton('streetViewButton');}
return;}
function handleGdirErrors(){disableExtButton('printDirectionButton');if(gdir.getStatus().code==G_GEO_UNKNOWN_ADDRESS)
$('#directionDetails').html("<br /><p>No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.</p>");else if(gdir.getStatus().code==G_GEO_SERVER_ERROR)
$('#directionDetails').html("<br /><p>A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.</p>");else if(gdir.getStatus().code==G_GEO_MISSING_QUERY)
$('#directionDetails').html("<br /><p>The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.</p>");else if(gdir.getStatus().code==G_GEO_BAD_KEY)
$('#directionDetails').html("<br /><p>The given key is either invalid or does not match the domain for which it was given.</p>");else if(gdir.getStatus().code==G_GEO_BAD_REQUEST)
$('#directionDetails').html("<br /><p>A directions request could not be successfully parsed.</p>");else
$('#directionDetails').html("<br /><p>An unknown error occurred.</p>");}
function clearError(){$('#googleError').html('');$('#streetViewButton').enable();$('#streetViewButton').removeClass('disabledBtn');$('#googleMapButton').enable();$('#googleMapButton').removeClass('disabledBtn');if(!Ext.isEmpty(Ext.getCmp('streetViewButton'))){enableExtButton('streetViewButton');}
if(!Ext.isEmpty(Ext.getCmp('googleMapButton'))){enableExtButton('googleMapButton');}}
function switchOnGoogleMap(mapId,streetViewId){$('#'+streetViewId).hide();$('#'+mapId).show();}
function switchOnStreetView(mapId,streetViewId){$('#'+mapId).hide();$('#'+streetViewId).show();}
