function setLayer(prev,next,layer,tag,size,set,px){this.prevObj=BASE.$(prev);this.nextObj=BASE.$(next);this.layerObj=BASE.$(layer);this.childeTag=tag;this.nodeSize=0;this.set=parseInt(set);this.layerWidth=0;this.layerSize=size;this.px=parseInt(px);this.cnt=0;this.timer=0;this.aniHTML=this.layerObj.innerHTML;this.newObj="";this.tmpCnt=0;for(var i=0;i<this.layerObj.childNodes.length;i++){if(this.layerObj.childNodes[i].tagName==this.childeTag){this.nodeSize++;if(this.tmpCnt==0)this.tmpCnt=i;}}
this.layerWidth=this.layerObj.childNodes[this.tmpCnt].offsetWidth;};setLayer.prototype.init=function(obj,txt,type,timer){this.prevObj.onclick=function(){if(type=="d")obj.prev();else if(type=="a")obj.aniPrev();else if(type=="r")obj.rollPrev();}
this.nextObj.onclick=function(){if(type=="d")obj.next();else if(type=="a")obj.aniNext();else if(type=="r")obj.rollNext();}
this.layerObj.style.marginLeft="0px";this.newObjId=String(txt);if(timer!=null){this.timer=parseInt(timer);window.setTimeout(this.newObjId+".random(30000);",this.timer);}};setLayer.prototype.random=function(time){if(time!=null){this.timer=time;}if(this.nodeSize>this.layerSize){this.aniNext();}window.setTimeout(this.newObjId+".random();",this.timer);};setLayer.prototype.prev=function(){if((parseInt(this.layerObj.style.marginLeft)+parseInt(this.layerWidth*this.set))<=0){this.layerObj.style.marginLeft=(parseInt(this.layerObj.style.marginLeft)+parseInt(this.layerWidth*this.set))+"px";}else{alert("Ã³À½ÀÌ¹ÌÁö ÀÔ´Ï´Ù.");}};setLayer.prototype.next=function(){if((parseInt(this.layerObj.style.marginLeft)-parseInt(this.layerWidth*this.layerSize))>-(parseInt(this.layerWidth*this.nodeSize))){this.layerObj.style.marginLeft=(parseInt(this.layerObj.style.marginLeft)-parseInt(this.layerWidth*this.set))+"px";}else{alert("¸¶Áö¸·ÀÌ¹ÌÁö ÀÔ´Ï´Ù.");}};setLayer.prototype.rollPrev=function(){if((parseInt(this.layerObj.style.marginLeft)+parseInt(this.layerWidth*this.set))<=0){this.layerObj.style.marginLeft=(parseInt(this.layerObj.style.marginLeft)+parseInt(this.layerWidth*this.set))+"px";}else{this.layerObj.style.marginLeft=-(parseInt(this.layerWidth*(this.layerSize-this.set)))+"px";}};setLayer.prototype.rollNext=function(){if((parseInt(this.layerObj.style.marginLeft)-parseInt(this.layerWidth*this.layerSize))>-(parseInt(this.layerWidth*this.nodeSize))){this.layerObj.style.marginLeft=(parseInt(this.layerObj.style.marginLeft)-parseInt(this.layerWidth*this.set))+"px";}else{this.layerObj.style.marginLeft="0px";}};setLayer.prototype.aniPrev=function(obj){var frameW=this.layerWidth*this.set;if(parseInt(this.layerObj.style.marginLeft)==0){if(this.aniHTML!=""){this.layerObj.innerHTML+=this.aniHTML;this.aniHTML="";}
this.layerObj.style.marginLeft=-(this.layerWidth*this.nodeSize)+"px";}
this.layerObj.style.marginLeft=(parseInt(this.layerObj.style.marginLeft)+this.px)+"px";this.cnt+=this.px;if(this.cnt==frameW)this.cnt=0;else window.setTimeout(this.newObjId+".aniPrev()",5);if(parseInt(this.layerObj.style.marginLeft)==this.layerWidth*((this.nodeSize*2)-this.layerSize)){this.layerObj.style.marginLeft=this.layerWidth*(this.nodeSize-this.layerSize);}};setLayer.prototype.aniNext=function(obj){var frameW=this.layerWidth*this.set;this.layerObj.style.marginLeft=(parseInt(this.layerObj.style.marginLeft)-this.px)+"px";this.cnt+=this.px;if(this.cnt==frameW)this.cnt=0;else window.setTimeout(this.newObjId+".aniNext()",5);if(parseInt(this.layerObj.style.marginLeft)==this.layerWidth*-(this.nodeSize-this.layerSize)){if(this.aniHTML!=""){this.layerObj.innerHTML+=this.aniHTML;this.aniHTML="";}}
if(parseInt(this.layerObj.style.marginLeft)==this.layerWidth*-((this.nodeSize*2)-this.layerSize)){this.layerObj.style.marginLeft=(this.layerWidth*-(this.nodeSize-this.layerSize))+"px";}};
function layerBanner(bannerId,iconId,bannerTag,isClick,isAni,px){this.over=false;this.selBanner=0;this.childTag=String(bannerTag);this.BannerObj=BASE.$(String(bannerId));this.iconObj=BASE.$(String(iconId)).getElementsByTagName("A");this.bannerWidth=0;this.childLen=0;this.isAni=isAni;this.tmpCnt=0;this.px=px;this.cnt=0;this.isClick=isClick;this.newObjId=null;this.tmpObj=null;this.ranTime=0;this.timer=0;};layerBanner.prototype.init=function(obj,newObjId,timer){for(var i=0;i<this.BannerObj.childNodes.length;i++){if(this.BannerObj.childNodes[i].tagName==this.childTag){this.childLen++;if(this.tmpCnt==0)this.tmpCnt=i;}}
this.bannerWidth=parseInt(this.BannerObj.childNodes[this.tmpCnt].offsetWidth);this.newObjId=String(newObjId);this.timer=parseInt(timer);for(var i=0;i<this.iconObj.length;i++){if(this.isClick){if(this.isAni){this.iconObj[i].onclick=function(){obj.aniView(this);}}
else{this.iconObj[i].onclick=function(){obj.view(this);}}
this.iconObj[i].onmouseover=function(){obj.over=true;}
this.iconObj[i].onmouseout=function(){obj.over=false;}}else{if(this.isAni){this.iconObj[i].onmouseover=function(){obj.aniView(this);obj.over=true;}
this.iconObj[i].onmouseout=function(){obj.over=false;}}else{this.iconObj[i].onmouseover=function(){obj.view(this);obj.over=true;}
this.iconObj[i].onmouseout=function(){obj.over=false;}}}}
this.BannerObj.style.marginLeft="0px";if(this.timer>0){window.setTimeout(this.newObjId+".random(3000);",this.timer);}};layerBanner.prototype.random=function(time){if(time!=null){this.timer=time;}
if(!this.over){if(this.isAni){if(this.selBanner+1==this.childLen)this.aniView(this.iconObj[0]);else this.aniView(this.iconObj[this.selBanner+1]);}else{if(this.selBanner+1==this.childLen)this.view(this.iconObj[0]);else this.view(this.iconObj[this.selBanner+1]);}}
window.setTimeout(this.newObjId+".random();",this.timer);};layerBanner.prototype.aniView=function(obj){if(obj!=null){for(var i=0;i<this.iconObj.length;i++){if(this.iconObj[i]==obj){this.tmpObj=i;break;}}}
if(this.tmpObj!=this.selBanner){if(this.tmpObj<this.selBanner){this.BannerObj.style.marginLeft=(parseInt(this.BannerObj.style.marginLeft)+this.px)+"px";}
else if(this.tmpObj>this.selBanner){this.BannerObj.style.marginLeft=(parseInt(this.BannerObj.style.marginLeft)-this.px)+"px";}
this.cnt+=this.px;if(this.cnt==this.bannerWidth){this.cnt=0;this.iconObj[this.selBanner].getElementsByTagName("IMG")[0].src=this.iconObj[this.selBanner].getElementsByTagName("IMG")[0].src.replace("_on.gif",".gif");if(this.tmpObj<this.selBanner){this.selBanner--;}
else if(this.tmpObj>this.selBanner){this.selBanner++;}
if(this.selBanner!=this.tmpObj){window.setTimeout(this.newObjId+".aniView()",5);}else{this.iconObj[this.tmpObj].getElementsByTagName("IMG")[0].src=this.iconObj[this.tmpObj].getElementsByTagName("IMG")[0].src.replace(".gif","_on.gif");}}else{window.setTimeout(this.newObjId+".aniView()",5);}}};layerBanner.prototype.view=function(obj){for(var i=0;i<this.iconObj.length;i++){if(this.iconObj[i]==obj){this.BannerObj.style.marginLeft=(-(this.bannerWidth*i))+"px";this.iconObj[this.selBanner].getElementsByTagName("IMG")[0].src=this.iconObj[this.selBanner].getElementsByTagName("IMG")[0].src.replace("_on.gif",".gif");this.iconObj[i].getElementsByTagName("IMG")[0].src=this.iconObj[i].getElementsByTagName("IMG")[0].src.replace(".gif","_on.gif");this.selBanner=i;break;}}};
function imgTab(tabId,contId,tagName,isClick,isRan){this.tabObj=BASE.$(tabId).getElementsByTagName("A");this.contTagName=tagName;this.isClick=isClick;this.contObj=new Array();this.selTab=0;this.isRan=isRan;this.contCnt=0;if(contId!=""){var contTmp=BASE.$(String(contId)).childNodes;for(var i=0;i<contTmp.length;i++){if(contTmp[i].tagName==tagName){this.contObj[this.contCnt]=contTmp[i];this.contObj[this.contCnt].style.display="none";this.contCnt++;}}}};imgTab.prototype.init=function(obj){var tmpNum=0;for(var i=0;i<this.tabObj.length;i++){if(this.isClick){this.tabObj[i].onclick=function(){obj.view(this)};}
else{this.tabObj[i].onmouseover=function(){obj.view(this)};}}
if(this.isRan){tmpNum=parseInt(BASE.getRandom(this.contCnt));}
this.view(this.tabObj[tmpNum]);};imgTab.prototype.view=function(btn){if(this.contCnt>0){this.contObj[this.selTab].style.display="none";}
for(var i=0;i<this.tabObj.length;i++){if(this.tabObj[i]==btn){this.selTab=i;}
this.tabObj[i].getElementsByTagName("IMG")[0].src=this.tabObj[i].getElementsByTagName("IMG")[0].src.replace("_on.gif",".gif");}
btn.getElementsByTagName("IMG")[0].src=btn.getElementsByTagName("IMG")[0].src.replace(".gif","_on.gif");if(this.contCnt>0){this.contObj[this.selTab].style.display="block";}};
function layerPopup(){this.bodyW=parseInt(document.documentElement.scrollWidth);this.bodyH=parseInt(document.documentElement.scrollHeight);this.browerW=parseInt(document.documentElement.clientWidth);this.browerH=parseInt(document.documentElement.clientHeight);this.popupObj=null;this.backObj=null;this.isCenter=false;this.leftP=0;this.TopP=0;};layerPopup.prototype.openType1=function(popId,isCenter,leftP,topP,evt){if(typeof evt=="object"){this.leftP=evt.clientX;this.topP=evt.clientY;}else{this.leftP=leftP;this.topP=topP;}
this.popupObj=BASE.$(String(popId));this.isCenter=isCenter;this.popupObj.style.display="block";if(this.isCenter){this.popupObj.style.left=((this.browerW-parseInt(this.popupObj.offsetWidth))/2)+"px";this.popupObj.style.top=((this.browerH-parseInt(this.popupObj.offsetHeight))/2)+"px";}else{this.popupObj.style.left=parseInt(this.leftP)+"px";this.popupObj.style.top=parseInt(this.topP)+"px";}};layerPopup.prototype.openType2=function(popId,backId,isCenter,leftP,topP,evt){this.backObj=BASE.$(String(backId));this.popupObj=BASE.$(String(popId));this.isCenter=isCenter;if(typeof evt=="object"){this.leftP=evt.clientX;this.topP=evt.clientY;}else{this.leftP=leftP;this.topP=topP;}
if(typeof this.backObj=="object"){this.backObj.style.display="block";this.backObj.style.width=this.bodyW+"px";this.backObj.style.height=this.bodyH+"px";}
this.popupObj.style.display="block";if(this.isCenter){this.popupObj.style.left=((this.browerW-parseInt(this.popupObj.offsetWidth))/2)+"px";this.popupObj.style.top=((this.browerH-parseInt(this.popupObj.offsetHeight))/2)+"px";}else{this.popupObj.style.left=parseInt(this.leftP)+"px";this.popupObj.style.top=parseInt(this.topP)+"px";}};layerPopup.prototype.close=function(){if(this.backObj!=null){this.backObj.style.display="none";}
this.popupObj.style.display="none";this.popupObj=null;this.backObj=null;this.isCenter=false;this.leftP=0;this.TopP=0;};layerPopup.prototype.resize=function(){if(this.popupObj!=null&&this.popupObj.style.display=="block"){this.bodyW=parseInt(document.documentElement.scrollWidth);this.bodyH=parseInt(document.documentElement.scrollHeight);this.browerW=parseInt(document.documentElement.clientWidth);this.browerH=parseInt(document.documentElement.clientHeight);if(this.backObj!=null&&this.backObj.style.display!="none"){this.backObj.style.width=this.bodyW+"px";this.backObj.style.height=this.bodyH+"px";}
if(this.isCenter){this.popupObj.style.left=((this.browerW-parseInt(this.popupObj.offsetWidth))/2)+"px";this.popupObj.style.top=((this.browerH-parseInt(this.popupObj.offsetHeight))/2)+"px";}else{this.popupObj.style.left=parseInt(this.leftP)+"px";this.popupObj.style.top=parseInt(this.topP)+"px";}}};
 
if(typeof BASE=="undefined"){var BASE={};}
BASE.$=function(id){var aryObj=[];for(var i=0;i<arguments.length;i++){if(typeof arguments[i]=='string'){aryObj.push(document.getElementById(arguments[i]));}else{aryObj.push(arguments[i]);}}
return aryObj[1]?aryObj:aryObj[0];}
BASE.trim=function(str){return str.replace(/(^\s*)|(\s*$)/g,"");}
BASE.setDisplay=function(id){$(id).style.display=($(id).style.display=='none')?'block':'none';}
BASE.addEvent=function(obj,type,evt){if(obj.addEventListener){if(type=='mousewheel')type='DOMMouseScroll';obj.addEventListener(type,evt,false);}else{obj.attachEvent("on"+type,evt);}}
BASE.delEvent=function(obj,type,evt){if(obj.removeEventListener){if(type=='mousewheel')type='DOMMouseScroll';obj.removeEventListener(type,evt,false);}else{obj.detachEvent('on'+type,evt);}}
BASE.getPositionX=function(obj){var left=0;while(obj)
{left+=obj.offsetLeft||0;obj=obj.offsetParent;}
return parseInt(left);}
BASE.getPositionY=function(obj){var top=0;while(obj)
{top+=obj.offsetTop||0;obj=obj.offsetParent;}
return parseInt(top);}
BASE.getElementsByClassName=function(strClassName,strTagName,oElm){var arrElements=(strTagName=="*"&&document.all)?document.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)){arrReturnElements.push(oElement);}}
return(arrReturnElements)}
BASE.setCookie=function(cookieName,cookieValue){document.cookie=cookieName+"="+escape(cookieValue)+"; path=/;domain=paran.com;";}
BASE.getCookie=function(cookieName){var search=cookieName+"=";var cookie=document.cookie;if(cookie.length>0){startIndex=cookie.indexOf(cookieName);if(startIndex!=-1){startIndex+=cookieName.length;endIndex=cookie.indexOf(";",startIndex);if(endIndex==-1)endIndex=cookie.length;return unescape(cookie.substring(startIndex+1,endIndex));}else{return false;}}else{return false;}}
BASE.getHttpObj=function(){var obj;if(window.ActiveXObject){obj=new ActiveXObject("Microsoft.XMLHTTP");}else if(window.XMLHttpRequest){obj=new XMLHttpRequest();}else{obj=false;}
return obj;}
BASE.resizeIframe=function(iframe_id){var h=(self.innerHeight)?document.documentElement.offsetHeight:document.body.scrollHeight;try{parent.BASE.$(iframe_id).style.height=h+"px";}catch(e){}}
BASE.popUp=function(url,name,w,h,scroll,resize,center){if(!scroll)scroll=0;if(!resize)resize=0;if(!status)status=1;if(center)
{var x=(screen.width-w)/2;var y=(screen.height-h)/2;center=",top="+y+",left="+x;}
return window.open(url,name,"width="+w+",height="+h+",resizable="+resize+",scrollbars="+scroll+center);}
BASE.getRandom=function(num){return Math.floor(Math.random()*parseInt(num));}

