/* popup */ 
function winOpen(file,wid,hei,name){ 
	window.open(file, name, 'status=no, toolbar=no, location=no, menubar=no, directories=no, resizable=no, scrolling=no, width='+wid+', height='+hei+',top=200,left=250');	 
 }
/* popup */ 
function winOpen1(file,wid,hei,name){ 
	window.open(file, name, 'status=yes, toolbar=yes, location=yes, menubar=yes, directories=no, resizable=yes, scrollbars=yes, width='+wid+', height='+hei+',top=10,left=10');	 
 }

function winOpen2(file,wid,hei,name,top,left){
	window.open(file, name, 'status=no, toolbar=no, location=no, menubar=no, directories=no, resizable=no, scrolling=no, width='+wid+', height='+hei+',top='+top+',left='+left);	
}
 
/* record add*/
function addTr(str) {
  var ele=document.getElementById(str);
  var tot=1;
  var tr = ele.getElementsByTagName("tr");
  for(var i=1; i<tr.length;i++){
    if (tr[i].className == "isView" ){ tot++; }
  }
  if(tot<"11"){
    tr[tot].className ="isView";
  }else{
    alert("10개까지만 등록가능합니다");
  }
}

function eventTr(ele){ 
	var trbg = document.getElementById(ele);
	var bg = trbg.getElementsByTagName("tr");
	for(var i=0; i<bg.length;i++){
		bg[i].onmouseover = function (){
			 this.className="on";	 
		}
		
		bg[i].onmouseout = function (){
			 this.className="";	 
		}
	}
}

/* 우편번호 팝업 */
function winPost(mode){
  var url = "/popup/post.asp?mode="+mode;
  var wid = "345";
  var hei = "290";
  window.open(url, 'winPost','status=no,toolbar=no,location=no,menubar=no,directories=no, resizeable=no, scrollbars=no, width='+wid+', height='+hei+',top=200,left=400');
}

function readyAlert() {
  alert('준비중입니다');
}

/*맨 위로가가기*/
function topMove(){
	 document.documentElement.scrollTop = 0 +"px";
}


function quickMenu(str) {
	 this.top = 322;														// default top 위치;
	 this.left = 923;														// default left 위치;
	 this.ele = document.getElementById(str);		//액션 element

	 this.footlimit = 700;											//하단에서 300까지 limit.
	 this.timer = null;

	 this.yHeight = parseInt(document.documentElement.scrollHeight); //문서높이
	 this.ele.limit = this.yHeight- this.footlimit; //
	 // element  position, left, top value setup
	 this.ele.style.position	=	"absolute";
	 this.ele.style.top = this.top+"px";
	 this.ele.style.left =	this.left+"px";
	 this.moveY = this.top;

	}
	quickMenu.prototype.pos = function(){this.ele.style.top=this.moveY+"px";}
	//quickMenu.prototype.pos = function(){this.ele.style.top=this.end+"px";}
	quickMenu.prototype.move = function(){

		this.end = document.documentElement.scrollTop+this.top; /*스크룰바+위치값*/
		this.moveY +=   Math.floor((this.end - this.moveY ) / 10 );

		if(this.moveY>this.ele.limit){this.moveY = this.ele.limit; }
		this.pos();// 위치값 입력
		this.timer = setTimeout(this.name+".move()",10);
	}

	quickMenu.prototype.start = function(){
		this.start = parseInt (this.ele.style.top);
		this.timer = setTimeout(this.name+".move()",10);
	}
