<!--
	var Fat = {
		make_hex : function (r,g,b) 
		{
			r = r.toString(16); if (r.length == 1) r = '0' + r;
			g = g.toString(16); if (g.length == 1) g = '0' + g;
			b = b.toString(16); if (b.length == 1) b = '0' + b;
			return "#" + r + g + b;
		},
		fade_all : function ()
		{
			var a = document.getElementsByTagName("*");
			for (var i = 0; i < a.length; i++) 
			{
				var o = a[i];
				var r = /fade-?(\w{3,6})?/.exec(o.className);
				if (r)
				{
					if (!r[1]) r[1] = "";
					if (o.id) Fat.fade_element(o.id,null,null,"#"+r[1]);
				}
			}
		},
		fade_element : function (id, fps, duration, from, to) 
		{
			if (!fps) fps = 30;
			if (!duration) duration = 3000;
			if (!from || from=="#") from = "#FFFF33";
			if (!to) to = this.get_bgcolor(id);
			
			var frames = Math.round(fps * (duration / 1000));
			var interval = duration / frames;
			var delay = interval;
			var frame = 0;
			
			if (from.length < 7) from += from.substr(1,3);
			if (to.length < 7) to += to.substr(1,3);
			
			var rf = parseInt(from.substr(1,2),16);
			var gf = parseInt(from.substr(3,2),16);
			var bf = parseInt(from.substr(5,2),16);
			var rt = parseInt(to.substr(1,2),16);
			var gt = parseInt(to.substr(3,2),16);
			var bt = parseInt(to.substr(5,2),16);
			
			var r,g,b,h;
			while (frame < frames)
			{
				r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames));
				g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames));
				b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames));
				h = this.make_hex(r,g,b);
			
				setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay);

				frame++;
				delay = interval * frame; 
			}
			setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay);
		},
		set_bgcolor : function (id, c)
		{
			var o = document.getElementById(id);
			o.style.backgroundColor = c;
		},
		get_bgcolor : function (id)
		{
			var o = document.getElementById(id);
			while(o)
			{
				var c;
				if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color");
				if (o.currentStyle) c = o.currentStyle.backgroundColor;
				if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; }
				o = o.parentNode;
			}
			if (c == undefined || c == "" || c == "transparent") c = "#FFFFFF";
			var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
			if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
			return c;
		}
	}

	var dragapproved=false;
	var minrestore=0;
	var minimized = 0;
	var initialwidth,initialheight;
	var finalTop,finalLeft;
	var ie5=document.all&&document.getElementById;
	var ns6=document.getElementById&&!document.all;

	function iecompattest(){
		return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}
	
	function drag_drop(e){
		if (ie5&&dragapproved&&event.button==1){
			document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
			document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
		}
		else if (ns6&&dragapproved){
			document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
			document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
		}
	}
	
	function initializedrag(e){
		e.returnValue = false;
		if (e.preventDefault) e.preventDefault();
		e.cancelBubble = true;
		if (e.stopPropagation) e.stopPropagation();
		offsetx=ie5? event.clientX : e.clientX
		offsety=ie5? event.clientY : e.clientY
		document.getElementById("dwindowcontent").style.visibility="hidden"; //extra
		tempx=parseInt(document.getElementById("dwindow").style.left)
		tempy=parseInt(document.getElementById("dwindow").style.top)
		
		dragapproved=true
		document.getElementById("dwindow").onmousemove=drag_drop
	}
	
	function loadwindow(url,width,height){
		if (!ie5&&!ns6)
		window.open(url,"","width=width,height=height,scrollbars=1")
		else{
			minimized=0 //restore window
			document.getElementById("dwindowcontent").style.display = 'block';
			document.getElementById("dwindow").style.display=''
			document.getElementById("dwindow").style.width=initialwidth=width+"px";
			document.getElementById("dwindow").style.height=initialheight=height+40+"px"
			if (!finalLeft)
			{
				document.getElementById("dwindow").style.left = (document.body.offsetWidth - width)/2 + "px";
			}
			document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
			document.getElementById("cframe").src=url;
			finalLeft = document.getElementById("dwindow").style.left;
			finalTop = document.getElementById("dwindow").style.top;
		}
	}
	
	function maximize(){
		if (minimized == 1)
		{
			minimized=0;
			document.getElementById("dwindowcontent").style.display = 'block';
		}
		if (minrestore==0){
			minrestore=1 //maximize window
			document.getElementById("maxname").setAttribute("src","/icomment/images/restore.gif")
			document.getElementById("dwindow").style.width=ns6? window.innerWidth-22+"px" : iecompattest().clientWidth+"px"
			document.getElementById("dwindow").style.height=ns6? window.innerHeight-22+"px" : iecompattest().clientHeight+"px"
			document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
			document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px";
			document.getElementById("cframe").contentWindow.location.reload();
		}
		else{
			minrestore=0 //restore window
			document.getElementById("maxname").setAttribute("src","/icomment/images/max.gif")
			document.getElementById("dwindow").style.width=initialwidth
			document.getElementById("dwindow").style.height=initialheight
			document.getElementById("dwindow").style.left = finalLeft;
			document.getElementById("dwindow").style.top = finalTop;
			document.getElementById("cframe").contentWindow.location.reload();
		}
	}

	function minimize(){
		if (minimized==0){
			minimized=1 //minimize window
			document.getElementById("dwindowcontent").style.display = 'none';
			document.getElementById("dwindow").style.height = '';
		}
		else{
			minimized=0 //restore window
			document.getElementById("dwindowcontent").style.display = 'block';
			document.getElementById("dwindow").style.height = initialheight;
		}
	}
	
	function closeit(){
		document.getElementById("dwindow").style.display="none"

		minrestore=0 //restore window
		document.getElementById("maxname").setAttribute("src","/icomment/images/max.gif")
		document.getElementById("dwindow").style.width=initialwidth
		document.getElementById("dwindow").style.height=initialheight
		document.getElementById("dwindow").style.left = finalLeft;
		document.getElementById("dwindow").style.top = finalTop;
	}
	
	function stopdrag(){
		dragapproved=false;
		document.getElementById("dwindow").onmousemove=null;
		document.getElementById("dwindowcontent").style.visibility="visible"; //extra
		finalLeft = document.getElementById("dwindow").style.left;
		finalTop = document.getElementById("dwindow").style.top;
	}
	
	function hiliteIC(obj) {
		if(!obj.rel) {
			obj.rel = obj.getAttribute('rel');
		}
		document.getElementById('ic_main_'+obj.rel).className +=  ' boderHilite' ;
		Fat.fade_element('ic_main_'+obj.rel , 30, 1000, "#AECDFF", "#FFFFFF");
		window.status = 'i-comment ³²±â±â/º¸±â';
	}
	
	function unHiliteIC(obj) {
		document.getElementById('ic_main_'+obj.rel).className =  'ic_main' ;
	}
	
	function showIcomment(id,no,icno) {
		var url = '/icomment/index.php?';
		url += 'id='+ id + '&no=' + no + '&icno=' + icno + '&rnd=' + new Date().getTime();
		loadwindow(url,600,400);
	}
	document.write('\
		<div id="dwindow" style="display:none;	left:40px; top:40px;" onSelectStart="return false" ondragstart="return false" unselectable="on">\
			<div id="bar" unselectable="on">\
				<div unselectable="on" style="float:right;"><img src="/icomment/images/min.gif" onClick="minimize();" style="margin-top: 3px;margin-right:5px;cursor:pointer;" unselectable="on" ondragstart="return false" /><img src="/icomment/images/max.gif" id="maxname" onClick="maximize()" style="margin-top: 3px;margin-right:5px;cursor:pointer;" unselectable="on" ondragstart="return false" /><img src="/icomment/images/close.gif" id="closename" onClick="closeit()" style="margin-top: 5px;margin-right:6px;cursor:pointer;" ondragstart="return false" unselectable="on" /></div>\
				<div id="dhandle" onMousedown="initializedrag(event)" onMouseup="stopdrag()" onSelectStart="return false" unselectable="on"><img src="/icomment/images/title_logo.gif" width="92px" height="12px" border="0" title="icomment" ondragstart="return false" unselectable="on" /></div>\
			</div>\
			<div id="dwindowcontent" style="height:100%" unselectable="on">\
				<iframe id="cframe" name= "cframe" src="" width="100%" height="90%" frameBorder="0" marginWidth="0" marginHeight="0" topmargin="0"></iframe>\
			</div>\
		</div>\
	');
//-->