{ //class MsgBox function MsgBox() { this.mo_element = null; this.mo_modalElement = null; this.mo_drag = null; this.ms_colorTitle = "FFDFDF"; this.ma_colorTitleBar = new Array("C44979", "A33D65"); this.ma_colorContent = new Array("FFFFFF", "E5E5E5"); this.ms_option = "alert"; this.ms_title = "알림 "; this.ms_message = "경고!"; this.mo_funcTrue = null; this.mo_funcFalse = null; } MsgBox.prototype = { setOption: function(option) { if (option == "confirm") { this.ms_option = option; this.ms_title = "확인 "; } else { this.ms_option = "alert"; this.ms_title = "알림 "; } }, setTitle: function(title) { this.ms_title = title + " "; }, setMessage: function(message) { this.ms_message = message; }, setColorTitle: function(color) { this.ms_colorTitle = color; }, setColorTitleBar: function(color) { try { this.ma_colorTitleBar[0] = color[0]; this.ma_colorTitleBar[1] = color[1]; } catch (e) {} }, setColorContent: function(color) { try { this.ma_colorContent[0] = color[0]; this.ma_colorContent[1] = color[1]; } catch (e) {} }, create: function() { var thisElement = this; this.destroy(); this.mo_modalElement = document.createElement("DIV"); this.mo_modalElement.style.position = "absolute"; this.mo_modalElement.style.left = "0px"; this.mo_modalElement.style.top = "0px"; this.mo_modalElement.style.width = Element.getWidth(document.body); this.mo_modalElement.style.height = Element.getHeight(document.body); this.mo_modalElement.style.background = "url('http://beta.somsee.com/img/transparent.gif')"; this.mo_modalElement.style.zIndex = 10000; this.mo_modalElement.onclick = function() { var i = 0; var objTimer = setInterval (function() { if (i > 6) { clearTimeout(objTimer); thisElement.mo_element.firstChild.firstChild.style.filter = 'progid:DXImageTransform.Microsoft.gradient(StartColorStr=#FF' + thisElement.ma_colorTitleBar[0] + ',EndColorStr=#FF' + thisElement.ma_colorTitleBar[1] + ',GradientType=0)'; return; } if (i%2) { thisElement.mo_element.firstChild.firstChild.style.filter = 'progid:DXImageTransform.Microsoft.gradient(StartColorStr=#55' + thisElement.ma_colorTitleBar[0] + ',EndColorStr=#55' + thisElement.ma_colorTitleBar[1] + ',GradientType=0)'; } else { thisElement.mo_element.firstChild.firstChild.style.filter = 'progid:DXImageTransform.Microsoft.gradient(StartColorStr=#FF' + thisElement.ma_colorTitleBar[0] + ',EndColorStr=#FF' + thisElement.ma_colorTitleBar[1] + ',GradientType=0)'; } i++; }, 100); } this.mo_element = document.createElement("DIV"); this.mo_element.style.position = "absolute"; this.mo_element.setAttribute("id", "alert"); this.mo_element.style.zIndex = 10001; document.body.appendChild(this.mo_element); document.body.appendChild(this.mo_modalElement); this.draggable(); switch (this.ms_option) { case "confirm": var btnCode = ' '; break; case "alert": var btnCode = ''; break; } this.mo_element.innerHTML = '