var ns4=(document.layers)?true:false;var ns6=(document.getElementById)?true:false;var ie4=(document.all)?true:false;var ie5=false;if(ie4){if((navigator.userAgent.indexOf('MSIE 5')>0)||(navigator.userAgent.indexOf('MSIE 6')>0)){ie5=true;}if(ns6){ns6=false;}}var TgtFrm=self; var x=0;var y=0;var snow=0;var tmpX;var newWin=null;var over=null;var doc_width=800

var size = 2
var width = 240;
var border = "0";
var offsetx = 3;
var offsety = 3;
var fcolor = "#ffffff";
var backcolor = "#cccccc";
var textcolor = "#666666";
var capcolor = "#000000";
var closecolor = "000000";

var x = 0;
var y = 0;
var snow = 0;
var	tmpX;
var newWin = null;
var over = document.overDiv;
var	doc_width=800, doc_height=600

if ( (ns4) || (ie4) ) {
	if (ns4) over = document.overDiv;
	if (ie4) over = overDiv.style;
	document.onmousemove = mouseMove;
	if (ns4) document.captureEvents(Event.MOUSEMOVE);
}

function newWindow(message, wid, het, picName) {
	if (newWin!=null)
	{
		newWin.close();
	}
	newWin=window.open('', 'photo_window', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+wid+',height='+het);
	if (newWin!=null) {
		newWin.document.write('<!--loading script by YSOYA 2000.12.18--><html><head><title>Å¬¸¯ÇÏ½Ã¸é Ã¢ÀÌ Á¾·áµË´Ï´Ù.</title></head><body bgcolor=#000000 background=img/loading.gif>\n');
		newWin.document.write("<script language='JavaScript'>\n<!--\nfunction click() {if (event.button==1) self.close(); }\ndocument.onmousedown=click;\n\nfunction change_bg(){ document.body.background=phototmp.src; };\nself.moveTo(10 ,10);\nvar phototmp=new Image();\nphototmp.src='http://www.hanwooly.net/img-b/"+picName +".jpg';\n\nphototmp.onload=change_bg;\n--></script>\n");
		newWin.document.write('</body></html>');
	}
	else
		alert("Error : in function newWindow");
	return;
}
function nd() {
	if ( (ns4) || (ie4) ) {
		snow = 0;
		hideObject(over);
	}
}
function drc(title, text) {
	if(ns4) doc_width=self.innerWidth;
	else if(ie4) doc_width=document.body.clientWidth;
	txt = "<TABLE WIDTH="+width+" STYLE=\"border:1 #cccccc solid\" CELLPADDING="+border+" CELLSPACING=0><TR><TD BGCOLOR=\""+backcolor+"\"><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD align=right><SPAN ID=\"PTT\">&nbsp;<FONT COLOR=\""+capcolor+"\" size=\""+size+"\"><b>"+title+"</b></FONT></SPAN></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD align=left><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\"size=>"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"
	layerWrite(txt);
	disp();
}
function disp() {
	if ( (ns4) || (ie4) ) {
		if (snow == 0) 	{
			moveTo(over,tmpX,y+offsety);
			showObject(over);
			snow = 1;
		}
	}
}
function mouseMove(e) {
	if (ns4) {x=e.pageX; y=e.pageY}
	if (ie4) {x=event.x; y=event.y}
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
	tmpX=(doc_width-x-offsetx-width < 0)? (doc_width-width):(x+offsetx)
	if (snow) {
		moveTo(over,tmpX,y+offsety);
	}
}
function layerWrite(txt) {
	if (ns4) {
		var lyr = document.overDiv.document
		lyr.write(txt)
		lyr.close()
	}
	else if (ie4) document.all["overDiv"].innerHTML = txt
}
function showObject(obj) {
	if (ns4) obj.visibility = "show"
	else if (ie4) obj.visibility = "visible"
}
function hideObject(obj) {
	if (ns4) obj.visibility = "hide"
	else if (ie4) obj.visibility = "hidden"
}
function moveTo(obj,xL,yL) {
	obj.left = xL;
	obj.top = yL;
}

