

	function copy_clip(maintext){
		// check browser information
		if (window.clipboardData) {		// if IE
			window.clipboardData.setData("Text", maintext);
		}else if (window.netscape) { 
			netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
			var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
			if (!clip) return;
			var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
			if (!trans) return;
			trans.addDataFlavor('text/unicode');
			var str = new Object();
			var len = new Object();
			var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
			var copytext=maintext;
			str.data=copytext;
			trans.setTransferData("text/unicode",str,copytext.length*2);
			var clipid=Components.interfaces.nsIClipboard;
			if (!clip) return false;
			clip.setData(trans,null,clipid.kGlobalClipboard);
		}
		alert("다음링크주소가 복사되었습니다.\n\n" + maintext);
		return false;
	};

function preloadimages(){
			for (i=0;i<preloadimages.arguments.length;i++){
				myimages[i]=new Image()
				myimages[i].src=preloadimages.arguments[i]
			}
		};

		function popimage(imagesrc)	{
			var popimage = window.open("",'Image','scrollbars=1,status=0,toolbar=no,resizable=0,location=no,menu=no,width=10,height=10'); 
			popimage.focus(); 
			popimage.document.open(); 
			popimage.document.write("<html><head><title>Image</title></head>"); 
			popimage.document.write("<sc"+"ript>\n"); 
			popimage.document.write("function resize() {\n"); 
			popimage.document.write("pic = document.popimg;\n"); 
			popimage.document.write("if (eval(pic).height) { nHeight = eval(pic).height + 62; nWidth = eval(pic).width+29; \n"); 
			popimage.document.write("  clearTimeout();\n"); 
			popimage.document.write("  self.resizeTo(nWidth, nHeight);\n"); 
			popimage.document.write("}else setTimeOut(resize(), 100);}\n"); 
			popimage.document.write("</sc"+"ript>\n"); 
			popimage.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 
			popimage.document.write("<img border=0 onclick='self.close()' src='"+imagesrc+"' xwidth=100 xheight=9 name=popimg onload='resize();' style='cursor:hand' alt ='Click to Close Window'></a>\n"); 
			popimage.document.write("</body></html>\n"); 
			popimage.document.close(); 
		};

		function popreg(URL) {
			day = new Date();
			id = day.getTime();
			eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=no,menubar=0,resizable=0,width=500,height=400');");
		};
		function openpop2(w,h,dest,x,y) { 
			var mywidth = w;
			var myheight = h;
			var myx = x;
			var myy = y;
			centerX = (screen.width - mywidth)/2;
			centerY = (screen.height - myheight)/2;
			neww = window.open(dest,'_blank','width='+mywidth+',height='+myheight+',left='+myx+',top='+myy); 
	};

