function goUrl(field,seq)
{
//	alert(user_id);
	leftform.seq.value = seq;	
	if(field == "notice")	
		leftform.action = "/community/asp/club/notice.asp";
	else if(field == "visitor")
		leftform.action = "/community/asp/club/visitor.asp";
	else if(field == "board")
		leftform.action = "/community/asp/club/board.asp";
	else if(field == "attboard")
		leftform.action = "/community/asp/club/attboard/default.asp";
	else if(field == "courseboard")
		leftform.action = "/community/asp/club/courseboard/default.asp";
	else if(field == "album")
		if(user_id == 'flyoff'){
		leftform.action = "/community/asp/club/album_test.asp";
		}
		else{
		leftform.action = "/community/asp/club/album.asp";
		}
	else if(field == "coolsite")
		leftform.action = "/community/asp/club/coolsite.asp";	
	else if(field == "poll")
		leftform.action = "/community/asp/poll/default.asp";
	else if(field == "anonymous")
		leftform.action = "/community/asp/club/anonymous.asp";
	else if(field == "schedule")
		leftform.action = "/community/asp/club/schedule/calendar.asp";		
	else if(field == "memo")
		leftform.action = "/community/asp/club/memo/memo.asp";
	else if(field == "discuss")
		leftform.action = "/community/asp/discuss/default.asp";
	else if(field == "dues")
		leftform.action = "/community/asp/dues/default.asp";						
	else if(field == "invite")
		leftform.action = "/community/asp/club/invite.asp";
	else if(field == "member")
		leftform.action = "/community/asp/club/member_list.asp";
	else if(field == "mail")
		leftform.action = "/community/asp/club/sendmail.asp";
//¸ÞÀÏ ¾²±â ¸ðµâ ¾÷±×·¹ÀÌµå¿ë ÀÛ¾÷ 
	else if(field == "mail2")
		leftform.action = "/community/asp/club/sendmail2.asp";

	else if(field == "message")
		leftform.action = "/community/asp/club/sendmessage.asp";
	else if(field == "myinfo")
		leftform.action = "/community/asp/club/membermod.asp";
	else if(field == "myenv")
		leftform.action = "/community/asp/club/memberenv.asp";		
	else if(field == "manage")
		leftform.action = "/community/asp/club/mgt/clubmanage.asp";		
	else if(field == "userdefine")
		leftform.action = "/community/asp/club/userdefine.asp";
	else if(field == "sgroup")
		leftform.action = "/community/asp/club/sg/default.asp";
	else if(field == "link")
		leftform.action = "/community/asp/club/sitelink.asp";	
	else if(field == "goodnews1")
		leftform.action = "/community/asp/club/goodnews.asp";
	else if(field == "goodnews2")
		leftform.action = "/community/asp/club/goodnews.asp";
	else if(field == "goodnews3")
		leftform.action = "/community/asp/club/goodnews.asp";
	else if(field == "ebible")
		leftform.action = "/community/asp/ebible/ebible.asp";
	else if(field == "biblewrite")
		leftform.action = "/community/asp/ebible/biblewrite.asp";
	else			
		return;	
	leftform.submit();
}

function getCookie(name)
{
   var cname = name+"=";
   var dc = document.cookie;

   if(dc.length>0)
   {
      begin = dc.indexOf(cname);
      if(begin != -1)
      {
         begin += cname.length;
         end = dc.indexOf(";",begin);
         if(end == -1) end =dc.length;
         return unescape(dc.substring(begin, end));
      }
   }
}

function set_groupcookie(name, value, expiredays)
{
 	todayDate = new Date();
 	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";";
}

function goLoginuser(schcode)
{
	w=open('/community/asp/club/loginuser.asp?schcode='+schcode,'loginuser','width=360,height=400,scrollbars=yes'); 
	w.focus();	
}
function goChatting(id, code)
{
	if(id == "")
	{
		alert("·Î±×ÀÎ ÇÏ½Å ÈÄ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
		return;
	}			
	w=open("http://218.145.145.51:9002/voicechat/voicechat.asp?member_id="+id,'chatting','width=790,height=533,scrollbars=yes'); 
	w.focus();
}

function goMyclub(objSelect,uid) 
{
	idx = objSelect.selectedIndex;
	if( idx != 0 && idx != 1 && idx != 2  && idx != 3 ) 
	{	
		window.location.href = "/" + objSelect.value;		
	}
	else if(idx == 1)
	{	
		View_Cap(uid);
	}
	else if(idx == 2)
	{	
		document.location.href = "http://mygoodnews.catholic.or.kr/";		
		return;
	}
	
}


function goFriendlist()
{
	w=open('/community/asp/main/friend/friend.asp?flag=i','myfriend','width=486,height=330,scrollbars=yes'); 
	w.focus();	
}
function goMessage()
{
	w=open('/community/asp/main/message/rmessage.asp?fwhere=club','message','width=740,height=510,scrollbars=yes'); 
	w.focus();	
}

function setMenu(submenu,cellbar,groupopen)
{
	if(submenu.style.display=="")
	{ 	
   		submenu.style.display="none";   
   		if(document.all[groupopen])
   		{
   			if(document.all[groupopen].totnew == '1')
   				document.all[groupopen].style.display = "";		
   		}		
   		document.all[cellbar].src= "/community/images/club/icnFolderPlus.gif";
		groupcookieval = "0"; 			
   	}
   	else
   	{
   		submenu.style.display="";
   		if(document.all[groupopen])
   		{
	   		document.all[groupopen].style.display = "none";	
	   	}	
   		document.all[cellbar].src="/community/images/club/icnFolderMinus.gif";
		groupcookieval = "1"; 
   	}
	cookieval = getCookie(strSCHCODE + "?:groupid");
	
	if(cookieval == null) cookieval = "";		
   	group_id = parseInt(cellbar.substring(3,cellbar.length),10);
   	if(cookieval.length < group_id)
   	{
   		for(var i=cookieval.length;i<group_id;i++)
   		{
   			cookieval = cookieval + "1";
   		}
   	}
   	var newcookieval = "";
	for(var i=0;i<cookieval.length;i++)
	{
		if(i == group_id - 1)
			newcookieval = newcookieval + groupcookieval;
		else
   			newcookieval = newcookieval + cookieval.charAt(i);
   	}   	   	
   	set_groupcookie(strSCHCODE + "?:groupid",newcookieval,30);
   	
}
