	function checkSelect(ele)
	{	
		if(ele[0])
		{
			for(i = 0; ele[i]; i++)
			{
				if(ele[i].checked) return true;
			}
		} else if(ele) {
			if(ele.checked) return true;
		} else {
			return true;
		}
		return false;
	}
	
	// check box üũ ó Ѵ
	// ele check box ̵ 迭̸ 
	// ι° ڷ a, n, c    ִ.
	// a : ü ; n :  ; c : 
	function selectProcess(ele){
		var arg = arguments;
		var argc = arg.length;
		if(argc > 1) selType = arg[1];
		else selType = "a";
		// a : ü ; n :  ; c : 

		//alert('why call me?');

		if(selType == "c"){
			if(ele[0])
			{
				for(i = 0; ele[i]; i++)
				{
					if(!ele[i].disabled) ele[i].checked = !ele[i].checked;
				}
			} else if(ele)
			{
				if(!ele.disabled) ele.checked = !ele.checked;
			} 
		} else {
			if(selType == "a") convert = true;
			else convert = false;
			
			if(ele[0])
			{
				for(i = 0; ele[i]; i++)
				{
					if(!ele[i].disabled) ele[i].checked = convert;
				}
			} 
			else if(ele)
			{
				if(!ele.disabled) ele.checked = convert;
			} 
		}
	}
	// â 
	// arg[0] = url
	// arg[1] = â
	// arg[2] = 
	// arg[3] =  
	// arg[4] =    0 ; â  ܿ 1
	function popupwin(urlz, widthz, heightz, winname) {
		var arg = arguments;
		var argc = arg.length;
		urlz = (argc > 0) ? arg[0] : "about:blank";
		widthz = (argc > 1)?arg[1]:100;
		heightz = (argc > 2)?arg[2]:100;
		winname = (argc > 3)?arg[3]:"popUpWin";	
		if(argc > 5) {
			topz = arg[4];
			leftz = arg[5];
		} else {
			relativeObj = (argc > 4)?arg[4]:1;
			if(relativeObj)
			{
				topz = ((document.body.clientHeight-heightz)/2+window.screenTop);
				leftz = ((document.body.clientWidth-widthz)/2+window.screenLeft);
			} 
			else
			{
				topz = (screen.height-heightz)/2;
				leftz = (screen.width-widthz)/2;
			}
		}
		optionz = 'width='+widthz;
		optionz += ',scrollbars=auto,';
		optionz += ',height='+heightz;
		optionz += ',status=no';
		optionz += ',top='+topz;
		optionz += ',left='+leftz;
		popUpWin = window.open(urlz,winname,optionz);
		popUpWin.focus();
	}
	


// select ٸ ũ
function change1(S) 
{	
	{ 
		i=S.selectedIndex;
		http = S.options[i].value; 
		window.open(http,"","")
       	}
}

function voteProcess()
{
	f = document.frmVote;
	f.submit();
}



	function showtip() {
		movetip();
		innerHTMLZ = "<table bgcolor='#000000' cellpadding=2 cellspacing=1 border=0>";
		if(arguments.length == 3 && arguments[2] == 1){
			innerHTMLZ += "<tr><td style='color:#FFFFFF;background:#336699;text-align:right;"
					+" '>"+arguments[0]
					+"</td></tr><tr><td style='background:#FFFFFF transprant;'>"
					+arguments[1]+"</td></tr>";
		} else {
			argCnt = arguments.length;
			for(i = 0 ; i < argCnt ; i++){
				innerHTMLZ += "<tr><td style='color:#FFFFFF;background:#336699;text-align:right;"
					+" '>"+arguments[i++]
					+"<td style='background:#FFFFFF transprant;'>"
					+arguments[i]+"</td></tr>";
			}
		}
		innerHTMLZ += "</table>";
		document.all.xiTooltip.innerHTML= innerHTMLZ;
		document.all.xiTooltip.style.display="inline";
	}

	function hidetip() {
		if(document.all.xiTooltip){
			document.all.xiTooltip.innerHTML = "";
			document.all.xiTooltip.style.display="none";
		}
		return true;
	}

	function movetip() {
		if(!document.all.xiTooltip) {
			oTmp =  document.createElement("DIV");
			oTmp.className="alphashadow";
			oTmp.style.position = "absolute";
			oTmp.id="xiTooltip";
			document.body.insertBefore(oTmp);
		}
		document.all.xiTooltip.style.pixelTop=event.clientY+document.body.scrollTop+15; 
		document.all.xiTooltip.style.pixelLeft=event.clientX+document.body.scrollLeft+10; 
		return true;
	}	


	function moveCenter(widthz, heightz, objz){
		topz = ((document.body.clientHeight-heightz)/2+document.body.scrollTop);
		leftz = ((document.body.clientWidth-widthz)/2+document.body.scrollLeft);
		if (objz)
		{
			with(objz.style)
			{
				pixelTop = topz;
				pixelLeft = leftz;
			}
		}
	}
	
	var tDiv = new Array();
	var x = 50;
	var y = 50;
	var step = 20;
	var aBgcolor = new Array("#FFFFFF", "#FFFFFF", "#FFFFFF");
	function inlineInnerWindow(obj, htmlz){
		obj.innerHTML = htmlz;
		//obj.className = "";
		obj.style.padding = 5;
		obj.style.borderColor = "#EFEFEF";
		obj.style.display = 'inline';

		widthz = (arguments.length > 2) ? arguments[2] : (obj.scrollWidth) ? obj.scrollWidth : 450;
		heightz = (arguments.length > 3) ? arguments[3] : (obj.scrollHeight) ? obj.scrollHeight : 50;
		topz = ((document.body.clientHeight-heightz)/2+document.body.scrollTop) - 50;
		leftz = ((document.body.clientWidth-widthz)/2+document.body.scrollLeft);
		if(topz < 0) topz = 0;
		if(heightz > document.body.clientHeight){
			heightz = document.body.clientHeight;
			topz = 0;
			if(document.all.gyaaGetForm){
				with(document.all.gyaaGetForm){
					style.height=document.body.clientHeight - 50;
					style.overflowY = 'auto';
				}
			}
		}
		moveCenter(widthz, heightz, obj);
		
		return false;
	}
	
	function createInnerWIndow(){
		var arg = arguments;
		var argc = arguments.length;
		var divc = tDiv.length;
		
		bgColor = aBgcolor[divc%3];
		if(argc == 0){
			widthz = 300;
			heightz = 120;
		} else if(argc == 1){
			bgColor = arg[1];
			widthz = 300;
			heightz = 120;
		} else if(argc == 2){
			widthz = arg[0];
			heightz = arg[1];
		} else if(argc == 3){
			widthz = arg[0];
			heightz = arg[1];
			bgColor = arg[2];
		} else if(argc == 4){
			widthz = arg[0];
			heightz = arg[1];
			topz = arg[2];
			leftz = arg[3];
		} else if(argc == 5){
			widthz = arg[0];
			heightz = arg[1];
			bgColor = arg[2];
			topz = arg[3];
			leftz = arg[4];
		}
		oTmp =  document.createElement("SPAN");
		oTmp.innerHTML = document.all.lyer.innerHTML;
		oTmp.className="innerWindows";
		oTmp.style.backgroundColor= bgColor;
		oTmp.style.width = widthz;
		oTmp.style.height= heightz;
		oTmp.id="oDiv_"+divc;
		document.body.insertBefore(oTmp);
		
		if(widthz < oTmp.style.width) widhtz = oTmp.style.width;
		if(heightz < oTmp.style.height) heightz = oTmp.style.height;

		if(argc != 5) {
			moveCenter(widthz, heightz, oTmp);
		} else {
			oTmp.style.pixelTop = topz;
			oTmp.style.pixelLeft = leftz;
		}
		
		tDiv[divc] = oTmp;
		
		x += step;
		y += step;
		
		return oTmp;
	}
	
	function createObj(){
		var arg = arguments;
		var argc = arguments.length;
		var divc = tDiv.length;
		
		bgColor = aBgcolor[divc%3];
		if(argc == 0){
			widthz = 300;
			heightz = 120;
		} else if(argc == 1){
			bgColor = arg[1];
			widthz = 300;
			heightz = 120;
		} else if(argc == 2){
			widthz = arg[0];
			heightz = arg[1];
		} else if(argc == 3){
			widthz = arg[0];
			heightz = arg[1];
			bgColor = arg[2];
		} else if(argc == 4){
			widthz = arg[0];
			heightz = arg[1];
			topz = arg[2];
			leftz = arg[3];
		} else if(argc == 5){
			widthz = arg[0];
			heightz = arg[1];
			bgColor = arg[2];
			topz = arg[3];
			leftz = arg[4];
		}

		oTmp =  document.createElement("SPAN");
		oTmp.className="alphashadow";
		oTmp.style.position = "absolute";
		oTmp.style.borderColor = "#EFEFEF";
		oTmp.style.borderStyle = "solid";
		oTmp.style.borderWidth="1px";
		oTmp.style.display="inline";
		oTmp.style.zIndex=3000;
		oTmp.style.backgroundColor= bgColor;
		oTmp.style.width = widthz;
		oTmp.style.height=heightz;
		oTmp.id="oDiv_"+divc;
		document.body.insertBefore(oTmp);
		
		if(widthz < oTmp.style.width) widhtz = oTmp.style.width;
		if(heightz < oTmp.style.height) heightz = oTmp.style.height;

		if(argc != 5) {
			moveCenter(widthz, heightz, oTmp);
		} else {
			oTmp.style.pixelTop = topz;
			oTmp.style.pixelLeft = leftz;
		}
		
		tDiv[divc] = oTmp;
		
		x += step;
		y += step;

		return oTmp;
	}

	function removeObj(obj){
		var tTmp = document.getElementById(obj);
		if(tTmp){
			tTmp.innerHTML="";
			tTmp.removeNode();
		}
	}

	function removeAll(){
		var divc = tDiv.length;
		for(i = 0; i < divc ; i++){
			if(document.getElementById('oDIv_'+i)) removeObj('oDiv_'+i);
		}
		x = 50;
		y = 50;
		tDiv = new Array();
	}

	function winstatus(){
		if(window.status) {
			if(arguments.length > 0)
				window.status=arguments[0];
			else
				window.status="";
		}
		return true;
	}

	function doMouseMove() {
		if(document.all.xiTooltip && document.all.xiTooltip.style.display=="inline") movetip();
	}
	
	function doMouseDown() {
		if(typeof(hideTipQmenu) == "function") hideTipQmenu();
		if(typeof(hideShownDropDowns) == "function") hideShownDropDowns();
		if(typeof(doDown) == "function") doDown();
	}

	function domouseover() {
		winstatus(_SITENAME_);
		if(event.srcElement){
			if(event.srcElement.getAttribute("noTip")){
				hidetip();
			}
			if(event.srcElement.getAttribute("tooltipTitle") && event.srcElement.getAttribute("tooltip"))
			{
				if(event.srcElement.getAttribute("tooltipskin")){
					showtip(event.srcElement.getAttribute("tooltipTitle"), event.srcElement.getAttribute("tooltip"),event.srcElement.getAttribute("tooltipskin"));
				} else {
					showtip(event.srcElement.getAttribute("tooltipTitle"), event.srcElement.getAttribute("tooltip"));
				}
			}
			if(typeof(doOver) == "function") doOver();
		}
	}
	function domouseout() {
		winstatus(_SITENAME_);
		if(event.srcElement){
			if(event.srcElement.getAttribute("tooltipTitle") || event.srcElement.getAttribute("tooltip"))
			{
				hidetip();
			}
		}
	}

	function doMouseUp(){ 
		if(document.all.oQUICKMENU && event.srcElement.className != "contextTD") oQUICKMENU.style.display="none";
		new Function("elDragged = null;");
		if(typeof(doUp) == "function") doUp();
	}

// ޴
	topidx = 1;
	function QuickMenu(quickMenu){
		var lefter = document.body.scrollLeft+event.clientX+10;
		var topper = document.body.scrollTop+event.clientY+0;
		if(!document.all.oQUICKMENU){
			oTmp =  document.createElement("DIV");
			oTmp.className="alphashadow";
			oTmp.style.position = "absolute";
			oTmp.style.cursor="hand";
			oTmp.id="oQUICKMENU";
			document.body.insertBefore(oTmp);
		}
		oQUICKMENU.style.display="inline";
		oQUICKMENU.style.pixelTop = topper;
		oQUICKMENU.style.pixelLeft = lefter;
		oQUICKMENU.innerHTML=quickMenu;
		topidx = 1;
	}
	function hideQuickMenu(){
		if(document.all.oQUICKMENU){
			oQUICKMENU.innerHTML = "";
			oQUICKMENU.style.diplay="none";
			if(document.all.oContextHTML) oContextHTML.style.display="none";
		}
		return true;
	}
// ޴ 
// ޴ ̺ ϼ
	function makeTable(value){
		reVal = "<table border=0 cellpadding=0 cellspacing=0 bgcolor=#FFFFFF class=alphashadow><tr></td><table border=0 cellpadding=2 cellspacing=0 bgcolor=#FFFFFF class=\"\" style=\"border:1px solid black\">";
		reVal += value;
		reVal +="</table></td></tr></table>";
		return reVal;
	}
// ޴ ָ޴ 
	function makeMenu(value, aliase){
		var reVal;
		reVal =" <tr>";
		if(topidx) {
			reVal += "<td align=\"center\" class=\"contextTH\" valign=\"top\"><img src=\"/lib/img/small_icon2.gif\" width=\"12\" height=\"12\" border=\"0\" onClick=\"hideQuickMenu()\" alt=\"close\" style=\"cursor:hand\"></td>";
			topidx--;
		} else {
			reVal +="<td class=\"contextTH2\">&nbsp;</td>";
		}
		if(arguments.length > 0) value =arguments[0];  else value = "";
		if(arguments.length > 1 ) aliase =arguments[1];
		if(value == ""){
			reVal +="      <td height=1 bgcolor=#FFFFFF align=center style=\"font-size:1px\"><div style=\"border:1px solid #999999;border-bottom:none;border-right:none;font-size:1px;background:#4D6BA3;height:1px;width:90%\"></div></td>";
		} else {
			if(arguments.length > 2) {
				reVal +="      <td bgcolor=#FFFFFF class=\"contextTD\"  onClick=\"//"+value+";hideQuickMenu();\"><div onMouseOver=\"hiddenSubmenu("+subMenuIdx+");\" onMouseOut=\"hiddenSubmenu();\" style=\"position:relative\">"+aliase+"<span id=\"submenuItem\" style=\"position:absolute;display='none';width:200;left:60;\">"+makeSubmenu(arguments[2], arguments[3], arguments[4], arguments[5])+"</span></div></td>";
				subMenuIdx++;
			} else {
				reVal +="      <td bgcolor=#FFFFFF class=\"contextTD\" onClick=\""+value+";hideQuickMenu();\"  a href=\"javascript:void(0)\" onFocus=\"this.blur()\">"+aliase+"</a></td>";
			}
		}
		reVal +="</tr>";
		return reVal;
	}
	
	// ޴  
	function formMember(mem_id, club){
			forMember =makeMenu("viewMember('"+mem_id+"','"+club+"')", "ȸ");
			forMember +=makeMenu("sendMemo('"+mem_id+"')", "");
			//forMember +=makeMenu("sendMail('"+mem_id+"')", "Ϻ");
			return forMember;
	}
	// ȸ  ޴ 
	function qMenu_memInfo(memId){
		quickMenu = makeTable(formMember(memId));
		QuickMenu(quickMenu);
	}
	// ȸ  ޴  
	
	function aMenu_clubmem(mem_id, club){
		var arg = arguments;
		var argc = arg.length;
		
		quickMenu = makeTable(formMember(mem_id, club));
		QuickMenu(quickMenu);
	}
	
	function viewMember(mem_id, club){
		popupwin('/community/popup_club_member_info.asp?mem_id='+mem_id+'&club='+club,450,450,'memInfoWIn');
	}
	
	function sendMemo(mem_id){
		popupwin('/community/club_slippaper_write.asp?mem_id='+mem_id,520,450,'memoWIn');
	}
	
	function sendMail(mem_id){
		
	}



function viewimg(urlz, wintitle){
		myImage = new Image();
		myImage.src = urlz;
		widthz = (arguments.length > 2) ? arguments[2] : (myImage.width)?myImage.width: 340;
		heightz = (arguments.length > 3) ? arguments[3] : (myImage.height)?myImage.height:210;
		winwidthz = widthz;// + 70;
		winheightz = heightz - 1 + 21;
		//alert(widthz + " " + heightz);
		//alert(winwidthz + " " + winheightz);
		newy = ((document.body.clientWidth-winwidthz)/2)+window.screenLeft;
		newx = ((document.body.clientHeight-winheightz)/2)+window.screenTop;
		optionz = "width="+winwidthz+",height="+winheightz;
		optionz += ",top="+newx+",left="+newy;
		optionz +=",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
		imageviewer = window.open("","imageviewer", optionz);
		imageviewer.document.write("<html>\n<haed>\n");
		imageviewer.document.write("<title>"+wintitle+"</title>\n");
		imageviewer.document.write("<META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\">\n");
		imageviewer.document.write("<style>body, html{ border:0 ;background:buttonface} </style>\n");
		imageviewer.document.write("<link rel=stylesheet href=/css/default.css>\n");
		imageviewer.document.write("</head>\n");
		imageviewer.document.write("<body background=white topmargin=0 leftmargin=0>\n");
		imageviewer.document.write("<table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%' align='center'>\n");
		imageviewer.document.write("<tr><td align='center' bgcolor='#FFFFFF' style='border:1px solid #808080;border-bottom:1px solid #EFEFEF;border-right:1px solid #EFEFEF;'>\n");
		imageviewer.document.write("<img title='Ŭ Ͻø ϴ ^^' src=\"");
		imageviewer.document.write(urlz);
		imageviewer.document.write("\" border=0 onClick='self.close()' width="+widthz+" height="+heightz+" style='cursor:hand'>\n");
		imageviewer.document.write("</td></tr>\n");
		imageviewer.document.write("<form><tr>");
		imageviewer.document.write("<td valign='bottom' align='center' height='25'><input type='button' value='CLOSE WIN' onClick='self.close()' onFocus='this.blur()' style=';cursor:hand;' class='imgBtn'></td>\n");
		imageviewer.document.write("</tr></form>");
		imageviewer.document.write("</table>\n")
		imageviewer.document.write("</body>\n</html>\n");
		imageviewer.document.close();
		imageviewer.document.images[0].src = urlz;
		//imageviewer.resizeTo(winwidthz, winheightz);
		//imageviewer.moveTo(newx,newy);
		imageviewer.focus();
	}

	function printBbs(board, seq, club){
		popupwin("./print.asp?board="+board+"&seq="+seq+"&club="+club, 720, 500, "printBbsWin");
	}
	function fn_resizeImg(){
		fn_resizeimg();
	}
	function fn_resizeimg(){
		var maxWidth = 0;
		var maxHeight = 0 ;
		var oWidth = 0;
		var oHeight = 0 ;
		var oRate = 0;
		for(i = 0 ; i < document.images.length; i++){
			var oImg = document.images[i];
			if(oImg.getAttribute("maxwidth") || oImg.getAttribute("maxheight")){
				maxWidth = oImg.getAttribute("maxwidth")
				maxHeight = oImg.getAttribute("maxheight")
				
				oWidth = parseInt(oImg.width);
				oHeight = parseInt(oImg.height);
				
				if(maxWidth == null){
					maxWidth = oWidth;
				}
				if(maxHeight == null){
					maxHeight = oHeight;
				}
				
				maxWidth = parseInt(maxWidth);
				maxHeight = parseInt(maxHeight);
				
				if(maxWidth < oWidth){
					wRate = maxWidth / oWidth;
				} else {
					wRate = 1;
				}
				if(maxHeight < oHeight){
					hRate = maxHeight / oHeight;
				} else {
					hRate = 1;
				}
				
				oRate = (wRate > hRate) ? hRate : wRate;
				oImg.width = oWidth * oRate;
				oImg.height = oHeight * oRate;
				//oImg.style.display="inline";
			}
		}
	}
	
	function viewmoveableimg(urlz, wintitle){
		myImage = new Image();
		myImage.src = urlz;
		widthz = (arguments.length > 2) ? arguments[2] : (myImage.width)?myImage.width: 400;
		heightz = (arguments.length > 3) ? arguments[3] : (myImage.height)?myImage.height:400;
		widthz;// + 70;
		winwidthz =  (widthz > screen.availWidth) ? screen.availWidth : widthz;
		winheightz = (heightz > screen.availHeight) ? screen.availHeight : heightz - 1 + 21;
		//alert(widthz + " " + heightz);
		//alert(winwidthz + " " + winheightz);
		newy = ((screen.availWidth-winwidthz)/2);//((document.body.clientWidth-winwidthz)/2);//+window.screenLeft;
		newx = ((screen.availHeight-winheightz)/2);//((document.body.clientHeight-winheightz)/2);//+window.screenTop;
		optionz = "width="+winwidthz+",height="+winheightz;
		optionz += ",top="+newx+",left="+newy;
		optionz +=",location=no,directories=no,status=no,titlebar=no,status=no,menubar=no,toolbar=no,resizable=no";
		imageviewer = window.open("/_viewer/image.asp?filename="+urlz+"&title="+wintitle, "imageviewer", optionz)
		if(imageviewer) imageviewer.focus();
	}
	
// ʸ޴ ѿư ũƮ 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
   if(typeof(maininit) == "function") maininit();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function init(){
	if(typeof(initTop) == "function") initTop();
	if(typeof(initLeft) == "function") initLeft();
	if(typeof(initContent) == "function") initContent();
	if(typeof(initBtm) == "function") initBtm();
}

<!-------------------------------------------------------------------------------->


