var mixsh_explode_dot = "\n+|+e9+|+\n"; var mixsh_explode_dot2 = "+|+e9.e9+|+"; var nowTS = new Date(); //휠이벤트 관리를 위한 함수 function onMouseWheel() { return true; } window.onmousewheel = document.onmousewheel = onMouseWheel; function isIE() { var ua = navigator.userAgent.toLowerCase(); return (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1); } function setPng24(obj) { obj.width=obj.height=1; obj.className=obj.className.replace(/\bpng24\b/i,''); obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" obj.src=''; return '' } var loadHtmlContentsTarget =""; function loadHtmlContents(target,turl,ttar) { //if(ttar) nowCareaType = ttar; //else nowCareaType = 'html_contents'; loadHtmlContentsTarget = target; var xmlRequest = new Ajax.Request( turl, { method: 'get', parameters: '', onComplete: setHtmlContents }); } function setHtmlContents(data) { loadHtmlContentsTarget.update(data.responseText); } String.prototype.bytes = function() { /* var str = this; var l = 0; for (var i=0; i 128) ? 2 : 1; return l; */ var sVal = this; var iMaxlength = sVal.length; var sOneByteStr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !@#$%^&*(),./<>?;':\"=-_+"; var iByteLength = 0; for(var ii = 0; ii < iMaxlength; ii++) { if (sVal.charCodeAt(ii) > 127) { iByteLength++; iByteLength++; } else { iByteLength++; } } return iByteLength; } String.prototype.cut = function(len) { var str = this; var l = 0; for (var i=0; i 128) ? 2 : 1; if (l > len) return str.substring(0,i) + "..."; } return str; } String.prototype.URLEncode = function URLEncode( ) { var SAFECHARS = "0123456789" + // Numeric "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + // Alphabetic "abcdefghijklmnopqrstuvwxyz" + "-_.!~*'()"; // RFC2396 Mark characters var HEX = "0123456789ABCDEF"; var plaintext = this; var encoded = ""; for (var i = 0; i < plaintext.length; i++ ) { var ch = plaintext.charAt(i); if (ch == " ") { encoded += "+"; // x-www-urlencoded, rather than %20 } else if (SAFECHARS.indexOf(ch) != -1) { encoded += ch; } else { var charCode = ch.charCodeAt(0); if (charCode > 255) { alert( "Unicode Character '" + ch + "' cannot be encoded using standard URL encoding.\n" + "(URL encoding only supports 8-bit characters.)\n" + "A space (+) will be substituted." ); encoded += "+"; } else { encoded += "%"; encoded += HEX.charAt((charCode >> 4) & 0xF); encoded += HEX.charAt(charCode & 0xF); } } } // for return encoded; } String.prototype.URLDecode = function URLDecode( ) { var HEXCHARS = "0123456789ABCDEFabcdef"; var encoded = this; var plaintext = ""; var i = 0; while (i < encoded.length) { var ch = encoded.charAt(i); if (ch == "+") { plaintext += " "; i++; } else if (ch == "%") { if (i < (encoded.length-2) && HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 && HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) { plaintext += unescape( encoded.substr(i,3) ); i += 3; } else { alert( 'Bad escape combination near ...' + encoded.substr(i) ); plaintext += "%[ERROR]"; i++; } } else { plaintext += ch; i++; } } // while return plaintext; } String.prototype.str_replace = function(src,dest) { var reg = new RegExp(src, "gi"); return this.replace(reg, dest); } String.prototype.number_format = function() { return this.replace(/(\d)(?=(?:\d{3})+(?!\d))/g,'$1,'); } String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); } String.prototype.ltrim = function() { return this.replace(/^\s+/,""); } String.prototype.rtrim = function() { return this.replace(/\s+$/,""); } Number.prototype.padZeros = function(size) { var str = this.toString(); while(str.length"); } String.prototype.stips_echar = function stips_echar() { var str = this; var special = new Array("?","&"); for(i=0; i< special.length;i++) { t = special[i]; str = str.str_replace(t,""); } return str; } String.prototype.stips_schar = function stips_schar() { var str = this; var special = new Array(":","\"","'","~","!","@","#","$","%","^","`","|"," ","-","\\(","\\)"); for(i=0; i< special.length;i++) { t = special[i]; str = str.str_replace(t,""); } return str; } String.prototype.strip_space = function() { return this.str_replace(" ",""); } String.prototype.is_schar = function () { var special = new Array(":","\"","'","~","!","@","#","$","%","^","`","|"," ","-"); for(i=0; i< special.length;i++) { t = special[i]; if(this.indexOf(t)!=-1) return true; } return false; } String.prototype.is_id = function() { var filter = /^[A-Za-z0-9]/; if (!filter.test(this)) return false; else return true; } String.prototype.is_url = function() { var filter = /^[A-Za-z]+:\/\/[A-Za-z0-9-]+\.[A-Za-z0-9]+/i if (!filter.test(this)) return false; else return true; } String.prototype.is_email = function() { var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i if (!filter.test(this)) return false; else return true; } String.prototype.is_mixshlink = function() { if(this.substr(0,23)=="http://inside.mixsh.com") return false; if(this.substr(0,16)=="inside.mixsh.com") return false; var filter=/^http:\/\/mixsh+\.[A-Za-z0-9]+/i; if (filter.test(this)) return true; var filter=/^http:\/\/[A-Za-z0-9-]+\.mixsh+\.[A-Za-z0-9]+/i; if (filter.test(this)) return true; var filter=/^mixsh+\.[A-Za-z0-9]+/i; if (filter.test(this)) return true; var filter=/^[A-Za-z0-9-]+\.mixsh+\.[A-Za-z0-9]+/i; if (filter.test(this)) return true; return false; } Element.Methods.fill = function(element) { $(element).style.height = document.body.scrollHeight+document.viewport.getHeight()+'px'; } Element.Methods.cleaning = function(element) { $(element).innerHTML = ' 
 '; } //FF outerhtml if(Prototype.Browser.Gecko) { HTMLElement.prototype.__defineGetter__("outerHTML", function() { var span = document.createElement("span"); span.appendChild(this.cloneNode(true)); return span.innerHTML; }); HTMLElement.prototype.__defineSetter__("outerHTML", function(html) { var range = document.createRange(); this.innerHTML = html; range.selectNodeContents(this); var frag = range.extractContents(); this.parentNode.insertBefore(frag, this); this.parentNode.removeChild(this); }); } function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } function getCookie(name) { var cookieName=name+"="; var x=0; while(x<=document.cookie.length) { var y=(x+cookieName.length); if(document.cookie.substring(x,y)==cookieName) { if((endOfCookie=document.cookie.indexOf(";",y))==-1) endOfCookie=document.cookie.length; return unescape(document.cookie.substring(y,endOfCookie)); } x=document.cookie.indexOf(" ",x)+1; if(x == 0) break; } return ""; } function clearCookie(name) { var now = new Date(); var yesterday = new Date(now.getTime() - 86400000); setCookie(name,'', yesterday); } function onlyNumberInput(t) { v = parseInt(t.value.replace(/[^0-9]/g,"")); if(!v) v=0; t.value = v; } function getChkboxValue(el) { for(i=0;i"+tit+"
"+str+"
"); $('pop_tooltip').style.left = ev.clientX-15+'px'; $('pop_tooltip').style.top = ev.clientY+15+'px'; global_tooltip_handle = new Effect.Appear($('pop_tooltip'),{duration:0.3}); } function hide_tooltip(str) { if(global_tooltip_handle) global_tooltip_handle.cancel(); global_tooltip_handle = new Effect.Fade($('pop_tooltip'),{duration:0.3}); } function showWaitPop(str) { $('pop_wait').select('.msg')[0].update(str); return Effect.Appear($('pop_wait'),{duration:0.5}); } function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } function hideAllEmbedOb() { $$('embed').each(function(el){ el.style.visibility = 'hidden'; }); $$('object').each(function(el){ el.style.visibility = 'hidden'; }); } function showAllEmbedOb() { $$('embed').each(function(el){ el.style.visibility = 'visible'; }); $$('object').each(function(el){ el.style.visibility = 'visible'; }); } function show_pop(el) { hideAllEmbedOb() $('cover').show(); $('cover').fill(); Effect.Appear($(el), {duration:0.3,beforeFinish:function(){}}); } function close_pop(el) { showAllEmbedOb(); var ef = Effect.Fade($(el), {duration:0.3,beforeFinish:function(){$('cover').hide();}}); }