function get_win_open(url,name,width,height,scrollbars,left,top)
{
	var opt = 'left='+left+',top='+top+',width='+width+',height='+height+',scrollbars='+scrollbars+',status=yes,resizable=yes';
	window.open(url,name,opt);
}

/********************************************************************
*
* Form °ü·Ã ½ºÅ©¸³Æ® ÇÔ¼ö ¸ðÀ½
*
*******************************************************************/
// Æû °ËÁõ ÇÔ¼ö
function get_object_check(f) 
{
	var fLen = f.elements.length;
	var fObj; // Æû ¿ä¼Ò
	var fTyp; // Æû ¿ä¼Ò Type
	var fVal; // Æû ¿ä¼Ò Value
	var fMsg; // °æ°í ¸Þ½ÃÁö ¼Ó¼º
	var fNum; // ¼ýÀÚ¸¸ ÀÔ·Â ¼Ó¼º
	var fMax; // ÃÖ´ë ±æÀÌ ÁöÁ¤
	var fMin; // ÃÖ¼Ò ±æÀÌ ÁöÁ¤
	var fMxN; // ÃÖ´ë°ª ÁöÁ¤
	var fMnN; // ÃÖ¼Ò°ª ÁöÁ¤
	var fMal; // ¸ÞÀÏ FORMAT
	var fEng; // ¿µ¹®¸¸ »ç¿ë °¡´ÉÇÏµµ·Ï ÁöÁ¤

	for (i=0;i<fLen;i++) 
	{
		fObj = f.elements[i];
		fTyp = toUpperCase(fObj.getAttribute("type"));
		fVal = fObj.getAttribute("value");
		fMsg = fObj.getAttribute("msg"); // °æ°í ¸Þ½ÃÁö
		fMsgFull = fObj.getAttribute("msgfull"); // °æ°í ¸Þ½ÃÁö ÀüÃ¼ ³ª¿È
		fFil = fObj.getAttribute("chkfile");// Ã·ºÎÆÄÀÏÀ» Ã¼Å© ÇÒ²«Áö
		fNum = fObj.getAttribute("chknum"); // ¼ýÀÚ¸¸ ±âÀÔ °¡´ÉÇÏµµ·Ï
		fMax = fObj.getAttribute("maxlen"); // ÃÖ´ë ÀÔ·Â±ÛÀÚ¼ö Á¦ÇÑ
		fMin = fObj.getAttribute("minlen"); // ÃÖ¼Ò ÀÔ·Â±ÛÀÚ¼ö Á¦ÇÑ
		fMxN = fObj.getAttribute("maxnum"); // ÃÖ´ë ¼ýÀÚ Á¦ÇÑ
		fMnN = fObj.getAttribute("minnum"); // ÃÖ¼Ò ¼ýÀÚ Á¦ÇÑ
		fMal = fObj.getAttribute("chkmail"); // ÀÌ¸ÞÀÏ Ã¼Å©
		fEng = fObj.getAttribute("chkeng"); // ¿µ¹®/¼ýÀÚ¸¸ »ç¿ë °¡´ÉÇÏµµ·Ï Á¦ÇÑ

		if (fMsg != null && (fTyp == "TEXT" || fTyp == "HIDDEN" || fTyp == "TEXTAREA" || fTyp == "PASSWORD") && fVal.replace(/ /gi,"") == "") 
		{
			if(fMsgFull != null)	alert(fMsg);
			else					alert(fMsg + " ÀÔ·ÂÇØ ÁÖ¼¼¿ä");

			if (fTyp != "HIDDEN") 
			{
				fObj.focus();
			}
			return false;
		}
		if (fMsg != null && (fTyp == "SELECT-ONE" || fTyp == "SELECT-MULTIPLE") && fVal =="") 
		{
			alert(fMsg + " ¼±ÅÃÇØ ÁÖ¼¼¿ä");
			fObj.focus(); return false;
		}
		if (fMsg != null && (fTyp == "FILE") && fVal =="") 
		{
			if(fFil != null)
			{
				alert(fMsg + " Ã£¾Æº¸±â¸¦ Å¬¸¯ÇØ¼­ ¼±ÅÃÇØ ÁÖ¼¼¿ä");
				fObj.focus(); return false;
			}
		}
		if (fMsg != null && (fTyp == "RADIO" || fTyp == "CHECKBOX") && checkChecked(fObj) == false) 
		{
			alert(fMsg + " ¼±ÅÃÇØ ÁÖ¼¼¿ä");
			fObj.focus(); return false;
		}
		if (fNum != null && isNaN(fVal)) 
		{
			alert("¼ýÀÚ·Î¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
			fObj.focus(); return false;
		}
		if (fMax != null && fMax < getLen(fVal)) 
		{
			alert("ÀÔ·ÂµÈ ±ÛÀÚ¼ö°¡ "+fMax+"ÀÚº¸´Ù ÀÛ¾Æ¾ßÇÕ´Ï´Ù.\n(¿µ¹® "+fMax+"ÀÚ, ÇÑ±Û "+Math.floor(fMax/2)+"ÀÚ ±îÁö °¡´ÉÇÕ´Ï´Ù.)");
			fObj.focus(); return false;
		}
		if (fMin != null && fMin > getLen(fVal)) 
		{
			alert("ÀÔ·ÂµÈ ±ÛÀÚ¼ö°¡ "+fMin+"ÀÚº¸´Ù Ä¿¾ßÇÕ´Ï´Ù.");
			fObj.focus(); return false;
		}
		if (fMxN != null && parseInt(fMxN) < parseInt(fVal)) 
		{
			alert("ÀÔ·ÂµÈ ¼ýÀÚ´Â "+fMxN+"º¸´Ù ÀÛ¾Æ¾ßÇÕ´Ï´Ù.");
			fObj.focus(); return false;
		}
		if (fMnN != null && parseInt(fMnN) > parseInt(fVal)) 
		{
			alert("ÀÔ·ÂµÈ ¼ýÀÚ´Â "+fMnN+"º¸´Ù Ä¿¾ßÇÕ´Ï´Ù.");
			fObj.focus(); return false;
		}
		if (fMal != null && checkEmail(fVal) == false && fVal != "") 
		{
			alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù");
			fObj.focus(); return false;
		}

		if(fEng != null && get_eng_check(fVal) == false && fVal != "")
		{
			alert("¿µ¹®/¼ýÀÚ·Î¸¸ ÀÔ·Â ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.");
			fObj.focus(); return false;
		}
	}
	return true;
}

// ¹è¿­ ¿ä¼ÒÀÏ °æ¿ì checked µÈ°ÍÀÌ ÀÖ´ÂÁö È®ÀÎ
function checkChecked(obj) 
{
	var fname = obj.form.name;
	var objnm = obj.name;
	var oElem = eval(fname+"."+objnm);
	var ret = false;

	if (typeof(oElem.length) == "undefined") 
	{
		if (oElem.checked) 
		{
			ret = true;
		}
	} 
	else 
	{
		for (var i=0;i<oElem.length;i++) 
		{
			if (oElem[i].checked) 
			{
				ret = true;
			}
		}
	}
	return ret;
}
// ÀÌ¸ÞÀÏ À¯È¿¼º Ã¼Å©
function checkEmail(str)
{
	var reg = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
	if (str.search(reg) != -1) 
	{
		return true;
	}
	return false;
}
// ¹®ÀÚ ±æÀÌ ¹ÝÈ¯ (¿µ¹® 1byte, ÇÑ±Û 2byte °è»ê)
function getLen(str) 
{
	var len;
	var temp;

	len = str.length;
	var tot_cnt = 0;

	for(k=0;k < len;k++)
	{
		temp = str.charAt(k);
		if(escape(temp).length > 4)
		{
			tot_cnt += 2;
		}
		else
		{
			tot_cnt++;
		}
	}
	return tot_cnt;
}
// ´ë¹®ÀÚ º¯È¯ ex) toUpperCase(¹®ÀÚ)
function toUpperCase(str) 
{
	var ret;
	str != null ? ret = str.toUpperCase() : ret = "";
	return ret;
}

// ¿µ¹®¸¸ »ç¿ë °¡´ÉÇÏµµ·Ï
function get_eng_check(str)
{
	var pattern = /^[a-zA-Z0-9]*$/;

	if(pattern.test(str) == false) 
	{
		return false;
	}
}

// °ø¹é Á¦°Å
function get_trim(str)
{
	var txt = "";
	var from_pos = to_pos = 0;

	for (i=0; i<str.length; i++)
	{
		if (str.charAt(i) == ' ')
			continue;
		else 
		{
			from_pos = i;
			break;
		}
	}

	for (i=str.length; i>=0; i--)
	{
		if (str.charAt(i-1) == ' ')
			continue;
		else 
		{
			to_pos = i;
			break;
		}
	}	

	txt = str.substring(from_pos, to_pos);
	return txt;
}

// ±ÝÁö´Ü¾î ÇÊÅÍ¸µ
function word_filter_check(str)
{
	var trim_pattern = /(^\s*)|(\s*$)/g; // \s °ø¹é ¹®ÀÚ // ¾çÂÊ °ø¹é ¾ø¾Ö±â trim()
	var filter = filter_txt;
	var s = filter.split(",");

	for (i=0; i<s.length; i++) 
	{
		s[i] = s[i].replace(trim_pattern, "");

		if (s[i]=="") continue;
		if (str.indexOf(s[i]) != -1)
			return s[i];
	}
	return "";
}

// ÀÌ¹ÌÁöÀÇ Å©±â¿¡ µû¶ó »õÃ¢ÀÇ Å©±â°¡ º¯°æµË´Ï´Ù.
// zzzz´Ô²²¼­ ¾Ë·ÁÁÖ¼Ì½À´Ï´Ù. 2005/04/12
function image_popup(img)
{
	var w = img.tmp_width; 
	var h = img.tmp_height; 
	var winl = (screen.width-w)/2; 
	var wint = (screen.height-h)/3; 

	if (w >= screen.width) { 
		winl = 0; 
		h = (parseInt)(w * (h / w)); 
	} 

	if (h >= screen.height) { 
		wint = 0; 
		w = (parseInt)(h * (w / h)); 
	} 

	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  ='width='+w+','; 
	settings +='height='+h+','; 
	settings +='top='+wint+','; 
	settings +='left='+winl+','; 
	settings +='scrollbars=no,'; 
	settings +='resizable=yes,'; 
	settings +='status=no'; 


	win=window.open("","image_popup",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=euc-kr'>\n"); 
	var size = "ÀÌ¹ÌÁö »çÀÌÁî : "+w+" x "+h;
	win.document.write ("<title>"+size+"</title> \n"); 
	if(w >= screen.width || h >= screen.height) { 
		win.document.write (js_url); 
		var click = "ondblclick='window.close();' style='cursor:move' title=' "+size+" \n\n ÀÌ¹ÌÁö »çÀÌÁî°¡ È­¸éº¸´Ù Å®´Ï´Ù. \n ¿ÞÂÊ ¹öÆ°À» Å¬¸¯ÇÑ ÈÄ ¸¶¿ì½º¸¦ ¿òÁ÷¿©¼­ º¸¼¼¿ä. \n\n ´õºí Å¬¸¯ÇÏ¸é ´ÝÇô¿ä. '"; 
	} 
	else 
		var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \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=#dddddd style='cursor:arrow;'> \n"); 
	win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+img.src+"' width='"+w+"' height='"+h+"' border=0 class='dragme' "+click+"></td></tr></table>");
	win.document.write ("</body></html>"); 
	win.document.close(); 

	if(parseInt(navigator.appVersion) >= 4){win.window.focus();} 
}

function set_next_focus(formname,now_name,next_name)
{
	var f = 'document.'+ formname +'.'
	var now = eval(f + now_name);

	if (typeof now == 'object')
	{
		if ( now.value.length == now.maxLength)
		{
			var next = eval(f + next_name);

			if ((typeof next) == 'object')
				next.focus();
		}
	}
}

function ShowFlash(url, width, height){
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
	document.write('<param name="movie" value="' + url + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">'); 
	document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
	document.write('</object>');
}


function main(){
		window.location = "/index.php" ;
	}
function park_main(){
		window.location = "/community.html" ;
	}

function bsh(){
		window.location = "/introduce/babyshower.html" ;
	}
function hms(){
		window.location = "/introduce/happymoms.html" ;
	}
function hbp(){
		window.location = "/introduce/happybabyparty.html" ;
	}
function fp(){
		window.location = "/introduce/photo.html" ;
	}
function commu(){
		window.location = "/community.html" ;
	}

function fbd(){
		window.location = "/bbs/board.php?board_id=freeboard" ;
	}
function af_bsh(){
		window.location = "/bbs/board.php?board_id=babyshower" ;
	}
function af_hms(){
		window.location = "/bbs/board.php?board_id=happymoms" ;
	}
function af_hbp(){
		window.location = "/bbs/board.php?board_id=happybabyparty" ;
	}
function cscenter(){
		window.location = "/bbs/board.php?board_id=qna" ;
	}
function sitemap(){
		window.location = "/introduce/sitemap.html" ;
	}

function shop(){
		window.location = "http://mall.applelog.co.kr" ;
	}

function partyu(){
//		window.location = "http://partyu.co.kr" ;
		window.open("http://partyu.co.kr");
	}

function buy(){
		window.location = "/bbs/board.php?board_id=association1" ;
	}

function event_s(){
		window.location = "/bbs/board.php?board_id=event&scty=ÁøÇàÁßÀÎÀÌº¥Æ®" ;
	}
function event_e(){
		window.location = "/bbs/board.php?board_id=event&scty=Á¾·áµÈÀÌº¥Æ®" ;
	}
function insur(){
		window.location = "/bbs/board.php?board_id=insuqna" ;
	}