//################################################################################## //## ÆË¾÷ //################################################################################## var POPUP = function() { this.mode = "divpop"; // ÆË¾÷¸ðµå{ divpop | winpop } this.items = new Object; this.popups = new Array; // ÆË¾÷µ¥ÀÌÅÍ this.template = ''; // ÅÛÇø´ this.cookies = ''; // ÄíŰÁ¤º¸ this.baseTop = 0; this.baseLeft = 0; this.selTop = 0; this.selLeft = 0; this.tmpHeight = 0; } // ÆË¾÷ °¡Á®¿À±â POPUP.prototype.getPopup = function() { var classObj = this; var myRequest = new Ajax.Request(domain+"rankup_module/rankup_popup/multiProcess.html?mode=popup_list", { method: 'get', onSuccess: function(transport) { //alert(transport.responseText); if(!transport.responseText.match(null)) { var resultData = transport.responseXML.getElementsByTagName('resultData')[0]; classObj.items = resultData.getElementsByTagName('item'); classObj.formalize(); } myRequest = null; } }); } // ÆË¾÷ µî·Ï POPUP.prototype.formalize = function() { for(var i=0; idocument.body.offsetWidth) { divpop.style.top = this.selTop + this.tmpHeight-1; divpop.style.left = this.baseLeft; this.selLeft = this.baseLeft + content_x.offsetWidth-1; this.selTop += this.tmpHeight-1; this.tmpHeight = content_x.offsetHeight; // °»½Å } if(content_x.offsetHeight>this.tmpHeight) this.tmpHeight = content_x.offsetHeight; if(browser.kind=="IE") { if(browser.version <= 6) { iframe_x.style.width = content_x.offsetWidth; iframe_x.style.height = content_x.offsetHeight; } } } catch(e) { alert(e.message); } break; case "winpop": // ¹Ì±¸Çö break; } } } // Äí۱Á±â POPUP.prototype.setCookie = function(no, expiredays) { var todayDate = new Date(); todayDate.setDate(todayDate.getDate()+expiredays); document.cookie = "popup_id"+no+"=checked; path=/; expires="+todayDate.toGMTString()+";"; } // ÆË¾÷â´Ý±â POPUP.prototype.closeWin = function(no, check) { if(this.mode=="divpop") { var divPop = $("divpop_id"+no); if(divPop.getElementsByTagName("input")[0].checked) this.setCookie(no,1); divPop.style.visibility = "hidden"; } else if(check) this.setCookie(no,1); } // ÆË¾÷ ¼³Á¤ POPUP.prototype.initialize = function(template) { this.template = $(template); // ÅÛÇø´ // alert(this.template); this.cookies = document.cookie; // Äí۷εå this.getPopup(); }