function Journal_Frm(f,vol,num)
{
	f.action = "list.html";
	if(f.mod.value) {
		f.Vol.value = vol;
		f.Num.value = num;
		f.submit();
	}
}

function Select_check()
{
	var multi = document.getElementsByName("multi[]");

	for(var i = 0; i < multi.length; i++)
	{
		if(multi[i].checked == true) break;
	}

	if(i == multi.length)
	{
		alert("¸®½ºÆ®¼±ÅÃÀ» ÇÏÁö ¾ÊÀ¸¼Ì½À´Ï´Ù.");
		return;
	}
	else
	{
		document.Journal_form.action="view.html";
		document.Journal_form.submit();
	}
}

//--------------- ÀüÃ¼ ¼±ÅÃ ----------------
function Allcheck()
{
	theForm = document.Journal_form;
	for( var i=0; i < theForm.elements.length; i++)
	{
		var check = theForm.elements[i];
		check.checked = true;
	}
	return;
}

//--------------- ÀüÃ¼ ¼±ÅÃ Ãë¼Ò ----------------
function Allnocheck()
{
	theForm = document.Journal_form;
	for( var i=0; i < theForm.elements.length; i++)
	{
		var check = theForm.elements[i];
		check.checked = false;
	}
	return;
}

// »ç¿ë¾ÈÇÔ ¾Æ·¡²¨
// °Ô½Ã¹° ÀüÃ¼¼±ÅÃ
function CheckAll(o, tag)
{
	var flag = o.checked;
	var obj = findParentObjByTagName(o, tag);
	if (typeof(obj)=="object")
	{
		if (flag) {
			markAllRows(obj);
		} else {
			unMarkAllRows(obj);
		}
	}
}

/** from phpMyAdmin
 * marks all rows and selects its first checkbox inside the given element
 * the given element is usaly a table or a div containing the table or tables
 *
 * @param    container    DOM element
 */
function markAllRows( obj ) {
	var rows = obj.getElementsByTagName('tr');
	var unique_id;
	var checkbox;
	for ( var i = 1; i < rows.length; i++ )
	{
		checkbox = rows[i].getElementsByTagName( 'input' )[0];
		if ( checkbox && checkbox.type == 'checkbox' )
		{
			unique_id = checkbox.name + checkbox.value;
			if ( checkbox.disabled == false )
			{
				checkbox.checked = true;
				if ( typeof(marked_row[unique_id]) == 'undefined' || !marked_row[unique_id] )
				{
					rows[i].className += ' marked';
					marked_row[unique_id] = true;
				}
			}
		}
	}
}

/** from phpMyAdmin
 * marks all rows and selects its first checkbox inside the given element
 * the given element is usaly a table or a div containing the table or tables
 *
 * @param    container    DOM element
 */
function unMarkAllRows( obj ) {
	var rows = obj.getElementsByTagName('tr');
	var unique_id;
	var checkbox;
	for ( var i = 1; i < rows.length; i++ )
	{
		checkbox = rows[i].getElementsByTagName( 'input' )[0];
		if ( checkbox && checkbox.type == 'checkbox' )
		{
			unique_id = checkbox.name + checkbox.value;
			checkbox.checked = false;
			rows[i].className = rows[i].className.replace(' marked', '');
			marked_row[unique_id] = false;
		}
	}
}
