function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; path=/; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}
function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}



function pop091221() {
	writeCookie("konggi08", "done", 24);
	hidebox4D();
}
function pop100401() {
	writeCookie("konggi06", "done", 24);
	hideboxA();
}
function pop100406() {
	writeCookie("konggi07", "done", 24);
	hidebox2B();
}
function pop100527() {
	writeCookie("konggi05", "done", 24);
	hidebox3C();
}
//function proc2() {
//	document.all['hsp1'].style.display = 'none';
//	document.all['hsp2'].style.display = 'block';
//	var a = (screen.width - 510) / 2;
//	self.resizeTo(520, 700);
//	self.moveTo(a, 0);
//}

function DN(a) {
	location = "http://knta.or.kr/popup/dn.asp?filename=" + a;
}

function AutoBlur() {
	if (event.srcElement.tagName == "INPUT" || event.srcElement.tagName == "A" || event.srcElement.tagName == "IMG") event.srcElement.blur();
}
document.onfocusin = AutoBlur;


var dragapproved=false

function initializedragieA(){
	iex=event.clientX
	iey=event.clientY
	tempx=popup1.style.pixelLeft
	tempy=popup1.style.pixelTop
	dragapproved=true
	document.onmousemove=drag_dropieA
}

function drag_dropieA(){
	if (dragapproved==true){
	document.all.popup1.style.pixelLeft=tempx+event.clientX-iex
	document.all.popup1.style.pixelTop=tempy+event.clientY-iey
	return false
	}
}

function hideboxA(){
	if (document.all)
	popup1.style.visibility="hidden"
	else if (document.layers)
	document.popup1.visibility="hide"
}

function showboxA(){
	if (document.all)
	popup1.style.visibility="visible"
	else if (document.layers)
	document.popup1.visibility="show"
}






function initializedragie2B(){
	iex=event.clientX
	iey=event.clientY
	tempx=popup2.style.pixelLeft
	tempy=popup2.style.pixelTop
	dragapproved=true
	document.onmousemove=drag_dropie2B
}

function drag_dropie2B(){
	if (dragapproved==true){
	document.all.popup2.style.pixelLeft=tempx+event.clientX-iex
	document.all.popup2.style.pixelTop=tempy+event.clientY-iey
	return false
	}
}

function hidebox2B(){
	if (document.all)
	popup2.style.visibility="hidden"
	else if (document.layers)
	document.popup2.visibility="hide"
}

function showbox2B(){
	if (document.all)
	popup2.style.visibility="visible"
	else if (document.layers)
	document.popup2.visibility="show"
}






function initializedragie3C(){
	iex=event.clientX
	iey=event.clientY
	tempx=popup3.style.pixelLeft
	tempy=popup3.style.pixelTop
	dragapproved=true
	document.onmousemove=drag_dropie3C
}

function drag_dropie3C(){
	if (dragapproved==true){
	document.all.popup3.style.pixelLeft=tempx+event.clientX-iex
	document.all.popup3.style.pixelTop=tempy+event.clientY-iey
	return false
	}
}

function hidebox3C(){
	if (document.all)
	popup3.style.visibility="hidden"
	else if (document.layers)
	document.popup3.visibility="hide"
}

function showbox3C(){
	if (document.all)
	popup3.style.visibility="visible"
	else if (document.layers)
	document.popup3.visibility="show"
}






function initializedragie4D(){
	iex=event.clientX
	iey=event.clientY
	tempx=popup4.style.pixelLeft
	tempy=popup4.style.pixelTop
	dragapproved=true
	document.onmousemove=drag_dropie4D
}

function drag_dropie4D(){
	if (dragapproved==true){
	document.all.popup4.style.pixelLeft=tempx+event.clientX-iex
	document.all.popup4.style.pixelTop=tempy+event.clientY-iey
	return false
	}
}

function hidebox4D(){
	if (document.all)
	popup4.style.visibility="hidden"
	else if (document.layers)
	document.popup4.visibility="hide"
}

function showbox4D(){
	if (document.all)
	popup4.style.visibility="visible"
	else if (document.layers)
	document.popup4.visibility="show"
}

if (document.all){
	document.onmouseup=new Function("dragapproved=false")
}