	var xmldoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
	var gUserID;
	var sHtml;

	function getUserInfo(userID) {
		gUserID = userID;
		if (trigger==1) {
			clearpic();
		}
		resetUserInfo();
		xmldoc.onreadystatechange = userInfoState;
		xmldoc.load("/userInfo/index.asmx/GetUserInfoByUserID?userID="+userID);
	}

	function getUserProduct() {
		xmldoc.onreadystatechange = userProductState;
		xmldoc.load("/userInfo/index.asmx/GetUserProductByUserID?userID="+gUserID);
	}

	function userInfoState() {
		var state = xmldoc.readyState;
		if (state == 4) {
			var err = xmldoc.parseError;
			if (err.errorCode == 0) {

				var oNodes = xmldoc.selectNodes("//Table/*");

				oNode = oNodes.nextNode;
				for (i=0; i<4; i++) {
					if (oNode.nodeName=="NickImageYN"&&oNode.text=="1") {
						oNode = oNodes.nextNode;
						sHtml = sHtml.replace(/myimage/g, "<img src='/down/nickimage/"+oNode.text+"' width='60' height='16' align='absmiddle'>");
						oNode = oNodes.nextNode;
					}
					else if (oNode.nodeName=="NickImageYN") {
						oNode = oNodes.nextNode;
						sHtml = sHtml.replace(/myimage/g, oNode.text);
						oNode = oNodes.nextNode;
					}
					else if (oNode.nodeName=="MYURL_YN"&&oNode.text=="0")
					{
						sHtml = sHtml.replace(/url/g, "(Private)"); //ºñ°ø°³
						oNode = oNodes.nextNode;
					}
					else if (oNode.nodeName=="MYURL_YN")
					{
						oNode = oNodes.nextNode;
						if (oNode.nodeName=="MYURL") {
							sHtml = sHtml.replace(/url/g, "<a href='http://"+escape(oNode.text)+"' target='_blank'>"+escape(oNode.text)+"</a>");
							oNode = oNodes.nextNode;
						}
						else {
							sHtml = sHtml.replace(/url/g, "");
						}
					}
					else if (oNode.nodeName=="MYINFO_YN" && oNode.text=="0")
					{
						sHtml = sHtml.replace(/myinform/g, "(Private)"); //ºñ°ø°³
						oNode = oNodes.nextNode;
					}
					else if (oNode.nodeName=="MYINFO_YN")
					{
						oNode = oNodes.nextNode;
						if (oNode.nodeName=="MYINFO") {
							sHtml = sHtml.replace(/myinform/g, "<textarea name='textarea' style='width:140;height:38;font-size:12px;color:323232;SCROLLBAR-HIGHLIGHT-COLOR:#d9d9d9;SCROLLBAR-SHADOW-COLOR:#ffffff;SCROLLBAR-3DLIGHT-COLOR:#ececec;SCROLLBAR-ARROW-COLOR:#ffffff;SCROLLBAR-TRACK-COLOR:#f0f0f0;SCROLLBAR-DARKSHADOW-COLOR:#d9d9d9;SCROLLBAR-BASE-COLOR:#dddddd;padding:0;BORDER:solid 1px #BBBBBB;'>"+oNode.text+"</textarea>");
							oNode = oNodes.nextNode;
						}
						else {
							sHtml = sHtml.replace(/myinform/g, "");
						}
					}
					else if (oNode.nodeName=="MYPRODUCT_YN" && oNode.text=="0")
					{
						sHtml = sHtml.replace(/product/g, "(Private)"); //ºñ°ø°³
						dopic(1);
					}
					else if (oNode.nodeName=="MYPRODUCT_YN")
					{
						getUserProduct();
					}

				}
/*
				if (oNodes.item(0).text=="1")
				{
					sHtml = sHtml.replace(/image/g, "<img src='/down/nickimage/"+oNodes.item(1).text+"' width='60' height='16' align='absmiddle'>");
				}
				else
				{
					sHtml = sHtml.replace(/image/g, oNodes.item(1).text);
				}
				if (oNodes.item(4).text=="0")
				{
					sHtml = sHtml.replace(/url/g, "(Private)"); //ºñ°ø°³
				}
				else
				{
					sHtml = sHtml.replace(/url/g, "<a href='"+oNodes.item(3).text+"' target='_blank'>"+oNodes.item(3).text+"</a>");
				}
				if (oNodes.item(6).text=="0")
				{
					sHtml = sHtml.replace(/myinfo/g, "(Private)"); //ºñ°ø°³
				}
				else
				{
					sHtml = sHtml.replace(/myinfo/g, oNodes.item(5).text);
				}

				if (oNodes.item(2).text=="0")
				{
					sHtml = sHtml.replace(/product/g, "(Private)"); //ºñ°ø°³
					dopic(1);
				}
				else
				{
					getUserProduct();
				}
*/
			}
		}
	}

	function userProductState() {
		var tmpHtml = "";
		var state = xmldoc.readyState;
		if (state == 4) {
			var err = xmldoc.parseError;

			if (err.errorCode == 0) {

				var oNodes = xmldoc.selectNodes("//NewDataSet/*");
				for (i=0; i<oNodes.length; i++) {
					oNode = oNodes.nextNode;
					if (oNode != null)
						tmpHtml = tmpHtml + "<option>"+oNode.text+"</option>";
				}
				if (tmpHtml.length>0)	{
					tmpHtml = "<select style='width:140px'>" + tmpHtml + "</select>";
				}
				sHtml = sHtml.replace(/product/g, tmpHtml);
			}
			dopic(1);
		}
	}

	function resetUserInfo() {
		sHtml = "<iframe src='about:blank' mce_src='about:blank' scrolling='no' frameborder='0' style='position:absolute;width:208px;height:117px;top:0px;left:9px;z-index:0;border:none;display:block;'></iframe>";
		sHtml = sHtml+"<div style='position:absolute;width:217px;height:119px;top:0px;left:0px;z-index:0;border:0'>";
		sHtml = sHtml+"<table border='0' cellspacing='0' cellpadding='0'>";
		sHtml = sHtml+"  <tr>";
		sHtml = sHtml+"    <td height='20' align='left' valign='top'><img src='/image/club/myinfo/blank.gif' width='1' height='20' /></td>";
		sHtml = sHtml+"    <td rowspan='3' align='left' valign='top'>";
		sHtml = sHtml+"	  <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>";
		sHtml = sHtml+"		<tr>";
		sHtml = sHtml+"		  <td width='6' height='6' align='left' valign='top'><img src='/image/club/myinfo/top_01.gif' width='6' height='6' /></td>";
		sHtml = sHtml+"		  <td height='6' align='left' valign='top' background='/image/club/myinfo/top_02_bg.gif'></td>";
		sHtml = sHtml+"		  <td width='6' height='6' align='right' valign='top'><img src='/image/club/myinfo/top_03.gif' width='6' height='6' /></td>";
		sHtml = sHtml+"		</tr>";
		sHtml = sHtml+"		<tr>";
		sHtml = sHtml+"		  <td align='left' valign='top' background='/image/club/myinfo/top_08_bg.gif'></td>";
		sHtml = sHtml+"		  <td align='center' valign='middle'>";
		sHtml = sHtml+"			<table width='95%' border='0' cellpadding='0' cellspacing='0'>";
		sHtml = sHtml+"			  <tr>";
		sHtml = sHtml+"				<td>";
		sHtml = sHtml+"				  <table width='100%' border='0' cellpadding='0' cellspacing='0'>";
		sHtml = sHtml+"					<tr>";
		sHtml = sHtml+"					  <td width='10' height='20' align='left' valign='top'><img src='/image/club/myinfo/blank.gif' width='1' height='20' /></td>";
		sHtml = sHtml+"					  <td width='174' align='left' valign='middle'>myimage</td>";
		sHtml = sHtml+"					  <td width='11' align='right' valign='middle'><img src='/image/club/myinfo/btn_close.gif' width='9' height='9' onclick='clearpic();' style='cursor:pointer'/></td>";
		sHtml = sHtml+"					</tr>";
		sHtml = sHtml+"				  </table>";
		sHtml = sHtml+"				</td>";
		sHtml = sHtml+"			  </tr>";
		sHtml = sHtml+"			  <tr>";
		sHtml = sHtml+"				<td height='3' align='left' valign='top' background='/image/club/myinfo/title_bg.gif'></td>";
		sHtml = sHtml+"			  </tr>";
		sHtml = sHtml+"			  <tr>";
		sHtml = sHtml+"				<td>";
		sHtml = sHtml+"				  <table width='100%' border='0' cellpadding='0' cellspacing='0'>";
		sHtml = sHtml+"					<tr>";
		sHtml = sHtml+"					  <td width='5' height='5' rowspan='3' align='left' valign='top' nowrap='nowrap'><img src='/image/club/myinfo/blank.gif' width='5' height='5' /></td>";
		sHtml = sHtml+"					  <td width='185' align='left' valign='top'>";
		sHtml = sHtml+"						<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
		sHtml = sHtml+"						  <tr>";
		sHtml = sHtml+"							<td width='16' height='15' align='center' valign='middle'><img src='/image/club/myinfo/icon_01.gif' width='10' height='15' /></td>";
//		sHtml = sHtml+"							<td width='44' align='left' valign='middle'>My device</td>";    //³»Á¦Ç°
		sHtml = sHtml+"							<td width='131' height='24' align='left' valign='middle'>product</td>";
		sHtml = sHtml+"						  </tr>";
		sHtml = sHtml+"						</table>";
		sHtml = sHtml+"					  </td>";
		sHtml = sHtml+"					</tr>";
		sHtml = sHtml+"					<tr>";
		sHtml = sHtml+"					  <td align='left' valign='top'>";
		sHtml = sHtml+"						<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
		sHtml = sHtml+"						  <tr>";
		sHtml = sHtml+"							<td width='14' height='15' align='center' valign='middle'><img src='/image/club/myinfo/icon_02.gif' width='12' height='12' /></td>";
//		sHtml = sHtml+"							<td width='56' align='left' valign='middle'>My blog</td>";  //³»ºí·Î±×
		sHtml = sHtml+"							<td width='115' height='24' align='left' valign='middle'> url</td>";
		sHtml = sHtml+"						  </tr>";
		sHtml = sHtml+"						</table>";
		sHtml = sHtml+"					  </td>";
		sHtml = sHtml+"					</tr>";
		sHtml = sHtml+"					<tr>";
		sHtml = sHtml+"					  <td height='24' align='left' valign='top'>";
		sHtml = sHtml+"						<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
		sHtml = sHtml+"						  <tr>";
		sHtml = sHtml+"							<td width='16' height='15' align='center' valign='middle'><img src='/image/club/myinfo/icon_03.gif' width='11' height='12' /></td>";
//		sHtml = sHtml+"							<td width='47' align='left' valign='middle'>My introduction.</td>"; //³»¼Ò°³
		sHtml = sHtml+"							<td width='132' align='left' valign='middle'>myinform</td>";
		sHtml = sHtml+"						  </tr>";
		sHtml = sHtml+"						</table>";
		sHtml = sHtml+"					  </td>";
		sHtml = sHtml+"					</tr>";
		sHtml = sHtml+"				  </table>";
		sHtml = sHtml+"				</td>";
		sHtml = sHtml+"			  </tr>";
		sHtml = sHtml+"			</table>";
		sHtml = sHtml+"		  </td>";
		sHtml = sHtml+"		  <td align='right' valign='top' background='/image/club/myinfo/top_04_bg.gif'></td>";
		sHtml = sHtml+"		</tr>";
		sHtml = sHtml+"		<tr>";
		sHtml = sHtml+"		  <td width='6' height='6' align='left' valign='bottom'><img src='/image/club/myinfo/top_07.gif' width='6' height='6' /></td>";
		sHtml = sHtml+"		  <td height='6' align='left' valign='bottom' background='/image/club/myinfo/top_06_bg.gif'></td>";
		sHtml = sHtml+"		  <td align='right' valign='bottom'><img src='/image/club/myinfo/top_05.gif' alt='' width='6' height='6' /></td>";
		sHtml = sHtml+"		</tr>";
		sHtml = sHtml+"	  </table>";
		sHtml = sHtml+"	</td>";
		sHtml = sHtml+"  </tr>";
		sHtml = sHtml+"  <tr>";
		sHtml = sHtml+"	<td width='9' height='5' align='left' valign='top'><img src='/image/club/myinfo/top_09_allow.gif' width='9' height='5' /></td>";
		sHtml = sHtml+"  </tr>";
		sHtml = sHtml+"  <tr>";
		sHtml = sHtml+"    <td height='5' align='left' valign='top'><img src='/image/club/myinfo/blank.gif' width='1' height='90' /></td>";
		sHtml = sHtml+"  </tr>";
		sHtml = sHtml+"</table>";
		sHtml = sHtml+"</div>";
	}

	// ¾ÆÁ÷ ·¹ÀÌ¾î´Â »ý¼ºµÇÁö ¾Ê¾Ò´Ù. 
	var trigger=0;
	// ¾ÆÁ÷ È°¼ºÈ­µÈ ·¹ÀÌ¾î´Â ¾ø´Ù. 
	var vis=0;
	var fx, fy;
	function initthumb() { 
		document.onmousemove = sniff 
		document.onmouseup = sniff 
		document.onmousedown = sniff 
		// Trigger Netscape Mouse Check 
		if (document.layers){document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP)} 
		// Call dummy to help IE get width + height 
		if (document.all)dopic('');
	} 

	function sniff(e) {
		// ¸¶¿ì½ºÀÇ À§Ä¡Á¤º¸¸¦ ¾ò´Â ºÎºÐ
		if (document.layers) {var mousex=e.pageX; var mousey=e.pageY;fx=mousex;fy=mousey;} 
		else if (document.all) {var mousex=event.x; var mousey=event.y+document.body.scrollTop;fx=mousex;fy=mousey;}//-
	}

	function dopic(auto) { 
		var picx = 10;
		var picy = -20;
		var newpicx;
		var newpicy;
		// È°¼ºÈ­µÈ ·¹ÀÌ¾î°¡ ¾ø´Ù¸é.. 
		if (vis == 0) {
			// ±âº»°ª 
			var oldpicx=0;
			var oldpicy=0;

			// ·¹ÀÌ¾î°¡ ¾øÀ» ¶§ 
			if (trigger!=1) { 
				trigger=1; // ·¹ÀÌ¾î¸¦ »ý¼ºÇØ ÁØ´Ù. 
				// ¼û°ÜÁø ·¹ÀÌ¾î¸¦ ¸¸µç´Ù(Netscape) 
				if(document.layers) { 
					document.layers['user_info'] = new Layer(1); 
					document.layers['user_info'].left = oldpicx;
					document.layers['user_info'].top = oldpicy;
					document.layers['user_info'].height = 20; 
					document.layers['user_info'].visibility = "hidden"; 
				} 
				// ¼û°ÜÁø ·¹ÀÌ¾î¸¦ ¸¸µç´Ù(IE) 
				else if (document.all) { 
					document.body.insertAdjacentHTML("BeforeEnd","<div id='user_info' style='z-index:200;position:absolute;left:"+picx+";top:"+picy+"'></div>");
				} 
			} 
			// ¸¸¾à¿¡ ·¹ÀÌ¾î°¡ ÀÖ´Ù¸é, ¼û°ÜÁØ´Ù. 
			if (trigger != 0) { 
				if (document.layers){document.layers['user_info'].visibility="hide"} //Netscape 
				if (document.all){document.getElementById('user_info').style.visibility="hidden"}//IE
			}

			// ·¹ÀÌ¾î ¾È¿¡ Á¤ÇØÁØ ³»¿ëÀ» ³Ö°í, º¸¿©ÁÖ´Â ºÎºÐ(Netscape) 
			if (document.layers) { 
				sprite=document.layers['user_info'].document; 
				sprite.open(); 
				sprite.write(sHtml); 
				sprite.close(); 
				
				// À§Ä¡°¡ ÀÚµ¿ÀûÀ¸·Î ÁöÁ¤µÇÁö ¾ÊÀ» ¶§, ·¹ÀÌ¾î¸¦ Ã³À½¿¡ Á¤ÇØÁÖ¾ú´ø ±âº» À§Ä¡¿¡ À§Ä¡½ÃÅ²´Ù. 
				if (picx != null && auto == '') {
					document.layers['user_info'].left = picx; 
					document.layers['user_info'].top = picy; 
				} 

				// À§Ä¡°¡ ÀÚµ¿ÀûÀ¸·Î ÁöÁ¤µÇ°Ô µÇ¾îÀÖÀ¸¸é.. 
				if (auto != "")	{ 
					// »çÁøÀÇ Æø°ú ³ôÀÌ¸¦ ¾ò´ÂºÎºÐ 
//					xw=document.layers['user_info'].document.images['pic'].width;
//					yw=document.layers['user_info'].document.images['pic'].height;
					// »çÁøÀÇ Áß½ÉºÎºÐÀÇ À§Ä¡¸¦ »õ·Ó°Ô ¸¶¿ì½ºÀÇ À§Ä¡·Î ¼³Á¤ÇÑ´Ù. 
					newpicx = fx// - (xw/2);
					newpicy = fy// - (yw/2);
					// ¿ÀÇÁ¼ÂÀÌ ÀÖ´Ù¸é, ±×°Íµµ ¸ÂÃç¼­ ¼³Á¤ÇØ ÁØ´Ù. 
					if (picx) {newpicx=newpicx + picx}
					if (picy) {newpicy=newpicy + picy}
					// ·¹ÀÌ¾îÀÇ À§Ä¡¸¦ ¼³Á¤ÇØ ÁØ´Ù. 
					document.layers['user_info'].left = newpicx; 
					document.layers['user_info'].top = newpicy; 
				} 
				// ·¹ÀÌ¾î¸¦ º¸¿©ÁØ´Ù. 
				document.layers['user_info'].visibility="show"; 
				// È°¼ºÈ­µÈ ·¹ÀÌ¾î°¡ ÀÖ´Ù°í ¹Ù²ãÁØ´Ù. 
				vis=1;
			} 

			// ·¹ÀÌ¾î ¾È¿¡ Á¤ÇØÁØ ³»¿ëÀ» ³Ö°í, º¸¿©ÁÖ´Â ºÎºÐ(IE) 
			if (document.all) { 
				document.getElementById('user_info').innerHTML = sHtml; 
				// À§Ä¡°¡ ÀÚµ¿ÀûÀ¸·Î ÁöÁ¤µÇÁö ¾ÊÀ» ¶§, ·¹ÀÌ¾î¸¦ Ã³À½¿¡ Á¤ÇØÁÖ¾ú´ø ±âº» À§Ä¡¿¡ À§Ä¡½ÃÅ²´Ù. 
				if (picx != null && auto == ''){ 
					document.getElementById('user_info').style.top=picy;
					document.getElementById('user_info').style.left=picx; 
				} 
				// À§Ä¡°¡ ÀÚµ¿ÀûÀ¸·Î ÁöÁ¤µÇ°Ô µÇ¾îÀÖÀ¸¸é.. 
				if (auto != "") { 
					// get the picture width/height 
//					xw=document.all['pic'].width;
//					yw=document.all['pic'].height;
					// »çÁøÀÇ Áß½ÉºÎºÐÀÇ À§Ä¡¸¦ »õ·Ó°Ô ¸¶¿ì½ºÀÇ À§Ä¡·Î ¼³Á¤ÇÑ´Ù. 
					newpicx = fx// - (xw/2);
					newpicy = fy// - (yw/2);
					// ¿ÀÇÁ¼ÂÀÌ ÀÖ´Ù¸é, ±×°Íµµ ¸ÂÃç¼­ ¼³Á¤ÇØ ÁØ´Ù. 
					if (picx) {newpicx=newpicx + picx} 
					if (picy) {newpicy=newpicy + picy} 
					// ·¹ÀÌ¾îÀÇ À§Ä¡¸¦ ¼³Á¤ÇØ ÁØ´Ù. 
					document.getElementById('user_info').style.top=newpicy;
					document.getElementById('user_info').style.left=newpicx;
				} 
				// ·¹ÀÌ¾î¸¦ º¸¿©ÁØ´Ù. 
				if (auto != "") { 
					document.getElementById('user_info').style.visibility="visible"; 
					// È°¼ºÈ­µÈ ·¹ÀÌ¾î°¡ ÀÖ´Ù°í ¹Ù²ãÁØ´Ù. 
					vis=1;
				} 
			} 
			else if (document.layers == null && document.all == null) {self.location=name}; 
		} 
	} 

	// Å¬¸¯ÇÏ¸é ·¹ÀÌ¾î¸¦ ¼û°ÜÁÖ´Â ºÎºÐ 
	function clearpic() { 
		// º¸¿©Áø ·¹ÀÌ¾î¸¦ ºñÈ°¼ºÈ­ ½ÃÅ°´Â ºÎºÐ 
		vis=0;
		if (document.layers){document.layers['user_info'].visibility="hide"}; 
		if (document.all){document.getElementById('user_info').style.visibility="hidden"}; 
	}

	function window::onload() {initthumb();}
