function initsize() 
{ bbs.resizeTo(bbs.document.body.scrollWidth, bbs.document.body.scrollHeight); }

function linkbutton2(url) {
        window.open(url, "vote_result", "width=500,height=500");
}
function linkbutton(url, width, height) {
    if(url=='backward')
	{
        history.back(1);
	}
    else
	{
		var style = "width="+width+",height="+height+",scrollbars=yes,resizable=yes";
        window.open(url, "popup_win", style);
	}
}

function checkform() {
   var obj; 
    var flag; 
     
	obj = document.vote.elements;
	flag = false;         

	for (var j = 0; j < obj.length; j++) { 
		if(obj[j].type == 'radio' || obj[j].type == 'checkbox')
		{
			if (obj[j].checked == true) { 
				flag = true; 
				break; 
			} 
		}
	} 

	if (flag == false) { 
		alert("¼³¹®À» Ã¼Å©ÇØÁÖ¼¼¿ä."); 
		return false; 
	} 
    return true; 
}

function checkform_login() {
	if(!login.id.value) {
		alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		login.id.focus();
		return false;
	}
	if(!login.passwd.value) {
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		login.passwd.focus();
		return false;
	}
	return true;
}

/////////////////////////////////////////////
//         :*: Happyscript :*:             //
// ¼Ò½º : http://www.happyscript.net       //
// ÆíÁý and ¼Ò½º ¼³¸í : Magic              //
// ¼Ò½º ¼öÁ¤ : Fresian                     //
// E-mail : happyscript@hanmail.net        //
/////////////////////////////////////////////

function hidestatus(){
window.status='ÇÑ±¹ ¶óÀÌÆ®³ëº§ÀÇ ½ÃÀÛ, ½Ãµå³ëº§!';
return true;
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.FOCUS)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
document.onfocus=hidestatus

function closesubmenu(menu)
{
	submenu.innerHTML = "";
}

function CallRefreshCode(url, id, isArg)
{
	if(isArg == true)
		remoteURL = url + "&object_id=" + id;
	else
		remoteURL = url + "?object_id=" + id;
	self.frames.workfrm.location.href = remoteURL;
}


function roundTable(objID) {
var obj = document.getElementById(objID);
var Parent, objTmp, Table, TBody, TR, TD;
var bdcolor, bgcolor, Space;
var trIDX, tdIDX, MAX;
var styleWidth, styleHeight;

// get parent node
Parent = obj.parentNode;
objTmp = document.createElement('SPAN');
Parent.insertBefore(objTmp, obj);
Parent.removeChild(obj);

// get attribute
bdcolor = obj.getAttribute('rborder');
bgcolor = obj.getAttribute('rbgcolor');
radius = parseInt(obj.getAttribute('radius'));
if (radius == null || radius < 1) radius = 1;
else if (radius > 6) radius = 6;

MAX = radius * 2 + 1;

/*
create table {{
*/
Table = document.createElement('TABLE');
TBody = document.createElement('TBODY');

Table.cellSpacing = 0;
Table.cellPadding = 0;

for (trIDX=0; trIDX < MAX; trIDX++) {
TR = document.createElement('TR');
Space = Math.abs(trIDX - parseInt(radius));
for (tdIDX=0; tdIDX < MAX; tdIDX++) {
TD = document.createElement('TD');

styleWidth = '1px'; styleHeight = '1px';
if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
else if (radius > 2) {
if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
}

if (styleWidth != null) TD.style.width = styleWidth;
if (styleHeight != null) TD.style.height = styleHeight;

if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
else if (tdIDX > Space && Space < MAX - tdIDX - 1) TD.style.backgroundColor = bgcolor;

if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
TR.appendChild(TD);
}
TBody.appendChild(TR);
}

/*
}}
*/

Table.appendChild(TBody);

// insert table and remove original table
Parent.insertBefore(Table, objTmp);
}

