function appendNavi(id, appendCtg) {
	var nd = document.getElementById(id);
	if(!nd) return;
	var li = document.createElement("li");
	li.innerHTML = " &gt; ";
	nd.appendChild(li);
	li = document.createElement("li");
	li.innerHTML = appendCtg;
	nd.appendChild(li);
	
}

// Æ÷Åä¿¡¼¼ÀÌ
// ÁÂ¿ì·Ñ¸µ½Ã mediapd.uprev(), mediapd.unext(), mediapd.type = 3, mediapd.num = 4(³ëÃâ°¹¼ö);
// À§¾Æ·¡·Ñ¸µ½Ã mediapd.uprev2(), mediapd.unext2(), mediapd.type = 1, mediapd.num = 4(³ëÃâ°¹¼ö);
function NvScroll() {
	this.version = "0.2";
	this.name = "NvScroll";
	this.item = new Array();
	this.itemcount = 0;
	this.currentspeed = 0;
	this.scrollspeed = 50;
	this.pausedelay = 1000;
	this.pausemouseover = false;
	this.stop = false;
	this.type = 1;
	this.height = 100;
	this.width = 100;
	this.stopHeight=0;
	this.i=0;

	this.add = function () {
		var text = arguments[0];

		this.item[this.itemcount] = text;
	//	alert(this.item[this.itemcount]);
		this.itemcount ++;
	};

	this.start = function (layer_name) {

		if ( this.itemcount == 1 ) {
			this.add(this.item[0]);
		}
		if (layer_name != null)
		{
			document.getElementById(layer_name).innerHTML = this.str_ret();
		}
		else 
		{
			this.display();
		}
		this.currentspeed = this.scrollspeed;
		if ( this.type == 1 || this.type == 2 ) {
			this.stop = true;
			setTimeout(this.name+'.rolling2()',this.currentspeed);
			window.setTimeout(this.name+".stop = false", this.pausedelay);
		} else if ( this.type == 3 ) {
			this.stop = true;
			setTimeout(this.name+'.rolling()',this.currentspeed);
			window.setTimeout(this.name+".stop = false", this.pausedelay);
		}

	};

	this.display = function () {
		if (this.type == 1)	{
			document.write('<div id="'+this.name+'" style="height:'+(this.height*this.num-this.widtht)+'; width:'+this.width+'; position:relative; overflow:hidden; " OnMouseOver="'+this.name+'.onmouseover(); " OnMouseOut="'+this.name+'.onmouseout(); ">');
		} else if ( this.type == 3)
		{
			document.write('<div id="'+this.name+'" style="height:'+this.height+'; width:'+(this.width*this.num-this.widtht)+'; position:relative; overflow:hidden; " OnMouseOver="'+this.name+'.onmouseover(); " OnMouseOut="'+this.name+'.onmouseout(); ">');
		}
		for(var i = 0; i < this.itemcount; i++) {
			if ( this.type == 1 ) {
				document.write('<div id="'+this.name+'item'+i+'"style="left:0px; width:'+this.width+'; position:absolute; top:'+(this.height*i)+'px; ">');
				document.write(this.item[i]);
				document.write('</div>');
			} else if ( this.type == 2 || this.type == 3 ) {
				document.write('<div id="'+this.name+'item'+i+'"style="left:'+(this.width*i)+'px; width:'+this.width+'; position:absolute; top:0px; ">');
				document.write(this.item[i]);
				document.write('</div>');
			}
		}
		document.write('</div>');
	};
	// ¹Ù·Î µð½ºÇÃ·¹ÀÌ ¾Ê°í ½ºÆ®¸µ ¸®ÅÏÇÏµµ·Ï Ãß°¡ 2006-03-30
	this.str_ret = function () {
		var str = '<div id="'+this.name+'" style="height:'+this.height+'; width:'+this.width+'; position:relative; overflow:hidden; " OnMouseOver="'+this.name+'.onmouseover(); " OnMouseOut="'+this.name+'.onmouseout(); ">';
		for(var i = 0; i < this.itemcount; i++) {
			if ( this.type == 1 ) {
				str += '<div id="'+this.name+'item'+i+'"style="left:0px; width:'+this.width+'; position:absolute; top:'+(this.height*i)+'px; ">';
				str += this.item[i];
				str += '</div>';
			} else if ( this.type == 2 || this.type == 3 ) {
				str += '<div id="'+this.name+'item'+i+'"style="left:'+(this.width*i)+'px; width:'+this.width+'; position:absolute; top:0px; ">';
				str += this.item[i];
				str += '</div>';
			}
		}
				str += '</div>';
				return str;
	};

	this.scroll = function () {

		if ( this.pause == true ) {

			window.setTimeout(this.name+".scroll()",this.pausedelay);
			this.pause = false;

		} else {

			this.currentspeed = this.scrollspeed;
			if ( !this.stop ) {
				for (i = 0; i < this.itemcount; i++) {
					obj = document.getElementById(this.name+'item'+i).style;
					if ( this.type == 1 ) {
						obj.top = parseInt(obj.top) - 1;
						if ( parseInt(obj.top) <= this.height * (-1) ) obj.top = this.height * (this.itemcount-1);
						if ( parseInt(obj.top) == 0 ) this.currentspeed = this.pausedelay;
					} else if ( this.type == 2 ) {
						obj.left = parseInt(obj.left) - 1;
						if ( parseInt(obj.left) <= this.width * (-1) ) obj.left = this.width * (this.itemcount-1);
						if ( parseInt(obj.left) == 0 ) this.currentspeed = this.pausedelay;
					}
				}
			}
			window.setTimeout(this.name+".scroll()",this.currentspeed);
		}
	};

	this.rolling = function () {
		if ( this.stop == false  ) {
			this.next();
		}
		self.setTimeout(this.name+".rolling()",this.scrollspeed);
	}

	this.rolling2 = function () {
		if ( this.stop == false  ) {
			this.next2();
		}
		window.setTimeout(this.name+".rolling2()",this.scrollspeed);

	}

	this.onmouseover = function () {
		if ( this.pausemouseover ) {
			this.stop = true;
		}
	};

	this.onmouseout = function () {
		if ( this.pausemouseover ) {
			this.stop = false;
		}
	};

	this.next = function() {
		try{
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.left) < 1 ) { 
					width = this.width + parseInt(obj.left);
					break;
				}
			}
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.left) < 1 ) { 
					obj.left = this.width * (this.itemcount-1);
				} else {
					obj.left = parseInt(obj.left) - width;
				}
			}
		}catch(e){
			alert(e);
		}
	}

	this.next2 = function() {
		try{
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.top) < 1 ) { 
					height = this.height + parseInt(obj.top);
					break;
				}
			}
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.top) < 1 ) { 
					obj.top = this.height * (this.itemcount-1);
				} else {
					obj.top = parseInt(obj.top) - height;
				}
			}
		}catch(e){
			alert(e);
		}
	}

	this.prev = function() {

		for (i = 0; i < this.itemcount; i++) {
			obj = document.getElementById(this.name+'item'+i).style;
			if ( parseInt(obj.left) < 1 ) { 
				width = parseInt(obj.left) * (-1);
				break;
			}
		}
		if ( width == 0 ) {
			total_width = this.width * (this.itemcount-1);
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.left) + 1 > total_width ) { 
					obj.left = 0;
				} else {
					obj.left = parseInt(obj.left) + this.width;
				}
			}
		} else {
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.left) < 1 ) { 
					obj.left = 0;
				} else {
					obj.left = parseInt(obj.left) + width;
				}
			}
		}
	}

	this.prev2 = function() {

		for (i = 0; i < this.itemcount; i++) {
			obj = document.getElementById(this.name+'item'+i).style;
			if ( parseInt(obj.top) < 1 ) { 
				height = parseInt(obj.top) * (-1);
				break;
			}
		}
		if ( height == 0 ) {
			total_width = this.height * (this.itemcount-1);
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.top) + 1 > total_width ) { 
					obj.top = 0;
				} else {
					obj.top = parseInt(obj.top) + this.height;
				}
			}
		} else {
			for (i = 0; i < this.itemcount; i++) {
				obj = document.getElementById(this.name+'item'+i).style;
				if ( parseInt(obj.top) < 1 ) { 
					obj.top = 0;
				} else {
					obj.top = parseInt(obj.top) + height;
				}
			}
		}
	}

	this.unext = function () {
		this.onmouseover();
		this.next();
		window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}

	this.unext2 = function () {
		this.onmouseover();
		this.next2();
		window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}

	this.uprev = function () {
		this.onmouseover();
		this.prev();
		window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}

	this.uprev2 = function () {
		this.onmouseover();
		this.prev2();
		window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}
}

/*
		±Û·Î¹ú ·Ñ¿À¹ö
*/
	function SGslideshow(){
		var ImgNum = 0;
		this.imgobj = new Array();
		this.textobj = new Array();
		
		this.slideimgdata = new Array();
		this.slidetextdata = new Array();
		
		this.name = "SGslide"
		this.ImgLength;
		this.delay = 1000; //ÀÚµ¿ÀüÈ¯½Ã ½Ã°£¼³Á¤(1000=1ÃÊ)
		this.lock = false;	
		this.run = null;
		this.imgobjcount=0;
		this.textobjcount=0;
		this.direction = 1;
		
		this.chgImg=function(dir){
			if (document.images) {
				
				ImgNum = ImgNum + dir;
				if (ImgNum > this.ImgLength) {
					ImgNum = 0;
				}
				if (ImgNum < 0) {
					ImgNum = this.slideimgdata.length + ImgNum;
				}
				if(ImgNum < 0 ) ImgNum = 0;
				if (this.imgobj.length > 0 ) {
					document.getElementById((this.name)+"1"+"").src = this.slideimgdata[ImgNum];
					if(this.imgobj.length>1){
						for(i=1;i<dir;i++){
							document.getElementById((this.name)+(i+1)+"").src = this.slideimgdata[ImgNum+i];
						}
					}	
				}
				if ( this.textobj.length > 0 ) {
					document.getElementById((this.name)+"TEXT1").innerHTML = this.slidetextdata[ImgNum];
					if(this.textobj.length>1){
						for(i=1;i<dir;i++){
							document.getElementById((this.name)+"TEXT" + (i+1) +"").innerHTML = this.slidetextdata[ImgNum+i];
						}
					}		
				}
		   }
		};

		this.imgobjadd = function () {
			var text  = arguments[0];
			this.imgobj[this.imgobjcount] = text;
			this.imgobjcount ++;
		};
		this.textobjadd = function () {
			var text  = arguments[0];
			this.textobj[this.textobjcount] = text;
			this.textobjcount ++;
		};
		
		this.display = function(){
			for (i=0;i<this.imgobj.length ;i++ )
			{
				document.write(this.imgobj[i]);
			}
			for (i=0;i<this.textobj.length ;i++ )
			{
				document.write(this.textobj[i]);
			}
		};

		this.start=function() {
		
			if (this.lock == true) {
				this.lock = false;
				window.clearInterval(this.run);
			}
			else if (this.lock == false) {

				this.ImgLength = this.slideimgdata.length-(this.imgobj.length);
				this.display();	
				this.lock = true;
				this.run = setInterval(this.name+".chgImg("+this.direction+");",this.delay);
		   }
		};
		this.nextSlide=function(){
			window.clearInterval(this.run);
			this.chgImg(this.direction);
		}
		this.prevSlide=function(){
			window.clearInterval(this.run);
			this.chgImg(parseInt(this.direction) * (-1));
		}
	}
	
	function SGslideshowForMain(){
		var ImgNum = 0;
		this.imgobj = new Array();
		this.textobj = new Array();
		
		this.slideimgdata = new Array();
		this.slidetextdata = new Array();
		
		this.name = "SGslide"
		this.ImgLength;
		this.delay = 2000; //ÀÚµ¿ÀüÈ¯½Ã ½Ã°£¼³Á¤(1000=1ÃÊ)
		this.lock = false;	
		this.run = null;
		this.imgobjcount=0;
		this.textobjcount=0;
		this.direction = 1;
		
		this.chgImg=function(dir){
			if (document.images) {
				
				ImgNum = ImgNum + dir;
				if (ImgNum > this.ImgLength) {
					ImgNum = ImgNum - this.slideimgdata.length ;
				}
				if (ImgNum < 0) {
					ImgNum = this.slideimgdata.length + ImgNum;
				}
				if (this.imgobj.length > 0 ) {
					document.getElementById((this.name)+"1"+"").innerHTML = this.slideimgdata[ImgNum];
					if(this.imgobj.length>1){
						for(i=1;i<dir;i++){
							document.getElementById((this.name)+(i+1)+"").innerHTML = this.slideimgdata[ImgNum+i];
						}
					}	
				}
				if ( this.textobj.length > 0 ) {
					document.getElementById((this.name)+"TEXT1").innerHTML = this.slidetextdata[ImgNum];
					if(this.textobj.length>1){
						for(i=1;i<dir;i++){
							document.getElementById((this.name)+"TEXT" + (i+1) +"").innerHTML = this.slidetextdata[ImgNum+i];
						}
					}		
				}
		   }
		};

		this.imgobjadd = function () {
			var text  = arguments[0];
			this.imgobj[this.imgobjcount] = text;
			this.imgobjcount ++;
		};
		this.textobjadd = function () {
			var text  = arguments[0];
			this.textobj[this.textobjcount] = text;
			this.textobjcount ++;
		};
		
		this.display = function(){
			for (i=0;i<this.imgobj.length ;i++ )
			{
				document.write(this.imgobj[i]);
			}
			for (i=0;i<this.textobj.length ;i++ )
			{
				document.write(this.textobj[i]);
			}
		};

		this.start=function() {
		
			if (this.lock == true) {
				this.lock = false;
				window.clearInterval(this.run);
			}
			else if (this.lock == false) {

				this.ImgLength = this.slideimgdata.length-(this.imgobj.length);
				this.display();	
				this.lock = true;
				this.run = setInterval(this.name+".chgImg("+this.direction+");",this.delay);
		   }
		};
		this.nextSlide=function(){
			window.clearInterval(this.run);
			this.chgImg(this.direction);
			this.run = setInterval(this.name+".chgImg("+this.direction+");",this.delay);
		}
		this.prevSlide=function(){
			window.clearInterval(this.run);
			this.chgImg(parseInt(this.direction) * (-1));
			this.run = setInterval(this.name+".chgImg("+this.direction+");",this.delay);
		}
	}
	function tabover(id,cnt,div){

		var tname = id.substr(0,(id.length)-(cnt.length));
		if(div!=undefined){
			var tdiv = div.substr(0,(div.length)-(cnt.length));
		}
		for (i=1;i<=cnt; i++){

			if (id==tname+i){
				document.getElementById(id).src =  document.getElementById(tname+i).src.substring(0,document.getElementById(tname+i).src.lastIndexOf("_"))+"_on.gif";
				if(div!=undefined){
					document.getElementById(tdiv+i).style.display = "";
				}
				
			}
			else{
				document.getElementById(tname+i).src =  document.getElementById(tname+i).src.substring(0,document.getElementById(tname+i).src.lastIndexOf("_"))+"_off.gif";
				if(div!=undefined){
					document.getElementById(tdiv+i).style.display = "none";
				}
			}
			
		}	
	}

	function rollover(img){
		var onImage = img.src.substring(0,img.src.lastIndexOf("_"))+"_on.gif";
		img.src = onImage;
	}
	function hide(img){
		var offImage = img.src.substring(0,img.src.lastIndexOf("_"))+"_off.gif";
		img.src = offImage;
	}

	function setObjColor(obj){
		obj.style.color = "red";
	}
	function setObjOrgColor(obj){
		obj.style.color = "black";
	}
	

/*
	ÄíÅ°
*/
function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie )
		{
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}
function setCookie( name, value, expiredays, dom)
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	if(arguments[2] == null)
		document.cookie = name + "=" + escape( value ) + "; path=/;" 
	else if(arguments[3] == null) {
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() +";" 
	}
	else {
		document.cookie = name + "=" + escape( value ) + "; path=/; domain=" + dom + "; expires=" + todayDate.toGMTString() +";" 
	}

}
function reSize(id){
	try{	
		if(id == null) id = "comment";
		var oBody	=	comment.document.body;
		var oFrame	=	document.getElementById(id);
			
		oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight - oBody.clientHeight);
		oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth - oBody.clientWidth);
	}
	//An error is raised if the IFrame domain != its container's domain
	catch(e)
	{
		//window.status =	'Error: ' + e.number + '; ' + e.description;
	}
}
function showExpose(num) {
	for ( i = 0 ; i < 3 ; i++ ) {
		dd = document.getElementById("MAIN_RTEXPOSE" + (i+1));
		if ( (i+1) == num) {
			dd.style.display = "block";
		}
		else {
			dd.style.display = "none";
		}
	}
}

// °ø¹éÃ¼Å© ÇÔ¼ö Á¤ÀÇºÎºÐ
function isEmpty( data ){
   for ( var i = 0 ; i < data.length ; i++ ){
      if ( data.substring( i, i+1 ) != " " ){
         return false;
	  }
   }
   return true;
} 

/** À¯È¿¼º °Ë»ç ·çÆ¾ **/
function MC_eregNumeric(str){
	var reg = RegExp("^[0-9\.]+$");
	return reg.test(str);	
}
function MC_eregAlpha(str) {
	var reg = RegExp("^[a-zA-Z]+$");
	return reg.test(str);
}
function MC_eregEmail(str) {
	var reg = RegExp(/^[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i);
	return reg.test(str);
}

function MC_eregAlphaNumeric(str){
	var reg = RegExp("^[0-9\.a-zA-Z]+$");
	return reg.test(str);
}
function MC_eregKorean(str) {
	var reg = RegExp("^[°¡-ÆR0-9 ]+$");
	return reg.test(str);
}
function MC_eregID(str){
	var reg = RegExp("^[a-zA-Z0-9\_]{4,12}$");
	return reg.test(str);
}
function MC_eregPhone(str){
	var reg = RegExp("^[0-9]{2,3}-[0-9]{3,4}-[0-9]{4}$");
	return reg.test(str);
}
//ÁÖ¹Îµî·Ï Ã¼Å©

function check_juminno(juminno){
	var jumin1 = juminno.substr(0,6);
	var jumin2 = juminno.substr(6,7);

  
  // ¹®ÀÚ¿­À» Á¤¼ö·Î ¹Ù²ãÁÖ´Â ³»ÀåÇÔ¼ö : parseInt()
	a1 = parseInt(jumin1.charAt(0))*2;
	a2 = parseInt(jumin1.charAt(1))*3;
	a3 = parseInt(jumin1.charAt(2))*4;
	a4 = parseInt(jumin1.charAt(3))*5;
	a5 = parseInt(jumin1.charAt(4))*6;
	a6 = parseInt(jumin1.charAt(5))*7;
	a7 = parseInt(jumin2.charAt(0))*8;
	a8 = parseInt(jumin2.charAt(1))*9;
	a9 = parseInt(jumin2.charAt(2))*2;
	a10 = parseInt(jumin2.charAt(3))*3;
	a11 = parseInt(jumin2.charAt(4))*4;
	a12 = parseInt(jumin2.charAt(5))*5;

	tot=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12;

	na=tot%11;
	ch=11-na;
	  
	if(ch==10)ch=0;
	if(ch==11)ch=1;

	if(ch!=parseInt(jumin2.charAt(6))){
		alert("ÀÔ·ÂÇÑ ÁÖ¹Îµî·Ï¹øÈ£¸¦ È®ÀÎÈÄ,´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
		return false;
	}
	return true
}

//14¼¼¹Ì¸¸ ÁÖ¹Îµî·ÏÃ¼Å©

function check_residence_14(jumin1,jumin2,o)
{
	var frm = o;
	var today_yy = new Date();
	var buf = "";
	buf = today_yy.getYear();
	//alert(buf);
	
	aform = document.member_info;
    yy = jumin1.substr(0,2);
    mm = jumin1.substr(2,2);
    dd = jumin1.substr(4,2);
    gender = jumin2.substr(0,1);
	chk = 0;

	birth_yy = 19 + yy;
	if (birth_yy <= buf - 14)
	{
		alert('¸¸14¼¼ ÀÌÇÏ°¡ ¾Æ´Õ´Ï´Ù.');
		frm.jumin1.value = ""
		frm.jumin2.value = ""
        frm.jumin1.focus();
		return false;
	}

    if ((jumin1.length!=6)||(mm <1||mm>12||dd<1)){
            frm.jumin11.value = "";
            alert ('ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®°¡ Àß¸øµÇ¾ú½À´Ï´Ù.');
            frm.jumin1.focus();
            return false;
    }
   
    if ((gender != 1 && gender !=2 && gender != 3 && gender !=4 )||(jumin2.length != 7 )){
            frm.jumin2.value = "";
            alert ('ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®°¡ Àß¸øµÇ¾ú½À´Ï´Ù.');
            frm.jumin2.focus();
            return false;
    }



  
    for (var i = 0; i <=5 ; i++){
        chk = chk + ((i%8+2) * parseInt(jumin1.substring(i,i+1)))
    }

    for (var i = 6; i <=11 ; i++){
            chk = chk + ((i%8+2) * parseInt(jumin2.substring(i-6,i-5)))
    }

    chk = 11 - (chk %11)
    chk = chk % 10

    if (chk != jumin2.substring(6,7))
    {
            frm.jumin1.value = ""
            frm.jumin2.value = ""
            alert ('¸ÂÁö ¾Ê´Â ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.');
            frm.jumin1.focus();
            return false;
    }
    return true;
}

//¿Ü±¹ÀÎ ¹øÈ£ Ã¼Å©
function check_fgnno(fgnno){
	var sun = 0;
	var odd = 0;
	buf = new Array(13);
	for(var i=0;i<13;i++){
		buf[i] = parseInt(fgnno.charAt(i));
	}
	odd = buf[7]*10+buf[8];
	if(odd%2!=0){
		return false;
	}
	if((buf[11]!=6)&&(buf[11]!=7)&&(buf[11]!=8)&&(buf[11]!=9)){
		return false;
	}
	multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
	for(var i=0,sum=0;i<12;i++){
		sum+=(buf[i]*=multipliers[i]);
	}
	sum=11-(sum%11);
	if(sum>=10){
		sum-=10;
	}
	sum+=2;
	if(sum>=10){
		sum-=10;
	}
	if(sum!=buf[12]){
		return false;
	}
	return false;
}

//ÆË¾÷Ã¢ ¶ç¿ì±â
function popstart(url,sName){

	var win = window.open(url, sName, "scrollbars=yes,status=no,toolbar=no,resizable=yes,location=no,menu=no,width=10,height=10"); 
	win.opener.self;
}
//ÆË¾÷Ã¢ »çÀÌÁî ÀÚµ¿ Á¶Àý
function WindowReset(win){ // »õÃ¢ÀÇ Å©±â¿Í À§Ä¡ Àç¼³Á¤
  
  var winBody = win.document.body; 
  // »õÃ¢ÀÇ »çÀÌÁî¿¡ ´õÇØÁÙ marginWidth¿Í marginHeight 
  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 goSubscription(userid,eid,f){
	if(userid==""){
		if(confirm("·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ¼­ºñ½ºÀÔ´Ï´Ù\n\nÁö±Ý ·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?")) {
		location.href = "/member/login.asp?f="+f;
		}
	}
	else{
		location.href="components/evnetSubscription.asp?eid="+eid;
	}
}
