var is_DOM = (document.getElementById ? true : false); 
var is_IE4 = ((document.all && !is_DOM) ? true : false);
var is_IE = ((document.all) ? true : false);
var is_NS4 = (document.layers ? true : false);
var is_NS6 = ((document.getElementById&&!document.all) ? true : false);
var is_NS = navigator.appName == "Netscape";
var _W = document.write;
var _A = document.all;
var _O = window.open;
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g, "");}// 문자(자,우) 공백 제거
String.prototype.ltrim = function(){return this.replace(/(^\s*)/, "");}// 문자의 좌 공백 제거 [R]: String
String.prototype.rtrim = function() {return this.replace(/(\s*$)/, "");}// 문자의 우 공백 제거 [R]: String
String.prototype.replaceAll = function(str1, str2){var str = "";if(this.trim() != "" && str1 != str2){str = this.trim();while(str.indexOf(str1) > -1) str=str.replace(str1, str2);return str;}};
Function.prototype.bind = function(object) {var __method = this;return function() {return __method.apply(object, arguments);}};
function is_string(s){if(s.trim()!="") return true; else return false;}
function _WSTR(n,str){
	if(n) return str;
	_W(str);
	return '';
}
function _I(n){
  if(is_DOM){
  	return document.getElementById(n);
  }else if(is_IE4){
	return document.all[n];
  }else if (is_NS4){
	return getObj_NN4(document,n);
  }
  return null;
}
function _N(n){
  if(is_DOM){
  	return document.getElementByName(n);
  }else if(is_IE4){
	return document.all[n];
  }else if (is_NS4){
	return getObj_NN4(document,n);
  }
  return null;
}
function _Tag(n){
	return document.getElementsByTagName(n);
}
function _OC(n){
	var f=_I(n);
	var dis=f.style.display;
	if(dis=="BLOCK"||dis=="block"||dis=="") f.style.display="none";
	else f.style.display="block";
}
function getObj_NN4(obj,name){
	var x = obj.layers;
	var foundLayer;
	for(var i=0;i<x.length;i++){
		if(x[i].id == name)	foundLayer = x[i];
		else if(x[i].layers.length)	var tmp = getObj_NN4(x[i],name);
		if(tmp) foundLayer=tmp;
	}
	return foundLayer;
}
function get_Widht(oNode){// 절대 폭 계산
	var oCurrentNode=oNode;
	var iWidth=oCurrentNode.offsetWidth;
	return parseInt(iWidth);
}
function get_Hight(oNode){// 절대 높이 계산
	var oCurrentNode=oNode;
	var iHeight=oCurrentNode.offsetHeight;
	if(parseInt(iHeight)<=0) iHeight=16;
	return parseInt(iHeight);
}
function get_Top(oNode){// 절대 위쪽 계산
	var oCurrentNode=oNode;
	var iTop=0;
	while(oCurrentNode.tagName!="BODY"){
		iTop+=oCurrentNode.offsetTop;//+document.body.scrollTop;
		oCurrentNode=oCurrentNode.offsetParent;
	}
	return parseInt(iTop);
}
function get_Left(oNode){// 절대 좌측 계산
	var oCurrentNode=oNode;
	var iLeft=0;
	while(oCurrentNode.tagName!="BODY"){
		iLeft+=oCurrentNode.offsetLeft;//+document.body.scrollLeft;
		oCurrentNode=oCurrentNode.offsetParent;
	}
	return parseInt(iLeft);
}
function strip_tags(str){return str.replace(/<\/?[^>]+>/gi, "");};
function strcut(str,len){for(var i=0,l=0; i<=len; i++){l += (str.charCodeAt(i) > 128) ? 2 : 1;if (l > len) return str.substring(0,i);};return str;}
function explode(opt,item){
	var Arr=new Array(1);
	var cnt=0;
	var str=new String(item);
	while (str.indexOf(opt)>0){
		Arr[cnt]=str.substr(0,str.indexOf(opt));
		str=str.substr(str.indexOf(opt)+1,str.length-str.indexOf(opt)+1);
		cnt=cnt+1;
	}
	Arr[cnt]=str;
	return Arr;
}
function oLayer(obj,mode){
	obj=_I(obj);
	if(mode)obj.style.display = mode;
	else obj.style.display = (obj.style.display!="none") ? "none" : "block";
}
function inArray(arr,n){
	for(var i=0;i<arr.length;i++) if(arr[i]==n) return true;
	return false;
}
function _SCRIPT(){
	var args=arguments;
	if(!args[0]) return;
	var nFname=args[0].split(",");
	var i=0;
	while(nFname.length>0){
		if(!nFname[i]) break;
		var nn=nFname[i].trim();
		var nURL=(args[1] ? args[1] : "/core/js");
		var str="";
		if(nn.charAt(0)=='/') str=nn;
		else if(nn.charAt(4)==':'&&nn.charAt(5)=='/') str=nn;
		else if(nn.charAt(5)==':'&&nn.charAt(6)=='/') str=nn;
		else str=nURL+"/"+nn;
		_W("<"+"script type=\"text/javascript\" src=\""+str+".js\"><"+"\/script"+">");
		i++;
	}
}
// 테그값 자동조정
// ex] onload="table_design()" or table_design('classname','tag name')
// 페이지별 조정하려면 function table_designcheck(){} 안에 다음과같이 사용가능하다.
/*function tag_designcheck(t){
	with(t){
		setAttribute('border', 1);
		setAttribute('borderColor', "#789654");
		setAttribute('rules', 'none');
		setAttribute('cellPadding',5);
		frame = "hsides";
		rules = "rows";
		cellPadding = "4";
	};
}*/
function tag_design(){
	var cname = (arguments[0] ? arguments[0] : 'tdesign');
	var tname = (arguments[1] ? arguments[1] : 'table');
	var t=document.getElementsByTagName(tname);
	for(var i=0;i<t.length;i++){
		if(t[i].getAttribute("classname")==cname){
			if(typeof table_designcheck=="function") table_designcheck(t[i]);
			with(t[i].style){
				width="100%";
				borderCollapse = "collapse";
			};
		};
	};
}
var save_FormBG="";
var save_FormSBG="";
function setFormBG(form,ccolor){
	if(ccolor){
		if(form.style.backgroundColor) save_FormBG=form.style.backgroundColor;
		else save_FormBG='';
		if(form.bgcolor) save_FormBG=form.bgcolor;
		form.style.backgroundColor=ccolor;
		save_FormSBG=ccolor;
	}else{
		form.style.backgroundColor=save_FormBG;
	}
}
function hasFunction(obj, functioName) {
    return obj && obj.functionName && obj.functionName instanceof Function
}
var onFocus_color="2px solid #7dc400";
var onFocus_background="#ebfad0";
var onBlur_color="2px solid #cccccc";
var onBlur_background="#ffffff";
var onFBclass="SF";
function onFocus(o){o.style.border=onFocus_color;o.style.background=onFocus_background;}
function onBlur(o){o.style.border=onBlur_color;o.style.background=onBlur_background;if(typeof FChecker=="function"){if(o.getAttribute("V")!=null)FChecker(o);}; };
function onFB(){
	var args = arguments;
	var cname = (args[0] ? args[0] : onFBclass);
	var obj = document.getElementsByTagName('input');
	for(var e=0;e<obj.length;e++){
		var type = obj[e].getAttribute('type');
		if(type=='text'||type=='password'||type=='file'||type=='checkbox'){
			if(obj[e].getAttribute(cname) != null){
				obj[e].onfocus=function(e){onFocus(this);};
				obj[e].onblur=function(e){onBlur(this);};
			}
		}
	}
	obj=document.getElementsByTagName('textarea');
	for(var e=0;e<obj.length;e++){
		var clsnm=obj[e].className.toString().split(' ');
		if(obj[e].getAttribute(cname) != null){
				obj[e].onfocus=function(e){onFocus(this);};
				obj[e].onblur=function(e){onBlur(this);};
		}	}
	tag_design();
}
function onLD(){
	var obj=document.getElementsByTagName('a');
	var nUrl=HTTP+URI;
	for(var e=0;e<obj.length;e++){
		var xx=obj[e].href.trim();
		//if(xx=="") obj[e].href="javascript:;";
		//if(xx=="#") obj[e].href="javascript:;";
		//if(xx==(nUrl+"#")) obj[e].href="javascript:;";
	}
}

// AJAX
function Ajax(){
	var o = null;
	try{
		o = new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
		try{
			o = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(sc){
			o = null;
		}
	}
	if(!o && typeof(o)!="undefined"){
		o = new XMLHttpRequest();
	}
	return o;
}
function Part() {
	var args=arguments;
	var PartURL=(args[0] ? args[0] : "");
	var mode=(args[1] ? args[1] : "");
	if(_I(mode)==null||PartURL==""||mode=="") return;
	var obj=new Ajax();
	if(obj) {
		obj.onreadystatechange=function(){
			if(obj.readyState!=4) return;
			if(obj.status!=200) return;
			if(obj.responseText=="") return;

			var o=_I(mode);
			if(o==null) return;
			o.innerHTML=obj.responseText;
		};
		obj.open("POST", PartURL+"?"+mode, true);
		obj.send(null);
		delete obj;
	}
}

// Tooltip: dynamicdrive[.]com Cool DHTML Tooltip 수정
var tip_offset_x=10;
var tip_offset_y=10;
var tip_enable=false;
var tipobj=null;
var tiptimeout=null;
function IE_BODY(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body};
function tip_on(tobj, e, thetext, width){
	if (is_NS6||is_IE){
		tipobj=_I(tobj);
		tipobj.innerHTML=thetext;
		var strlen=thetext.length*10;
		if(width==-1) tipobj.style.width=strlen+"px";
		else if(width) tipobj.style.width=width+"px";
		tip_enable=true;
		
		if(e!=null) tip_show(e);
		return false;
	}
}
function tip_show(e){
	if(tip_enable){
		var curX=(is_NS6)?e.pageX : event.clientX+IE_BODY().scrollLeft;
		var curY=(is_NS6)?e.pageY : event.clientY+IE_BODY().scrollTop;
		var rightedge=is_IE&&!window.opera? IE_BODY().clientWidth-event.clientX-tip_offset_x : window.innerWidth-e.clientX-tip_offset_x-20;
		var bottomedge=is_IE&&!window.opera? IE_BODY().clientHeight-event.clientY-tip_offset_y : window.innerHeight-e.clientY-tip_offset_y-20;
		var leftedge=(tip_offset_x<0)? tip_offset_x*(-1) : -1000;
		if(rightedge<tipobj.offsetWidth) tipobj.style.left=is_IE? IE_BODY().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px";
		else if (curX<leftedge)	tipobj.style.left="5px";
		else tipobj.style.left=curX+tip_offset_x+"px";
		if(bottomedge<tipobj.offsetHeight) tipobj.style.top=is_IE? IE_BODY().scrollTop+event.clientY-tipobj.offsetHeight-tip_offset_y+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-tip_offset_y+"px";
		else tipobj.style.top=curY+tip_offset_y+"px";
		tipobj.style.visibility="visible";
	}
}
function tip_hide(t){
	if(is_NS6||is_IE){
		if(t){if(tiptimeout!=null)clearTimeout(tiptimeout);tiptimeout=setTimeout("tip_hide();",t);return;}
		tip_enable=false;
		tipobj.style.visibility="hidden";
		tipobj.style.left="-1000px";
		tipobj.style.backgroundColor='';
		tipobj.style.width='';
		tipobj.innerHTML='';
		clearTimeout(tiptimeout);
	}
}
/*
<style type="text/css">
#dhtmltooltip{
position: absolute;
width: 150px;
border: 2px solid black;
padding: 2px;
background-color: lightyellow;
visibility: hidden;
z-index: 100;
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
}
</style>
<div id="tip1"></div>
onMouseover="tip_on('tip1',this,'내용', 가로길이(폭));"
onMouseout="tip_hide()"
document.onmousemove=tip_show;
*/

function num(){	// 숫자만입력받기 onkeydown="num()"
	var o = event.keyCode;
	if(o==8 || o==9 || o==13 || o==46) return;
	if(o>=48 && o<=57) return;
	if(o>=96 && o<=105) return;
	event.returnValue = false;
}
function engnum(){	// 알파벳 대소문자,숫자 입력받기 onkeydown="c_number()"
	var o = event.keyCode;
	window.status = o;
	if(o==8 || o==9 || o==13 || o==46) return;
	if(o>=37 && o<=40) return;
	if(o>=48 && o<=57) return;
	if(o>=96 && o<=105) return;
	event.returnValue = false;
}
function encom(o){	// 숫자 정수,실수,양수,음수 포괄 소수점 3자리
	var t=new String(o);
	t=t.trim();
	if(t==''||!t) return 0;
	var ma='',tail='';
	if(t.charCodeAt(0)==45){t=t.substr(1);ma='-';};
	var str=explode('.',t);
	t=str[0];
	if(str.length==2)tail='.'+str[1];
	var rtn="";
	for(var i=(t.length-1),j=0; i>=0; i--,j++){
		if(j>2){ rtn +=','; j=0; };
		rtn += t.charAt(i);
	}
	t="";
	for(var i=(rtn.length-1); i>=0; i--) t += rtn.charAt(i);

	return ma+t+tail;
}
function decom(o){
	var t=new String(o);
	t=t.trim();
	if(t==''||!t) return 0;
	return t.replace(/,/gi,'');
}
function pop(){
	var args=arguments;
	var url=(args[0]?args[0]:'');
	if(args[0].trim()==''||args[0]==null) return ;
	var wname=(args[1]?args[1]:'');
	var width=(args[2]?',width='+args[2]:'500');
	var height=(args[3]?',height='+args[3]:'480');
	var scrollbar=(args[4]?',scrollbars='+args[4]:'');
	var top=(args[5]?',top='+args[5]:'');
	var left=(args[6]?',left='+args[6]:'');
	var toolbar=(args[7]?',toolbar='+args[7]:'toolbar=no');
	var opt="loaction=no,menubar=no,directories=no,resizable=no"+width+height+left+top+scrollbar+toolbar;
	var wopen=_O(url,wname,opt);
	return wopen;
}
function flash(src,width,height){	
	var args=arguments;
	if(t_http=='https') src=src.replace('http:','https:');
	var wmode=(args[3]?args[3]:'window');
	var quality=(args[4]?args[4]:'high');
	var bgcolor=(args[5]?args[5]:'#FFFFFF');
	var str='\
	<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+t_http+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" ALIGN="">\
	<PARAM NAME=movie VALUE="'+src+'">\
	<PARAM NAME=quality VALUE="'+quality+'">\
	<PARAM NAME=wmode VALUE="'+wmode+'">\
	<PARAM NAME=bgcolor VALUE="'+bgcolor+'">\
	<PARAM NAME=allowFullScreen VALUE="true">\
	<PARAM NAME=menu VALUE="false">\
	<EMBED src="'+src+'" quality="'+quality+'" WIDTH="'+width+'" HEIGHT="'+height+'" ALIGN="middle" TYPE="application/x-shockwave-flash" PLUGINSPAGE="'+t_http+'://www.macromedia.com/go/getflashplayer" style="position:relative !important;" bgcolor="'+bgcolor+'"></EMBED>\
	</OBJECT>\
	';
	_W(str);
}
function embed(src,w,h) { 
	_W('<embed src="'+src+'" width="'+w+'" height="'+h+'" style="filter:xray">') 
}
function href(c){location.href=c.trim();}
function ht(){
	var ar=arguments;
	var c1=(ar[0] ? ar[0] : "").trim();
	var c2=(ar[1] ? ar[1] : "").trim();
	var c3=(ar[2] ? ar[2] : "").trim();
	if(is_string(c1)) alert('\n'+c1+'\n');
	if(is_string(c2)) location.href=c2.trim();
	if(is_string(c3)) history.go(c3);
}
var SUBTMNU=0;
function onScrollMove(nTop,sID) {	// 상하스크롤 
	this.Top=nTop;
	this.sID=sID;
	this.speed=0.09;
	this.oTid=null;
	this._y=parseInt(document.getElementById(this.sID).offsetTop) + this.Top;
	document.getElementById(this.sID).style.top=this.Top;
	this.start=function() {
		if(document.body.scrollTop<this.Top) this.targety=document.body.scrollTop+this.Top;
		else this.targety=document.body.scrollTop;
		if(this.oTid != null) {
			clearInterval(this.oTid);
			this.oTid=null;
		}
		if(this.targety > 1620){
			this.targety = 1620;
		}
		this.oTid=setInterval(this._moveMENU.bind(this),10);

	}
	this._moveMENU=function() {
		if(SUBTMNU) return ;
		this._y +=this.speed*(this.targety-this._y);
		document.getElementById(this.sID).style.top=this._y;
		if(this.targety==parseInt(this._y)) {
			clearInterval(this.oTid);
			this.oTid=null;
		}

	}
}
function clearCookie(cookieName){
	var now = new Date();
	var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
	setCookie(cookieName, "", yesterday, "/", null, false);
};
function setCookie(cookieName, cookieValue) {
	var argv = setCookie.arguments;
	var argc = setCookie.arguments.length;
	var expires = (2 < argc) ? argv[2] : null;
	var path = (3 < argc) ? argv[3] : null;
	var domain = (4 < argc) ? argv[4] : null;
	var secure = (5 < argc) ? argv[5] : false;
	var str = escape(cookieName) + '=' + escape(cookieValue)+';';
	if(expires!=null) str += (expires ? ' expires=' + expires.toGMTString() : '')+';';
	if(path!=null) str += (path ? ' path=' + path : '')+';';
	if(domain!=null) str += (domain ? ' domain=' + domain : '')+';';
	if(secure!=false) str += (secure ? ' secure' : '')+';';
	document.cookie=str;
};
function getCookie(cookieName) {
	var cookieValue='';
	var posName=document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) {
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}
	return cookieValue;
};
function sFrame(oFrame,wt,ht){	// ifream 외부에서제어  onload="sFrame(this,false,true);" onchange="sFrame(this,false,true);"
	var Frm= oFrame.contentWindow;
	var oBody = Frm.document.body;
	var min_height = 0;
	var min_width = 0;
	if(ht==true){
		var i_height = oBody.scrollHeight + (oBody.offsetHeight-oBody.clientHeight);
		if(i_height < min_height) i_height = min_height;
		else i_height=i_height+10;
		oFrame.style.height = i_height;
	}
	if(wt==true){
		var i_width = oBody.scrollWidth + (oBody.offsetWidth-oBody.clientWidth);
		if(i_width < min_width) i_width = min_width;
		oFrame.style.width = i_width;
	}
	parent.scrollTo(1,1);
}
function WinReSize(win){ // 새창의 크기와 위치 재설정
  var winBody = win.document.body;
  var marginHeight = parseInt(winBody.topMargin)+parseInt(winBody.bottomMargin);
  var marginWidth = parseInt(winBody.leftMargin)+parseInt(winBody.rightMargin);
  var wid = winBody.scrollWidth + (winBody.offsetWidth - winBody.clientWidth) + marginWidth-5;
  var hei = winBody.scrollHeight + (winBody.offsetHeight - winBody.clientHeight) + marginHeight+17;
  win.resizeTo(wid, hei);
}
function window_center(width,height){	// 가로세로값을받아 중앙위치값을 리턴:window.open 사용
	var opt="";
	if(window.screen){
		var ah=screen.availHeight - 30;
		var aw=screen.availWidth - 10;
		var xc=(aw - width) / 2;
		var yc=(ah - height) / 2;
		opt += ",left=" + xc + ",screenX=" + xc;
		opt += ",top=" + yc + ",screenY=" + yc;
	}
	return opt;
}
function DatePM(){	// 원하는 날짜를 찾아옴 ('y년,m월,d일,h시간,i분,s초,z요일',+-숫자,'출력형식')
	var args=arguments;
	var nOpt=(args[0] ? args[0] : "");	// 출력방법 y:년단위계산,m:월단위계산,d:일단위계산,h:시간,i:분,s:초,'':공백
	var nN=parseInt(args[1]);	// 계산값 : +-숫자
	var nPrt=(args[2] ? args[2] : "ymd");	// 출력형식
	var nDT=(args[3] ? args[3] : "");	// 지정날짜(현재일지정) 년월일시분초
	var d=new Date();
	var day_arr=['일','월','화','수','목','금','토'];

	if(nDT!=""){
		nDT=nDT.replaceAll('-','');	// - : 빈공간제거
		nDT=nDT.replaceAll(':','');	// - : 빈공간제거
		nDT=nDT.replaceAll(' ','');	// - : 빈공간제거
		if(nDT.length>=4)d.setFullYear(parseInt(nDT.substring(0,4)));
		if(nDT.length>=6)d.setMonth(parseInt(nDT.substring(4,6))-1);
		if(nDT.length>=8)d.setDate(parseInt(nDT.substring(6,8)));
		if(nDT.length>=10)d.setHours(parseInt(nDT.substring(8,10)));
		if(nDT.length>=12)d.setMinutes(parseInt(nDT.substring(10,12)));
		if(nDT.length>=14)d.setSeconds(parseInt(nDT.substring(12,14)));
	}
	if(nOpt=='d'||nOpt=='D'){
		d.setSeconds(d.getSeconds() + (nN*60*60*24));// 일단위:+ - 해당일 구함
	}else if(nOpt=='m'||nOpt=='M'){
		var i,d_year=parseInt(d.getYear()),d_month=parseInt(d.getMonth());
		if(nN>0){
			for(i=nN;i>0;i--) if(d_month == 11){ d_year++;d_month=0; }else{ d_month++; }
		}else if(nN<0){
			for(i=nN;i<0;i++) if(d_month == 0){ d_year--;d_month=11; }else{ d_month--; }
		};
		d.setYear(d_year);
		d.setMonth(d_month);
	}else if(nOpt=='y'||nOpt=='Y'){
		var d_year=parseInt(d.getFullYear())+ nN;
		d.setYear(d_year);
	}else if(nOpt=='h'||nOpt=='H'){
		d.setSeconds(d.getSeconds() + (nN*60*60));
	}else if(nOpt=='i'||nOpt=='I'){
		d.setSeconds(d.getSeconds() + (nN*60));
	}else if(nOpt=='s'||nOpt=='S'){
		d.setSeconds(d.getSeconds() + nN);
	}
	var year=parseInt(d.getYear());
	if(year<100) year="19"+year;
	var month=d.getMonth()+1;
	var month2=d.getMonth()+1;
	var day=d.getDate();
	var day2=d.getDate();
	var hours=d.getHours();
	var hours2=d.getHours();
	var minutes=d.getMinutes();
	var minutes2=d.getMinutes();
	var seconds=d.getSeconds();
	var seconds2=d.getSeconds();
	day=day_arr[day];
	if(month2<10) month2=0+""+month2;
	if(day2<10) day2=0+""+day2;
	if(hours2<10) hours2=0+""+hours2;
	if(minutes2<10) minutes2=0+""+minutes2;
	if(seconds2<10) seconds2=0+""+seconds2;
	nPrt=nPrt.replace('y',year);
	nPrt=nPrt.replace('mm',month2);
	nPrt=nPrt.replace('m',month);
	nPrt=nPrt.replace('dd',day2);
	nPrt=nPrt.replace('d',day);
	nPrt=nPrt.replace('hh',hours2);
	nPrt=nPrt.replace('h',hours);
	nPrt=nPrt.replace('ii',minutes2);
	nPrt=nPrt.replace('i',minutes);
	nPrt=nPrt.replace('ss',seconds2);
	nPrt=nPrt.replace('s',seconds);
	nPrt=nPrt.replace('z',day);
	return nPrt;
}
// 전체선택/해제 vars변수명
function check_all(){
	var args=arguments;
	var n=(args[0] ? args[0] : "");	// 변수명
	var v=(args[1] ? args[1] : 0);	// 0:전체채크/해제 1:채크값리턴 2:채크안된값리턴
	var ex=(args[2] ? args[2] : ",");  // v 1-2일때 구분기호
	var f,rtn="";
	// 길이계산
	for(var i=0;;i++){
		if(typeof(_I(n+'['+i+']'))){
			f=_I(n+'['+i+']');
			if(!f) return rtn;
			if(v==0){
				if(f.checked==true) f.checked=false;
				else f.checked=true;
			}else if(v==1&&f.checked==true){
				if(rtn!="") rtn+=ex;
				rtn+=f.value;
			}else if(v==2&&f.checked==false){
				if(rtn!="") rtn+=ex;
				rtn+=f.value;
			}
		}else return rtn;
	}
	return rtn;
}
function qus(msg){
	if(is_string(msg)&&confirm(msg)) return 1;
	return 0;
}
function err_check(form, msg){
	if(form.value==""){ alert(msg); form.focus(); return false; }
	return true;
}
function ifrm_parent_autoheight(u){
if(parent._I(u)){
	parent._I(u).style.height = document.body.scrollHeight;
	document.body.style.margin = '0';
}
}
function Floating(){
	var args=arguments;
	this.FloatingObj = _I(args[0]);
	this.MarginX = (args[1]) ? args[1] : 0;
	this.MarginY = (args[2]) ? args[2] : 0;
	this.Percentage = (args[3]) ? args[3] : 20;
	this.setTime = (args[4]) ? args[4] : 10;
	this.FloatingObj.style.position = "absolute";
	this.Body = null;
	this.setTimeOut = null;
	this.onOff = args[5] ? args[5] : true;
	this.Run();
}
Floating.prototype.Run = function () {
	if ((document.documentElement.scrollLeft + document.documentElement.scrollTop) > (document.body.scrollLeft + document.body.scrollTop)) {
		this.Body = document.documentElement;
	} else {
		this.Body = document.body;
	}
	var This = this;
	if(this.onOff) {
		var FloatingObjLeft = (this.FloatingObj.style.left) ? parseInt(this.FloatingObj.style.left,10) : this.FloatingObj.offsetLeft;
		var FloatingObjTop = (this.FloatingObj.style.top) ? parseInt(this.FloatingObj.style.top,10) : this.FloatingObj.offsetTop;
		var DocLeft = this.Body.scrollLeft + this.MarginX;
		var DocTop = this.Body.scrollTop + this.MarginY;

		var MoveX = Math.abs(FloatingObjLeft - DocLeft);
		MoveX = Math.ceil(MoveX / this.Percentage);
		var MoveY = Math.abs(FloatingObjTop - DocTop);
		MoveY = Math.ceil(MoveY / this.Percentage);

		if (FloatingObjLeft < DocLeft) {
			this.FloatingObj.style.left = FloatingObjLeft + MoveX + "px";
		} else {
			this.FloatingObj.style.left = FloatingObjLeft - MoveX + "px";
		}
		if (FloatingObjTop < DocTop) {
			this.FloatingObj.style.top = FloatingObjTop + MoveY + "px";
		} else {
			this.FloatingObj.style.top = FloatingObjTop - MoveY + "px";
		}
	}

	window.clearTimeout(this.setTimeOut);
	this.setTimeOut = window.setTimeout(function () { This.Run(); },this.setTime);
}
/*new Floating(quickmenu),918,177,30,10,true);
<div id="quickmenu">...내용...</div>*/

function add_zzim(goods_no){
	href('/zzim.html?g_id='+goods_no);
}

var t_http='';
if(location.protocol.toLowerCase()=='http:') t_http='http';
if(location.protocol.toLowerCase()=='https:') t_http='https';

