
function selectedBox(obj, val)
{
    var selectedIndexNum = 0;

    for (i = 0; i < obj.length; i++)
    {
        if (obj.options[i].value == val)
            selectedIndexNum = i;
    }
    obj.selectedIndex = selectedIndexNum;
}

function checkedBox(obj, val)
{
    if (obj.length == null)
    {
        if (obj.value == val)
            obj.checked = true;

        return;
    }

    for (i = 0; i < obj.length; i++)
    {
        if (obj[i].value == val)
        {
            obj[i].checked = true;
            return;
        }
    }
}

function check_radio(obj, field){
		var objs = obj.all[field];
		for (var i=0;i < objs.length;i++){
			if (objs[i].checked == true){
				return true;
				break;
			}
		}
		return false;
}

function getRadioValue(obj)
{

    for (i = 0; i < obj.length; i++)
    {
        if (obj[i].checked == true)
            return obj[i].value;
    }
    return '';
}


function wopen(url)
{

    if (self.newwin && !newwin.closed)
    {
        newwin.close();
        newwin = null;
    }

    newwin = window.open(url, "newwin", "width=800,height=600,scrollbars=yes");
}

function wopen(url, wt, ht)
{

    if (self.newwin && !newwin.closed)
    {
        newwin.close();
        newwin = null;
    }
    newwin =
        window.open(
            url,
            "newwin",
            "width=" + wt + ",height=" + ht + ",scrollbars=yes");
}

function wopen3(url, wt, ht, winName)
{

    if (self.winName && !winName.closed)
    {
        winName.close();
        winName = null;
    }
    winName =
        window.open(
            url,
            winName,
            "width=" + wt + ",height=" + ht + ",scrollbars=no");
}

function wopen(url, wt, ht, scrl)
{

    if (self.newwin && !newwin.closed)
    {
        newwin.close();
        newwin = null;
    }

    newwin =
        window.open(
            url,
            "newwin",
            "width=" + wt + ",height=" + ht + ",scrollbars=" + scrl);
}

// For Date Formatting append by yakjin.
function dateFormat(obj, mode)
{
    d = obj.value;
    if (mode == 'off')
    {
        while (d.indexOf('/') >= 0)
        {
            d =
                d.substring(0, d.indexOf('/'))
                    + d.substring(d.indexOf('/') + 1);
        }
    }
    else if (mode == 'on')
    {
        d = d.substring(0, 4) + '/' + d.substring(4, 6) + '/' + d.substring(6);
    }
    obj.value = d;
    if (mode == 'off')
    {
        obj.select();
    }
}

/**
 * ¹®ÀÚ¿­ÀÇ leftÂÊ trim()
 * @return trimµÈ ¹®ÀÚ¿­
 */
function ltrim(str)
{
    var i;
    var ch;
    var retStr = '';
    if (str.length == 0)
        return str;
    for (i = 0; i < str.length; i++)
    {
        ch = str.charAt(i);
        if (retStr.length == 0 && (ch == ' ' || ch == '\r' || ch == '\n'))
            continue;
        retStr += ch;
    }
    return retStr;
}

/**
 * ¹®ÀÚ¿­ÀÇ rightÂÊ trim()
 * @return trimµÈ ¹®ÀÚ¿­
 */
function rtrim(str)
{
    var i;
    var ch;
    var retStr = '';
    if (str.length == 0)
        return str;
    for (i = str.length - 1; i >= 0; i--)
    {
        ch = str.charAt(i);
        if (ch != ' ' && ch != '\r' && ch != '\n')
        {
            break;
        }
    }
    retStr = str.substring(0, i + 1);
    return retStr;
}

/**
 * ¹®ÀÚ¿­ÀÇ ¾çÂÊ trim()
 * @return trimµÈ ¹®ÀÚ¿­
 */
function trim(str)
{
    var retStr;
    retStr = ltrim(str);
    retStr = rtrim(retStr);
    return retStr;
}

/**
 * ¹®ÀÚ¿­Ä¡È¯
 * @return trimµÈ ¹®ÀÚ¿­
 */
function replaceStr(str, oldstr, newstr)
{
    var index = 1;
    var temp = String(str);

    if (newstr == null)
        newstr = "";

    while (index > 0)
    {
        temp = temp.replace(oldstr, newstr);
        index = temp.indexOf(oldstr);
    }

    return temp;
}


function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	if(expiredays==null)
	    expiredays = 7;
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}


function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}
/**
 * ½ºÆ®¸µÀÌ ¼ýÀÚ·Î¸¸ ±¸¼ºµÇ¾îÀÖ´ÂÁö ¿©ºÎ ÆÇº°
 * @return boolean
 */
function isNumStr(str) {
    var i;
    var ch;
    for (i=0;i<str.length;i++) {
        ch = str.charAt(i);
        if (isNum(ch) == false) {
            return false;
        }
    }
    return true;
}

function isNum(ch) {
    return (ch >= '0' && ch <= '9');
}

/**
 * ¾ÆÀÌµð¸¦ Ã¼Å©ÇÕ´Ï´Ù.
 *
 * @param idbox ¾ÆÀÌµðÀÔ·Â Form InputBox
 */
function checkId( idbox ){
    idbox.value = alltrim(idbox.value);

    if (idbox.value.length == 0) {
        alert("¾ÆÀÌµð¸¦ ³ÖÀ¸½Ê½Ã¿À.");
        idbox.focus();
        return false;
    }

    if(isAllowStr(idbox.value,"1234567890abcdefghijklmnopqrstuvwxyz") == false){
        alert("¾ÆÀÌµð´Â ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ Çã¿ëµË´Ï´Ù.");
        idbox.focus();
        return false;
    }

    if (idbox.value.length < 4 || idbox.value.length > 10) {
        alert("¾ÆÀÌµð´Â 4ÀÚ ÀÌ»ó 10ÀÚ ÀÌÇÏÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        idbox.focus();
        return  false;
    }
    return true;
}


function checkIdNum(idbox1, idbox2) {
    idbox1.value = alltrim(idbox1.value);
    idbox2.value = alltrim(idbox2.value);

    var today = new Date();
    var chkYear1 = today.getYear();
    var chkYear2 = 0;
    if (chkYear1 < 2000)
        chkYear1 += 1900;
    var chk = 0;
    var chk2 = 0;
    var chk3 = 0;
    var yy = idbox1.value.substring(0,2);
    var mm = idbox1.value.substring(2,4);
    var dd = idbox1.value.substring(4,6);
    var chkSex = 0 + idbox2.value.substring(0,1);

    if ((idbox1.value.length != 6 ) ||
        (mm < 1 || mm > 12 || dd < 1) )
    {
        alert ("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ¹Ù·Î ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        idbox1.focus();
        return false;
    }

    if ((chkSex != 1 && chkSex !=2 && chkSex !=3 && chkSex !=4)
        || (idbox2.value.length != 7 )) {
        alert ("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ¹Ù·Î ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        idbox2.focus();
        return false;
    }

    chkYear2 = parseInt(yy,10);
    if (chkSex == 1  || chkSex == 2)
        chkYear2 += 1900;
    else if (chkSex == 3  || chkSex == 4)
        chkYear2 += 2000;

    //"14¼¼ ¹Ì¸¸Àº °¡ÀÔÇÒ ¼ö ¾ø½À´Ï´Ù."
    if (arguments.length > 2)
    {
        if ((chkYear1 - chkYear2) < arguments[2]) {
            alert(arguments[2] + "¼¼ ¹Ì¸¸Àº °¡ÀÔÇÒ ¼ö ¾ø½À´Ï´Ù.");
            idbox1.focus();
            return false;
        }
    }

    for (var i = 0; i <=5 ; i++) {
        chk = chk + ((i%8+2) * parseInt(idbox1.value.substring(i,i+1)))
    }
    for (var i = 6; i <=11 ; i++){
        chk = chk + ((i%8+2) * parseInt(idbox2.value.substring(i-6,i-5)))
    }

    chk = 11 - (chk %11)
    chk = chk % 10

    //"À¯È¿ÇÏÁö ¾ÊÀº ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù."
    if (chk != idbox2.value.substring(6,7)) {
        alert ("À¯È¿ÇÏÁö ¾ÊÀº ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.");
        idbox1.focus();
        return false;
    }
    return true;
}

function checkPassword( pwdbox, pwdRebox ) {
    pwdbox.value = alltrim(pwdbox.value);

    if (pwdbox.value.length == 0) {
        alert("ºñ¹Ð¹øÈ£¸¦ ³ÖÀ¸½Ê½Ã¿À.");
        pwdbox.focus();
        return false;
    }

    if (pwdbox.value.length < 4 || pwdbox.value.length > 10) {
        alert("ºñ¹Ð¹øÈ£´Â 4ÀÚ¸® ÀÌ»ó 10ÀÚ¸® ÀÌÇÏÀÔ´Ï´Ù.");
        pwdbox.focus();
        return false;
    }
    if (pwdRebox.value.length == 0)
    {
        alert("ºñ¹Ð¹øÈ£ È®ÀÎÀ» ³ÖÀ¸½Ê½Ã¿À.");
        pwdRebox.focus();
        return false;
    }
    if (pwdbox.value != pwdRebox.value)
    {
        alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
        pwdRebox.focus();
        return false;
    }
    return true;
}

/**
 * ÀÌ¸§À» Ã¼Å©ÇÕ´Ï´Ù.
 *
 * @param namebox ÀÌ¸§ ÀÔ·Â Form InputBox
 */
function checkUserName( namebox ) {
    namebox.value = alltrim(namebox.value);

    var nameStr = "³×±ÛÀÚ´Ù";
    var nameStr1 = "µÎÀÚ";

    if (isAllHangulStr(namebox.value) == false) {
        alert("ÀÌ¸§Àº ¸ðµÎ ÇÑ±ÛÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        namebox.focus();
        return false;
    }

    if (namebox.value.length < nameStr1.length || namebox.value.length > nameStr.length ) {
        alert("ÀÌ¸§Àº ÇÑ±Û 2ÀÚ ÀÌ»ó, 4ÀÚ ÀÌ³»ÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        namebox.focus();
        return false;
    }
    return true;
}

/**
 * ÇØ´ç ¹®ÀÚ¿­ÀÌ ÇÑ±Û·Î ±¸¼ºµÇ¾îÀÖ´ÂÁö ¿©ºÎ ÆÇº°
 *
 * -»ç¿ë¹ý
 * if (isAllHangulStr(formName.nameFd) == false) {
 *      alert("ÀÌ¸§Àº ¸ðµÎ ÇÑ±ÛÀÌ¾î¾ß ÇÕ´Ï´Ù.");
 *      formName.nameFd.focus();
 *      return false;
 * }
 *
 * @param str ÆÇº°ÇÑ ¹®ÀÚ¿­
 * @return boolean
 */
function isAllHangulStr(str) {
    var i;
    var ch;
    for (i=0;i<str.length;i++) {
        ch = escape(str.charAt(i));
        if (isHangul(ch) == false) {
            return false;
        }
    }
    return true;
}

function isHangul(chStr) {
    if (strCharByte(chStr) == 2)
        return true;
    else
        return false;
}

function strCharByte(chStr)
{
    if (chStr.substring(0, 2) == '%u')
    {
        if (chStr.substring(2,4) == '00')
            return 1;
        else
            return 2;
    }
    else if (chStr.substring(0,1) == '%')
    {
        if (parseInt(chStr.substring(1,3), 16) > 127)
            return 2;
        else
            return 1;
    }
    else
        return 1;
}

/**
 * ÁÖ¼ÒÇ×¸ñÀ» Ã¼Å©ÇÕ´Ï´Ù.
 *
 * @param addressbox ÁÖ¼Ò ÀÔ·Â Form InputBox
 * @param addressdetailbox ¼¼ºÎÁÖ¼Ò ÀÔ·Â Form InputBox
 */
function checkAddress( addressbox, addressdetailbox ) {
    addressbox.value = trim(addressbox.value);
    addressdetailbox.value = trim(addressdetailbox.value);

    if (addressbox.value.length == 0) {
        alert("Ã¹¹øÂ° ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
        addressbox.focus();
        return false;
    }

    if (addressdetailbox.value.length == 0) {
        alert("¼¼ºÎ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
        addressdetailbox.focus();
        return false;
    }
    return true;
}


function alltrim(str) {
    var i;
    var ch;
    var retStr = '';
    var retStr1 = '';
    if (str.length == 0)
        return str;
    for (i=0;i<str.length;i++) {
        ch = str.charAt(i);
        if (ch == ' ' || ch == '\r' || ch == '\n')
            continue;
         retStr += ch;
    }
    return retStr;
}

function checkCellPhone(phone1, phone2, phone3)
{
    phone1.value = alltrim(phone1.value);
    phone2.value = alltrim(phone2.value);
    phone3.value = alltrim(phone3.value);
    if (phone1.value.length == 0) {
        alert("¹«¼± ÀüÈ­ÀÇ ¼­ºñ½º¾÷Ã¼ ¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        phone1.focus();
        return false;
    }
    if (isNumStr(phone1.value) == false) {
        alert("¹«¼± ÀüÈ­ÀÇ ¼­ºñ½º¾÷Ã¼ ¹øÈ£´Â ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone1.focus();
        return false;
    }
    if (phone1.value.charAt(0) != "0") {
        alert("¹«¼± ÀüÈ­ÀÇ ¼­ºñ½º¾÷Ã¼ ¹øÈ£´Â 0À¸·Î ½ÃÀÛÇÏ¿©¾ß ÇÕ´Ï´Ù.");
        phone1.focus();
        return false;
    }
    if (phone1.value.length != 3) {
        alert("¹«¼± ÀüÈ­ÀÇ ¼­ºñ½º¾÷Ã¼ ¹øÈ£´Â 3ÀÚ¸®ÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone1.focus();
        return false;
    }
    if (phone2.value.length == 0) {
        alert("¹«¼± ÀüÈ­ÀÇ ±¹¹øÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        phone2.focus();
        return false;
    }
    if (isNumStr(phone2.value) == false) {
        alert("¹«¼± ÀüÈ­ÀÇ ±¹¹øÀº ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone2.focus();
        return false;
    }
    if (phone2.value.length != 3 && phone2.value.length != 4) {
        alert("¹«¼± ÀüÈ­ÀÇ ±¹¹øÀº 3ÀÚ¸® ¶Ç´Â 4ÀÚ¸®ÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone2.focus();
        return false;
    }
    if (isNumStr(phone3.value) == false) {
        alert("¹«¼± ÀüÈ­ÀÇ °íÀ¯¹øÈ£´Â ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone3.focus();
        return false;
    }
    if (phone3.value.length != 4) {
        alert("¹«¼± ÀüÈ­ÀÇ °íÀ¯¹øÈ£´Â 4ÀÚ¸®ÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone3.focus();
        return false;
    }
    if (phone3.value.length == 0) {
        alert("¹«¼± ÀüÈ­ÀÇ °íÀ¯¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        phone3.focus();
        return false;
    }
    return true;
}


function checkLinePhone(phone1, phone2, phone3) {
    phone1.value = alltrim(phone1.value);
    phone2.value = alltrim(phone2.value);
    phone3.value = alltrim(phone3.value);
    if (phone1.value.length == 0) {
        alert(" Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        phone1.focus();
        return false;
    }
    if (isNumStr(phone1.value) == false) {
        alert("Áö¿ª¹øÈ£´Â ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone1.focus();
        return false;
    }
    if (phone1.value.charAt(0) != "0") {
        alert("Áö¿ª¹øÈ£´Â 0À¸·Î ½ÃÀÛÇÏ¿©¾ß ÇÕ´Ï´Ù.");
        phone1.focus();
        return false;
    }
    if (phone1.value.length < 2) {
        alert("Áö¿ª¹øÈ£´Â 2ÀÚ¸® ÀÌ»óÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone1.focus();
        return false;
    }
    if (phone2.value.length == 0) {
        alert("±¹¹øÀ» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        phone2.focus();
        return false;
    }
    if (isNumStr(phone2.value) == false) {
        alert("±¹¹øÀº ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone2.focus();
        return false;
    }
    if (phone2.value.length < 2) {
        alert("±¹¹øÀº 2ÀÚ¸® ÀÌ»óÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone2.focus();
        return false;
    }
    if (phone3.value.length == 0) {
        alert("°íÀ¯¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
        phone3.focus();
        return false;
    }
    if (isNumStr(phone3.value) == false) {
        alert("°íÀ¯¹øÈ£´Â ¼ýÀÚÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone3.focus();
        return false;
    }
    if (phone3.value.length != 4) {
        alert("°íÀ¯¹øÈ£´Â 4ÀÚ¸®ÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        phone3.focus();
        return false;
    }
    return true;
}

function checkEmail( emailbox ) {
    emailbox.value = alltrim(emailbox.value);

    if (emailbox.value.length == 0) {
        alert("ÀüÀÚ¿ìÆíÀ» ÀÔ·ÂÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
        emailbox.focus();
        return false;
    }

    if (isAllowStr(emailbox.value, "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@.-_") == false) {
        alert("ÀüÀÚ¿ìÆí¿¡´Â ¿µ¹®°ú ¼ýÀÚ - _ . @¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.");
        return false;
    }

    var atCnt = 0;
    var dotCnt = 0;
    for (i = 0; i < emailbox.value.length ; i++) {
        ch = emailbox.value.charAt(i);
        if (ch == "@")
            atCnt++;
        if (ch == ".") {
            dotCnt++;
        }
    }

    if (atCnt != 1 || dotCnt < 1) {
        alert ("À¯È¿ÇÏÁö ¾ÊÀº ÀüÀÚ¿ìÆíÀÔ´Ï´Ù.");
        emailbox.focus();
        return false;
    }

    var atIndex = 0;
    atIndex = emailbox.value.indexOf("@");

    if (atIndex <= 0) {
        alert ("À¯È¿ÇÏÁö ¾ÊÀº ÀüÀÚ¿ìÆíÀÔ´Ï´Ù.");
        emailbox.focus();
        return false;
    }

    return true;
}

function isAllowStr(str, allowStr) {
    var i;
    var ch;	
    for (i=0;i<str.length;i++) {
        ch = str.charAt(i);
        if (allowStr.indexOf(ch) < 0) {
            return false;
        }
    }
    return true;
}

function checkNullNotTrim( inputbox, title ){

	if (inputbox.value.length == 0) {
    	alert( title + "À» ÀÔ·ÂÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
    	inputbox.focus();
    	return false;
    }
    return true;
}

function checkNullNotTrim2( inputbox, title ){

	if (inputbox.value.length == 0) {
    	alert( title + " ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
    	inputbox.focus();
    	return false;
    }
    return true;
}

function checkNullNotTrim3( inputbox, title ){

	if (inputbox.checked == false) {
    	alert( title + " ¼±ÅÃÇØÁÖ¼¼¿ä.");
    	return false;
    }
    return true;
}


/**
 * ÀÔ·Â ±ÛÀÚ°¡ ÇÑ±ÛÀÌ¸é¼­ ÃÖ¼Ò°ªºÎÅÍ ÃÖ´ë°ª ÀÌ³»ÀÇ ±ÛÀÚ¼öÀÎÁö¸¦ Ã¼Å©ÇÕ´Ï´Ù.
 * - »ç¿ë¹ý
 * checkStrName(nameBox, 2, 4, "ÀÌ¸§");
 * checkStrName(deptBox, 2, 15, "ºÎ¼­¸í");
 *
 * @param deptbox ÀÌ¸§ ÀÔ·Â Form InputBox
 * @param minStrSize ÆÇº°ÇÒ ÃÖ¼Ò ±ÛÀÚ ½ÎÀÌÁî
 * @param maxStrSize ÆÇº°ÇÒ ÃÖ´ë ±ÛÀÚ ½ÎÀÌÁî
 * @param title ¾îµð°¡ Æ²·È´ÂÁö ¿¡·¯¸Þ¼¼Áö¿¡ ³ªÅ¸³¯ ¹®±¸
 */
function checkStrName( strbox, minStrSize, maxStrSize, title){
    strbox.value = trim(strbox.value);

    var nameStr = "";
    for (var i= 0; i < maxStrSize; i++ )
        nameStr += "a";
	
    var nameStr1 = "";
    for (var i= 0; i < minStrSize; i++ )
        nameStr1 += "a";
	
	if (strbox.value.length < nameStr1.length || strbox.value.length > nameStr.length ) {
        alert(title + "Àº ±ÛÀÚ "+minStrSize+"ÀÚ ÀÌ»ó, "+maxStrSize+"ÀÚ ÀÌ³»ÀÌ¾î¾ß ÇÕ´Ï´Ù.");
        strbox.focus();
        return false;
    }
    return true;
}

function open_socialclub() {
	var url = "/sclub_index.htm";
	location.href = url;
}

function openSClub()
{
	var url = "/sclub_index.htm";
	location.href = url;
}
function index_page(url) {

	//var winreswidth=window.screen.availWidth;
	//var winresheight=window.screen.availHeight;
	var winreswidth=1024;
	var winresheight=709;

	var winl = (screen.width - winreswidth) / 2;
	var wint = (screen.height - winresheight) / 2;


	var wind;

	wind = window.open( url, 'RENEEVON', 'top=0,left=0,width=' + winreswidth +
		',height=' + winresheight + ',toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=yes' );
	wind.moveTo(winl, wint);
	wind.resizeTo(winreswidth, winresheight);
	wind.focus();
}

function setComma(str) 
{ 
        str = ""+str+""; 
        var retValue = ""; 
        for(i=0; i<str.length; i++) 
        { 
                if(i > 0 && (i%3)==0) { 
                        retValue = str.charAt(str.length - i -1) + "," + retValue; 
                 } else { 
                        retValue = str.charAt(str.length - i -1) + retValue; 
                } 
        } 
        return retValue; 
} 


function open_window2(url, name, srcollYN, strWidth, strHeight, strTop, strLeft){
	new_win = window.open(url, name, "top=" + strTop + ", left=" + strLeft +", width=" + strWidth + ",height=" + strHeight + ", status=0, menubar=0, resizable=no, scrollbars=" + srcollYN);
	new_win.focus();
}

function popupEvent051112() {
	window.open("/event/051112/index.html", "popupEvent051112", "width=850,height=550,top=0,left=0"); 
}


function gotoEvent051112() {
	opener.location.href='/multi_park/mboard/detail.asp?boardkind=WU&idx=155&CPG=1';

}

function popupEvent051209() {
	window.open("/event/051209/menu.html", "popupEvent051209", "width=850,height=550,top=0,left=0"); 
}


function gotoEvent051209() {
	opener.location.href='/multi_park/mboard/detail.asp?boardkind=WU&idx=187&CPG=1';

}

function gotoEvent060221() {

	win = window.open("/i_live_for_this/I_LIVE_FOR_THIS.html", "popupEvent060221", "width=860,height=570,top=0,left=0"); 
	win.focus();
    
}

function popSB() {
	window.open("/event/061124/menu1.html", "popSB", "width=800,height=550,top=0,left=0"); 
}

function goto(url) {

    opener.location.href= url;

	//self.close();

}

function flash_contents(file,width,height){
	document.writeln("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+width+"' HEIGHT='"+height+"' id='contents' ALIGN=''>");
	document.writeln("<PARAM NAME=movie value='"+file+"' />");
	document.writeln("<PARAM NAME=quality VALUE=high>");
	document.writeln("<PARAM NAME=bgcolor VALUE=#FFFFFF>");
	document.writeln("<PARAM NAME=wmode VALUE=transparent> ");
	document.writeln("<embed src='"+file+"' quality='high' bgcolor='#FFFFFF' width='"+width+"' height='"+height+"' name='contents' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.writeln("</OBJECT>");
}
