diff --git a/classes/security/EmbedFilter.class.php b/classes/security/EmbedFilter.class.php
index 0b5d5dd4f..1913963af 100644
--- a/classes/security/EmbedFilter.class.php
+++ b/classes/security/EmbedFilter.class.php
@@ -347,14 +347,9 @@ class EmbedFilter
}
}
- if(!$isWhiteDomain && !$isWhiteMimetype && $ext)
+ if(!$isWhiteDomain || !$isWhiteMimetype)
{
- $isWhiteExt = $this->isWhiteExt($ext);
- }
-
- if(!$isWhiteDomain && !$isWhiteMimetype && !$isWhiteExt)
- {
- $content = str_replace($objectTag, htmlspecialchars($objectTag), $content);
+ $content = str_replace($objectTag, htmlspecialchars($objectTag, ENT_COMPAT, 'UTF-8', false), $content);
}
}
}
@@ -400,14 +395,9 @@ class EmbedFilter
}
}
- if(!$isWhiteDomain && !$isWhiteMimetype && $ext)
+ if(!$isWhiteDomain || !$isWhiteMimetype)
{
- $isWhiteExt = $this->isWhiteExt($ext);
- }
-
- if(!$isWhiteDomain && !$isWhiteMimetype && !$isWhiteExt)
- {
- $content = str_replace($embedTag, htmlspecialchars($embedTag), $content);
+ $content = str_replace($embedTag, htmlspecialchars($embedTag, ENT_COMPAT, 'UTF-8', false), $content);
}
}
}
@@ -450,7 +440,7 @@ class EmbedFilter
if(!$isWhiteDomain)
{
- $content = str_replace($iframeTag, htmlspecialchars($iframeTag), $content);
+ $content = str_replace($iframeTag, htmlspecialchars($iframeTag, ENT_COMPAT, 'UTF-8', false), $content);
}
}
}
@@ -483,14 +473,9 @@ class EmbedFilter
$ext = strtolower(substr(strrchr($parser->iNodeAttributes['value'], "."), 1));
$isWhiteDomain = $this->isWhiteDomain($parser->iNodeAttributes['value']);
- if(!$isWhiteDomain && $ext)
+ if(!$isWhiteDomain)
{
- $isWhiteExt = $this->isWhiteExt($ext);
- }
-
- if(!$isWhiteDomain && !$isWhiteExt)
- {
- $content = str_replace($paramTag, htmlspecialchars($paramTag), $content);
+ $content = str_replace($paramTag, htmlspecialchars($paramTag, ENT_COMPAT, 'UTF-8', false), $content);
}
}
}
@@ -568,7 +553,7 @@ class EmbedFilter
if($m[1] == 'param')
{
- if(strpos(strtolower($m[0]), 'allowscriptaccess'))
+ if(stripos($m[0], 'allowscriptaccess'))
{
$m[0] = 'http://www.youtube-nocookie.com/
//www.youtube.com/v/
//www.youtube-nocookie.com/
+ //www.youtube.com/embed/
http://play.mgoon.com/Video/
@@ -203,6 +204,7 @@
https://www.youtube-nocookie.com/
//www.youtube.com/v/
//www.youtube-nocookie.com/
+ //www.youtube.com/embed/
http://maps.google.com/
diff --git a/common/js/common.js b/common/js/common.js
index d3779a297..1b72817db 100644
--- a/common/js/common.js
+++ b/common/js/common.js
@@ -136,11 +136,6 @@ if(jQuery) jQuery.noConflict();
/* jQuery(document).ready() */
jQuery(function($) {
- // Anchor: focus move to target
- $('a[href^="#"]').click(function(){
- $($(this).attr('href')).attr('tabindex','0').focus();
- });
-
/* select - option의 disabled=disabled 속성을 IE에서도 체크하기 위한 함수 */
if($.browser.msie) {
$('select').each(function(i, sels) {
diff --git a/common/js/x.min.js b/common/js/x.min.js
index fbdfac0f1..dd98a2157 100644
--- a/common/js/x.min.js
+++ b/common/js/x.min.js
@@ -10,8 +10,8 @@ function xResizeEvent(){xDeprecate("xResizeEvent");window.xREL&&setTimeout("xRes
function xAppendChild(a,b){xDeprecate("xAppendChild");return a.appendChild?a.appendChild(b):null}
function xClientHeight(){xDeprecate("xClientHeight");var a=0;xOp6Dn?a=window.innerHeight:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientHeight?a=document.documentElement.clientHeight:document.body&&document.body.clientHeight?a=document.body.clientHeight:xDef(window.innerWidth,window.innerHeight,document.width)&&(a=window.innerHeight,document.width>window.innerWidth&&(a-=16));return a}
function xClientWidth(){xDeprecate("xClientWidth");var a=0;xOp6Dn?a=window.innerWidth:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientWidth?a=document.documentElement.clientWidth:document.body&&document.body.clientWidth?a=document.body.clientWidth:xDef(window.innerWidth,window.innerHeight,document.height)&&(a=window.innerWidth,document.height>window.innerHeight&&(a-=16));return a}
-function xCreateElement(a){xDeprecate("xCreateElement");return document.createElement?document.createElement(a):null}function xDef(){xDeprecate("xDef");for(var a=0;ab?a:b}function xGetBodyHeight(){xDeprecate("xGetBodyHeight");var a=xClientHeight(),b=window.document.body.scrollHeight;return a>b?a:b}
@@ -24,15 +24,15 @@ function xHeight(a,b){xDeprecate("xHeight");if(!(a=xGetElementById(a)))return 0;
a.style.height)&&(a.style.height=b+"px",d=a.offsetHeight-b)}b-=d+e+f+h;if(isNaN(b)||0>b)return null;a.style.height=b+"px"}b=a.offsetHeight}else d&&xDef(a.style.pixelHeight)&&(0<=b&&(a.style.pixelHeight=b),b=a.style.pixelHeight);return b}function xHex(a,b,d){xDeprecate("xHex");var e="";a=Math.ceil(a);d&&(e=d);a=a.toString(16);for(d=0;db?0:Math.round(b):-1;var d=xDef(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=xClientWidth();else if(d&&xDef(a.offsetWidth)&&xStr(a.style.width)){if(0<=b){var e=d=0,f=0,h=0;if("CSS1Compat"==document.compatMode){var g=xGetComputedStyle,d=g(a,"padding-left",1);null!==d?(e=g(a,"padding-right",1),f=g(a,"border-left-width",1),h=g(a,"border-right-width",1)):xDef(a.offsetWidth,
a.style.width)&&(a.style.width=b+"px",d=a.offsetWidth-b)}b-=d+e+f+h;if(isNaN(b)||0>b)return null;a.style.width=b+"px"}b=a.offsetWidth}else d&&xDef(a.style.pixelWidth)&&(0<=b&&(a.style.pixelWidth=b),b=a.style.pixelWidth);return b}function xZIndex(a,b){xDeprecate("xZIndex");if(!(a=xGetElementById(a)))return 0;a.style&&xDef(a.style.zIndex)&&(xNum(b)&&(a.style.zIndex=b),b=parseInt(a.style.zIndex));return b}
function xStopPropagation(a){xDeprecate("xStopPropagation");a&&a.stopPropagation?a.stopPropagation():window.event&&(window.event.cancelBubble=!0)};
diff --git a/common/js/xe.min.js b/common/js/xe.min.js
index 315d4dcfc..8bcd80764 100644
--- a/common/js/xe.min.js
+++ b/common/js/xe.min.js
@@ -1 +1,76 @@
-(function(g){var c,a,d;var e=[];c={getName:function(){return"Core"},createApp:function(j,h){var i=b();g.extend(i.prototype,a,h);i.prototype.getName=function(){return j};return i},createPlugin:function(j,h){var i=b();g.extend(i.prototype,d,h);i.prototype.getName=function(){return j};return i},getApps:function(){return g.makeArray(e)},getApp:function(h){h=(h||"").toLowerCase();if(typeof e[h]!="undefined"){return e[h]}else{return null}},registerApp:function(h){var i=h.getName().toLowerCase();e.push(h);if(!g.isArray(e[i])){e[i]=[]}e[i].push(h);h.parent=this;if(g.isFunction(h.activate)){h.activate()}},unregisterApp:function(i){var j=i.getName().toLowerCase();var h=g.inArray(i,e);if(h>=0){e=e.splice(h,1)}if(g.isArray(e[j])){h=g.inArray(i,e[j]);if(h>=0){e[j]=e[j].splice(h,1)}}if(g.isFunction(i.deactivate)){i.deactivate()}},broadcast:function(i,h){this._broadcast(this,i,h)},_broadcast:function(j,l,k){for(var h=0;h=0){return false}this._plugins.push(j);if(!g.isArray(this._plugins[i])){this._plugins[i]=[]}this._plugins[i].push(j);g.each(j._binded_fn,function(l,k){h.registerHandler(l,k)});j.oApp=this;if(g.isFunction(j.activate)){j.activate()}return true},registerHandler:function(h,i){var j=this._messages;h=h.toUpperCase();if(!g.isArray(j[h])){j[h]=[]}j[h].push(i)},cast:function(i,h){return this._cast(this,i,h||[])},broadcast:function(h,j,i){if(this.parent&&this.parent._broadcast){this.parent._broadcast(h,j,i)}},_cast:function(k,h,j){var l,m;var q=this._messages;h=h.toUpperCase();if(q["BEFORE_"+h]||this["API_BEFORE_"+h]){var n=this._cast(k,"BEFORE_"+h,j);if(!n){return}}var p=[],o="API_"+h;if(g.isArray(q[h])){for(l=0;l"+q+" "}}}this.loaded_popup_menus[s]=o}if(o){var g=b("#popup_menu_area").html("");var h={top:j.page_y,left:j.page_x};if(g.outerHeight()+h.top>b(window).height()+b(window).scrollTop()){h.top=b(window).height()-g.outerHeight()+b(window).scrollTop()}if(g.outerWidth()+h.left>b(window).width()+b(window).scrollLeft()){h.left=b(window).width()-g.outerWidth()+b(window).scrollLeft()}g.css({top:h.top,left:h.left}).show().focus()}}}})(jQuery);jQuery(function(c){if(c.browser.msie){c("select").each(function(h,d){var g=false;var k=new Array();for(var e=0;e-1)?k[h]:e}}if(!g){return}d.oldonchange=d.onchange;d.onchange=function(){if(this.options[this.selectedIndex].disabled){this.selectedIndex=k[h]}else{if(this.oldonchange){this.oldonchange()}}};if(d.selectedIndex>=0&&d.options[d.selectedIndex].disabled){d.onchange()}})}var a=c(".xe_content .fold_button");if(a.size()){var b=c("div.fold_container",a);c("button.more",a).click(function(){c(this).hide().next("button").show().parent().next(b).show()});c("button.less",a).click(function(){c(this).hide().prev("button").show().parent().next(b).hide()})}jQuery('input[type="submit"],button[type="submit"]').click(function(e){var d=jQuery(e.currentTarget);setTimeout(function(){return function(){d.attr("disabled","disabled")}}(),0);setTimeout(function(){return function(){d.removeAttr("disabled")}}(),3000)})});(function(){function a(d,c){return(d.replace(/#.*$/,"")===c.replace(/#.*$/,""))}var b=Array.isArray||function(c){return Object.prototype.toString.call(c)=="[object Array]"};String.prototype.getQuery=function(e){var i=a(this,window.location.href)?current_url:this;var c=i.indexOf("?");if(c==-1){return null}var h=i.substr(c+1,this.length),d={};h.replace(/([^=]+)=([^&]*)(&|$)/g,function(){d[arguments[1]]=arguments[2]});var g=d[e];if(typeof(g)=="undefined"){g=""}return g};String.prototype.setQuery=function(q,e){var k=a(this,window.location.href)?current_url:this;var p=k.indexOf("?");var g=k.replace(/#$/,"");var l,s,r;if(typeof(e)=="undefined"){e=""}if(p!=-1){var j=g.substr(p+1,k.length),m={},u=[];g=k.substr(0,p);j.replace(/([^=]+)=([^&]*)(&|$)/g,function(i,c,v){m[c]=v});m[q]=e;for(var d in m){if(!m.hasOwnProperty(d)){continue}if(!(r=String(m[d]).trim())){continue}u.push(d+"="+decodeURI(r))}j=u.join("&");g=g+(j?"?"+j:"")}else{if(String(e).trim()){g=g+"?"+q+"="+e}}s=/^https:\/\/([^:\/]+)(:\d+|)/i;if(s.test(g)){var t="http://"+RegExp.$1;if(window.http_port&&http_port!=80){t+=":"+http_port}g=g.replace(s,t)}var o=!!window.enforce_ssl;if(!o&&b(window.ssl_actions)&&(l=g.getQuery("act"))){for(var h=0,n=ssl_actions.length;h-1&&!a.getQuery("vid")){a=a.setQuery("vid",xeVid)}try{if(g!="_blank"&&winopen_list[g]){winopen_list[g].close();winopen_list[g]=null}}catch(d){}if(typeof(g)=="undefined"){g="_blank"}if(typeof(b)=="undefined"){b=""}var c=window.open(a,g,b);c.focus();if(g!="_blank"){winopen_list[g]=c}}function popopen(a,b){if(typeof(b)=="undefined"){b="_blank"}if(typeof(xeVid)!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")){a=a.setQuery("vid",xeVid)}winopen(a,b,"width=800,height=600,scrollbars=yes,resizable=yes,toolbars=no")}function sendMailTo(a){location.href="mailto:"+a}function move_url(a,b){if(!a){return false}if(typeof(b)=="undefined"){b="N"}if(b=="N"){b=false}else{b=true}if(/^\./.test(a)){a=request_uri+a}if(b){winopen(a)}else{location.href=a}return false}function displayMultimedia(e,d,a,b){var c=_displayMultimedia(e,d,a,b);if(c){document.writeln(c)}}function _displayMultimedia(a,c,j,l){if(a.indexOf("files")==0){a=request_uri+a}var e={wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:false};var d=jQuery.extend(e,l||{});var k=(d.autostart&&d.autostart!="false")?"true":"false";delete (d.autostart);var g="";var h="";var i="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a)){i='
'}else{if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a)){i=''}else{if(/\.swf/i.test(a)){g="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";if(typeof(enforce_ssl)!="undefined"&&enforce_ssl){h="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"}else{h="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"}i=''}else{if(jQuery.browser.mozilla||jQuery.browser.opera){k=(d.autostart&&d.autostart!="false")?"1":"0"}i='"}}}return i}function zbxe_folder_open(a){jQuery("#folder_open_"+a).hide();jQuery("#folder_close_"+a).show();jQuery("#folder_"+a).show()}function zbxe_folder_close(a){jQuery("#folder_open_"+a).show();jQuery("#folder_close_"+a).hide();jQuery("#folder_"+a).hide()}function setFixedPopupSize(){var g=jQuery,j=g(window),b=g("body>.popup"),a,d,c,e,i;i=b.css({overflow:"scroll"}).offset();a=b.width(10).height(10000).get(0).scrollWidth+i.left*2;d=b.height(10).width(10000).get(0).scrollHeight+i.top*2;if(a<800){a=800+i.left*2}c=j.width();e=j.height();if(a!=c){window.resizeBy(a-c,0)}if(d!=e){window.resizeBy(0,d-e)}b.width(a-i.left*2).css({overflow:"",height:""})}function doCallModuleAction(a,c,b){var d={target_srl:b,cur_mid:current_mid,mid:current_mid};exec_xml(a,c,d,completeCallModuleAction)}function completeCallModuleAction(a,b){if(a.message!="success"){alert(a.message)}location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){if(typeof(a)=="string"){setLangType(a)}else{var b=a.options[a.selectedIndex].value;setLangType(b)}location.href=location.href.setQuery("l","")}function setLangType(b){var a=new Date();a.setTime(a.getTime()+(7000*24*3600000));setCookie("lang_type",b,a,"/")}function doDocumentPreview(e){var a=e;while(a.nodeName!="FORM"){a=a.parentNode}if(a.nodeName!="FORM"){return}var b=a.getAttribute("editor_sequence");var c=editorGetContent(b);var d=window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var g=jQuery("#previewDocument");if(!g.length){jQuery('').appendTo(document.body);g=jQuery("#previewDocument")[0]}else{g=g[0]}if(g){g.content.value=c;g.submit()}}function doDocumentSave(g){var b=g.form.getAttribute("editor_sequence");var i=editorRelKeys[b]["content"].value;if(typeof(b)!="undefined"&&b&&typeof(editorRelKeys)!="undefined"&&typeof(editorGetContent)=="function"){var c=editorGetContent(b);editorRelKeys[b]["content"].value=c}var h={},e=["error","message","document_srl"],a=g.form.elements,d=jQuery(g.form).serializeArray();jQuery.each(d,function(j,k){var l=jQuery.trim(k.value);if(!l){return true}if(/\[\]$/.test(k.name)){k.name=k.name.replace(/\[\]$/,"")}if(h[k.name]){h[k.name]+="|@|"+l}else{h[k.name]=k.value}});exec_xml("document","procDocumentTempSave",h,completeDocumentSave,e,h,g.form);editorRelKeys[b]["content"].value=i;return false}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))}function doDocumentSelect(a){if(!opener||!opener.objForSavedDoc){window.close();return}opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite");window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=new Array();function doAddDocumentCart(b){var a=b.value;addedDocument[addedDocument.length]=a;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)}function callAddDocumentCart(a){if(addedDocument.length<1||a!=addedDocument.length){return}var b=new Array();b.srls=addedDocument.join(",");exec_xml("document","procDocumentAddCart",b,null);addedDocument=new Array()}function transRGB2Hex(d){if(!d){return d}if(d.indexOf("#")>-1){return d.replace(/^#/,"")}if(d.toLowerCase().indexOf("rgb")<0){return d}d=d.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=d.split(",");var c="";for(var b=0;b>2;h=((l&3)<<4)|(j>>4);e=((j&15)<<2)|(g>>6);d=g&63;if(isNaN(j)){e=d=64}else{if(isNaN(g)){d=64}}a=a+this._keyStr.charAt(k)+this._keyStr.charAt(h)+this._keyStr.charAt(e)+this._keyStr.charAt(d)}return a},decode:function(c){var a="";var l,j,g;var k,h,e,d;var b=0;c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(b>4);j=((h&15)<<4)|(e>>2);g=((e&3)<<6)|d;a=a+String.fromCharCode(l);if(e!=64){a=a+String.fromCharCode(j)}if(d!=64){a=a+String.fromCharCode(g)}}a=Base64._utf8_decode(a);return a},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}};if(typeof(resizeImageContents)=="undefined"){function resizeImageContents(){}}if(typeof(activateOptionDisabled)=="undefined"){function activateOptionDisabled(){}}objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show()}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide()}function open_calendar(c,d,b){if(typeof(d)=="undefined"){d=""}var a="./common/tpl/calendar.php?";if(c){a+="fo_id="+c}if(d){a+="&day_str="+d}if(b){a+="&callback_func="+b}popopen(a,"Calendar")}var loaded_popup_menus=XE.loaded_popup_menus;function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,c){XE.displayPopupMenu(a,b,c)}function GetObjLeft(a){return jQuery(a).offset().left}function GetObjTop(a){return jQuery(a).offset().top}function replaceOuterHTML(b,a){jQuery(b).replaceWith(a)}function getOuterHTML(a){return jQuery(a).html().trim()}function setCookie(b,c,a,e){var d=b+"="+escape(c)+((!a)?"":("; expires="+a.toGMTString()))+"; path="+((!e)?"/":e);document.cookie=d}function getCookie(b){var a=document.cookie.match(new RegExp(b+"=(.*?)(?:;|$)"));if(a){return unescape(a[1])}}function is_def(a){return(typeof(a)!="undefined")}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1)}function get_by_id(a){return document.getElementById(a)}jQuery(function(a){a(document).click(function(d){var e=a("#popup_menu_area");if(!e.length){e=a('').appendTo(document.body)}e.hide();var b=a(d.target).filter("a,div,span");if(!b.length){b=a(d.target).closest("a,div,span")}if(!b.length){return}var c=b.attr("class"),g;if(c){g=c.match(new RegExp("(?:^| )((document|comment|member)_([1-9]\\d*))(?: |$)",""))}if(!g){return}var i="get"+ucfirst(g[2])+"Menu";var j={mid:current_mid,cur_mid:current_mid,menu_id:g[1],target_srl:g[3],cur_act:current_url.getQuery("act"),page_x:d.pageX,page_y:d.pageY};var h="error message menus".split(" ");d.preventDefault();d.stopPropagation();if(is_def(window.xeVid)){j.vid=xeVid}if(is_def(XE.loaded_popup_menus[j.menu_id])){return XE.displayPopupMenu(j,h,j)}show_waiting_message=false;exec_xml("member",i,j,XE.displayPopupMenu,h,j);show_waiting_message=true});a("a._xe_popup").click(function(){var e=a(this),c=e.attr("name"),b=e.attr("href"),d;if(!c){c="_xe_popup_"+Math.floor(Math.random()*1000)}d=window.open(b,c,"left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no");if(d){d.focus()}return false});if(a.datepicker){a.datepicker.setDefaults({dateFormat:"yy-mm-dd"})}});var show_waiting_message=true;function xml2json(c,d,b){var h={toObj:function(k){var q={};if(k.nodeType==1){if(b&&k.attributes.length){for(var p=0;p1){q=h.escape(h.innerXml(k))}else{for(var r=k.firstChild;r;r=r.nextSibling){q=h.escape(r.nodeValue)}}}}}}if(!k.attributes.length&&!k.firstChild){q=null}}else{if(k.nodeType==9){q=h.toObj(k.documentElement)}else{alert("unhandled node type: "+k.nodeType)}}return q},toJson:function(s,l,r){var q=l?('"'+l+'"'):"";if(s instanceof Array){for(var p=0,t=s.length;p1?("\n"+r+"\t"+s.join(",\n"+r+"\t")+"\n"+r):s.join(""))+"]"}else{if(s==null){q+=(l&&":")+"null"}else{if(typeof(s)=="object"){var k=[];for(var j in s){k[k.length]=h.toJson(s[j],j,r+"\t")}q+=(l?":{":"{")+(k.length>1?("\n"+r+"\t"+k.join(",\n"+r+"\t")+"\n"+r):k.join(""))+"}"}else{if(typeof(s)=="string"){q+=(l&&":")+'"'+s.toString()+'"'}else{q+=(l&&":")+s.toString()}}}}return q},innerXml:function(k){var j="";if("innerHTML" in k){j=k.innerHTML}else{var i=function(q){var o="";if(q.nodeType==1){o+="<"+q.nodeName;for(var m=0;m";for(var p=q.firstChild;p;p=p.nextSibling){o+=i(p)}o+=""+q.nodeName+">"}else{o+="/>"}}else{if(q.nodeType==3){o+=q.nodeValue}else{if(q.nodeType==4){o+=""}}}return o};for(var l=k.firstChild;l;l=l.nextSibling){j+=i(l)}}return j},escape:function(i){return i.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(j){j.normalize();for(var k=j.firstChild;k;){if(k.nodeType==3){if(!k.nodeValue.match(/[^ \f\n\r\t\v]/)){var i=k.nextSibling;j.removeChild(k);k=i}else{k=k.nextSibling}}else{if(k.nodeType==1){h.removeWhite(k);k=k.nextSibling}else{k=k.nextSibling}}}return j}};if(c.nodeType==9){c=c.documentElement}var g=h.toObj(h.removeWhite(c)),a;if(typeof(JSON)=="object"&&jQuery.isFunction(JSON.stringify)&&false){var e={};e[c.nodeName]=g;a=JSON.stringify(e);return a}else{a=h.toJson(g,c.nodeName,"");return"{"+(d?a.replace(/\t/g,d):a.replace(/\t|\n/g,""))+"}"}}(function($){$.exec_xml=window.exec_xml=function(module,act,params,callback_func,response_tags,callback_func_arg,fo_obj){var xml_path=request_uri+"index.php";if(!params){params={}}if($.isArray(params)){params=arr2obj(params)}params.module=module;params.act=act;if(typeof(xeVid)!="undefined"){params.vid=xeVid}if(typeof(response_tags)=="undefined"||response_tags.length<1){response_tags=["error","message"]}else{response_tags.push("error","message")}if($.isArray(ssl_actions)&¶ms.act&&$.inArray(params.act,ssl_actions)>=0){var url=default_url||request_uri;var port=window.https_port||443;var _ul=$("").attr("href",url)[0];var target="https://"+_ul.hostname.replace(/:\d+$/,"");if(port!=443){target+=":"+port}if(_ul.pathname[0]!="/"){target+="/"}target+=_ul.pathname;xml_path=target.replace(/\/$/,"")+"/index.php"}var _u1=$("").attr("href",location.href)[0];var _u2=$("").attr("href",xml_path)[0];if(_u1.protocol!=_u2.protocol||_u1.port!=_u2.port){return send_by_form(xml_path,params)}var xml=[],i=0;xml[i++]='';xml[i++]="";xml[i++]="";$.each(params,function(key,val){xml[i++]="<"+key+">"+key+">"});xml[i++]="";xml[i++]="";var _xhr=null;if(_xhr&&_xhr.readyState!=0){_xhr.abort()}function onsuccess(data,textStatus,xhr){var resp_xml=$(data).find("response")[0],resp_obj,txt="",ret=[],tags={},json_str="";waiting_obj.css("display","none").trigger("cancel_confirm");if(!resp_xml){alert(_xhr.responseText);return null}json_str=xml2json(resp_xml,false,false);resp_obj=(typeof(JSON)=="object"&&$.isFunction(JSON.parse))?JSON.parse(json_str):eval("("+json_str+")");resp_obj=resp_obj.response;if(typeof(resp_obj)=="undefined"){ret.error=-1;ret.message="Unexpected error occured.";try{if(typeof(txt=resp_xml.childNodes[0].firstChild.data)!="undefined"){ret.message+="\r\n"+txt}}catch(e){}return ret}$.each(response_tags,function(key,val){tags[val]=true});tags.redirect_url=true;tags.act=true;$.each(resp_obj,function(key,val){if(tags[key]){ret[key]=val}});if(ret.error!=0){if($.isFunction($.exec_xml.onerror)){return $.exec_xml.onerror(module,act,ret,callback_func,response_tags,callback_func_arg,fo_obj)}alert((ret.message||"An unknown error occured while loading ["+module+"."+act+"]").replace(/\\n/g,"\n"));return null}if(ret.redirect_url){location.href=ret.redirect_url.replace(/&/g,"&");return null}if($.isFunction(callback_func)){callback_func(ret,response_tags,callback_func_arg,fo_obj)}}try{$.ajax({url:xml_path,type:"POST",dataType:"xml",data:xml.join("\n"),contentType:"text/plain",beforeSend:function(xhr){_xhr=xhr},success:onsuccess,error:function(xhr,textStatus){waiting_obj.css("display","none");var msg="";if(textStatus=="parsererror"){msg="The result is not valid XML :\n-------------------------------------\n";if(xhr.responseText==""){return}msg+=xhr.responseText.replace(/<[^>]+>/g,"")}else{msg=textStatus}try{console.log(msg)}catch(ee){}}})}catch(e){alert(e);return}var waiting_obj=$(".wfsr");if(show_waiting_message&&waiting_obj.length){var timeoutId=$(".wfsr").data("timeout_id");if(timeoutId){clearTimeout(timeoutId)}$(".wfsr").css("opacity",0);$(".wfsr").data("timeout_id",setTimeout(function(){$(".wfsr").css("opacity","")},1000));waiting_obj.html(waiting_message).show()}};function send_by_form(url,params){var frame_id="xeTmpIframe";var form_id="xeVirtualForm";if(!$("#"+frame_id).length){$(''.replace(/%id%/g,frame_id)).appendTo(document.body)}$("#"+form_id).remove();var form=$(''.replace(/%id%/g,form_id)).attr({id:form_id,method:"post",action:url,target:frame_id});params.xeVirtualRequestMethod="xml";params.xeRequestURI=location.href.replace(/#(.*)$/i,"");params.xeVirtualRequestUrl=request_uri;$.each(params,function(key,value){$('').attr("name",key).attr("value",value).appendTo(form)});form.appendTo(document.body).submit()}function arr2obj(arr){var ret={};for(var key in arr){if(arr.hasOwnProperty(key)){ret[key]=arr[key]}}return ret}$.exec_json=function(action,data,func,f_error){if(typeof(data)=="undefined"){data={}}action=action.split(".");if(action.length==2){var timeoutId=$(".wfsr").data("timeout_id");if(timeoutId){clearTimeout(timeoutId)}$(".wfsr").css("opacity",0);$(".wfsr").data("timeout_id",setTimeout(function(){$(".wfsr").css("opacity","")},1000));if(show_waiting_message){$(".wfsr").html(waiting_message).show()}$.extend(data,{module:action[0],act:action[1]});if(typeof(xeVid)!="undefined"){$.extend(data,{vid:xeVid})}$.ajax({type:"POST",dataType:"json",url:request_uri,contentType:"application/json",data:$.param(data),success:function(data){$(".wfsr").hide().trigger("cancel_confirm");if(data.error!=0&&data.error>-1000){if(data.error==-1&&data.message=="msg_is_not_administrator"){alert("You are not logged in as an administrator");if($.isFunction(f_error)){f_error(data)}return}else{alert(data.message);if($.isFunction(f_error)){f_error(data)}return}}if($.isFunction(func)){func(data)}}})}};$.fn.exec_html=function(action,data,type,func,args){if(typeof(data)=="undefined"){data={}}if(!$.inArray(type,["html","append","prepend"])){type="html"}var self=$(this);action=action.split(".");if(action.length==2){var timeoutId=$(".wfsr").data("timeout_id");if(timeoutId){clearTimeout(timeoutId)}$(".wfsr").css("opacity",0);$(".wfsr").data("timeout_id",setTimeout(function(){$(".wfsr").css("opacity","")},1000));if(show_waiting_message){$(".wfsr").html(waiting_message).show()}$.extend(data,{module:action[0],act:action[1]});$.ajax({type:"POST",dataType:"html",url:request_uri,data:$.param(data),success:function(html){$(".wfsr").hide().trigger("cancel_confirm");self[type](html);if($.isFunction(func)){func(args)}}})}};function beforeUnloadHandler(){return""}$(function($){$(".wfsr").ajaxStart(function(){$(window).bind("beforeunload",beforeUnloadHandler)}).bind("ajaxStop cancel_confirm",function(){$(window).unbind("beforeunload",beforeUnloadHandler)})})})(jQuery);(function(g){var e=[];var k=[];var a={};var j=[];var d={};var b=xe.createApp("Validator",{init:function(){var q=/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",q]);this.cast("ADD_RULE",["email_address",q]);var t=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast("ADD_RULE",["userid",t]);this.cast("ADD_RULE",["user_id",t]);var s=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;this.cast("ADD_RULE",["url",s]);this.cast("ADD_RULE",["homepage",s]);var o=new RegExp("^[\uAC00-\uD7A3]*$");this.cast("ADD_RULE",["korean",o]);var p=new RegExp("^[\uAC00-\uD7A30-9]*$");this.cast("ADD_RULE",["korean_number",p]);var m=/^[a-z]*$/i;this.cast("ADD_RULE",["alpha",m]);var n=/^[a-z][a-z0-9_]*$/i;this.cast("ADD_RULE",["alpha_number",n]);var r=/^[0-9]*$/;this.cast("ADD_RULE",["number",r])},run:function(p){var n="";if(p._filter){n=p._filter.value}var o=[p,n];var m=this.cast("VALIDATE",o);if(typeof m=="undefined"){m=false}return m},API_ONREADY:function(){var m=this;g("form").each(function(){if(this.onsubmit){this["xe:onsubmit"]=this.onsubmit;this.onsubmit=null}}).submit(function(q){var p=this["xe:onsubmit"];var o=g.isFunction(p);var n=o?p.apply(this):m.run(this);if(!n){q.stopImmediatePropagation()}return n})},API_VALIDATE:function(o,M){var w=true,n=M[0],N=n.elements,x,p,F,q;var A,y,Q,m,P,O,J,s,H,E,B,D,u,C,v,G,L,z,I,t;if(N.ruleset){x=n.elements.ruleset.value}else{if(N._filter){x=n.elements._filter.value}}if(!x){return true}if(g.isFunction(j[x])){q=j[x]}x=g.extend({},a[x.toLowerCase()]||{},d);function K(r){return r.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,"\\$1")}A=[];for(G=0,L=n.elements.length;G(D?s:J))||(H&&H<(B?s:J))){return this.cast("ALERT",[n,Q,"outofrange",E,H])&&false}if(f.equalto){C=N[f.equalto];v=C?g.trim(c(g(C))):"";if(C&&v!==P){return this.cast("ALERT",[n,Q,"equalto"])&&false}}u=(f.rule||"").split(",");for(G=0,L=u.length;G-1){w=!w}if(!w){return this.cast("ALERT",[n,Q,"invalid_"+z])&&false}}}if(g.isFunction(q)){return q(n)}return true},API_ADD_RULE:function(n,o){var m=o[0].toLowerCase();k[m]=o[1]},API_DEL_RULE:function(n,o){var m=o[0].toLowerCase();delete k[m]},API_GET_RULE:function(n,o){var m=o[0].toLowerCase();if(k[m]){return k[m]}else{return null}},API_ADD_FILTER:function(n,p){var m=p[0].toLowerCase();var o=p[1];a[m]=o},API_DEL_FILTER:function(n,o){var m=o[0].toLowerCase();delete a[m]},API_GET_FILTER:function(n,o){var m=o[0].toLowerCase();if(a[m]){return a[m]}else{return null}},API_ADD_EXTRA_FIELD:function(n,o){var m=o[0].toLowerCase();var p=o[1];d[m]=p},API_GET_EXTRA_FIELD:function(n,o){var m=o[0].toLowerCase();return d[m]},API_DEL_EXTRA_FIELD:function(n,o){var m=o[0].toLowerCase();delete d[m]},API_APPLY_RULE:function(n,p){var m=p[0];var o=p[1];if(typeof(k[m])=="undefined"){return true}if(g.isFunction(k[m])){return k[m](o)}if(k[m] instanceof RegExp){return k[m].test(o)}if(g.isArray(k[m])){return(g.inArray(o,k[m])>-1)}return true},API_ALERT:function(t,r){var m=r[0];var s=r[1];var q=r[2];var n=r[3];var p=r[4];var u=this.cast("GET_MESSAGE",[s]);var o=this.cast("GET_MESSAGE",[q]);if(o!=q){o=(o.indexOf("%s")<0)?(u+o):(o.replace("%s",u))}if(n||p){o+="("+(n||"")+"~"+(p||"")+")"}this.cast("SHOW_ALERT",[o]);g(m.elements[s]).focus()},API_SHOW_ALERT:function(m,n){alert(n[0])},API_ADD_MESSAGE:function(n,p){var m=p[0];var o=p[1];e[m]=o},API_GET_MESSAGE:function(n,o){var m=o[0];return e[m]||m},API_ADD_CALLBACK:function(n,p){var m=p[0];var o=p[1];j[m]=o},API_REMOVE_CALLBACK:function(n,o){var m=o[0];delete j[m]}});var l=new b;xe.registerApp(l);var i=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(n,q){var o=q[0];var m=o.getAttribute("editor_sequence");if(m&&typeof m=="object"){m=m.value}if(m){try{editorRelKeys[m].content.value=editorRelKeys[m].func(m)||""}catch(p){}}}});l.registerPlugin(new i);function c(m){var n=[];if(m.is(":radio")){return m.filter(":checked").val()}else{if(m.is(":checkbox")){m.filter(":checked").each(function(){n.push(this.value)});return n.join("|@|")}else{return m.val()}}}function h(m){m+="";if(!m.length){return 0}m=encodeURI(m);var n=m.split("%").length-1;return m.length-n*2}})(jQuery);function filterAlertMessage(e){var d=e.error;var g=e.message;var b=e.act;var a=e.redirect_url;var c=location.href;if(typeof(g)!="undefined"&&g&&g!="success"){alert(g)}if(typeof(b)!="undefined"&&b){c=current_url.setQuery("act",b)}else{if(typeof(a)!="undefined"&&a){c=a}}if(c==location.href){c=c.replace(/#(.*)$/,"")}location.href=c}function procFilter(b,a){a(b);return false}function legacy_filter(k,a,b,e,j,d,l,h){var i=xe.getApp("Validator")[0],c=jQuery,g=[];if(!i){return false}if(!a.elements._filter){c(a).prepend('')}a.elements._filter.value=k;g[0]=k;g[1]=function(p){var q={},m=[],n=p.elements,o=c(p).serializeArray();c.each(o,function(s,t){var r=c.trim(t.value),u=t.name;if(!r||!u){return true}if(h[u]){u=h[u]}if(/\[\]$/.test(u)){u=u.replace(/\[\]$/,"")}if(q[u]){q[u]+="|@|"+r}else{q[u]=t.value}});if(l&&!confirm(l)){return false}exec_xml(b,e,q,j,d,q,a)};i.cast("ADD_CALLBACK",g);i.cast("VALIDATE",[a,k]);return false};
\ No newline at end of file
+/**
+ * @file common/js/xe.min.js
+ * @author NHN (developers@xpressengine.com)
+ * @brief XE Common JavaScript
+ **/
+(function(a){function b(){return function(){var e=this;a.isArray(this._plugins)&&(this._plugins=[]);this._messages?this._messages={}:this._binded_fn={};a.each(this,function(h,c){if(!a.isFunction(c)||!/^API_([A-Z0-9_]+)$/.test(h))return!0;var b=RegExp.$1,d=function(a,c){return e[h](a,c)};e._messages?e._messages[b]=[d]:e._binded_fn[b]=d});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,g=[];d={_plugins:[],_messages:{},getPlugin:function(e){e=e.toLowerCase();return a.isArray(this._plugins[e])?
+this._plugins[e]:[]},registerPlugin:function(e){var h=this,c=e.getName().toLowerCase();if(0<=a.inArray(e,this._plugins))return!1;this._plugins.push(e);a.isArray(this._plugins[c])||(this._plugins[c]=[]);this._plugins[c].push(e);a.each(e._binded_fn,function(a,e){h.registerHandler(a,e)});e.oApp=this;a.isFunction(e.activate)&&e.activate();return!0},registerHandler:function(e,h){var c=this._messages;e=e.toUpperCase();a.isArray(c[e])||(c[e]=[]);c[e].push(h)},cast:function(a,h){return this._cast(this,a,
+h||[])},broadcast:function(a,h,c){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,h,c)},_cast:function(e,h,c){var b,d=this._messages;h=h.toUpperCase();if(!d["BEFORE_"+h]&&!this["API_BEFORE_"+h]||this._cast(e,"BEFORE_"+h,c)){var g=[];if(a.isArray(d[h]))for(b=0;bg.length&&(g=g[0]);(d["AFTER_"+h]||this["API_AFTER_"+h])&&this._cast(e,"AFTER_"+h,c);return/^(?:AFTER|BEFORE)_/.test(h)?a.isArray(g)?0>a.inArray(!1,g):"undefined"==typeof g?!0:!!g:g}}};c=
+{oApp:null,cast:function(a,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(e,c){var g=b();a.extend(g.prototype,d,c);g.prototype.getName=function(){return e};return g},createPlugin:function(e,h){var d=b();a.extend(d.prototype,c,h);d.prototype.getName=function(){return e};return d},getApps:function(){return a.makeArray(g)},
+getApp:function(a){a=(a||"").toLowerCase();return"undefined"!=typeof g[a]?g[a]:null},registerApp:function(e){var c=e.getName().toLowerCase();g.push(e);a.isArray(g[c])||(g[c]=[]);g[c].push(e);e.parent=this;a.isFunction(e.activate)&&e.activate()},unregisterApp:function(e){var c=e.getName().toLowerCase(),b=a.inArray(e,g);0<=b&&(g=g.splice(b,1));a.isArray(g[c])&&(b=a.inArray(e,g[c]),0<=b&&(g[c]=g[c].splice(b,1)));a.isFunction(e.deactivate)&&e.deactivate()},broadcast:function(a,c){this._broadcast(this,
+a,c)},_broadcast:function(a,c,b){for(var d=0;de.length)e=Array(e);if(e.length)for(var h=0;h"+l+" "}}this.loaded_popup_menus[c]=b}b&&(c=a("#popup_menu_area").html(""),b=g.page_y,g=g.page_x,c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-
+c.outerHeight()+a(window).scrollTop()),c.outerWidth()+g>a(window).width()+a(window).scrollLeft()&&(g=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:g}).show().focus())}}})(jQuery);
+jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var e=!1,h=[],d=0;d';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))e='';else if(/\.swf/i.test(a)){var e="undefined"!=typeof enforce_ssl&&enforce_ssl?"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0":"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0",e=''}else{if(jQuery.browser.mozilla||jQuery.browser.opera)g=c.autostart&&"false"!=c.autostart?"1":"0";e='"}return e}
+function zbxe_folder_open(a){jQuery("#folder_open_"+a).hide();jQuery("#folder_close_"+a).show();jQuery("#folder_"+a).show()}function zbxe_folder_close(a){jQuery("#folder_open_"+a).show();jQuery("#folder_close_"+a).hide();jQuery("#folder_"+a).hide()}
+function setFixedPopupSize(){var a=jQuery,b=a(window),a=a("body>.popup"),d,c,g,e;e=a.css({overflow:"scroll"}).offset();d=a.width(10).height(1E4).get(0).scrollWidth+2*e.left;c=a.height(10).width(1E4).get(0).scrollHeight+2*e.top;800>d&&(d=800+2*e.left);g=b.width();b=b.height();d!=g&&window.resizeBy(d-g,0);c!=b&&window.resizeBy(0,c-b);a.width(d-2*e.left).css({overflow:"",height:""})}
+function doCallModuleAction(a,b,d){exec_xml(a,b,{target_srl:d,cur_mid:current_mid,mid:current_mid},completeCallModuleAction)}function completeCallModuleAction(a,b){"success"!=a.message&&alert(a.message);location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){"string"==typeof a?setLangType(a):setLangType(a.options[a.selectedIndex].value);location.href=location.href.setQuery("l","")}
+function setLangType(a){var b=new Date;b.setTime(b.getTime()+6048E8);setCookie("lang_type",a,b,"/")}
+function doDocumentPreview(a){for(;"FORM"!=a.nodeName;)a=a.parentNode;if("FORM"==a.nodeName){a=a.getAttribute("editor_sequence");a=editorGetContent(a);window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var b=jQuery("#previewDocument");b.length?b=b[0]:(jQuery('').appendTo(document.body),b=
+jQuery("#previewDocument")[0]);b&&(b.content.value=a,b.submit())}}
+function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if("undefined"!=typeof b&&b&&"undefined"!=typeof editorRelKeys&&"function"==typeof editorGetContent){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var g={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return!0;/\[\]$/.test(b.name)&&(b.name=b.name.replace(/\[\]$/,""));g[b.name]=g[b.name]?g[b.name]+("|@|"+c):b.value});exec_xml("document",
+"procDocumentTempSave",g,completeDocumentSave,["error","message","document_srl"],g,a.form);editorRelKeys[b].content.value=d;return!1}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))}
+function doDocumentSelect(a){opener&&opener.objForSavedDoc&&(opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite"));window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=[];function doAddDocumentCart(a){addedDocument[addedDocument.length]=a.value;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)}
+function callAddDocumentCart(a){1>addedDocument.length||a!=addedDocument.length||(a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[])}
+function transRGB2Hex(a){if(!a)return a;if(-1a.toLowerCase().indexOf("rgb"))return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");a="";for(var b=0;b>2,d=(d&3)<<4|c>>4,h=(c&15)<<2|g>>6,n=g&63,isNaN(c)?h=n=64:isNaN(g)&&(n=64),b=b+this._keyStr.charAt(e)+this._keyStr.charAt(d)+this._keyStr.charAt(h)+this._keyStr.charAt(n);return b},decode:function(a){var b="",d,c,g,e,h,n=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");n<
+a.length;)d=this._keyStr.indexOf(a.charAt(n++)),c=this._keyStr.indexOf(a.charAt(n++)),e=this._keyStr.indexOf(a.charAt(n++)),h=this._keyStr.indexOf(a.charAt(n++)),d=d<<2|c>>4,c=(c&15)<<4|e>>2,g=(e&3)<<6|h,b+=String.fromCharCode(d),64!=e&&(b+=String.fromCharCode(c)),64!=h&&(b+=String.fromCharCode(g));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",d=0;dc?b+=String.fromCharCode(c):(127c?b+=String.fromCharCode(c>>
+6|192):(b+=String.fromCharCode(c>>12|224),b+=String.fromCharCode(c>>6&63|128)),b+=String.fromCharCode(c&63|128))}return b},_utf8_decode:function(a){for(var b="",d=0,c=c1=c2=0;dc?(b+=String.fromCharCode(c),d++):191c?(c2=a.charCodeAt(d+1),b+=String.fromCharCode((c&31)<<6|c2&63),d+=2):(c2=a.charCodeAt(d+1),c3=a.charCodeAt(d+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),d+=3);return b}};
+if("undefined"==typeof resizeImageContents)var resizeImageContents=function(){};if("undefined"==typeof activateOptionDisabled)var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show()}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide()}
+function open_calendar(a,b,d){"undefined"==typeof b&&(b="");var c="./common/tpl/calendar.php?";a&&(c+="fo_id="+a);b&&(c+="&day_str="+b);d&&(c+="&callback_func="+d);popopen(c,"Calendar")}var loaded_popup_menus=XE.loaded_popup_menus;function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,d){XE.displayPopupMenu(a,b,d)}function GetObjLeft(a){return jQuery(a).offset().left}function GetObjTop(a){return jQuery(a).offset().top}
+function replaceOuterHTML(a,b){jQuery(a).replaceWith(b)}function getOuterHTML(a){return jQuery(a).html().trim()}function setCookie(a,b,d,c){a=a+"="+escape(b)+(d?"; expires="+d.toGMTString():"")+"; path="+(c?c:"/");document.cookie=a}function getCookie(a){if(a=document.cookie.match(RegExp(a+"=(.*?)(?:;|$)")))return unescape(a[1])}function is_def(a){return"undefined"!=typeof a}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1)}function get_by_id(a){return document.getElementById(a)}
+jQuery(function(a){a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('').appendTo(document.body));d.hide();d=a(b.target).filter("a,div,span");d.length||(d=a(b.target).closest("a,div,span"));if(d.length){var d=d.attr("class"),c;d&&(c=d.match(/(?:^| )((document|comment|member)_([1-9]\d*))(?: |$)/));if(c){d="get"+ucfirst(c[2])+"Menu";c={mid:current_mid,cur_mid:current_mid,menu_id:c[1],target_srl:c[3],cur_act:current_url.getQuery("act"),
+page_x:b.pageX,page_y:b.pageY};var g=["error","message","menus"];b.preventDefault();b.stopPropagation();is_def(window.xeVid)&&(c.vid=xeVid);if(is_def(XE.loaded_popup_menus[c.menu_id]))return XE.displayPopupMenu(c,g,c);show_waiting_message=!1;exec_xml("member",d,c,XE.displayPopupMenu,g,c);show_waiting_message=!0}}});a("a._xe_popup").click(function(){var b=a(this),d=b.attr("name"),b=b.attr("href");d||(d="_xe_popup_"+Math.floor(1E3*Math.random()));(d=window.open(b,d,"left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no"))&&
+d.focus();return!1});a.datepicker&&a.datepicker.setDefaults({dateFormat:"yy-mm-dd"})});var show_waiting_message=!0;
+function xml2json(a,b,d){var c={toObj:function(a){var b={};if(1==a.nodeType){if(d&&a.attributes.length)for(var g=0;gg&&2>l)for(c.removeWhite(a),k=a.firstChild;k;k=k.nextSibling)3==k.nodeType?b=c.escape(k.nodeValue):4==k.nodeType?
+b=c.escape(k.nodeValue):b[k.nodeName]?b[k.nodeName]instanceof Array?b[k.nodeName][b[k.nodeName].length]=c.toObj(k):b[k.nodeName]=[b[k.nodeName],c.toObj(k)]:b[k.nodeName]=c.toObj(k);else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(g)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(l)if(1";for(e=a.firstChild;e;e=e.nextSibling)b+=c(e);b+=""+a.nodeName+">"}else b+="/>"}else 3==a.nodeType?b+=a.nodeValue:
+4==a.nodeType&&(b+="'.replace(/%id%/g,"xeTmpIframe")).appendTo(document.body);a("#xeVirtualForm").remove();var d=a(''.replace(/%id%/g,"xeVirtualForm")).attr({id:"xeVirtualForm",method:"post",action:b,target:"xeTmpIframe"});c.xeVirtualRequestMethod="xml";c.xeRequestURI=location.href.replace(/#(.*)$/i,"");c.xeVirtualRequestUrl=request_uri;
+a.each(c,function(b,c){a('').attr("name",b).attr("value",c).appendTo(d)});d.appendTo(document.body).submit()}function d(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function c(){return""}a.exec_xml=window.exec_xml=function(c,e,h,n,l,m,k){function u(b,d,h){b=a(b).find("response")[0];d="";var u=[],t={};h="";w.css("display","none").trigger("cancel_confirm");if(!b)return alert(x.responseText),null;h=xml2json(b,!1,!1);h="object"==typeof JSON&&a.isFunction(JSON.parse)?
+JSON.parse(h):eval("("+h+")");h=h.response;if("undefined"==typeof h){u.error=-1;u.message="Unexpected error occured.";try{"undefined"!=typeof(d=b.childNodes[0].firstChild.data)&&(u.message+="\r\n"+d)}catch(p){}return u}a.each(l,function(a,b){t[b]=!0});t.redirect_url=!0;t.act=!0;a.each(h,function(a,b){t[a]&&(u[a]=b)});if(0!=u.error){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(c,e,u,n,l,m,k);alert((u.message||"An unknown error occured while loading ["+c+"."+e+"]").replace(/\\n/g,"\n"));
+return null}if(u.redirect_url)return location.href=u.redirect_url.replace(/&/g,"&"),null;a.isFunction(n)&&n(u,l,m,k)}var t=request_uri+"index.php";h||(h={});a.isArray(h)&&(h=d(h));h.module=c;h.act=e;"undefined"!=typeof xeVid&&(h.vid=xeVid);"undefined"==typeof l||1>l.length?l=["error","message"]:l.push("error","message");if(a.isArray(ssl_actions)&&h.act&&0<=a.inArray(h.act,ssl_actions)){var p=default_url||request_uri,t=window.https_port||443,p=a("").attr("href",p)[0],y="https://"+p.hostname.replace(/:\d+$/,
+"");443!=t&&(y+=":"+t);"/"!=p.pathname[0]&&(y+="/");y+=p.pathname;t=y.replace(/\/$/,"")+"/index.php"}p=a("").attr("href",location.href)[0];y=a("").attr("href",t)[0];if(p.protocol!=y.protocol||p.port!=y.port)return b(t,h);var z=[],q=0;z[q++]='';z[q++]="";z[q++]="";a.each(h,function(a,b){z[q++]="<"+a+">"});z[q++]="";z[q++]="";var x=null;x&&0!=x.readyState&&x.abort();try{a.ajax({url:t,type:"POST",
+dataType:"xml",data:z.join("\n"),contentType:"text/plain",beforeSend:function(a){x=a},success:u,error:function(a,b){w.css("display","none");var c="";if("parsererror"==b){if(""==a.responseText)return;c="The result is not valid XML :\n-------------------------------------\n"+a.responseText.replace(/<[^>]+>/g,"")}else c=b;try{console.log(c)}catch(e){}}})}catch(C){alert(C);return}var w=a(".wfsr");show_waiting_message&&w.length&&((h=a(".wfsr").data("timeout_id"))&&clearTimeout(h),a(".wfsr").css("opacity",
+0),a(".wfsr").data("timeout_id",setTimeout(function(){a(".wfsr").css("opacity","")},1E3)),w.html(waiting_message).show())};a.exec_json=function(b,c,d,n){"undefined"==typeof c&&(c={});b=b.split(".");if(2==b.length){var l=a(".wfsr").data("timeout_id");l&&clearTimeout(l);a(".wfsr").css("opacity",0);a(".wfsr").data("timeout_id",setTimeout(function(){a(".wfsr").css("opacity","")},1E3));show_waiting_message&&a(".wfsr").html(waiting_message).show();a.extend(c,{module:b[0],act:b[1]});"undefined"!=typeof xeVid&&
+a.extend(c,{vid:xeVid});a.ajax({type:"POST",dataType:"json",url:request_uri,contentType:"application/json",data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");0!=b.error&&-1E3(B?D:r)||v&&v<(A?D:r))return this.cast("ALERT",[l,s,"outofrange",p,v])&&!1;if(f.equalto&&(v=(r=m[f.equalto])?a.trim(b(a(r))):"",r&&v!==w))return this.cast("ALERT",[l,s,"equalto"])&&!1;A=(f.rule||"").split(",");r=0;for(v=A.length;rn.indexOf("%s")?
+m+n:n.replace("%s",m));if(h||l)n+="("+(h||"")+"~"+(l||"")+")";this.cast("SHOW_ALERT",[n]);a(d.elements[e]).focus()},API_SHOW_ALERT:function(a,b){alert(b[0])},API_ADD_MESSAGE:function(a,b){c[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var d=b[0];return c[d]||d},API_ADD_CALLBACK:function(a,b){h[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete h[b[0]]}}));xe.registerApp(l);var m=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");c&&"object"==
+typeof c&&(c=c.value);if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||""}catch(d){}}});l.registerPlugin(new m)})(jQuery);function filterAlertMessage(a){var b=a.message,d=a.act;a=a.redirect_url;var c=location.href;"undefined"!=typeof b&&b&&"success"!=b&&alert(b);"undefined"!=typeof d&&d?c=current_url.setQuery("act",d):"undefined"!=typeof a&&a&&(c=a);c==location.href&&(c=c.replace(/#(.*)$/,""));location.href=c}function procFilter(a,b){b(a);return!1}
+function legacy_filter(a,b,d,c,g,e,h,n){var l=xe.getApp("Validator")[0],m=jQuery,k=[];if(!l)return!1;b.elements._filter||m(b).prepend('');b.elements._filter.value=a;k[0]=a;k[1]=function(a){var k={};a=m(a).serializeArray();m.each(a,function(a,b){var c=m.trim(b.value),d=b.name;if(!c||!d)return!0;n[d]&&(d=n[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));k[d]=k[d]?k[d]+("|@|"+c):b.value});if(h&&!confirm(h))return!1;exec_xml(d,c,k,g,e,k,b)};l.cast("ADD_CALLBACK",k);
+l.cast("VALIDATE",[b,a]);return!1};
diff --git a/config/config.inc.php b/config/config.inc.php
index 5d0daeba1..c247f02c7 100644
--- a/config/config.inc.php
+++ b/config/config.inc.php
@@ -42,7 +42,7 @@ define('__ZBXE__', __XE__);
* '2' means 'release candidate' status.
* '3' means 'final' status.
*/
-define('__XE_VERSION__', '1.7.3.6');
+define('__XE_VERSION__', '1.7.3.7');
/**
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.