//**Start Encode**

function IsPop(){

	/*------------- ÇÊ¿äÇÑ º¯¼öµé ----------------/
	var Title = "";         //ÆË¾÷ ÀÌ¸§
	var ImgS = "";		//¹é±×¶ó¿îµå ÀÌ¹ÌÁö °æ·Î
	 var ImgW = 0;		//¹é±×¶ó¿îµå ÀÌ¹ÌÁö °¡·Î»çÀÌÁî
	 var ImgH = 0;		//¹é±×¶ó¿îµå ÀÌ¹ÌÁö ¼¼·Î»çÀÌÁî
	 var BottS = "";		//¹öÆ° ÀÌ¹ÌÁö °æ·Î
	 var BottW = 0;		//¹öÆ° ÀÌ¹ÌÁö °¡·Î»çÀÌÁî
	 var BottH = 0;		//¹öÆ° ÀÌ¹ÌÁö ¼¼·Î»çÀÌÁî
	 var YT = 0;			// ÆË¾÷ »ó´Ü À§Ä¡
	 var YL = 0;			//ÆË¾÷ ¿ÞÂÊÀ§Ä¡
	 var YC = "";			//ÆË¾÷ ÄíÅ°ÀÌ¸§°ú Å×ÀÌºíÀÌ¸§
	 var ALT_NM = "";       // À¥Á¢±Ù¼º Çâ»óÀ§ÇØ ÀÌ¹ÌÁö¼³¸í
	 /-----------------------------------------*/

	var Title
	var ImgS
	var ImgW
	var ImgH
	var BottS
	var BottW
	var BottH
	var YT
	var YL
	var YC
	var Link
	var ALT_NM

	this.SetProperty = SetProperty;
	this.GetCookie = GetCookie;
	this.Open = Open;
	this.SetCookie = SetCookie;
	this.Close = Close;
	this.Init = GetCookie;
	this.onplay = onplay;
	this.ietruebody = ietruebody;
	this.movescontentmain = movescontentmain;
	this.movesoverout = movesoverout;
	this.dragscontentmain = dragscontentmain;
	this.escCode = escCode;
	this.btEscClose = btEscClose;
	document.onmousedown = dragscontentmain;
	document.onmouseup = movesoverout;
	document.onkeydown= escCode;
	
}

function SetProperty(vTitle, vAltV, vImgS, vImgW, vImgH, vBottS, vBottW, vBottH, vYT, vYL, vYC, vLink){
	this.Title = vTitle;
	this.ImgS = vImgS;
	this.ImgW = vImgW;
	this.ImgH = vImgH;
	this.BottS = vBottS;
	this.BottW = vBottW;
	this.BottH = vBottH;
	this.YT = vYT;
	this.YL = vYL;
	this.YC = vYC;
	this.Link = vLink;
	this.ALT_NM = vAltV;
}

function GetCookie(){ //ÄíÅ° Ã¼Å©°¡ µÇ¾îÀÖ´ÂÁö È®ÀÎ
	var name = this.YC + "_cn";   //ÄíÅ°³×ÀÓ ¼ÂÆÃ
	var Found = false;
	var start, end; 
	var i = 0;
	var cookieC = "";
	 
	while(i <= document.cookie.length) {

	start = i ;
	end = start + name.length; 


	if(document.cookie.substring(start, end) == name) {  //ÄíÅ°°ªÀÌ ÀÖ´ÂÁö È®ÀÎ
		Found = true ;
		break;
	} 
	i++ ;
	} 
 
	if(Found == true) { //ÄíÅ°°ªÀÌ ÀÖÀ»½Ã

	start = end + 1; 
	end = document.cookie.indexOf(";", start); 
	if(end < start) 
	end = document.cookie.length;
	cookieC = document.cookie.substring(start, end) 
	}else{
		
		this.Open();
		
	}
}

function Open(){ //ÄíÅ°°ª ¾øÀ»½Ã ÆË¾÷Ã¢À» ¿¬´Ù

		var he =  46 + this.ImgH + 6;
		var t = document.getElementById(this.YC + "_Tmain");
		var h = 46 + this.ImgH;
		var w = this.ImgW + 6;
		var ws = this.ImgW - 6;
		document.write("<DIV ID='" + this.YC + "_DIV' STYLE='position:absolute; top:" + this.YT + "px; left:" + this.YL +"px; ");
		document.write("width: " + w + " px; height: " + he + "px; padding:0px; font:bold 0pt verdana;'>");
		//document.write(" filter:progid:DXImageTransform.Microsoft.Shadow(color=gray, Direction=135, Strength=4)'>");
			document.write("<table border='0' cellpadding='0' cellspacing='0' width='" + w + "'>");
			document.write("<tr>");
				document.write("<td valign='top'>");
					document.write("<table border='0' cellspacing='0' cellpadding='0' width='" + this.ImgW + "'>");
					document.write("<tr>");
						document.write("<td valign='top'>");
							document.write("<table border='0' id='" + this.YC + "' cellspacing='1' background='/images/main/pop_bg.gif'  cellpadding='0' width='" + this.ImgW + "'>");
							document.write("<tr>");
								document.write("<td align='center' height='22'>");
									document.write("<DIV ID='" + this.YC + "_title' STYLE='position:relative; cursor:hand'>");
										document.write("<table id='" + this.YC + "_Ttitle' border='0' cellspacing='0'  height='22' cellpadding='0'>");
										document.write("<tr>");
											document.write("<td background='/images/main/pop_bg2.gif'>");
												document.write("<table border='0'  cellspacing='0' cellpadding='0' height='22' width='" + this.ImgW +"'>");
												document.write("<tr>");
													document.write("<td width='25' align='right'>");
															document.write("<img src='/images/main/pop_tv.gif' border='0'>");
													document.write("</td>");
													document.write("<td>");
														document.write("&nbsp;<b><font size='2'  face='µ¸¿ò' color='#F9F9F9'>" + this.Title + "</font></b>");
													document.write("</td>");
													document.write("<td width='89' align='right'>");
														document.write("<a href=javascript:escClose();>");
														document.write("<img  id='" + this.YC +"_esc' src='/images/main/pop_esc.gif' border='0'>");
														document.write("</a>");
													document.write("</td>");
													document.write("<td width='18' align='center'>");														
														document.write("<a href=javascript:cutplay('" + this.YC  + "'," + this.YT + "," +  this.YL + "," + this.ImgW +"," + he +");>");
														document.write("<img  id='" + this.YC +"_zoom' src='/images/main/pop_zoom.gif' border='0'>");
														document.write("</a>");
													document.write("</td>");
													document.write("<td width='18' align='left'>");
														document.write("<a href=javascript:closeWin('" + this.YC + "')><img src='/images/main/pop_close.gif' border='0'></a>");
													document.write("</td>");
												document.write("</tr>");												
												document.write("</table>");	
											document.write("</td>");	
										document.write("</tr>");
										document.write("</table>");
									document.write("</DIV>");
								document.write("</td>");
							document.write("</tr>");
							document.write("<tr>");
								document.write("<td>");
									// ½ÇÁ¦ ÆË¾÷ ³»¿ë ½ÃÀÛ
									document.write("<DIV ID='" + this.YC + "_main'>");
										document.write("<table id ='" + this.YC + "_Tmain' border='0' cellspacing='0' cellpadding='0' width='" + this.ImgW + "'>");
										document.write("<tr>");
											document.write("<td background='" + this.ImgS + "' width='" + this.ImgW + "' height='" + this.ImgH + "'>");
												if(this.Link != ""){ //¸µÅ©°É±â
													document.write("<a href='" + this.Link + "'><img alt='" + this.ALT_NM + "' src='" + this.ImgS  + "' border='0'>");
												}
											document.write("</td>");
										document.write("</tr>");
										document.write("<tr>");
												//document.write("<td height='22' bgcolor='white' align='left'>&nbsp;<font size='2' face='µ¸¿ò'>ÀüÃ¼Ã¢ ´Ý±â(ESCÅ°)</font>");
												//document.write("</td>");
												document.write("<td height='22' bgcolor='white' align='center' valign='meddle'>");
												document.write("<font size='2'  face='µ¸¿ò'><INPUT id='Checkbox1'  onClick=javascript:closeWin('" + this.YC + "') type='checkbox' name='" + this.YC + "_notice' class='box2'>");
												document.write("¿À´Ã ÀÌ Ã¢À» ¿­Áö ¾ÊÀ½</font>&nbsp;");
											document.write("</td>");
										document.write("</tr>");
										document.write("</table>");
									  document.write("</DIV>");
									//½ÇÁ¦ ÆË¾÷ ³»¿ë ³¡
								document.write("</td>");
							document.write("</tr>");
							document.write("</table>");
						document.write("</td>");
					document.write("</tr>");
					document.write("</table>")
				document.write("</td>");
				document.write("<td width='6' valign='bottom'>");
					document.write("<table border='0' id='" + this.YC + "_right'  cellspacing='0' cellpadding='0' height='"+ h +"' STYLE='filter:progid:DXImageTransform.Microsoft.Alpha( Opacity=25, FinishOpacity=0, Style=0, StartX=0,  FinishX=100, StartY=0, FinishY=100)'>");
					document.write("<tr>");
						document.write("<td height='6' width='6' >");
						document.write("</td>");
					document.write("</tr>");
					document.write("<tr>");
						document.write("<td bgcolor='#000000'>");
						document.write("</td>");
					document.write("</tr>");
					document.write("</table>");
				document.write("</td>");
			document.write("</tr>");
			document.write("<tr height='6' width='" + w + "'>");
				document.write("<td align='right'>");
					document.write("<table border='0'  cellspacing='0' cellpadding='0'  width='" + (this.ImgW+1) + "'  STYLE='filter:progid:DXImageTransform.Microsoft.Alpha( Opacity=25, FinishOpacity=0, Style=0, StartX=0,  FinishX=100, StartY=0, FinishY=100)'>");
					document.write("<tr>");
						document.write("<td height='6' width='6' >");
						document.write("</td>");
						document.write("<td height='6' width='" + ws + "' bgcolor='#000000'>");
						document.write("</td>");
					document.write("</tr>");
					document.write("</table>");
				document.write("</td>");
				document.write("<td bgcolor='#000000' width='6' height='6'  STYLE='filter:progid:DXImageTransform.Microsoft.Alpha( Opacity=25, FinishOpacity=0, Style=0, StartX=0,  FinishX=100, StartY=0, FinishY=100)'>");
				document.write("</td>");
			document.write("</tr>");
			document.write("</table>");
		document.write("</DIV>");
		
		var t = document.getElementById(this.YC + "_DIV");	
		t.style.display="block";

		var t2 = document.getElementById(this.YC + "_Ttitle");	
		t2.style.display="block";		

		var t3 = document.getElementById(this.YC + "_Tmain");
		t3.style.display="block";
}


function onplay(obj,top,left,width,height){
	
	var t = document.getElementById(obj + "_Tmain");
	var tdiv = document.getElementById(obj + "_DIV");
	var zoom = document.getElementById(obj + "_zoom");
	var right = document.getElementById(obj + "_right");
	if(t.style.display == "block"){
		zoom.src = "/images/main/pop_in.gif";
		t.style.display = "none";
		x   = left;
		y   = document.body.clientHeight - 32 - top;
		
		tdiv.style.top = y;
		tdiv.style.left = x;
		tdiv.style.height= 32;
		right.style.height = 22;
		}else{
			t.style.display = "block";
			zoom.src = "/images/main/pop_zoom.gif";
			tdiv.style.top = top;
			tdiv.style.left = left;
			tdiv.style.height= height;
			right.style.height = height - 6;
		}
}
function Close(obj){ 
	var t = document.getElementById(obj);
	 t.style.display="none";
}

function SetCookie(obj) 
{ 
	var name = obj + "_cn";   //ÄíÅ°³×ÀÓ ¼ÂÆÃ
	var value = "no";
	var expiredays = 1;
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
} 


/*--------------------------------------------------------------¸¶¿ì½º·Î ÀÌµ¿½Ã ½ÇÇà--------------------------*/
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function movescontentmain(){
	if (event.button==1&&dragapproved){

		document.all[zcor].style.pixelLeft=tempvar1+event.clientX-xcor;
		document.all[zcor].style.pixelTop=tempvar2+event.clientY-ycor;
		leftpos=document.all[zcor].style.pixelLeft-ietruebody().scrollLeft;
		toppos=document.all[zcor].style.pixelTop-ietruebody().scrollTop;
		return false;
	}
}

function escCode(){
	if(event.keyCode == 27){
		tagList = new Array("DIV"); // ¾ÆÀÌµð¸¦ °ËÁõÇÒ ÅÂ±× ¸®½ºÆ®¸¦ ¹è¿­·Î ¼±¾ðÇÑ´Ù
		idAllList = new Array();     
		idx = 0;
		for(i=0; i<tagList.length; i++) {
		   objList = document.body.all.tags(tagList[i]);
			for(j=0; j < objList.length; j++) {
				if( objList[j].id != null && objList[j].id.lastIndexOf("_DIV") > 0 )
					//idAllList[idx++] = objList[j].id; //°´Ã¼È­µÈ ÆË¾÷Ã¢ÀÇ ÀÌ¸§µéÀ» °¡Á®¿È
					//spobj = objList[j].id.split("_");
					Close(objList[j].id);
			}
		}
		//alert(idAllList);
	}
}

function btEscClose(ok){
	if(ok == "esc"){
		tagList = new Array("DIV"); // ¾ÆÀÌµð¸¦ °ËÁõÇÒ ÅÂ±× ¸®½ºÆ®¸¦ ¹è¿­·Î ¼±¾ðÇÑ´Ù
		idAllList = new Array();     
		idx = 0;
		for(i=0; i<tagList.length; i++) {
		   objList = document.body.all.tags(tagList[i]);
			for(j=0; j < objList.length; j++) {
				if( objList[j].id != null && objList[j].id.lastIndexOf("_DIV") > 0 )
					//idAllList[idx++] = objList[j].id; //°´Ã¼È­µÈ ÆË¾÷Ã¢ÀÇ ÀÌ¸§µéÀ» °¡Á®¿È
					//spobj = objList[j].id.split("_");
					Close(objList[j].id);
			}
		}
		//alert(idAllList);
	}
}

function movesoverout(){
		dragapproved = false;
}

function dragscontentmain(){
	e = event.srcElement;
	while(e.id == "" || e.id != null){
			if(e.id.lastIndexOf("_title") > 0){
				dragapproved = true;
				epop = e.id;
				epop = epop.split("_");  	
				if (epop[1]== "title"){
				dragapproved=true;
				zcor=epop[0] + "_DIV";
				this.YC = zcor;
				tempvar1=document.all[zcor].style.pixelLeft;
				tempvar2=document.all[zcor].style.pixelTop;
				xcor=event.clientX;
				ycor=event.clientY;
				document.onmousemove=movescontentmain;
				document.onmouseup=movesoverout;
				}	
			}			
			e = e.parentNode;	
	}		
}
/*--------------------------------------------------------------¸¶¿ì½º·Î ÀÌµ¿½Ã ½ÇÇà ³¡--------------------------*/

