Function.prototype.bind = function(object) { var _method = this; return function() { _method.apply(object, arguments); } } //------------------------------------------------------------------ // MyCheckBox //------------------------------------------------------------------ function MyCheckBoxes(oForm) { if (!oForm) return; this.checkboxes = []; this.limit = 0; this.form = oForm; var elems = oForm.elements; if (elems.length == 0) return; for (var i=0;i this.limit) { alert(this.limit + "개 까지만 선택할 수 있습니다"); oCheckbox.onImgCheckBoxClick(); } } } } }, toggle:function() { if (this.toggled == false) this.checkall(); else this.uncheckall(); this.toggled = !this.toggled; }, checkall:function() { for (var i=0;i1){ this.scrolling[objID+"tid"] = setTimeout("scrollFunc.scrolling('"+this.action[objID]+"')",4000); } }, scrolling : function(objID){ var obj = document.getElementById(objID).getElementsByTagName("ul")[0]; this.action[objID+"posY"] = this.action[objID+"posY"]-this.action[objID+"numb"]; obj.style.top = this.action[objID+"posY"] + "px"; if(this.action[objID+"posY"]>this.action[objID+"cellHeight"]*(-1)){ this.status = false; this.scrolling[objID+"tid"] = setTimeout("scrollFunc.scrolling('"+objID+"')",this.action[objID+"speed"]); } else { this.status = true; this.action[objID+"posY"] = 0; obj.style.top = this.action[objID+"posY"] + "px"; clearTimeout(scrollFunc.scrolling[objID+"tid"]); this.scrolling[objID+"tid"] = setTimeout("scrollFunc.scrolling('"+objID+"')",3000); var strValue = obj.getElementsByTagName("li")[0].innerHTML; obj.removeChild(obj.getElementsByTagName("li")[0]); obj.innerHTML = obj.innerHTML + "
  • " + strValue + "
  • "; } obj.onmouseover = function(){ scrollFunc.stop(objID) } obj.onmouseout = function(){ scrollFunc.play(objID) } }, stop : function(objID){ clearTimeout(scrollFunc.scrolling[objID+"tid"]); }, play : function(objID){ scrollFunc.scrolling[objID+"tid"] = (scrollFunc.status==true) ? setTimeout("scrollFunc.scrolling('"+objID+"')",1000) : setTimeout("scrollFunc.scrolling('"+objID+"')",scrollFunc.action[scrollFunc.objID+"speed"]); }, next : function(objID){ if(document.getElementById(objID).getElementsByTagName("li").length>1){ clearTimeout(scrollFunc.scrolling[objID+"tid"]); this.scrolling[objID+"tid"] = setTimeout("scrollFunc.scrolling('"+objID+"')",1); } }, prev : function(objID){ if(document.getElementById(objID).getElementsByTagName("li").length>1){ clearTimeout(scrollFunc.scrolling[objID+"tid"]); var obj = document.getElementById(objID).getElementsByTagName("ul")[0]; this.action[objID+"posY"] = this.action[objID+"cellHeight"]*(-1); var strValue = obj.getElementsByTagName("li")[obj.getElementsByTagName("li").length-1].innerHTML; obj.removeChild(obj.getElementsByTagName("li")[obj.getElementsByTagName("li").length-1]); obj.innerHTML = "
  • " + strValue + "
  • " + obj.innerHTML; obj.style.top = this.action[objID+"posY"] + "px"; this.scrolling[objID+"tid"] = setTimeout("scrollFunc.scrollingPrev('"+objID+"')",1); } }, scrollingPrev : function(objID){ var obj = document.getElementById(objID).getElementsByTagName("ul")[0]; this.action[objID+"posY"] = this.action[objID+"posY"]+this.action[objID+"numb"]; obj.style.top = this.action[objID+"posY"] + "px"; if(this.action[objID+"posY"]!=0){ this.scrolling[objID+"tid"] = setTimeout("scrollFunc.scrollingPrev('"+objID+"')",1); } else { this.scrolling[objID+"tid"] = setTimeout("scrollFunc.scrolling('"+this.action[objID]+"')",3000); } } }