function faqPopup(idx, category)
{
	exec = "/help/common/faqPopup.asp?idx="+idx+"&category="+category;

	window.open(exec, 'win', 'width=670,height=480,scrollbars=yes,resizable=yes');
}

function noticePopup(idx, category)
{
	exec = "/help/common/noticePopup.asp?idx="+idx+"&category="+category;

	window.open(exec, 'win', 'width=670,height=480,scrollbars=yes,resizable=yes');
}

function mChange()
{
	t = document.all.mtheme.value;

	address = new Array(30);

	address[0] = "";
	address[1] = "1_super_square";
	address[2] = "1_super_school";
	address[3] = "1_super_folder";
	address[4] = "1_super_newyear";
	address[5] = "1_super_spring";
	address[6] = "1_super_gray";
	address[7] = "1_super_winter";
	address[8] = "1_super_blue";
	address[9] = "1_super_outlook";
	address[10] = "1_super_defaults";
	address[11] = "1_super_summer";
	address[12] = "1_super_snake";
	address[13] = "1_super_business";
	address[14] = "1_super_color";
	address[15] = "1_super_change1";
	address[16] = "1_super_gentle";
	address[17] = "1_super_cuti";
	address[18] = "1_super_fall";
	address[19] = "1_super_whitexmas";
	address[20] = "1_super_gray2";
	address[21] = "1_super_redhat";
	address[22] = "1_super_scarlet";
	address[23] = "1_super_church";

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://mboard.superboard.com/board.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function jChange()
{
	t = document.all.jtheme.value;

	address = new Array(30);

	address[0] = "";
	address[1] = "1_super_outlook";
	address[2] = "1_super_square";
	address[3] = "1_super_school";
	address[4] = "1_super_folder";
	address[5] = "1_super_newyear";
	address[6] = "1_super_spring";
	address[7] = "1_super_gray";
	address[8] = "1_super_winter";
	address[9] = "1_super_blue";
	address[10] = "1_super_defaults";
	address[11] = "1_super_summer";
	address[12] = "1_super_black";
	address[13] = "1_super_user1";

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://jboard.superboard.com/board.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function pChange()
{
	t = document.all.ptheme.value;

	address = new Array(30);

	address[0] = "";
	address[1] = "super_christmas";
	address[2] = "super_purple";
	address[3] = "super_gray";
	address[4] = "super_oki";

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://pboard.superboard.com/photo.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function gChange()
{
	t = document.all.gtheme.value;

	address = new Array(30);

	address[0] = "";
	address[1] = "0_mgrayb";
	address[2] = "0_mgray";
	address[3] = "0_spring";
	address[4] = "0_gray";
	address[5] = "0_chab";
	address[6] = "0_cha";
	address[7] = "0_winterb";
	address[8] = "0_winter";
	address[9] = "0_newyear";
	address[10] = "0_newyearb";
	address[11] = "0_sboard";
	address[12] = "0_xmas";
	address[13] = "0_xmas2";

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://mguest.superboard.com/guest.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function memoChange()
{
	t = document.all.memotheme.value;

	address = new Array(30);

	address[0] = "";
	for (i = 1; i <= 29; i++)
	{
		address[i] = "3_test"+ i;
	}

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://memo.superboard.com/memo.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function fbChange()
{
	t = document.all.fbtheme.value;

	address = new Array(40);

	address[0] = "";
	for (i = 1; i <= 31; i++)
	{
		address[i] = "0_theme"+ (i - 1);
	}

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://board6.superboard.com/board.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function fgChange()
{
	t = document.all.fgtheme.value;

	address = new Array(30);

	address[0] = "";
	for (i = 1; i <= 5; i++)
	{
		address[i] = "1_demo"+ i;
	}

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://guest.superboard.com/guest.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function memberChange()
{
	t = document.all.membertheme.value;

	address = new Array(30);

	address[0] = "";
	for (i = 1; i <= 10; i++)
	{
		address[i] = "0_theme"+ (i - 1);
	}

	tt = address[t];

	if (tt == "")
	{
		return false;
	}

	document.form.target = "board";
	document.form.action = 'http://guest.superboard.com/guest.cgi';
	document.form.db.value = tt
	document.form.submit();
}

function jboard_open(value)
{ 
	window.open('/inc/theme_board.asp?t='+ value +'&kind=jboard', 'theme0', 'status=yes,toolbar=yes,scrollbars=yes,width=640,height=660');
}

function mboard_open(value)
{ 
	window.open('/inc/theme_board.asp?t='+value +'&kind=mboard', 'theme0', 'status=yes,toolbar=yes,scrollbars=yes,width=640,height=660');
}

function pboard_open(value)
{ 
	window.open('/inc/theme_board.asp?t='+value +'&kind=pboard', 'theme0', 'status=yes,toolbar=yes,scrollbars=yes,width=640,height=660');
}

function mguest_open(value)
{ 
	window.open('/inc/theme_board.asp?t='+value +'&kind=mguest', 'theme0', 'status=yes,toolbar=yes,scrollbars=yes,width=640,height=660');
}

function memo_open(value)
{ 
	window.open('/inc/theme_board.asp?t='+value +'&kind=memo', 'theme0', 'status=yes,toolbar=yes,scrollbars=yes,width=640,height=450');
}

function freeboard_open(value)
{ 
	window.open('/inc/theme_board.asp?t='+value +'&kind=free', 'theme0', 'status=yes,toolbar=yes,scrollbars=yes,width=640,height=610');
}

function freeguest_open(value)
{ 
	window.open('/inc/theme_board.asp?t='+value +'&kind=guest', 'theme0', 'status=yes,toolbar=yes,scrollbars=yes,width=640,height=610');
}

function diary_open()
{ 
	window.open('http://diary.superboard.com/diary.cgi?db=ares98','','status=no,toolbar=no,scrollbars=yes,width=580,height=600');
}

function vote_open()
{ 
	window.open('http://vote.superboard.com/vote.php?userid=super&action=try&vote_num=30','','status=no,toolbar=no,scrollbars=yes,width=470,height=450');
}

function member_open(no)
{
	window.open('http://member.superboard.com/member.cgi?act=setloginbar&db=%3Cfont%20color=red%3E%3Cb%3EDB%B8%ED%3C/b%3E%3C/font%3E&tnum='+no,'theme', 'scrollbars=no,status=no,width=720,height=490');
} 

function cash(type)
{
	window.open('/cash/asp/new.asp?type=' + type, '_cash', 'scrollbars=no,status=no,width=400,height=180');
} 

function themeOpen(idx, url)
{
	window.open('/inc/themeOpen.asp?idx='+ idx +'&url='+ url, '_theme', 'width=700, height=600, status=yes, scrollbars=yes,resizable=yes');

	return false;
}

function openAdver(p, subject, w, h, s, c, i)
{
	if ((c == 0) && (s == 1))
		window.open('/window/eventPOP.asp?subject='+ subject +'&path='+ p +'&close='+ c +'&scroll='+ s +'&idx='+ i, 'event', 'width='+ parseInt(w + (s * 20)) +', height='+ parseInt(h + (c * 30)) +', scrollbars=yes, status=no');
	else
		window.open('/window/eventPOP.asp?subject='+ subject +'&path='+ p +'&close='+ c +'&scroll='+ s +'&idx='+ i, 'event', 'width='+ parseInt(w + (s * 20)) +', height='+ parseInt(h + (c * 30)) +', scrollbars=no, status=no');
}

function chkGetCookie(strName)
{
	var strArg = new String(strName + "=");	
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;
	
	nArgLen	= strArg.length;
	nCookieLen = document.cookie.length;
	
	if(nCookieLen > 0) {
	
		while(i < nCookieLen) {
		
			j = i + nArgLen;
			
			if(document.cookie.substring(i, j) == strArg) {
			
				nEnd = document.cookie.indexOf (";", j);
				
				if(nEnd == -1) nEnd = document.cookie.length;
				
				return unescape(document.cookie.substring(j, nEnd));
			 
			}
			
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	}
	
	return("");
}
