/*
 * libura V2.0R1.0
 * http://www.desknets.com/
 * Copyright (C)2010 NEOJAPAN,Inc. All Rights Reserved.
 * 本製品は日本国著作権法および国際条約により保護されています。 
 * 本製品の全部または一部を無断で複製したり、無断で複製物を頒 
 * 布すると著作権の侵害となりますのでご注意ください。 
 */
(function(){if(!neo.core.readyNamespace("neo.vdoc")){return}neo.vdoc={CGI_MAIN:"vdoc",CGI_CONFIG:"vdocconfig",CGI_AJAX:"vdocrjsif",CMD_VIEWER:"viewer",CLS_DATE_REPLACED:"date-replaced",CLS_DATE_REPLACED_SERVER:"date-replaced-server",CLS_DATE_REPLACED_GENERATED:"date-replaced-generated",CLS_DATE_REPLACED_WITHYEAR:"date-replaced-with-year",CLS_DATE_REPLACED_WITHOUTYEAR:"date-replaced-without-year",CLS_MENU_CURRENT:"menu-item-current",SPARE_SHOW_CONMARK:1,dialogOptions:null,_url:"",_filename:"",_extension:"",_numHttpRequest:0,_tmShowConMark:null,numOfDialogs:0,oldAjax:{},_initSizeConMark:function(){var e=this._getElConMark();var d={width:e.outerWidth(),height:e.outerHeight()};return this._sizeConMark=d},_getSizeConMark:function(){return this._sizeConMark||this._initSizeConMark()},_sizeConMark:null,_initElConMark:function(){return this._elConMark=$("#neo-ajax-con-mark")},_getElConMark:function(){return this._elConMark||this._initElConMark()},_elConMark:null,initialize:function(){neo.vdoc.dialogOptions={};if(neo.core.exists(neo,"Ajax")){var e=neo.Ajax.moveDespiteConnecting._getDialogOptions;neo.Ajax.moveDespiteConnecting._getDialogOptions=function(){var f=e.apply(this,arguments);f.draggable=true;return f};if($.browser.msie&&$.browser.version<=6){var d=neo.Ajax.prototype._showConMark;neo.Ajax.prototype._showConMark=function(){neo.vdoc.moveConMark();return d.apply(this,arguments)}}this.oldAjax.beforeAjaxSend=neo.Ajax.prototype.beforeAjaxSend;neo.Ajax.prototype.beforeAjaxSend=this.beforeAjaxSend;if(neo.core.exists(neo,"vdoc.dialog")){neo.Ajax.moveDespiteConnecting.initElDlgConfirmMove=this.initElDlgAjaxConfirmMove}}$(document).ready(neo.vdoc._onLoadContent)},beforeAjaxSend:function(d,h){var g=neo.core.splitParam(d.data);if(d.type=="POST"&&((!g.cmd||g.cmd=="")&&(!g.pg||g.pg==""))){var f=neo.vdoc.getPageName(d.url);g.cmd=f;var e=neo.core.joinParam(g);d.data=e}return neo.vdoc.oldAjax.beforeAjaxSend.apply(this,arguments)},initElDlgAjaxConfirmMove:function(){var g=neo.Ajax.moveDespiteConnecting;var f=this._getElDialogContent();var e=this._getDialogOptions();e.buttons={};e.buttons[neo.Ajax.ajaxMessages.OK]=g.onOk;e.buttons[neo.Ajax.ajaxMessages.cancel]=g.onCancel;var h=e.dialogClass||"";h+=" "+neo.vdoc.dialog.CLS_DLG_TEXT;e.dialogClass=h;var d=neo.vdoc.dialog.build(f,e);return this.elDlgConfirmMove=d},initElDlgConfirmMove:function(){var d=this._getElDialogContent();var e=this._getDialogOptions();e.draggable=true;var g=e.dialogClass||"";g+=" "+neo.vdoc.dialog.CLS_DLG_TEXT;e.dialogClass=g;var f=neo.Ajax.ajaxMessages.cancel;var h=e.buttons[f];delete e.buttons[f];e.buttons[f]=h;return this.elDlgConfirmMove=neo.vdoc.dialog.build(d,e)},onStartRequest:function(){neo.vdoc._numHttpRequest=neo.vdoc._numHttpRequest+1;$(".now-loading").css("visibility","visible");if($.browser.msie||$.browser.mozilla){window.onbeforeunload=function(){return neo.vdoc.Resource.beforeUnloadMessage}}},onEndRequest:function(){neo.vdoc._numHttpRequest=neo.vdoc._numHttpRequest-1;if(neo.vdoc._numHttpRequest<=0){$(".now-loading").css("visibility","hidden");if($.browser.msie||$.browser.mozilla){window.onbeforeunload=null}}},_onLoadContent:function(){neo.vdoc.initSelLang();neo.vdoc.wordBreak();neo.vdoc.initDates();neo.vdoc.initBtnCheckAll();if($.browser.msie&&$.browser.version<=6){neo.vdoc.setBtnHover($("img.btn"),"btn")}neo.vdoc.saveCgi();if(neo.core.exists(neo,"Ajax")&&$.browser.msie&&$.browser.version<=6){$(window).bind("scroll",function(d){neo.vdoc.moveConMark()})}},initSelLang:function(){var d=$("#footerlang a");var e=function(g){g.preventDefault();var f=$(this);var h=f.attr("lang");neo.vdoc.setCookie("lang",h);location.reload()};d.click(e)},wordBreak:function(e){var f="word-break";var d="word-breaked";if(typeof jQuery.fn.wb!="function"){return}if(!e){e=$()}e.find("."+f+":not(."+d+")").addClass(d).wb()},initDates:function(d){var e=$("span."+neo.vdoc.CLS_DATE_REPLACED,d);for(var f=0;f<e.length;f++){var g=e.eq(f);this._initOneDate(g)}},_initOneDate:function(d){if(d.hasClass(neo.vdoc.CLS_DATE_REPLACED_GENERATED)){return}var f=d.text();var q=f.length;var k;switch(q){case 4:k="y";break;case 6:k="ym";break;case 8:k="ymd";break;case 10:k="ymdh";break;case 12:k="ymdhm";break;case 14:k="ymdhms";break;default:break}var r="";var l=f.slice(0,4);if(d.hasClass(neo.vdoc.CLS_DATE_REPLACED_WITHYEAR)){}else{if(d.hasClass(neo.vdoc.CLS_DATE_REPLACED_WITHOUTYEAR)){r="_withoutYear"}else{if(f.substr(0,4)==(new Date()).getFullYear()){r="_withoutYear"}}}var p=neo.vdoc.Resource["dateFormat_"+k+r];if(!p||p==""){throw new Error("neo.vdoc._initOneDate : invalid format.")}var h=f.slice(4,6)||"01";var m=f.slice(6,8)||"01";var n=f.slice(8,10)||"00";var e=f.slice(10,12)||"00";var o=f.slice(12,14)||"00";var g=l+"/"+h+"/"+m+" "+n+":"+e+":"+o;var s=new Date(g);if(isNaN(s.getTime())){throw new Error("neo.vdoc._initOneDate : invalid format.")}s.setTime(s.getTime()-s.getTimezoneOffset()*60*1000);var j={month:neo.vdoc.Resource.dateMonthNames.split(","),day:neo.vdoc.Resource.dateDayNames.split(",")};var i=neo.core.buildDateByFormat(s,p,j);d.text(i);d.addClass(neo.vdoc.CLS_DATE_REPLACED_GENERATED);d.show()},initBtnCheckAll:function(d){if(typeof CheckBoxChecked=="function"){var e=$("img.btn-chkall",d);e.click(CheckBoxChecked)}},setupMenuLinkTooltip:function(d){var e=d.parent().width();d.each(function(h,f){var g=$(f);var j=g.outerWidth();if(j>e){g.attr("title",g.text())}else{g.removeAttr("title")}})},moveConMark:function(){var d=this;var f=function(){if(!neo.Ajax.isConnecting()){return}var g=d._getSizeConMark();var i=document.documentElement.scrollTop+document.documentElement.clientHeight-g.height;var h=document.documentElement.scrollLeft+document.documentElement.clientWidth-g.width;var j=d._getElConMark();j.css({top:i,left:h}).fadeIn();d._tmShowConMark=null};if(this._tmShowConMark){clearTimeout(this._tmShowConMark)}else{var e=this._getElConMark();e.hide()}this._tmShowConMark=setTimeout(f,neo.vdoc.SPARE_SHOW_CONMARK)},setBtnHover:function(e,d){if(!e){throw new Error("neo.vdoc.setBtnHover() : elements is not available.")}if(!d||d==""){throw new Error("neo.vdoc.setBtnHover() : className is not available.")}e.mouseover(function(){$(this).addClass(d+"-hover")}).mouseout(function(){$(this).removeClass(d+"-hover")})},saveCgi:function(){var f=location.href;var e=f.indexOf("?");if(e>0){f=f.substr(0,e)}var d=f.match(/^(.*\/).*\.([^\/]*)$/);if(d){neo.vdoc._url=d[1];neo.vdoc._extension=d[2]}else{d=f.match(/^https?:\/\/[^\/]+/);neo.vdoc._url=d[0]+neo.vdoc.setting.BASE_PATH}},getUrl:function(e,i,k){if(!k){k=neo.vdoc._url}if(k.charAt(k.length-1)!="/"){k+="/"}if(neo.vdoc._extension){if(typeof(e)!="string"){e=$("form").attr("action");var j=e.indexOf("?");if(j>0){e=e.substring(0,j)}else{var j=e.indexOf("#");if(j>0){e=e.substring(0,j)}}var j=e.lastIndexOf("/");if(j>=0){e=e.substring(j+1,e.length)}}else{if(neo.vdoc._extension){e=e+"."+neo.vdoc._extension}}if(i&&typeof i!="string"){var l=neo.core.joinParam(i);e+="?"+l}else{e+="?pg="+i}}else{if(!i){i={}}if(typeof i=="string"){i={cmd:i}}var f="";if(e!=neo.vdoc.CGI_MAIN){f+=e.substr(4)+"/"}var h=i.cmd;delete i.cmd;if(!h){h=i.pg;delete i.pg}if(h){f+=h+"/"}if(e==neo.vdoc.CGI_MAIN&&h==neo.vdoc.CMD_VIEWER){var g=i.sv_ID;delete i.sv_ID;f+=g+"/"}for(var d in i){f+="?"+neo.core.joinParam(i);break}e=f}return k+e},getCmd:function(d){if(neo.vdoc._extension){return d}else{return undefined}},getPageName:function(e){if(!e){e=location.href}var h=neo.core.splitParam(e);var j=h.pg||h.cmd;if(!j){var i=neo.vdoc.setting.BASE_PATH;var g="";var d=e.match(/(?:(?:\/\/[^\/]*)|^)(\/[^\?#]*)/);if(d){var f=d[1];if(f.indexOf(i)==0){g=f.slice(i.length)}}if(g.match(/^viewer\/([0-9A-Za-z]+)\/?$/)){j="viewer"}else{if(g.match(/^([0-9A-Za-z]+)\/?$/)){j=RegExp.$1}else{if(g.match(/^([0-9A-Za-z]+)\/([0-9A-Za-z]+)\/?$/)){j=RegExp.$2}}}}return j},getPageNameOtrModule:function(){var d=neo.core.splitParam(location.href);var e=d.pg;if(!e){e=location.href.match(/\/\/[^\/]*\/[^\/]*\/([^\/]*)/)[1]}return e},getLang:function(){return(typeof lang=="string"?lang:"ja")},_theme:null,getTheme:function(){if(this._theme){return this._theme}var e=$(".btn-seltheme");var d=null;e.each(function(g,j){var h=j.className;var f=h.match(/btn-seltheme-(\w+)-on/);if(f){d=f[1];return false}});return this._theme=d},confirm:function(i,e){var d=function(){};var k=function(){};var h={};h[neo.vdoc.Resource.OKButtonLabel]=function(){d();$(this).dialog("destroy");neo.vdoc.endDisplayLayer()};h[neo.vdoc.Resource.CancelButtonLabel]=function(){k();$(this).dialog("destroy");neo.vdoc.endDisplayLayer()};var f={title:neo.vdoc.Resource.confirmDefaultTitle,draggable:false,resizable:false,modal:true,dialogClass:"dialog-confirm",open:neo.vdoc.onOpenDialog,close:h[neo.vdoc.Resource.CancelButtonLabel],buttons:h};$.extend(f,neo.vdoc.dialogOptions);if(!!e&&typeof(e)=="object"){$.extend(f,e)}var g=document.createElement("DIV");document.body.appendChild(g);var j=$(g);j.addClass("confirm-message");j.text(i);if($.isFunction(f.ok)){d=f.ok;delete f.ok}if($.isFunction(f.cancel)){k=f.cancel;delete f.cancel}return $(g).dialog(f)},displayError:function(h,d){if(!d||typeof(d)!="object"){d={}}if(d.errorNo){h=h+"["+d.errorNo+"]";delete d.errorNo}h="<DIV>"+h+"</DIV>";this.callbackOnDisplayErrorOpen=d.open;delete d.open;this.callbackOnDisplayErrorClose=d.close;delete d.close;var g=neo.vdoc._getErrorDialog();if(!g){var f={title:neo.vdoc.Resource.warnDefaultTitle,dialogClass:"dialog-error dialog-error-warn",modal:true,open:neo.vdoc.onOpenDialog,close:neo.vdoc.onCloseDialog,buttons:{OK:function(){$(this).dialog("close")}}};$.extend(f,neo.vdoc.dialogOptions,d);if(f.errorLevel){if(f.errorLevel=="error"){f.title=neo.vdoc.Resource.errorDefaultTitle;f.dialogClass="dialog-error dialog-error-error"}delete f.errorLevel}var e=$("<div></div>").appendTo($(document.body));e.append("<div class='error-messages'></div>");if(f.height){e.find(".error-messages").css("height",(f.height-80)+"px")}if(neo.core.exists(neo,"vdoc.dialog")&&neo.vdoc.dialog.isSkinEnabled()){var i=neo.vdoc.dialog.CLS_DLG_TEXT;f.dialogClass=(f.dialogClass||"")+" "+i;g=neo.vdoc.dialog.build(e,f)}else{g=e.dialog(f)}g.dialog("open")}else{g.find(".ui-dialog-content").dialog("open")}g.find(".error-messages").append(h)},startDisplayLayer:function(){neo.vdoc.hideElConflicts()},endDisplayLayer:function(){neo.vdoc.showElConflicts()},onOpenDialog:function(d,e){neo.vdoc.hideElConflicts();var f=$(this).parents(".ui-dialog").slice(0,1);var g=f.find(".ui-dialog-buttonpane").children().get(0);if(g&&g.focus){g.focus()}if(typeof neo.vdoc.callbackOnDisplayErrorOpen=="function"){neo.vdoc.callbackOnDisplayErrorOpen.apply(this,arguments)}},onCloseDialog:function(d,e){$(this).dialog("destroy");neo.vdoc.showElConflicts();if(typeof neo.vdoc.callbackOnDisplayErrorClose=="function"){neo.vdoc.callbackOnDisplayErrorClose.apply(this,arguments)}$(this).remove()},onError:function(d,f){params={errorNo:d,errorLevel:"error"};var h="";try{h=f.match(/^w\:/i)}catch(g){}if(h){params.errorLevel="warn"}f=f.replace(/^.?\:/,"");neo.vdoc.displayError(f,params)},_onCommandSuccess:function(e,d,g){if(!!g&&$.isFunction(g)){g(e,d)}var f=$(e).find("servertime").text();if(typeof(f)=="string"&&!!f){neo.vdoc._setDate($.trim(f));neo.vdoc.updateDate()}},_getErrorDialog:function(){var d=$(".dialog-error");if(d.length>0&&d.find(".error-messages").length>0){return d}return null},getErrorMsg:function(e){var d=e.find(".err-msg");if(d.length>0){var f=$.trim(d.text());return f}else{return null}},beforeShowError:function(g,d,f,e){var i={};if(f.indexOf("W:")==0||f.indexOf("E:")==0){var h=f.charAt(0);f=f.substr(2,f.length);if(h!="W"){i.errorLevel="error"}else{i.errorLevel="warning"}}else{i.errorLevel="error"}var i=$.extend({},i,e);neo.vdoc.displayError(f,i);return false},getDateTimeText:function(){var d=new Date();var e=this.getDateText()+neo.core.getZeroFilled(d.getHours(),2)+neo.core.getZeroFilled(d.getMinutes(),2);return e},getDateText:function(){var d=new Date();var e=""+d.getFullYear()+neo.core.getZeroFilled(d.getMonth()+1,2)+neo.core.getZeroFilled(d.getDate(),2);return e},getTimezone:function(){if(this.browserTimezone!=null){return this.browserTimezone}var g;var e=new Date();var f=e.getTimezoneOffset();if(f<0){g="+";f*=-1}else{g="-"}var d=parseInt(f/60);g+=neo.core.getZeroFilled(d,2);var h=parseInt(f%60);g+=neo.core.getZeroFilled(h,2);this.browserTimezone=g;return g},showElConflicts:function(){this.numOfDialogs--;if(!this.hasShowingDialogs()){var d=this.getElConflicts();d.css({visibility:"visible"})}},hideElConflicts:function(e){if(!this.hasShowingDialogs()){var f=this.getElConflicts();f.css({visibility:"hidden"});if(e){var d=this.getElConflicts(e);d.css({visibility:""})}}this.numOfDialogs++},hasShowingDialogs:function(){if(this.numOfDialogs>0){return true}else{return false}},getElConflicts:function(e){var f=$("empty");var d;d=$("applet, embed, object",e);f=f.add(d);if($.browser.msie){d=$("iframe",e);f=f.add(d);if($.browser.version<7){d=$("select",e);f=f.add(d)}}return f},getCookie:function(d){return neo.core.getCookie(d)},setCookie:function(e,f,d){if(!d){d={}}d=$.extend({domain:DOMAIN,path:neo.vdoc.setting.BASE_PATH},d);return neo.core.setCookie(e,f,d)},preloadImages:function(e){if(!e){return}var f=neo.vdoc.getLang();var d=neo.vdoc.getTheme();e=$.map(e,function(g){if(!g){return null}g=g.replace(/\$lang\$/g,f).replace(/\$theme\$/g,d);return g});neo.core.preloadImages(e)}};neo.vdoc.dialog={CLS_DIALOG:"vdoc-dialog",CLS_DLG_NOBUTTONS:"dlg-nobuttons",CLS_DLG_TEXT:"dlg-text",defaultOptions:{autoOpen:false,buttons:{},draggable:true,height:"auto",minHeight:0,modal:true,resizable:false,open:function(){neo.vdoc.hideElConflicts($(this))},close:function(){neo.vdoc.showElConflicts()}},_flgSkinEnabled:null,isSkinEnabled:function(){if(this._flgSkinEnabled==null){this._flgSkinEnabled=true;if(!neo.core.exists(neo,"vdoc.dialog")){this._flgSkinEnabled=false}else{var d=this._getElOuter();if(d.length<1){this._flgSkinEnabled=false}}}return this._flgSkinEnabled},_getElOuter:function(){return this._elOuter||this._initElOuter()},_initElOuter:function(){return this._elOuter=$("#dlg-outer-prototype")},_elOuter:null,initialize:function(){var d={};d[neo.vdoc.Resource.close]=function(){$(this).dialog("close")};this.defaultOptions.buttons=d},build:function(g,f){var e=this._createElOuter();var i=e.find("div.dlg-contentcontainer");i.append(g);f=$.extend({},this.defaultOptions,f);var h=0;for(var k in f.buttons){h++}if(h>0){var j=f.dialogClass||"";j+=" dlg-hasbuttons";f.dialogClass=j}f.dialogClass+=" "+neo.vdoc.dialog.CLS_DIALOG;if(!isNaN(f.height)){var d=parseInt(f.height);delete f.height;e.find("div.dlg-contentcontainer").height(d)}e.dialog(f);g.find("table.dlg-outer").width(g.width());return e},_createElOuter:function(){var d=this._getElOuter();var e=d.clone().attr("id",null);return e}};neo.core.readyNamespace("neo.jQuery.fn.neoDialog");var b=neo.jQuery.fn.neoDialog;var c=neo.jQuery.fn.vdocDialog=new neo.core.Class({superClass:b,classProperties:{CLS_HAS_BUTTONS:"dlg-hasbuttons",DIALOG_BORDER_LEFT:8,DIALOG_BORDER_RIGHT:8,DIALOG_PADDING_LEFT:10,DIALOG_PADDING_RIGHT:10,defaults:{dialogClass:null},initialize:function(){c.defaults.dialogClass=neo.vdoc.dialog.CLS_DLG_TEXT}},properties:{__constructor:function(h,d,g,f){if(!d){d={}}if(!d.elSkin){var e=this._getElVdocSkin();d.elSkin=e}this.__call("__constructor",[h,d,g,f])},_getElVdocSkin:function(){var d=$("#dlg-outer-prototype").clone().removeAttr("id");return d},_initOptions:function(e){var d=this.__call("_initOptions",arguments);this._initOptionBeforeShowError();return d},_getCompositedOptions:function(e){var d=$.extend({},c.defaults,e);return this.__call("_getCompositedOptions",[d])},_initOptionWidth:function(){var e=this.options.width;var d=this.__call("_initOptionWidth",arguments);if(e=="auto"){this.options.width+=c.DIALOG_BORDER_LEFT+c.DIALOG_BORDER_RIGHT;var g=" "+this.options.dialogClass+" ";var f=" "+neo.vdoc.dialog.CLS_DLG_TEXT+" ";if(g.match(f)){this.options.width+=c.DIALOG_PADDING_LEFT+c.DIALOG_PADDING_RIGHT}}return d},_initButtons:function(){if(this.options.buttons=="auto"){this.options.buttons={};if(this.options.buttonType=="info"){var d=this.__closure(this.close);this.options.buttons[neo.vdoc.Resource.OK]=d}if(this.options.buttonType=="submit"){var d=this.__closure(this.submit);this.options.buttons[neo.vdoc.Resource.OK]=d;d=this.__closure(this.cancel);this.options.buttons[neo.vdoc.Resource.cancel]=d}}else{this._bindButtonActions(this.options.buttons)}if(this.options.buttons){if(!this.options.dialogClass){this.options.dialogClass=""}this.options.dialogClass+=" "+c.CLS_HAS_BUTTONS}this.options.dialogClass+=" "+neo.vdoc.dialog.CLS_DIALOG;return},_initOptionBeforeShowError:function(){if(!this.options.beforeShowErrorLoad){this.options.beforeShowErrorLoad=this.__closure(this.beforeShowErrorLoad)}if(!this.options.beforeShowErrorSubmit){this.options.beforeShowErrorSubmit=this.__closure(this.beforeShowErrorSubmit)}},_hideHindrances:function(){neo.vdoc.hideElConflicts(this._getElDialog())},_showHindrances:function(){neo.vdoc.showElConflicts()},_getSubmitTo:function(){if(this.options.submitTo&&this.options.submitTo!=""){return this.options.submitTo}var f=this._getElDialog();var e=f.find('[name^="cmd__"]');var g=e.val();var d=neo.vdoc.getUrl(neo.vdoc.CGI_AJAX,g);return d},_getInputValues:function(){var f=this.__call("_getInputValues",arguments);for(var e in f){var d=e.indexOf("__");if(d>=0){var g=f[e];delete f[e];f[e.slice(0,d)]=g}}f.cmd=neo.vdoc.getCmd(f.cmd);return f},isError:function(e){var d=e.indexOf("<!--+OK-->");if(d!=0){return true}else{return false}},showError:function(g){var f;try{var d=g.match(/<body[^>]*>([\s\S]*)<\/body>/i)[1];elResponse=$(d)}catch(h){f=$("empty")}elResponse=$(d);var f=elResponse.filter(".msg-error-info");if(f.length<1){f=elResponse.find(".msg-error-info")}var i=f.text();this.close();neo.vdoc.displayError(i);return},onsuccessLoad:function(d){if(this.isError(d)){this.showError(d);return}this.__call("onsuccessLoad",arguments)},beforeShowErrorLoad:function(g,d,f,e){this.close();return neo.vdoc.beforeShowError(g,d,f,e)},beforeShowErrorSubmit:function(h,d,g,f){var e=this;if(!f){f={}}f.close=function(){setTimeout(function(){e._callSuper("open")},1)};return neo.vdoc.beforeShowError(h,d,g,f)}}});$.fn.vdocDialog=function(e,g,f){var d=this;this.each(function(){var j=$(this);var i=c.showcase.getInstance(j);if(i){var h=i.call(e,g,f);if(h!==undefined){d=h;return false}}else{i=new c(j,e);i.initialize()}});return d};neo.vdoc.selTheme={CGI_SET_THEME:"vdocrjsif",CMD_SET_THEME:"rjsifcolorchg",FIELD_THEME:"vdoctheme",val:null,_initElBtnSelThemes:function(){var d=$("img.btn-seltheme");d.click(neo.vdoc.selTheme.onClick);if($.browser.msie&&$.browser.version<=6){d.mouseover(neo.vdoc.selTheme.onMouseOver).mouseout(neo.vdoc.selTheme.onMouseOut)}},initialize:function(){this._initElBtnSelThemes()},getTheme:function(f){var e=f.attr("class");var d=e.match(/(?:^|\s)btn-seltheme-([a-zA-Z0-9]+)(?:\s|$)/);var g;if(d){g=d[1]}else{g=null}return g},onMouseOver:function(e){var d=$(this);var f=neo.vdoc.selTheme.getTheme(d);d.addClass("btn-seltheme-"+f+"-on")},onMouseOut:function(e){var d=$(this);var f=neo.vdoc.selTheme.getTheme(d);d.removeClass("btn-seltheme-"+f+"-on")},onClick:function(e){var d=$(this);var g=neo.vdoc.selTheme.getTheme(d);var h=neo.vdoc.getCookie(neo.vdoc.selTheme.FIELD_THEME);if(d.hasClass("btn-seltheme-"+h+"-on")){return}d.addClass("btn-seltheme-"+g+"-on");d.unbind("mouseout",neo.vdoc.selTheme.onMouseOut);neo.vdoc.setCookie(neo.vdoc.selTheme.FIELD_THEME,g,{expires:"unlimited"});var f=neo.vdoc.selTheme._getObjAjax(g);f.sendRequest();location.reload()},_getObjAjax:function(f){var e=neo.vdoc.selTheme;e.val=f;var d={url:neo.vdoc.getUrl(e.CGI_SET_THEME,e.CMD_SET_THEME),getSendData:function(){var g=neo.vdoc.selTheme;var h={cmd:neo.vdoc.getCmd(g.CMD_SET_THEME),COL000000003:g.val};return h},beforeShowError:function(){return false}};return new neo.Ajax(d)}};var a=neo.vdoc.genmenu={SUB_DURATION:100,SUB_DISTANCE:10,URL_IMG_SUBMYDOC:"/vdocres/img/themes/$theme$/bg_gentab_submydocs.gif",_getTmShowSubMydocs:function(){return this._tmShowSubMydocs},_setTmShowSubMydocs:function(d){return this._tmShowSubMydocs=d},_tmShowSubMydocs:null,_getTmHideSubMydocs:function(){return this._tmHideSubMydocs},_setTmHideSubMydocs:function(d){return this._tmHideSubMydocs=d},_tmHideSubMydocs:null,_initElMenuList:function(){return this._elMenuList=$(".generaltab")},_getElMenuList:function(){return this._elMenuList||this._initElMenuList()},_elMenuList:null,_initElItemMydocs:function(){return this._elItemMydocs=$(".generaltab-item-mydocs")},_getElItemMydocs:function(){return this._elItemMydocs||this._initElItemMydocs()},_elItemMydocs:null,_initElItemMyfavs:function(){return this._elItemMyfavs=$(".genetaltab-item-myfavs")},_getElItemMyfavs:function(){return this._elItemMyfavs||this._initElItemMyfavs()},_elItemMyfavs:null,_initPosSubMydocs:function(){var d=this._getElItemMydocs().find("img");var e=d.position();e.top+=d.height()+1;return this._posSubMydocs=e},_getPosSubMydocs:function(){return this._posSubMydocs||this._initPosSubMydocs()},_posSubMydocs:null,_initElMenuSubMydocs:function(){var e=this._getPosSubMydocs();var d=$(".generaltab-submydocs").css({top:e.top-a.SUB_DISTANCE,left:e.left});return this._elMenuSubMydocs=d},_getElMenuSubMydocs:function(){return this._elMenuSubMydocs||this._initElMenuSubMydocs()},_elMenuSubMydocs:null,initialize:function(){var e=this._getElItemMydocs();if(e.length<1){return}var d=this._getElItemMyfavs();if(d.css("display")!="none"){return}this._preloadImages();this._hook()},_preloadImages:function(){var d=[neo.vdoc.genmenu.URL_IMG_SUBMYDOC,];neo.vdoc.preloadImages(d)},_hook:function(){var e=this._getElItemMydocs();this._bind(e,"mouseover","Mydocs");this._bind(e,"mouseout","Mydocs");var d=this._getElMenuSubMydocs();this._bind(d,"mouseover","SubMydocs");this._bind(d,"mouseout","SubMydocs")},_bind:function(g,e,d){var h=this.__closure(this["on"+e+(d||"")]);g.bind(e,h)},_showSubMydocs:function(){clearTimeout(this._getTmHideSubMydocs());var d=this.__closure(this._showSubMydocsLow);this._setTmShowSubMydocs(setTimeout(d,a.SUB_DURATION))},_showSubMydocsLow:function(){var d=this._getElMenuSubMydocs();var f=this._getPosSubMydocs();var e={top:f.top,opacity:"show"};d.animate(e,a.SUB_DURATION)},_hideSubMydocs:function(){clearTimeout(this._getTmShowSubMydocs());clearTimeout(this._getTmHideSubMydocs());var d=this.__closure(this._hideSubMydocsLow);this._setTmHideSubMydocs(setTimeout(d,a.SUB_DURATION))},_hideSubMydocsLow:function(){var d=this._getElMenuSubMydocs();var h=this._getPosSubMydocs();var g={top:h.top-this.SUB_DISTANCE,opacity:"hide"};var e=function(){d.hide()};d.animate(g,a.SUB_DURATION,e)},__closure:neo.core.getClosure,onmouseoverMydocs:function(d){this._showSubMydocs()},onmouseoutMydocs:function(d){this._hideSubMydocs()},onmouseoverSubMydocs:function(d){this._showSubMydocs()},onmouseoutSubMydocs:function(d){this._hideSubMydocs()}};neo.vdoc.docsearch={CMD_ADVSEARCH:"docadvsearch",VAL_FILETYPE_ALL:"1",VAL_FILETYPE_SEL:"2",URL_IMG_SEARCH_HOVER:"/vdocres/img/lang/$lang$/btn_search_hover.gif",MENU_SHOW_DURATION:100,loaded:false,category:null,_getElForm:function(){return $(".docsearch")},_elSearchKeyword:null,_initElSearchKeyword:function(){this._elSearchKeyword=$(".inp-docsearch-keyword")},getElSearchKeyword:function(){return this._elSearchKeyword},_elBtnMenu:null,_initElBtnMenu:function(){return this._elBtnMenu=$(".btn-docsearch-menu").click(this.showSearchMenu)},_getElBtnMenu:function(){return this._elBtnMenu||this._initElBtnMenu()},_elMenu:null,_initElMenu:function(){return this._elMenu=$("#docsearch-menu-container")},_getElMenu:function(){return this._elMenu||this._initElMenu()},_elBtnSearchThis:null,_initElBtnSearchThis:function(){return this._elBtnSearchThis=this._getElMenu().find(".btn-docsearch-search-this").click(this.runSearch)},_getElBtnSearchThis:function(){return this._elBtnSearchThis||this._initElBtnSearchThis()},_elBtnAdvSearch:null,_initElBtnAdvSearch:function(){return this._elBtnAdvSearch=this._getElMenu().find(".btn-docsearch-advsearch").click(this.openAdvSearch)},_getElBtnAdvSearch:function(){return this._elBtnAdvSearch||this._initElBtnAdvSearch()},_elBtnAdvSearch:null,_getElBtnAdvSearch:function(){return this._elBtnAdvSearch=$(".btn-advsearch")},_elDlgAdvSearch:null,_initElDlgAdvSearch:function(){var e=this._getOptAdvSearch();var d=$("#dlg-adv-search");return this._elDlgAdvSearch=neo.vdoc.dialog.build(d,e)},getElDlgAdvSearch:function(){return this._elDlgAdvSearch},_htmlDlgAdvSearchContentOrg:null,_initHtmlDlgAdvSearchContentOrg:function(){this._htmlDlgAdvSearchContentOrg=this.getElDlgAdvSearch().find(".dlg-contentcontainer").html()},getHtmlDlgAdvSearchContentOrg:function(){return this._htmlDlgAdvSearchContentOrg},_elAdvSearchForm:null,getElAdvSearchForm:function(){return this._elAdvSearchForm},_setElAdvSearchForm:function(d){this._elAdvSearchForm=d},_elAdvSearchRadioCategory:null,getElAdvSearchRadioCategory:function(){return this._elAdvSearchRadioCategory},_initElAdvSearchRadioCategory:function(){var d=neo.vdoc.docsearch;return this._elAdvSearchRadioCategory=this.getElAdvSearchForm().find('input[name="sv_cid"]').click(d.callDisableCategories)},getElCategoryList:function(){return this._elCategoryList||this._initElCategoryList()},_initElCategoryList:function(){var d=this.getElDlgAdvSearch();return this._elCategoryList=d.find("ul.category-names")},_elCategoryList:null,_elDefaultCategories:null,_getElDefaultCategories:function(){return this._elDefaultCategories},_setElDefaultCategories:function(d){return this._elDefaultCategories=d},_initElDefaultCategories:function(){return this._elDefaultCategories=this.getElAdvSearchForm().find(".category-names").children()},_elAdvSearchRadioFileType:null,getElAdvSearchRadioFileType:function(){return this._elAdvSearchRadioFileType},_initElAdvSearchRadioFileType:function(){var d=neo.vdoc.docsearch;return this._elAdvSearchRadioFileType=this.getElAdvSearchForm().find('input[name="filetype"]').click(d.callDisableCheckboxFiletypes)},_elAdvSearchFileTypeList:null,_getElAdvSearchFileTypeList:function(){return this._elAdvSearchFileTypeList||this._initElAdvSearchFileTypeList()},_initElAdvSearchFileTypeList:function(){return this._elAdvSearchFileTypeList=this.getElAdvSearchForm().find("#filetypes")},_elAdvSearchFileTypeItems:null,_getElAdvSearchFileTypeItems:function(){return this._elAdvSearchFileTypeItems},_initElAdvSearchFileTypeItems:function(){var d=neo.vdoc.docsearch;return this._elAdvSearchFileTypeItems=this._getElAdvSearchFileTypeList().children("li").click(d.callEnablePreferenceFiletypes)},_elAdvSearchCheckboxFileTypes:null,getElAdvSearchCheckboxFileTypes:function(){return this._elAdvSearchCheckboxFileTypes||this._initElAdvSearchCheckboxFileTypes()},_initElAdvSearchCheckboxFileTypes:function(){return this._elAdvSearchCheckboxFileTypes=this.getElAdvSearchForm().find('input[name="sv_filetypes"]')},_objAjaxAdvSearchContent:null,_getObjAjaxAdvSearchContent:function(){var e=neo.vdoc.docsearch;var g=neo.core.splitParam(location.href);var h=g.sv_cid;var f=g.sv_bodysrch;if(!this._objAjaxAdvSearchContent){var d={url:neo.vdoc.getUrl(neo.vdoc.CGI_MAIN,neo.vdoc.docsearch.CMD_ADVSEARCH),useDefaultXml:false,getSendData:function(){var i={cmd:neo.vdoc.getCmd(neo.vdoc.docsearch.CMD_ADVSEARCH),sv_cid:h,sv_bodysrch:f};return i},onAjaxSuccess:e.onAjaxAdvSearchContentSuccess,beforeShowError:e.beforeAjaxAdvSearchContentError};this._objAjaxAdvSearchContent=new neo.Ajax(d)}return this._objAjaxAdvSearchContent},initialize:function(){this.updated=false;this._initElSearchKeyword();this._initElBtnMenu();this._initElBtnSearchThis();this._initElBtnAdvSearch();this._initElDlgAdvSearch();this._initHtmlDlgAdvSearchContentOrg();this._setSrchKeyword();if($.browser.msie&&$.browser.version<=6){var d="btn-docsearch";var e=$("."+d);neo.vdoc.setBtnHover(e,d);var d="docsearch-menu-item";var e=$("."+d);neo.vdoc.setBtnHover(e,d)}},_preloadImages:function(){var d=[neo.vdoc.docsearch.URL_IMG_SEARCH_HOVER,];neo.vdoc.preloadImages(d)},showSearchMenu:function(e){e.preventDefault();var f=neo.vdoc.docsearch._getElBtnMenu();var g=f.position();g.right=g.left+f.width();g.bottom=g.top+f.height();var d=neo.vdoc.docsearch._getElMenu();d.css({top:g.bottom,left:g.right-d.outerWidth()+1}).fadeIn(neo.vdoc.docsearch.MENU_SHOW_DURATION);setTimeout(function(){$(document).one("click",function(h){if($(h.target).closest(".btn-docsearch-menu").length<1){d.fadeOut(neo.vdoc.docsearch.MENU_SHOW_DURATION)}})},1)},runSearch:function(e){var d=neo.vdoc.docsearch._getElForm();d.submit()},_getOptAdvSearch:function(){var d={buttons:{},dialogClass:"dlg-docsearch-adv-container",height:300,title:neo.vdoc.Resource.advSearch,width:550};d.buttons[neo.vdoc.Resource.startSearching]=neo.vdoc.docsearch.execAdvSearch;d.buttons[neo.vdoc.Resource.clear]=neo.vdoc.docsearch.clearAdvSearch;d.buttons[neo.vdoc.Resource.cancel]=function(e){$(this).dialog("close")};return d},bindActions:function(){var e=neo.vdoc.docsearch;var d=this._getElBtnAdvSearch();d.click(e.openAdvSearch)},checkAdvConditions:function(d){var f=d.find('input[name="sv_cid"]:checked');var e=d.find('input[name="filetype"]:checked');var g=d.find('input[name="sv_filetypes"]');if(f.hasClass("category-radio-selected")&&f.val()==""){return neo.vdoc.Resource.selectCategories||"Error"}if(e.val()=="2"&&g.filter(":checked").length<1){return neo.vdoc.Resource.selectFiletypes||"Error"}return""},loadAdvDialog:function(){var d=this._getObjAjaxAdvSearchContent();d.sendRequest()},resetAdvDialog:function(){var e=this.getElDlgAdvSearch().find(".dlg-contentcontainer");var d=this.getHtmlDlgAdvSearchContentOrg();e.empty().append(d)},initAdvDialog:function(i){var g=i.find("form:first");this._setElAdvSearchForm(g);this._initElAdvSearchRadioCategory();this._initElDefaultCategories();this._initElAdvSearchRadioFileType();this._initElAdvSearchFileTypeItems();this.fillAdvSearchForm(g);var f=$('input[name="sv_cid"].category-radio-selected');var j=f.val().split(",");var k=(g.find('input[name="sv_lowlevctg"]').val()==1);var h={elBtnOpen:g.find("a.btn-select-category"),searchMode:true,ids:j,selectSub:k,callbackBeforeShow:neo.vdoc.docsearch.beforeCategoryShow,callbackOnChange:neo.vdoc.docsearch.onCategoryChange,callbackAfterHide:neo.vdoc.docsearch.afterCategoryHide};this.category=new neo.vdoc.Category(h);if(j&&j!=""){f.attr("checked",true)}this.disableCategories();g.submit(neo.vdoc.docsearch.execAdvSearch);var d=$("#btn-clear");d.neoClearButton();if($.browser.safari){var e=g.find("#filetypes li");e.css({whiteSpace:"normal"})}i.height("auto")},disableCategories:function(){var d=this.getElAdvSearchRadioCategory().filter(":checked");var e=this.getElCategoryList();if(d.hasClass("category-radio-all")){e.addClass("category-names-disabled")}else{e.removeClass("category-names-disabled")}},disableCheckboxFileTypes:function(){var d=this.getElAdvSearchRadioFileType().filter(":checked");var f=d.val();var e=this._getElAdvSearchFileTypeList();if(f==neo.vdoc.docsearch.VAL_FILETYPE_SEL){e.removeClass("category-filetypes-disabled")}else{e.addClass("category-filetypes-disabled")}},enablePreferenceFiletypes:function(){var d=this.getElAdvSearchRadioFileType();var e=this.getElAdvSearchCheckboxFileTypes().filter(":checked");if(e.length>0){d.filter('[value="2"]').attr("checked",true).click()}else{d.filter('[value="1"]').attr("checked",true).click()}},fillAdvSearchForm:function(i){var i=this.getElAdvSearchForm();var t=neo.core.splitParam(location.href);var z=i.find('input[name="sv_keyword"]');var v=t.sv_keyword;z.val(v);var o=i.find('input[name="sv_bodysrch"]');var j=t.sv_bodysrch;o.attr("checked",!!j);var x=i.find(".category-ids-temp");var r=t.sv_cid;if(r){var m=x.val();var l=i.find(".category-radio-selected");l.val(m)}if(m&&m!=""){var k=i.find('input[name="sv_cid"].category-radio-selected');k.attr("checked",true)}this.disableCategories();var y=i.find("a.btn-select-category");var p=neo.vdoc.Category.showcase.getInstance(y);if(p){p.setSelectedIds((m||"").split(","))}var q=this.getElCategoryList();var n=this._getElDefaultCategories();if(n){q.append(n)}if((r&&n&&n.length>0)){q.parent().show()}else{q.parent().hide()}var w=i.find('input[name="sv_lowlevctg"]');var f=t.sv_lowlevctg;w.val(f);var h=i.find('input[name="filetype"]');var u=t.filetype||"1";h.val([u]);if(u=="2"){var s=t.sv_filetypes;if(!(s instanceof Array)){s=[s]}var d=i.find('input[name="sv_filetypes"]');d.val(s)}this.disableCheckboxFileTypes();var e=i.find('select[name="sv_length"]');var g=t.sv_length;e.val(g)},_setSrchKeyword:function(){var h=neo.core.splitParam(location.href);var g=h.keyword||h.sv_keyword;var f=this.getElSearchKeyword();var d=parseInt(f.attr("maxlength"));if(g&&g!=""){var e=g.substring(0,d);f.val(e)}},displayAdvSearchContentError:function(f){var e=neo.vdoc.docsearch;var d=e.getElDlgAdvSearch();d.dialog("close");e.loaded=false;neo.vdoc.displayError(f)},INC_SUBCATE_ON:"1",INC_SUBCATE_OFF:"",callInitialize:function(){var d=neo.vdoc.docsearch;if(typeof d.initialize=="function"){d.initialize()}},execSearch:function(f){var e=neo.vdoc.docsearch;if(neo.Ajax.isConnecting()){f.preventDefault();return}var d=e.getElSearchKeyword();var g=$.trim(d.val())},openAdvSearch:function(g){var f=neo.vdoc.docsearch;g.preventDefault();var d=f.getElDlgAdvSearch();d.dialog("open");var f=neo.vdoc.docsearch;if(f.loaded){f.clearAdvSearch();var e=f.getElAdvSearchForm();if(e.length>0){f.fillAdvSearchForm(e)}}else{f.loadAdvDialog();f.loaded=true}},execAdvSearch:function(d){var l=neo.vdoc.docsearch;var e=l.getElAdvSearchForm();var g=l.checkAdvConditions(e);var i=e.find(".notice-container");if(g!=""){i.text(g).show();d.preventDefault()}else{i.css({visibility:"hidden"});var k=e.find('[name="filetype"]:checked').val();if(k==neo.vdoc.docsearch.VAL_FILETYPE_ALL){e.find('[name="sv_filetypes"]').attr("disabled",true)}var f=e.find('select[name="sv_length"]').val();if(f!="0"){var j=neo.vdoc.getTimezone();var h=neo.vdoc.getDateTimeText();e.append('<input type="hidden" name="sv_timezone" value="'+j+'">').append('<input type="hidden" name="sv_date" value="'+h+'">')}e.get(0).submit()}},clearAdvSearch:function(i){var h=neo.vdoc.docsearch;var f=neo.vdoc.docsearch.getElAdvSearchForm();if(!f){return}var e=f.find(".notice-container");e.hide();var d=f.find("#btn-clear");d.click();var g=f.find(".category-radio-selected");g.val("");h.clearCategoryList();h.disableCheckboxFileTypes()},clearCategoryList:function(){var d=this.getElCategoryList();d.empty();d.parent().hide();if(this.category){this.category.clear()}},onAjaxAdvSearchContentSuccess:function(h){var g=neo.vdoc.docsearch;var d=$(h);var j=$("<div />").append(d.filter("div"));var i=neo.vdoc.getErrorMsg(j);if(i&&i!=""){g.displayAdvSearchContentError(i);return}var e=d.filter("form");var f=g.getElDlgAdvSearch().find(".dlg-contentcontainer");f.empty().append(e);g.initAdvDialog(f)},beforeAjaxAdvSearchContentError:function(){var e=neo.vdoc.docsearch;var d=e.getElDlgAdvSearch();d.dialog("close");e.loaded=false;return neo.vdoc.beforeShowError.apply(this,arguments)},beforeCategoryShow:function(){var f=neo.vdoc.docsearch;var e=f.getElDlgAdvSearch();var d=b.getSelectorHindrance();e.find(d).css({visibility:"hidden"})},onCategoryChange:function(){var h=neo.vdoc.docsearch;var i=h.getElDlgAdvSearch();var d=this.getSelectedIds();var m=neo.vdoc.Category.getPathAll(d);f=i.find(".category-names");if(d.length<1){var g=i.find('input[name="sv_cid"].category-radio-selected');g.val("");f.parent().hide();var g=i.find('input[name="sv_cid"].category-radio-all')}else{var g=i.find('input[name="sv_cid"].category-radio-selected');g.val(d.join(","));f.parent().show()}g.attr("checked",true);var f=h.getElCategoryList();f.empty();h.disableCategories();for(var j=0;j<m.length;j++){var n=m[j];var k=$("<li />").text(n);f.append(k)}var e=this.getSelectSub();var l=i.find('input[name="sv_lowlevctg"]');if(e){l.val(neo.vdoc.docsearch.INC_SUBCATE_ON)}else{l.val(neo.vdoc.docsearch.INC_SUBCATE_OFF)}},afterCategoryHide:function(){var f=neo.vdoc.docsearch;var e=f.getElDlgAdvSearch();var d=b.getSelectorHindrance();e.find(d).css({visibility:""})},callDisableCategories:function(e){var d=neo.vdoc.docsearch;d.disableCategories()},callDisableCheckboxFiletypes:function(e){var d=neo.vdoc.docsearch;d.disableCheckboxFileTypes()},callEnablePreferenceFiletypes:function(e){var d=neo.vdoc.docsearch;d.enablePreferenceFiletypes()}};neo.vdoc.Category=new neo.core.Class({properties:{_elSelectedItems:null,_selectedCnt:null,_getSelectedCnt:function(){return this._selectedCnt},_setSelectedCnt:function(e){var d=neo.vdoc.Category.getElDlg();var f=d.find(".category-selected");f.text((neo.vdoc.Category.SELECTABLE_MAX-e));return this._selectedCnt=e},getSelectedIds:function(){return this._selectedIds||[]},setSelectedIds:function(e){this._selectedIds=e;var d=0;$.each(e,function(f){if(f&&f!=""){d++}});this._setSelectedCnt(d)},_selectedIds:null,_objAjaxUpdate:null,_getShowcaseId:function(){return this._showcaseId},_setShowcaseId:function(d){this._showcaseId=d},_showcaseId:null,searchMode:null,callbackBeforeShow:null,callbackOnChange:null,callbackAfterHide:null,getSelectSub:function(){return this._selectSub},setSelectSub:function(d){this._selectSub=!!d},_selectSub:null,_getElBtnOpen:function(){return this._elBtnOpen},_setElBtnOpen:function(d){this._elBtnOpen=d},_elBtnOpen:null,__constructor:function(d){this._elSelectedItems=null;this._selectSub=false;var e=d.elBtnOpen;if(!e||!e instanceof jQuery||e.length<1){throw new Error("neo.vdoc.Category : options.elBtnOpen is unavailable.")}this._setElBtnOpen(e);if(typeof d.searchMode=="undefined"){this.searchMode=false}else{this.searchMode=!!d.searchMode}if(typeof d.callbackBeforeShow=="function"){this.callbackBeforeShow=d.callbackBeforeShow}if(typeof d.callbackOnChange=="function"){this.callbackOnChange=d.callbackOnChange}if(typeof d.callbackAfterHide=="function"){this.callbackAfterHide=d.callbackAfterHide}if(d.ids instanceof Array){this.setSelectedIds(d.ids)}this.setSelectSub(d.selectSub);this._initialize()},_initialize:function(){var d=neo.vdoc.Category;var e=this._getElBtnOpen();var f=d.showcase.set(e,this);this._setShowcaseId(f);this.initElBtnOpen()},initElBtnOpen:function(){var d=neo.vdoc.Category;var e=this._getElBtnOpen();e.click(d.onOpenClick)},open:function(){var e=neo.vdoc.Category;e.instance=this;var d=this._getElDlg();d.dialog("open");if(!e.updated){var f=this._getShowcaseId();e.updateContent(f)}else{this.setSelectedElements()}},_getElDlg:function(){var d=neo.vdoc.Category;return d.getElDlg()},setSelectedElements:function(){var j=neo.vdoc.Category;var k=this._getElDlg();var g=k.find("span."+j.CLS_SELECTED);this.select(g);this._setSelectedCnt(0);if(this._elSelectedItems){var h=this._elSelectedItems;this.select(h)}else{var d=this.getSelectedIds();for(var l=0;l<d.length;l++){var e=d[l];if(e==""){continue}if(!this.searchMode&&e==neo.vdoc.Category.ID_NOASSIGNED){continue}var m=k.find("#"+e);this.select(m)}}var f=k.find('input[name="lowlevctg"]');var i=this.getSelectSub();f.attr("checked",i)},enableSearchMode:function(h){var f=this._getElDlg();var d=f.find("#"+neo.vdoc.Category.ID_NOASSIGNED);var g=f.find(".category-selected-container");var e=f.find(".category-select-sub-container");if(h){d.show();g.show();e.show()}else{d.hide();g.hide();e.hide()}},close:function(){var d=this._getElDlg();d.dialog("close")},decide:function(){var e=neo.vdoc.Category;var d=this._getElDlg();if(d.find("ul").length<1){return}var h=d.find("span."+e.CLS_SELECTED);this._elSelectedItems=h;this._saveSelectedIds(h);var g=d.find('input[name="lowlevctg"]');var f=g.attr("checked");this.setSelectSub(f)},_saveSelectedIds:function(g){var e=[];for(var f=0;f<g.length;f++){var d=g.eq(f);var h=d.attr("id");e.push(h)}this.setSelectedIds(e);return e},select:function(e){var f=neo.vdoc.Category;var d=this._getSelectedCnt();if(e.hasClass(f.CLS_SELECTED)){e.removeClass(f.CLS_SELECTED);d-=e.length}else{if(!this.searchMode||d<neo.vdoc.Category.SELECTABLE_MAX){e.addClass(f.CLS_SELECTED);d+=e.length}}this._setSelectedCnt(d)},clear:function(){this._elSelectedItems=null;this.setSelectedIds([])}},classProperties:{CGI_UPDATE:"vdoc",CMD_UPDATE:"optionctglist",URL_UPDATE:"/vdocres/html/category",URL_UPDATE_EXT:".html",ID_NOASSIGNED:"000000000000",CLS_SELECTED:"category-line-selected",LIST_WIDTH:170,LIST_WIDTH_MIN:370,LIST_PADDING:30,AREA_HEIGHT:250,SELECTABLE_MAX:10,showcase:new neo.core.Showcase("neo-select-category"),instance:null,updated:false,showing:false,adjusting:false,_data:new neo.core.Strage(),getElDlg:function(){return this._elDlg||this._initElDlg()},_initElDlg:function(){var g=neo.vdoc.Category;var f={autoOpen:false,buttons:null,dialogClass:"dlg-selcategory category-with-path",height:"auto",modal:true,resizable:false,title:neo.vdoc.Resource.selectCategory,width:540,open:g.onOpen,close:g.onClose};var e=$('<div class="dlg-select-category">loading...</div>');var d=neo.vdoc.dialog.build(e,f);return this._elDlg=d},_elDlg:null,updateContent:function(g){var d=neo.vdoc.Category;var f=neo.vdoc.getLang();var e=this.getObjAjaxUpdate(g,f);e.sendRequest();this.updated=true},getObjAjaxUpdate:function(f,e){if(!this._objAjaxUpdate){var d=this.getOptionsAjaxUpdate(f,e);this._objAjax=new neo.Ajax(d)}return this._objAjax},getOptionsAjaxUpdate:function(g,f){var e=neo.vdoc.Category;var d={url:neo.vdoc.getUrl(neo.vdoc.CGI_MAIN,e.CMD_UPDATE),useDefaultXml:false,getSendData:function(){var h=neo.vdoc.Category;var i={cmd:neo.vdoc.getCmd(h.CMD_UPDATE),lang:f||undefined,jstmpid:g};return i},onAjaxSuccess:e.onAjaxUpdateSuccess,beforeShowError:neo.vdoc.beforeShowError};return d},updateLow:function(e){var d=this.getElDlg();d.dialog("open");d.find("div.dlg-contentcontainer").html(e);this._setSelSubCategory(d);this._adjust();this._bindActions()},_setSelSubCategory:function(d){var g=d.find(".category-container > .category-list:last");var f=d.find(".category-select-sub-container");var e=$('<li class="category-select-sub-container" />').append(f.children());f.remove();g.append(e)},_adjust:function(){var h=neo.vdoc.Category;var d=this.getElDlg();if($.browser.msie){var j=d.find("ul.category-list");for(var i=0;i<j.length;i++){var e=j.eq(i);var g=e.children("li:last");g.addClass("neo-treelist-item-last")}}var f=this._getWidth(d);d.dialog("option","width",f);this.adjusting=true;d.dialog("close").dialog("open");this.adjusting=false},_getWidth:function(d){var f=neo.vdoc.Category;var g=d.find("div.category-container");var h=g.children("ul:not(.prototype)");var e=f.LIST_WIDTH*h.length+f.LIST_PADDING;if(e<f.LIST_WIDTH_MIN){e=f.LIST_WIDTH_MIN}return e},_bindActions:function(){var i=neo.vdoc.Category;var l=this.getElDlg();var f=l.find("div.category-with-path span.category-line").click(i.onLabelClick);if($.browser.msie&&$.browser.version<=6){f.mouseover(function(){$(this).addClass("category-line-hover")}).mouseout(function(){$(this).removeClass("category-line-hover")})}var k=l.find('input[name="ok"]');k.click(i.onBtnOkClick);var e=l.find('input[name="cancel"]');e.click(i.onBtnCancelClick);var j=function(){$(this).addClass("ui-state-focus")};var d=function(){$(this).removeClass("ui-state-focus")};var g=function(){$(this).addClass("ui-state-hover")};var h=function(){$(this).removeClass("ui-state-hover")};k.add(e).focus(j).blur(d).mouseover(g).mouseout(h)},getPathAll:function(d){var g=[];for(var f=0;f<d.length;f++){var h=d[f];var e=this.getPath(h);g.push(e)}return g},getPath:function(e){var d=this._data.get(e);if(!d){d=this._getPathLow(e);this._data.set(e,d)}return d},_getPathLow:function(k){if(!k||k==""){return""}var d=this.getElDlg();var e=d.find("#"+k+":first");var i=[];while(e.length>0){var f=$.trim(e.text());i.unshift(f);var g=e.parents("li:eq(1)");if(g.length>0){e=g.children("span.category-line")}else{break}}var j=neo.vdoc.Resource.categorySeparator;var h=i.join(j);return h},onOpenClick:function(f){var e=neo.vdoc.Category;f.preventDefault();var d=e.showcase.getInstance($(this));d.enableSearchMode(d.searchMode);if(d.callbackBeforeShow){d.callbackBeforeShow()}d.open()},onOpen:function(){var d=$(this);neo.vdoc.hideElConflicts(d);neo.vdoc.Category.showing=true;d.parent().find("div.ui-dialog-buttonpane button:first").blur().end().find("div.ui-dialog-buttonpane button:last").focus().end()},onBtnOkClick:function(f){var e=neo.vdoc.Category;var d=e.instance;d.decide();d.close();if(d.callbackOnChange){d.callbackOnChange()}},onBtnCancelClick:function(f){var e=neo.vdoc.Category;var d=e.instance;d.close()},onClose:function(e){neo.vdoc.showElConflicts();if(e.keyCode){$(this).dialog("close")}neo.vdoc.Category.showing=false;var d=neo.vdoc.Category.instance;if(!neo.vdoc.Category.adjusting&&d.callbackAfterHide){d.callbackAfterHide()}},onLabelClick:function(g){var f=neo.vdoc.Category;var d=f.instance;var e=$(this);d.select(e)},onAjaxUpdateSuccess:function(f){var e=neo.vdoc.Category;if(!neo.vdoc.Category.showing){neo.vdoc.Category.updated=false;return}e.updateLow(f);var g=neo.core.splitParam(this.url);var h=g.jstmpid;var d=e.showcase.getInstance(h);d.enableSearchMode(d.searchMode);d.setSelectedElements()}}});$(function(){neo.vdoc.initialize()});$(function(){neo.vdoc.dialog.initialize()});c.initialize();$(function(){neo.vdoc.selTheme.initialize()});$(document).ready(function(){a.initialize()});$(neo.vdoc.docsearch.callInitialize)})();
