﻿<!--
function OnLayPopupClose(oname)
{
	document.getElementById(oname).style.display = 'none';
}

function OnLayPopupSetCookie(cookiename)
{
	var expdate = new Date();
	expdate.setTime(expdate.getTime() + 1000 * 3600 * 24 * 1); // 1 일

	setCookie(cookiename, '1', expdate);

	OnLayPopupClose('Layer'+cookiename);
}

function getCookie(name)
{
	var Found = false
	var start, end
	var i = 0
	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
		return document.cookie.substring(start,end)
	}
	return ''
}

function setCookie (name, value, expires)
{
	document.cookie = name + "=" + escape (value) + "; path=/; expires=" + expires.toGMTString();
}

function OnLayPopupCreate(imgUrl, path, cookieName, Left, Top, Width, Height, usemap, dellogo, pTarget)
{
	var html = "";	

	var bMap = usemap == "N"?false:true;
  var bTarget = pTarget == "N"?false:true;
	if(document.body.scrollWidth - 980 > 0) Left += (document.body.scrollWidth - 980)/2;
	if(document.body.clientHeight - screen.availHeight > 0) Left -= 14; 
	html += "<div id='Layer"+cookieName+"' style='position:absolute; left:" + Left + "px; top:" + Top + "px; width:"+(Width+10)+"px;background: #f1f4f7 none no-repeat scroll 0 0; z-index:100;'>";
	html += "<table border=0 cellpadding=0 cellspacing=0 id='event_new' style='border: 1px solid #b2cde8;'>";
	html += "<tr>";
	html += "<td width='" + (Width/1 + 10) + "' height='22' bgcolor='#f1f4f7' background='http://image.joinsland.com/index2006/popup/box/bg_top.gif' style='padding: 3px 5px 0 5px;filter:alpha(opacity=95, finishopacity=0);'><table width='100%' height='100%' border=0 cellpadding=0 cellspacing=0><tr><td align='left' style='padding-left:5px;font-weight:bold' width='" + Width + "'>";
	html += "중앙일보 조인스랜드</td><td align='right'><a href='javascript:OnLayPopupClose(\"Layer"+cookieName+"\");'><img src='http://image.joinsland.com/index2006/popup/box/ico_close.gif' border='0'></a></td></tr></table></td>";
	html += "</tr>";
	html += "<tr>";
	html += "<td height='"+Height+"' style='padding: 5px 5px 5px 5px;background: #f1f4f7 none no-repeat scroll 0 0;filter:alpha(opacity=95, finishopacity=0);'>";
  if (bMap){
	  html+= "<img style='border: 2px solid #dad5d5;' src='" + imgUrl + "' width='"+Width+"' height='"+Height+"' border='0' usemap='#Map_"+cookieName+"_popcontent'/>";
  } else {
	  if (path!=""){
	  	if (bTarget)html+= "<a href='" + path + "' target='"+pTarget+"'><img src='" + imgUrl + "' width='"+Width+"' height='"+Height+"' border='0' /></a>";
		   else html+= "<a href='" + path + "'><img src='" + imgUrl + "' width='"+Width+"' height='"+Height+"' border='0' /></a>";
	  }	else{
			html+= "<img src='" + imgUrl + "' width='"+Width+"' height='"+Height+"' border='0' />";
	  }
  }
	html += "</td>";
	html += "</tr>";
	html += "<tr>";
	html += "<td width='" + (Width/1 + 10) + "' height='20' background='http://image.joinsland.com/index2006/popup/box/bg_bottom.gif' style='padding: 3px 5px 0 5px;filter:alpha(opacity=95, finishopacity=0);'><table width='100%' border=0 cellpadding=0 cellspacing=0><tr><td align='left' style='padding-left:5px;'>";
	html += "<a href=\"javascript:OnLayPopupSetCookie('"+cookieName+"');\">□ 오늘 이 창 그만보기</a></td><td align='right'><img src='http://image.joinsland.com/index2006/popup/box/btn_close.gif'   border='0' usemap='#Map_"+cookieName+"_right'></td></tr></table></td>";
	html += "</tr>";
	html += "</table>";

	html += "<map name='Map_"+cookieName+"_top'>";
	html += "<area shape='rect' coords='3,5,21,22' href=\"javascript:OnLayPopupClose('Layer"+cookieName+"');\">";
	html += "</map>";

	html += "<map name='Map_"+cookieName+"'_today' >";
	html += "<area shape='rect' coords='4,6,129,25' href=\"javascript:OnLayPopupSetCookie('"+cookieName+"');\">";
	html += "</map>";

	html += "<map name='Map_"+cookieName+"_right'>";
	html += "<area shape='rect' coords='3,6,50,21' href=\"javascript:OnLayPopupClose('Layer"+cookieName+"');\">";
	html += "</map>";

  if (bMap){
	  html += "<map name='Map_"+cookieName+"_popcontent'>";
	  html += usemap
	  html += "</map>";
  }
	html += "</div> ";

	if (getCookie(cookieName) == "") document.write (html);
}
//-->