/*******************************************************************************
* Æû À¯È¿¼º °Ë»ç¿¡ »ç¿ëµÇ´Â ÆÐÅÏ Á¤ÀÇ
*******************************************************************************/
var patterns = new Array();

patterns["num"]		= /^[0-9]+$/;
patterns["han"]		= /^[°¡-ÆR]+$/;
patterns["eng"]		= /^[a-zA-Z]+$/;
patterns["eng_num"]	= /^[0-9a-zA-Z]+$/;
patterns["email"]	= /^[_a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+\.[a-zA-Z]+$/; 
patterns["url"]		= /^[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/; 
patterns["img"]		= /.+(\.jpg|\.gif|\.bmp|\.png|\.jpeg)+$/gi;

function english_service_open(open)
{
	if( open == "open" )
	{
		document.all.english_service.style.display = "";
	}
	else
	{
		parent.document.all.english_service.style.display = "none";
	}
}

/*******************************************************************************
* ÀÌ¹ÌÁö Ã¼Å©
*******************************************************************************/
function isImg(str)
{
	if(str.match(patterns["img"]))	return true;
	else							return false;
}

/*******************************************************************************
* MMS Ã¢..
*******************************************************************************/
function mms_pop(mms_img_num)
{
	window.open('/mms/pop.php?mms_img_num='+mms_img_num,'mms', 'top=50, left=50, width=750, height=600, toolbars=no,resizable=yes,scrollbars=yes,status=no');
}

/*******************************************************************************
* ¼ýÀÚ Ã¼Å©
*******************************************************************************/
function isNum(str)
{
	if(str.match(patterns["num"]))	return true;
	else							return false;
}

/*******************************************************************************
* ÇÑ±Û Ã¼Å©
*******************************************************************************/
function isHan(str)
{
	if(str.match(patterns["han"]))	return true;
	else							return false;
}

/*******************************************************************************
* ¿µ¹® Ã¼Å©
*******************************************************************************/
function isEng(str)
{
	if(str.match(patterns["eng"]))	return true;
	else							return false;
}

/*******************************************************************************
* ¿µ¹®¼ýÀÚ Ã¼Å©
*******************************************************************************/
function isEngNum(str)
{
	if(str.match(patterns["eng_num"]))	return true;
	else								return false;
}

/*******************************************************************************
* ¸ÞÀÏ Ã¼Å©
*******************************************************************************/
function isEmail(str)
{
	if(str.match(patterns["email"]))	return true;
	else								return false;
}

/*******************************************************************************
* URL Ã¼Å©
*******************************************************************************/
function isUrl(str)
{
	if(str.match(patterns["url"]))	return true;
	else							return false;
}

/*******************************************************************************
* °ø¹éÀÎÁö
*******************************************************************************/
function isEmpty(str)
{
	if(getLength(trim(str)) <= 0)	return true;
	else							return false;
}

/*******************************************************************************
* °ø¹éÁ¦°Å
*******************************************************************************/
function trim(str)
{
	return str.replace(/^\s+|\s+$/g, '');
}

function delSpace(str)
{
	return str.replace(/\s+/g, '');
}

/*******************************************************************************
* ¼ýÀÚ¸¸ °¡´É
*******************************************************************************/
function delChar(obj)
{
	obj.value = obj.value.replace(/[^0-9]+/g, "");
}

/*******************************************************************************
* Ã¼Å©¹Ú½º ¼±ÅÃ
*******************************************************************************/
var checkall_flag = false;

function checkAll(form, obj_name)
{
	var length = form.elements.length;

	for (var i = 0; i < length; i++)
	{
		if(form.elements[i].name == obj_name && form.elements[i].disabled  == false)
			form.elements[i].checked = !checkall_flag;
	}

	checkall_flag = !checkall_flag;
}

function checkEx(form, obj_name)
{
	var length = form.elements.length;

	for (var i = 0; i < length; i++)
	{
		if(form.elements[i].name == obj_name)
			form.elements[i].checked = !form.elements[i].checked;
	}
}


/*******************************************************************************
* Ã¼Å©¹Ú½º ¼±ÅÃµÇ¾î ÀÖ´ÂÁö
*******************************************************************************/
function isChecked(form, obj_name)
{
	var is_checked_flag = false;
	var length = form.elements.length;

	for (var i = 0; i < length; i++)
	{
		if(form.elements[i].name == obj_name && form.elements[i].checked == true)
		{
			is_checked_flag = true;
			break;
		}
	}

	return is_checked_flag;
}

/*******************************************************************************
* ¸Þ¼¼Áö ¹Ú½º ÃÊ±âÈ­
*******************************************************************************/
function checkMsg(obj)
{
	if(trim(obj.value) == "¿©±â¿¡ ¸Þ¼¼Áö¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
		obj.value = "";											
}

/*******************************************************************************
* ¸Þ¼¼Áö ¹Ú½º ÃÊ±âÈ­
*******************************************************************************/
function checkMsg2(obj)
{
	if(trim(obj.value) == "¾Æ·¡ÀÇ ¹Ì¸®º¸±â¿Í °°ÀÌ ¸Þ¼¼Áö°¡ ³ª´µ¾î¼­ Àü¼ÛÀÌ µË´Ï´Ù. È®ÀÎ ÈÄ Àü¼ÛÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.")
		obj.value = "";											
}

/*******************************************************************************
* ¹ÙÀÌÆ® Ã¼Å© 80bytes ÀÌ»ó
*******************************************************************************/
function checkBytes(form)
{
	var page = 0;
	var body_length = getLength(form.body.value);
	
	form.bytes.value = body_length;
	
	if(body_length)
		page = parseInt(body_length / 80);

	if(body_length % 80)
		page += 1;

	if(typeof(form.page) != "undefined")
		form.page.value = page;
}

/*******************************************************************************
* ¹ÙÀÌÆ® Ã¼Å© 80bytes ÀÌ»ó
*******************************************************************************/
function checkBytes2_plusbyte(form, max_length)
{
	var page = 0;

	if(max_length>80)
	{
		var body_length = getLength2(form.body.value);
	}
	else
	{
		var body_length = getLength(form.body.value);
	}	

	if(body_length > max_length)
	{
		alert(max_length + "bytes ÀÌ»ó ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
		form.body.value	= stringCut(form.body.value, max_length);

		if(max_length>80)
		{
			var body_length = getLength2(form.body.value);
		}
		else
		{
			var body_length = getLength(form.body.value);
		}
	}
	
	var plus_byte = Number(form.optNum.value);
	if( plus_byte > 0)
	{		
		var chkNum = Number(plus_byte);

		body_length = body_length + chkNum;
	}

	if(body_length)
		page = parseInt(body_length / 80);

	if(body_length % 80)
		page += 1;

	if(typeof(form.page) != "undefined")
		form.page.value = page;

	form.bytes.value = body_length;	
}

/*******************************************************************************
* ¹ÙÀÌÆ® Ã¼Å© 80bytes ±îÁö
*******************************************************************************/
function checkBytes2(form, max_length)
{
	var page = 0;

	if(max_length>80)
	{
		var body_length = getLength2(form.body.value);
	}
	else
	{
		var body_length = getLength(form.body.value);
	}
	
	if(body_length > max_length)
	{
		alert(max_length + "bytes ÀÌ»ó ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
		form.body.value	= stringCut(form.body.value, max_length);

		if(max_length>80)
		{
			var body_length = getLength2(form.body.value);
		}
		else
		{
			var body_length = getLength(form.body.value);
		}
	}

	if(body_length)
		page = parseInt(body_length / 80);

	if(body_length % 80)
		page += 1;

	if(typeof(form.page) != "undefined")
		form.page.value = page;

	form.bytes.value = body_length;
}

function checkBytes3(form, max_length)
{
	var page = 0;
	var plus_value = 0;

	if(max_length>80)
	{
		var body_length = getLength2(form.body.value);
	}
	else
	{
		var body_length = getLength(form.body.value);
	}
	
	if(body_length > max_length)
	{
		alert(max_length + "bytes ÀÌ»ó ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
		form.body.value	= stringCut(form.body.value, max_length);

		if(max_length>80)
		{
			var body_length = getLength2(form.body.value);
		}
		else
		{
			var body_length = getLength(form.body.value);
		}
	}

	if(body_length)
		page = parseInt(body_length / 80);

	if(body_length % 80)
		page += 1;

	if(typeof(form.page) != "undefined")
		form.page.value = page;
	
	if( form.circle_munja.checked == true )
	{	
		body_length = body_length + (2 * page);			
	}

	form.bytes.value = body_length;
	
}

function checkBytes_heartcon(form, max_length)
{
	var page = 0;

	if(max_length>40)
	{
		var body_length = getLength2(form.SmsMsg.value);
	}
	else
	{
		var body_length = getLength(form.SmsMsg.value);
	}
	
	if(body_length > max_length)
	{
		alert(max_length + "bytes ÀÌ»ó ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
		form.body.value	= stringCut(form.SmsMsg.value, max_length);

		if(max_length>40)
		{
			var body_length = getLength2(form.SmsMsg.value);
		}
		else
		{
			var body_length = getLength(form.SmsMsg.value);
		}
	}

	if(body_length)
		page = parseInt(body_length / 40);

	if(body_length % 40)
		page += 1;

	if(typeof(form.page) != "undefined")
		form.page.value = page;

	form.bytes.value = body_length;
}

function checkBytes_heartcon2(form, max_length)
{
	var page = 0;

	if(max_length>100)
	{
		var body_length = getLength2(form.WapMsg.value);
	}
	else
	{
		var body_length = getLength(form.WapMsg.value);
	}
	
	if(body_length > max_length)
	{
		alert(max_length + "bytes ÀÌ»ó ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
		form.body.value	= stringCut(form.WapMsg.value, max_length);

		if(max_length>100)
		{
			var body_length = getLength2(form.WapMsg.value);
		}
		else
		{
			var body_length = getLength(form.WapMsg.value);
		}
	}

	if(body_length)
		page = parseInt(body_length / 100);

	if(body_length % 100)
		page += 1;

	if(typeof(form.page) != "undefined")
		form.page.value = page;

	form.bytes2.value = body_length;
}


/*******************************************************************************
* MMS ¹ÙÀÌÆ® Ã¼Å© 
*******************************************************************************/
function checkMMSBytes(form, max_length)
{
	var body_length = getLength(form.msg.value);
	
	if(body_length > max_length)
	{
		alert(max_length + "bytes ÀÌ»ó ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
		form.msg.value	= stringCut(form.msg.value, max_length);
		body_length		= getLength(form.msg.value);
	}

	form.msg_size.value = body_length;
}

/*******************************************************************************
* 80bytes¾¿.. Àß¶ó ¸®ÅÏ..
*******************************************************************************/
function getParseBodys(str)
{
	var bodys		= new Array();
	var length		= 0;
	var start_idx	= 0;

	for(var i = 0; i < str.length; i++)
	{
		if(escape(str.charAt(i)).length >= 4)
			length += 2;
		else
			if(escape(str.charAt(i)) != "%0D")
				length++;

		if(length >= 80 || i == str.length - 1)
		{
			if(length > 80)
				i--;

			bodys[bodys.length] = str.substring(start_idx, i + 1);
	
			length = 0;
			start_idx = i + 1;
		}
	}

	return bodys;
}

/*******************************************************************************
* ¹®ÀÚ¿­ ÀÚ¸£±â
*******************************************************************************/
function stringCut(str, max_length)
{
	var count = 0;
	 
	for(var i = 0; i < str.length; i++)
	{
		if(escape(str.charAt(i)).length >= 4)
			count += 2;
		else
			if(escape(str.charAt(i)) != "%0D")
				count++;

		if(count > max_length)
		{
			if(escape(str.charAt(i)) == "%0A")
				i--;
			break;		
		}
	}
	
	return str.substring(0, i);
}

/*******************************************************************************
* ¹®ÀÚ¿­ ±æÀÌ¸¦ ¸®ÅÏÇÑ´Ù. 
*******************************************************************************/
function getLength(str) 
{
	var length = 0;
	var length2 = 0;

	for(var i = 0; i < str.length; i++)
	{
		if(escape(str.charAt(i)).length >= 4 || escape(str.charAt(i)) == "%A7")
		{
			//ÇÑ±ÛÀÇ °æ¿ì 79 byte¿¡¼­ ÀÔ·ÂµÇ¸é length ++ add by ljj -2009-03-11
			legnth2=length+1;

			if(legnth2 % 80==0)
			{
				length++;
			}

			length += 2;
		}
		else
			if(escape(str.charAt(i)) != "%0D")
				length++;

		/*
		if(escape(str.charAt(i)).length >= 4)
			length += 2;
		else if(escape(str.charAt(i)) == "%A7")
			length += 2;
		else
			if(escape(str.charAt(i)) != "%0D")
				length++;
		*/
	}	

	return length;
}


/*******************************************************************************
* 1000ÀÚ ÀÌ¿ëÀÚ¸¦ À§ÇÑ ¹®ÀÚ¿­ ±æÀÌ¸¦ ¸®ÅÏÇÑ´Ù.
*******************************************************************************/
function getLength2(str) 
{
	var length = 0;

	for(var i = 0; i < str.length; i++)
	{

		if(escape(str.charAt(i)).length >= 4)
			length += 2;
		else if(escape(str.charAt(i)) == "%A7")
			length += 2;
		else
			if(escape(str.charAt(i)) != "%0D")
				length++;
	}
	return length;
}


/*******************************************************************************
* ÄíÅ°°ª ¸®ÅÏ
* 
* name	-	ÄíÅ°¸í
*******************************************************************************/
function getCookie(name)
{
	var label = name + "=";
	var label_len = label.length;
	var cookie_len = document.cookie.length;
	var i = 0;

	while (i < cookie_len) 
	{
		var j = i + label_len;

		if (document.cookie.substring(i, j) == label) 
		{
			var cookie_end = document.cookie.indexOf(";", j);
			if (cookie_end == -1) 
				cookie_end = document.cookie.length;
		
			return unescape(document.cookie.substring(j, cookie_end));
		}
		i++;
	}
	return "";
}

/*******************************************************************************
* ÄíÅ°¼³Á¤
* 
* name			-	ÄíÅ°¸í
* value			-	°ª
* expiredays	-	½Ã°£ (ÀÏ´ÜÀ§)
*******************************************************************************/
function setCookie( name, value, expiredays )
{
	var today = new Date();
	today.setDate(today.getDate() + expiredays);
	document.cookie = name + "=" + escape(value) + "; path=/; expires=" + today.toGMTString() + ";";
}


/*******************************************************************************
* ÀÌÅë»ç ¹øÈ£ Ã¼Å©
*
* str	- ÀüÈ­¹øÈ£
*******************************************************************************/
var tel = new Array("010", "011", "016", "017", "018", "019");

function isHandPhone(str)
{
	var flag = false;
	
	if(str.length > 9 && str.length < 12)
	{
		for(var i = 0; i < tel.length; i++)
		{
			if(str.substring(0, 3) == tel[i])
			{
				flag = true;
				break;
			}
		}
	}
	return flag;
}

/*******************************************************************************
* ÀÌ¸ðÆ¼ÄÜ Àû¿ë
*******************************************************************************/
function selectEmoticon(msg_no, obj)
{
	var form = document.msg_form;

	form.body.value		= obj.value;
	form.msg_no.value	= msg_no;

	checkBytes(form);
}

function showHelpMsg(msg, top, left)
{
	document.all.show_help_msg.innerHTML = msg;

	document.all.show_help_msg.style.pixelTop	= event.y + top + document.body.scrollTop;
	document.all.show_help_msg.style.pixelLeft	= event.x + left + document.body.scrollLeft;
	document.all.show_help_msg.style.display = "";
}

function hideHelpMsg()
{
	document.all.show_help_msg.style.display = "none";
}

document.write("<div id='show_help_msg' style='z-index:1; position:absolute; background-color: #f5f5f5; border: 1px solid aaaaaa; padding: 5px; display:none'></div>");


/*******************************************************************************
* ³»¸Þ¼¼Áö ÀúÀåÇÔ °¡Á®¿À±â
*******************************************************************************/
function getMyMsg()
{
	var url = "/smsbox/my_msg.php";
	window.open(url, "my_msg", "top=100, left=100, width=600, height=500, scrollbars=yes");
}

function getMyMsgL()
{
	var url = "/smsbox/my_msg_long.php";
	window.open(url, "my_msg_long", "top=100, left=100, width=600, height=500, scrollbars=yes");
}

/*******************************************************************************
* ³»¸Þ¼¼Áö ÀúÀå
*******************************************************************************/
function myMsgSave()
{
	var url = "/smsbox/my_msg_save_form.php";
	window.open(url, "my_msg_save_form", "top=100, left=100, width=300, height=200, scrollbars=yes");
}

function myMsgSaveL()
{
	var url = "/smsbox/my_msg_long_save_form.php";
	window.open(url, "my_msg_long_save_form", "top=100, left=100, width=300, height=200, scrollbars=yes");
}


/*******************************************************************************
* ¸ÞÀÎ ÁÖ¼Ò·Ï °¡Á®¿À±â
*******************************************************************************/
function mainAddrPop(src_url)
{
	var url;
	
	if(src_url != "")	url = "/address/main_addr_pop.php?src_url=" + src_url;
	else				url = "/address/main_addr_pop.php";

	window.open(url, "main_addr_pop", "top=100, left=100, width=600, height=500, scrollbars=yes");
}

/*******************************************************************************
* ÁÖ¼Ò·Ï °¡Á®¿À±â
*******************************************************************************/
function addrPop()
{
	var url = "/address/addr_pop.php";
	window.open(url, "addr_pop", "top=100, left=50, width=420, height=500, scrollbars=yes");
}

/*******************************************************************************
* ÁÖ¼Ò·Ï °¡Á®¿À±â
*******************************************************************************/
function addrPopHeartcon()
{
	var url = "/address/addr_pop_heartcon.php";
	window.open(url, "addr_pop", "top=100, left=50, width=420, height=500, scrollbars=yes");
}

function addrPopPlus(tel_type)
{
	var url = "/address/addr_pop.php?tel_type=" + tel_type;
	window.open(url, "addr_pop_plus", "top=100, left=50, width=420, height=500, scrollbars=yes");
}

/*******************************************************************************
* °Ô½ÃÆÇ µî·Ï
*******************************************************************************/
function saveBoard()
{
	var url = "/smsboard/sms_add_form.php";
	window.open(url, "sms_add_form", "top=100, left=100, width=600, height=500, scrollbars=yes");
}

function view(what) 
{ 
	var imgwin = window.open("", 'WIN', 'scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=10,height=10'); 
	imgwin.focus(); 
	imgwin.document.open(); 
	imgwin.document.write("<html>\n"); 
	imgwin.document.write("<head>\n"); 
	imgwin.document.write("<title>¹®ÀÚÃµ±¹</title>\n"); 
	imgwin.document.write("<sc"+"ript>\n"); 
	imgwin.document.write("function resize() {\n"); 
	imgwin.document.write("pic = document.il;\n"); 
	imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
	imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 40; myWidth = eval(pic).width + 12;\n"); 
	imgwin.document.write("  } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }\n"); 
	imgwin.document.write("  clearTimeout();\n"); 
	imgwin.document.write("  var height = screen.height;\n"); 
	imgwin.document.write("  var width = screen.width;\n"); 
	imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
	imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n"); 
	imgwin.document.write("  self.moveTo(leftpos, toppos);\n"); 
	imgwin.document.write("  self.resizeTo(myWidth, myHeight+50);\n"); 
	imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
	imgwin.document.write("</sc"+"ript>\n"); 
	imgwin.document.write("</head>\n"); 
	imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 
	imgwin.document.write("<img border=0 src="+what+" xwidth=100 xheight=9 name=il onload='resize();'>\n"); 
	imgwin.document.write("</body>\n"); 
	imgwin.document.close(); 
} 

function guide2(url)
{
	window.open("/guide/?url=" + url, "guide2", "top=100, left=100, width=400, height=400, scrollbars=yes");
}

// 2005.09.26 
function guide3(url)
{
	window.open("/guide3/?url=" + url, "guide2", "top=100, left=100, width=400, height=400, scrollbars=yes");
}

function first_guide(url)
{
	window.open("/new_guide/index.php", "first_guide", "top=100, left=100, width=600, height=452");
}

function showDDayCalc()
{
	window.open("/dday_calc.php", "dday_calc", "top=100, left=100, width=300, height=250");
}

function objWrite(str)
{
	document.write(str);
}

function today_woon()
{
	var url = "http://unse.skysms.co.kr/today/today_woon.php";
	window.open(url, "today_woon", "top=100, left=100, width=514, height=350, scrollbars=yes");
}

function saju_input()
{
	var url = "http://unse.skysms.co.kr/mem_info/mem_info_form.php";
	window.open(url, "today_woon", "top=100, left=100, width=514, height=350, scrollbars=yes");
}

function blank_win(target, msg)
{
	var newwin = window.open("", target, "top=200, left=200, width=250, height=250");
	
	if(!newwin)
	{
		msg += "\n\n---------------------------------------------------------";
		msg += "\n\nÆË¾÷ÀÌ Â÷´ÜµÇ¾î ÀÖ½À´Ï´Ù.";
		msg += "\n\nº¸´Ù ¿øÇÒÇÑ »çÀÌÆ® ÀÌ¿ëÀ» À§ÇØ¼­ ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.";
		msg += "\n\nÆË¾÷Â÷´Ü ÇØÁ¦ ¾È³» ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?";
		
		if(confirm(msg))
			top.location.href = "/cab/xp_sp2_1.php";
	}
}


/*******************************************************************************
* ¹®ÀÚ¿­ÀÚ¸£±â
*******************************************************************************/

function stringCut2(str, MAX_LEN)
{
	var str,msg;
	var len = 0;
	var temp;
	var count = 0;
	 
	//str = new String(msg);
	len = str.length;

	for (k=0 ; k<len ; k++)
	{
		temp = str.charAt(k);
	
		if (escape(temp).length > 4) {
			count += 2;
		}
		else
			if(escape(temp) != "%0D")
				count++;

		if(count > MAX_LEN)
		{
			if(escape(temp) == "%0A")
				k--;
			break;
		}
	}
	
	return str.substring(0, k);
}

// cjy - 08.09.30 Ãß°¡ 
function showHelpMsg_main2(msg, index, value)
{
	var top = 10;
	var left = 10;
	var right = -200;

	document.all.show_help_msg_main2.innerHTML = msg;
	
	if( index == 0 || index == 1 || index == 3 || index == 4 || index == 6 || index == 7 )
	{
		document.all.show_help_msg_main2.style.pixelTop       = event.y + top + document.body.scrollTop;
		document.all.show_help_msg_main2.style.pixelLeft      = event.x + left + document.body.scrollLeft;	
	}
	else 
	{
		document.all.show_help_msg_main2.style.pixelTop       = event.y + top + document.body.scrollTop;
		document.all.show_help_msg_main2.style.pixelLeft    = event.x + right + document.body.scrollLeft;	
	}		
	
	
	//document.all.show_help_msg_main2.style.pixelTop       = top;
	//document.all.show_help_msg_main2.style.pixelLeft      = left;
	document.all.show_help_msg_main2.style.display = "";
}

function hideHelpMsg_main2()
{
        document.all.show_help_msg_main2.style.display = "none";
}
document.write("<div id='show_help_msg_main2' style='z-index:1; position:absolute; background-color: #f5f5f5; border: 1px solid aaaaaa; padding: 5px; display:none'></div>");


function menu_all_view()
{
	if( document.all.menu_all_view.style.display=="none" )
	{
		document.all.menu_all_view.style.display="";
		document.all.menu_img.innerHTML="<img src='/img/menu/menu_all_close.gif'>";
		try
		{			
			document.all.rmenu.style.visibility="hidden";
			document.all.date.style.visibility="hidden";
		}
		catch (e)
		{
		}
		
	}
	else
	{
		document.all.menu_all_view.style.display="none";
		document.all.menu_img.innerHTML="<img src='/img/menu/menu_all_open.gif'>";	
		try
		{
			document.all.rmenu.style.visibility="visible";	
			document.all.date.style.visibility="visible";	
		}
		catch (e)
		{
		}
		
	}

}

function menu_all_view_close()
{	
	parent.document.all.menu_all_view.style.display="none";
	parent.document.all.menu_img.innerHTML="<img src='/img/menu/menu_all_open.gif'>";
	try
	{
		parent.document.all.rmenu.style.visibility="visible";
		parent.document.all.date.style.visibility="visible";	
	}
	catch (e)
	{
	}
}

/*******************************************************************************
*  ºÎÀû
*******************************************************************************/
function mms_charm_pop(mms_img_num)
{
	window.open('/charm/pop.php?mms_img_num='+mms_img_num,'mms', 'top=50, left=50, width=750, height=600, toolbars=no,resizable=yes,scrollbars=yes,status=no');
}

