function getCookie( name )
{
	var search = name + "=";

	if ( document.cookie.length > 0 ) /* if there are any cookies */
	{
		offset = document.cookie.indexOf( search );
		if ( offset != -1 ) /* if cookie exists */
		{
			offset += search.length;
			/* set index of beginning of value */
			end = document.cookie.indexOf( ";", offset );
			/* set index of end of cookie value */
			if ( end == -1 )
				end = document.cookie.length;
			return unescape( document.cookie.substring( offset, end ) );
		}
	}
	return "";
}

function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name+"="+escape( value )+"; path=/;expires="+todayDate.toGMTString()+";"
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function CheckLogin()
{
	if ( document.LoginForm.id.value == "" )
	{
		alert( "¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä" );
		document.LoginForm.id.focus();
		return false;
	}
	if ( document.LoginForm.pw.value == "" )
	{
		alert( "ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä" );
		document.LoginForm.pw.focus();
		return false;
	}
		return true;
}

function RightContent()
{
/*
	document.write("<table border=0 cellpadding=0 cellspacing=0>");
	document.write("	<tr>");
	document.write("		<td><img src='http://www.mylgpoint.com/image/join/imgs/menu017.gif'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td><img src='http://www.mylgpoint.com/image/join/imgs/menu018.gif'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td align=center><img src='http://www.mylgpoint.com/image/join/imgs/sample.gif'></td>");
	document.write("	</tr>");
	document.write("</table>");
*/
	document.write("    <table border='0' cellspacing='0' cellpadding='0'>");
    document.write("      <tr>");
    document.write("        <td height='102'><img src='/image/shop/imgs/site_family.gif' width='168' height='102' usemap='#Map' border='0'>");
    document.write("          <map name='Map'> ");
    document.write("            <area shape='rect' coords='80,7,131,24' href='http://www.lgcard.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,23,131,39' href='http://www.lghalbu.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,38,131,53' href='http://www.lgmyshop.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,52,131,66' href='http://www.lgmycar.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,65,131,80' http://www.lgmyshop.com/html_wrapper/wrap.jsp?num=122' target='_blank'>");
    document.write("            <area shape='rect' coords='80,79,131,94' href='http://www.lgmyshop.com/lotto/' target='_blank'>");
    document.write("          </map>");
    document.write("        </td>");
    document.write("      </tr>");
    document.write("      <tr>");
    document.write("        <td height='10'></td>");
    document.write("      </tr>");
    document.write("       <tr>");
    document.write("        <td><img src='/image/shop/imgs/site_brand.gif' width='168' height='56' usemap='#Map2' border='0'>");
    document.write("          <map name='Map2'> ");
    document.write("            <area shape='rect' coords='82,1,155,14' href='http://www.mylgpoint.com/comm/index.jsp?clubcd=AA99000001'>");
    document.write("            <area shape='rect' coords='82,13,155,28' href='http://www.mylgpoint.com/comm/joynjoy.jsp'>");
    document.write("            <area shape='rect' coords='82,27,155,42' href='http://www.mylgpoint.com/comm/lgbaby.jsp'>");
    document.write("           <area shape='rect' coords='82,41,155,56' href='http://www.mylgpoint.com/comm/index.jsp?clubcd=AA99000002'>");
    document.write("          </map>");
    document.write("       </td>");
    document.write("      </tr>");
    document.write("   </table>");
    document.write("    <table width='168' border='0' cellspacing='1' cellpadding='0'>");
    document.write("      <tr>");
    document.write("        <td><a href='http://www.lgmyshop.com/html_wrapper/wrap.jsp?num=84'  target='_blank'><img src='http://www.mylgpoint.com/image/shop/imgs/event.gif' border='0'></a></td>");
    document.write("      </tr>");
    document.write("   </table>");
}

function myLGpointBanner()
{
/*	
	document.write("<table border=0 cellpadding=0 cellspacing=0>");
	document.write("	<tr>");
	document.write("		<td><img src='http://www.mylgpoint.com/image/join/imgs/menu017.gif'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td><img src='http://www.mylgpoint.com/image/join/imgs/menu018.gif'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td align=center><img src='http://www.mylgpoint.com/image/join/imgs/sample.gif'></td>");
	document.write("	</tr>");
	document.write("</table>");
*/

	document.write("    <table width='168' border='0' cellspacing='0' cellpadding='0'>");
    document.write("      <tr>");
    document.write("        <td height='102'><img src='http://www.mylgpoint.com/image/shop/imgs/site_family.gif' width='168' height='102' usemap='#Map' border='0'>");
    document.write("          <map name='Map'> ");
    document.write("            <area shape='rect' coords='80,7,131,24' href='http://www.lgcard.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,23,131,39' href='http://www.lghalbu.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,38,131,53' href='http://www.lgmyshop.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,52,131,66' href='http://www.lgmycar.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,65,131,80' href='http://www.lgmyshop.com/html_wrapper/wrap.jsp?num=122' target='_blank'>");
    document.write("            <area shape='rect' coords='80,79,131,94' href='http://www.lgmyshop.com/lotto/' target='_blank'>");
    document.write("          </map>");
    document.write("        </td>");
    document.write("      </tr>");
    document.write("      <tr>");
    document.write("        <td height='10'></td>");
    document.write("      </tr>");
    document.write("       <tr>");
    document.write("        <td><img src='http://www.mylgpoint.com/image/shop/imgs/site_brand.gif' width='168' height='56' usemap='#Map2' border='0'>");
    document.write("          <map name='Map2'> ");
    document.write("            <area shape='rect' coords='82,1,155,14' href='http://www.mylgpoint.com/comm/index.jsp?clubcd=AA99000001'>");
    document.write("            <area shape='rect' coords='82,13,155,28' href='http://www.mylgpoint.com/comm/joynjoy.jsp'>");
    document.write("            <area shape='rect' coords='82,27,155,42' href='http://www.mylgpoint.com/comm/lgbaby.jsp'>");
    document.write("           <area shape='rect' coords='82,41,155,56' href='http://www.mylgpoint.com/comm/index.jsp?clubcd=AA99000002'>");
    document.write("          </map>");
    document.write("       </td>");
    document.write("      </tr>");
    document.write("   </table>");
    document.write("    <table width='168' border='0' cellspacing='1' cellpadding='0'>");
    document.write("      <tr>");
    document.write("        <td><a href='http://shop.mylgpoint.com/shop/toget_main.jsp?shopmenu=toget' target='_top'><img src='http://www.mylgpoint.com/image/common/09_10161031.gif' border='0'></a></td>");
    document.write("      </tr>");
    document.write("   </table>");

}

//ÀÓÁ÷¿ø ¹è³Ê
function FamilyBanner()
{
	document.write("    <table width='168' border='0' cellspacing='0' cellpadding='0'>");
    document.write("      <tr>");
    document.write("        <td height='102'><img src='http://www.mylgpoint.com/image/shop/imgs/site_family.gif' width='168' height='102' usemap='#Map' border='0'>");
    document.write("          <map name='Map'> ");
    document.write("            <area shape='rect' coords='80,7,131,24' href='http://www.lgcard.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,23,131,39' href='http://www.lghalbu.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,38,131,53' href='http://www.lgmyshop.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,52,131,66' href='http://www.lgmycar.com' target='_blank'>");
    document.write("            <area shape='rect' coords='80,65,131,80' href='http://www.lgmyshop.com/html_wrapper/wrap.jsp?num=122' target='_blank'>");
    document.write("            <area shape='rect' coords='80,79,131,94' href='http://www.lgmyshop.com/lotto/' target='_blank'>");
    document.write("          </map>");
    document.write("        </td>");
    document.write("      </tr>");
    document.write("      <tr>");
    document.write("        <td height='10'></td>");
    document.write("      </tr>");
    document.write("       <tr>");
    document.write("        <td><img src='http://www.mylgpoint.com/image/shop/imgs/site_brand.gif' width='168' height='56' usemap='#Map2' border='0'>");
    document.write("          <map name='Map2'> ");
    document.write("            <area shape='rect' coords='82,1,155,14' href='http://www.mylgpoint.com/comm/index.jsp?clubcd=AA99000001'>");
    document.write("            <area shape='rect' coords='82,13,155,28' href='http://www.mylgpoint.com/comm/joynjoy.jsp'>");
    document.write("            <area shape='rect' coords='82,27,155,42' href='http://www.mylgpoint.com/comm/lgbaby.jsp'>");
    document.write("           <area shape='rect' coords='82,41,155,56' href='http://www.mylgpoint.com/comm/index.jsp?clubcd=AA99000002'>");
    document.write("          </map>");
    document.write("       </td>");
    document.write("      </tr>");
    document.write("   </table>");
    document.write("    <table width='168' border='0' cellspacing='1' cellpadding='0'>");
    document.write("      <tr>");
    document.write("        <td><a href='http://www.mylgpoint.com/event/sub02/EVLgpDetail1W.jsp?eventid=PO002' target='_top'><img src='http://www.mylgpoint.com/image/shop/imgs/banner_1101.gif' border='0'></a></td>");
    document.write("      </tr>");
    document.write("   </table>");

}

function MemoWindow() {		//ÂÊÁö
	window.open('http://www.mylgpoint.com/mymng/sub02/MemoReceiveBox.jsp','Paper','scrollbars=yes,left=150,top=100,width=640,height=525');
}

function PollWindow(str1,str2,str3) {		//POLL
	if(str2=="Guest"){
		alert("·Î±×ÀÎÈÄ »ç¿ëÇÏ½Ç¼ö ÀÖ½À´Ï´Ù.");
	}else{
		var len;
		var isCheck = true;
		var checkValue ;
		var result_c;

			len = document.formpoll.poi.length;
			for( k=0 ; k < len; k++ ){
				isCheck = document.formpoll.poi[k].checked;
				if( isCheck == true ){
					checkValue =  document.formpoll.poi[k].value;
					result_c   =  document.formpoll.result[k].value;
					break;
				}
			}
			// ¸¸¾à ÇÏ³ªµµ Ã¼Å©°¡ ¾ÈµÇ¾îÀÖÀ¸¸é "¹øÈ£¸¦ ¼±ÅÃÇÏ¶ó´Â ¸Þ¼¼Áö°¡ ³ª¿Â´Ù.
			if ( isCheck == false ) {
				alert("¹øÈ£¸¦ ¼±ÅÃÇÏ¼¼¿ä.");
				return ;
			} else {
				window.open("http://www.mylgpoint.com/common/CyberPollReg.jsp?clubCode="+str1+"&pollno="+str3+"&CHECK="+checkValue+"&RESULT="+result_c,'Poll','scrollbars=yes,left=150,top=100,width=650,height=600');
			}
	}
}

function PollWindow2(str1,str2) {		//POLL
	if(str2=="Guest"){
		alert("·Î±×ÀÎÈÄ »ç¿ëÇÏ½Ç¼ö ÀÖ½À´Ï´Ù.");
	}else{
		window.open("http://www.mylgpoint.com/common/CyberPoll.jsp?clubCode="+str1,'Poll','scrollbars=yes,left=150,top=100,width=650,height=600');
	}
}
