<!--
// È¸¿ø¸í ÆË¾÷
document.write ("<div id='layer_mem_popup_menu' style='font-size:9pt;position:absolute; left:0; top:0; width:0; height:0; z-index:999; visibility: hidden'></div>")
//document.write ("<iframe name='frm_email_process' height=0 width=0 src='about:blank' style='visibility: hidden;width:0; height:0; left:0; top:0;border-width:0;'></iframe>")

var select_obj;
var xmlHttp = null;

function mem_layer(status,left_val) { 

	var obj = document.all('layer_mem_popup_menu');
	var _tmpx,_tmpy

	_tmpx = event.clientX+document.body.scrollLeft;
	_tmpy = event.clientY+document.body.scrollTop;

	if (left_val != "")
	{
		_tmpx = parseInt(left_val)+document.body.scrollLeft;
	}		
	
	if (status != 'hidden')
	{
		obj.style.pixelLeft = _tmpx - 10  ;
		obj.style.pixelTop = _tmpy - 25 ;
	}
	else
	{
		obj.style.pixelLeft = 0;
		obj.style.pixelTop = 0;
	}
	obj.style.visibility=status; 
}

function show_mem_layer(id,name,etcname,flag,left_val) {
	mem_layer('visible',left_val);
	var printHeight = 0;
	var printMain="";

	if(id)
	{
// 2006³â 10¿ù 25ÀÏ
//		printMain = printMain +	"<tr onMouseDown=show_profile('"+id+"');mem_layer('hidden','',0,0)><td onMouseOver=\"this.style.backgroundColor='white';this.style.color='black'\" onmouseout=\"this.style.backgroundColor='';this.style.color=''\" height=22 nowrap bgcolor='#f5f5f5'>&nbsp;&nbsp<span style='font-size:9pt;'>&nbsp;ÇÁ·ÎÇÊ º¸±â&nbsp;</span></td></tr>";
//		printHeight = printHeight + 22;
		
	}

	if(name)
	{
		printMain = printMain +	"<tr onMouseDown=\"memo_send('"+id+"');mem_layer('hidden','',0,0);\"><td onMouseOver=\"this.style.backgroundColor='white';this.style.color='black';\" onmouseout=\"this.style.backgroundColor='';this.style.color='';\" height=22 nowrap bgcolor='#f5f5f5'>&nbsp;&nbsp<span style='font-size:9pt;'>&nbsp;ÂÊÁö º¸³»±â&nbsp;</span></td></tr>";
		printHeight = printHeight + 22;
	}

	if (flag >= 1)
	{
		if(name)
		{
			printMain = printMain +	"<tr onMouseDown=\"name_search('"+name+"','"+etcname+"');mem_layer('hidden','',0,0);\"><td onMouseOver=\"this.style.backgroundColor='white';this.style.color='black';\" onmouseout=\"this.style.backgroundColor='';this.style.color='';\" height=22 nowrap bgcolor='#f5f5f5'>&nbsp;&nbsp<span style='font-size:9pt;'>&nbsp;ÀÌ¸§À¸·Î °Ë»ö&nbsp;</span></td></tr>";
			printHeight = printHeight + 22;
		}
	}

	if (flag >= 2)
	{
		if(name)
		{
			printMain = printMain +	"<tr onMouseDown=fri_add('"+id+"');mem_layer('hidden','',0,0)><td onMouseOver=\"this.style.backgroundColor='white';this.style.color='black'\" onmouseout=\"this.style.backgroundColor='';this.style.color=''\" height=22 nowrap bgcolor='#f5f5f5'>&nbsp;&nbsp<span style='font-size:9pt;'>&nbsp;Ä£±¸·Î Ãß°¡&nbsp;</span></td></tr>";
			printHeight = printHeight + 22;
		}
	}

	if(name)
	{
//		printMain = printMain +	"<tr onMouseDown=fri_add('"+id+"');mem_layer('hidden','',0,0)><td onMouseOver=\"this.style.backgroundColor='white';this.style.color='black'\" onmouseout=\"this.style.backgroundColor='';this.style.color=''\" height=22 nowrap bgcolor='#f5f5f5'>&nbsp;&nbsp<span style='font-size:9pt;'>&nbsp;Ä£±¸·Î Ãß°¡&nbsp;</span></td></tr>";
//		printHeight = printHeight + 22;
		
	}

	var printHeader = "<table border=0 style='font-size:9pt' class=mem_pop><tr><td colspan=3  onMouseover=\"mem_layer('hidden','',0,0);\" height=5></td></tr><tr><td width=3 onMouseover=\"mem_layer('hidden','');\" rowspan=2 >&nbsp;</td><td height=3 ></td></tr><tr><td><table style=cursor:pointer border='0' cellspacing='0' cellpadding='0' width=100 height=3><tr><td height=12 ></td></tr><tr><td valign=top ><table border=0 cellspacing=0 cellpadding=1 width=99% height=100% style=\"border-width:1; border-color:rgb(204,204,204); border-style:solid;\" >";

	var printFooter = "</table></td></tr></table></td><td width=5 rowspan=2 onMouseover=\"mem_layer('hidden','');\">&nbsp;</td></tr><tr><td colspan=3 height=10 onMouseover=\"mem_layer('hidden','');\"></td></tr></table></div>";

	layer_mem_popup_menu.innerHTML = printHeader+printMain+printFooter;
}

// ÇÁ·ÎÇÊ Ã¢ ¶ç¿ì±â
function show_profile(id)
{
//	open_window('fetish_profile','/mem_info/mywin.asp?mode=profile&blogid='+id, 652, 428,0,0,0,0,0);
	location.href="/mypage/profileview.html?id=" + id;
}

// ÂÊÁö º¸³»±â Ã¢ ¶ç¿ì±â
function memo_send(id)
{
	var strUrl = '/mypage/fri_check.html?id='+id;
	var strv = startRequest(strUrl);

	if (strv == "A") {
		alert('Ä£±¸µî·ÏÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä!');
	} else if (strv == "B") {
		alert('¼ö¶ô¿äÃ» ´ë±âÁßÀÔ´Ï´Ù!');
	} else if (strv == "C")	{
		open_window('fetish_memo','/mypage/memo_write.html?id='+id,430,280,0,0,1,0,0);
	}
}

// Ä£±¸Ãß°¡ ¾Ë¸² Ã¢ ¶ç¿ì±â
function fri_add(id)
{
	var str_chk;
	str_chk = confirm("Ä£±¸µî·Ï ¿äÃ»À» ÇÏ½Ã°Ú½À´Ï±î?");
	if (str_chk == true) {
		var strUrl = '/mypage/fri_add.html?id='+id;
		var strv = startRequest(strUrl);

		if (strv == "A") {
			alert('ÀÚ±âÀÚ½ÅÀ» Ä£±¸µî·Ï ÇÒ¼ö ¾ø½À´Ï´Ù!');
		} else if (strv == "B") {
			alert('Ä£±¸µî·Ï¿äÃ»À» ÇÏ¿´½À´Ï´Ù!');
		} else if (strv == "C")	{
			alert('Ä£±¸ ¼ö¶ô ¿äÃ» ´ë±âÁßÀÔ´Ï´Ù!');
		} else if (strv == "D")	{
			alert('ÀÌ¹Ì Ä£±¸ µî·ÏµÇ¾îÀÖ½À´Ï´Ù!');
		}
	}
}

// ÀÌ¸§À¸·Î °Ë»ö
function name_search(name,etcname)
{
	location.href="list.html?etcname="+etcname+"&s_check=n&search="+name;
}

// ¼ö½Å°ÅºÎ ¾Ë¸² Ã¢ ¶ç¿ì±â
function fri_decline(id)
{
	open_window('fri_decline','/mypage/fri_decline.html?etcname=member_fri&id='+id,430,280,0,0,0,0,0);
}

// »õÃ¢ ¶ç¿ì±â
function open_window(name, url, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  screen_width = screen.width
  screen_height = screen.height
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  isopen= window.open(url, name, 'left='+(screen_width-width)/2 +',top='+(screen_height-height)/3+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
	if(isopen == null){
		if (confirm('À©µµ¿ìÁî XP ¼­ºñ½ºÆÑ ¼³Ä¡·Î ÀÎÇÏ¿© ÆË¾÷Ã¢ÀÌ ºñÈ°¼ºÈ­ µÇ¾ú½À´Ï´Ù.    \n\n¼­ºñ½ºÆÑ ¼³Ä¡ »ç¿ëÀÚ ¾È³»¸¦ º¸½Ã°Ú½À´Ï±î?') == true)
		{
			top.location.href = '';
		}
		else
			return;
	}

}

function OpenWindow(url,width,height,scroll, windowname)
{
//var url
//var width
//var height
//var windowname
var left = (screen.width/2) - (width/2);
var top = (screen.height/2) - (height/2); 
 window.open(url,windowname,"scrollbars="+scroll+",toolbar=no,location=no,directories=no,status=no,left="+left+",top="+top+",width="+width+",height="+height+",resizable=no,menubar=no");
}
//-->

// Å¬¸¯½Ã »õÃ¢ ¹Ù·Î ¶ç¿ì±â - ¿ø¿µ 2007-11-14 À¯Èï Ã¢¾÷ ÄÁ¼³ÅÏÆ®
function displayImage(picName, windowName, windowWidth, windowHeight){ 
var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight) 
if(winHandle != null){ 
var htmlString = "<html><head><title>ÆäÆ¼½¬ÄÚ¸®¾Æ¿¡¼± ´ç½ÅÀ» ÃÖ°í·Î ¸ð½Ê´Ï´Ù.</title></head>" 
htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>" 
htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=´Ý±â></a>" 
htmlString += "</body></html>" 
winHandle.document.open() 
winHandle.document.write(htmlString) 
winHandle.document.close() 
} 
if(winHandle != null) winHandle.focus() 
return winHandle 
} 


// GoUrl
function GoUrl(url) {
	self.location.href=url;
}



// À¯ÀÏÇÑ 16ÀÚ ÀÌ³»ÀÇ °ªÀ» ¹ÝÈ¯ÇÏ´Â ÇÔ¼ö, ·£´ý°ªÀ» È£ÃâÇÏ´Âµ¥ »ç¿ëµÇ´Â ÇÔ¼ö
function NewSID()
{
    var prefix = "" + new Date().getTime();
    var num = prefix + Math.floor(Math.random() * 10000);
    while(num.length < 16)
        num += Math.floor(Math.random() * 10000);
    return num.substring(0,16);
}

// ÇÃ·¡½Ã Å×µÎ¸® È°¼ºÈ­Ã¢ ¾ø¾Ö±â

function documentwrite(value)
{
	document.write(value);
}


function createXMLHttpRequest() {
    if(window.ActiveXObject){ 
          try{ 
                  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); 
          } catch(e) { 
                  try{ 
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
                  }catch(e2){ 
                    xmlHttp = null; 
                  } 
          } 
    } else if(window.XMLHttpRequest){ 
          xmlHttp = new XMLHttpRequest(); 
    }else{ 
          xmlHttp = null; 
    }  
}


function startRequest(strUrl) {
    createXMLHttpRequest();
    xmlHttp.open("GET", strUrl, false);
    xmlHttp.send();
	return xmlHttp.responseText;
}

function resizeIframe(Obj) {
	var n = navigator.appName;
	var ie = (n=='Microsoft Internet Explorer');

	var reObj = eval(Obj);

	var tempobj = document.getElementById(Obj);

	if(tempobj){
		if(ie){
			var tempobjBody = reObj.document.body;

			tempobj.style.height = tempobjBody.scrollHeight + (tempobjBody.offsetHeight - tempobjBody.clientHeight);
		}else{
			var tempobjBody = tempobj.contentDocument.body;
			newHeight = tempobjBody.offsetHeight + 40;
			tempobj.style.height = newHeight + 'px';
		}
	}
}

function resizeFrameHeight(height) {
	document.getElementById('ifr_shop').style.height = height;
}


function image_window(img,imgsrc)
{
	var js_url = "<script language='JavaScript1.2'> \n"; 
		js_url += "<!-- \n"; 
		js_url += "var ie=document.all; \n"; 
		js_url += "var nn6=document.getElementById&&!document.all; \n"; 
		js_url += "var isdrag=false; \n"; 
		js_url += "var x,y; \n"; 
		js_url += "var dobj; \n"; 
		js_url += "function movemouse(e) \n"; 
		js_url += "{ \n"; 
		js_url += "  if (isdrag) \n"; 
		js_url += "  { \n"; 
		js_url += "    dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n"; 
		js_url += "    dobj.style.top  = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n"; 
		js_url += "    return false; \n"; 
		js_url += "  } \n"; 
		js_url += "} \n"; 
		js_url += "function selectmouse(e) \n"; 
		js_url += "{ \n"; 
		js_url += "  var fobj      = nn6 ? e.target : event.srcElement; \n"; 
		js_url += "  var topelement = nn6 ? 'HTML' : 'BODY'; \n"; 
		js_url += "  while (fobj.tagName != topelement && fobj.className != 'dragme') \n"; 
		js_url += "  { \n"; 
		js_url += "    fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n"; 
		js_url += "  } \n"; 
		js_url += "  if (fobj.className=='dragme') \n"; 
		js_url += "  { \n"; 
		js_url += "    isdrag = true; \n"; 
		js_url += "    dobj = fobj; \n"; 
		js_url += "    tx = parseInt(dobj.style.left+0); \n"; 
		js_url += "    ty = parseInt(dobj.style.top+0); \n"; 
		js_url += "    x = nn6 ? e.clientX : event.clientX; \n"; 
		js_url += "    y = nn6 ? e.clientY : event.clientY; \n"; 
		js_url += "    document.onmousemove=movemouse; \n"; 
		js_url += "    return false; \n"; 
		js_url += "  } \n"; 
		js_url += "} \n"; 
		js_url += "document.onmousedown=selectmouse; \n"; 
		js_url += "document.onmouseup=new Function('isdrag=false'); \n"; 
		js_url += "//--> \n"; 
		js_url += "</"+"script> \n"; 

	var settings;

	settings = 'fullscreen=yes,';
	settings +='top=1,'; 
	settings +='left=1,'; 
	settings +='scrollbars=no,'; 
	settings +='resizable=yes,'; 
	settings +='status=no'; 

	win=window.open("","image_window",settings); 
	win.document.open(); 
	win.document.write ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset=ecu-kr'>\n"); 
	win.document.write ("<title>AA</title> \n"); 
	win.document.write (js_url); 
	var click = "ondblclick='window.close();' style='cursor:move' title='¿ÞÂÊ ¹öÆ°À» Å¬¸¯ÇÑ ÈÄ ¸¶¿ì½º¸¦ ¿òÁ÷¿©¼­ º¸¼¼¿ä. \n\n ´õºí Å¬¸¯ÇÏ¸é ´ÝÇô¿ä. '"; 
	win.document.write ("<style>.dragme{position:relative;}</style> \n"); 
	win.document.write ("</head> \n\n"); 
	win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#2E2E2E style='cursor:arrow;'> \n"); 
	win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+imgsrc+"' border=0 class='dragme' "+click+"></td></tr></table>");
	win.document.write ("</body></html>"); 
	win.document.close(); 

	if(parseInt(navigator.appVersion) >= 4){win.window.focus();} 
}

