<!--
function body_load()
{
	var d = document;
	if( !d.p_images )
		d.p_images = new Array();

	var i, j = 0, a = body_load.arguments;
	for( i = 0 ; i < a.length ; i++ )
	{
		d.p_images[j] = new Image;
		d.p_images[j++].src = a[i];
	}
	var width=d.body.clientWidth;
	var height;
	width=eval(width+'-'+800)/2;
	if(a[a.length-1] < d.body.clientHeight)
		a[a.length-1] = d.body.clientHeight;

	d.getElementById('main').style.height=a[a.length-1];
	d.getElementById('main').style.left=0;
}


function popup_body_load()
{
	var d = document;
	if( !d.p_images )
		d.p_images = new Array();

	var i, j = 0, a = popup_body_load.arguments;
	for( i = 0 ; i < a.length ; i++ )
	{
		d.p_images[j] = new Image;
		d.p_images[j++].src = a[i];
	}
    /*
	var width=d.body.clientWidth;
	var height;
	width=eval(width+'-'+800)/2;
	if(a[a.length-1] < d.body.clientHeight)
		a[a.length-1] = d.body.clientHeight;

	d.getElementById('main').style.height=a[a.length-1];
	d.getElementById('main').style.left=0;
    */
}

function set_image( image_name, index )
{
    document.images[image_name].src = document.p_images[index].src;
}

function set_layer_position( name, left, top )
{
    document.getElementById(name).style.left = left;
    document.getElementById(name).style.top = top;
}

function go_url( url )
{
	document.DATA.action = url;
	document.DATA.submit();
}

function open_pdf( url )
{
	window.open(url,'_new','menubar=no toolbar=no location=no status=no resizable=no left=0  top=0'); 
}

function view_content(seq)
{
	document.DATA.seqno.value=seq;
	document.DATA.action='view.php';
	document.DATA.submit();
}

function go_page(page)
{
	document.DATA.now_page.value=page;
	document.DATA.action='list.php';
	document.DATA.submit();
}

function empty_check(name)
{
	str = name.value;
	str = str.replace(/\s+/g,'');
	if (!str || str == "" || str == " ")
		return true;

	return false;
}
	
function input_check()
{
	var form = document.BOARD_DATA;
	if(empty_check(form.title))
	{
		alert('Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
		form.title.focus();
		return;
	}
	if(empty_check(form.content))
	{
		alert('³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
		form.content.focus();
		return;
	}
	form.action='insert.php';
	form.submit();
}

function modify_check()
{
	var form = document.BOARD_DATA;
	if(empty_check(form.title))
	{
		alert('Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
		form.title.focus();
		return;
	}
	if(empty_check(form.content))
	{
		alert('³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
		form.content.focus();
		return;
	}
	form.action='update.php';
	form.submit();
}

function manager_check()
{
	var form = document.admin;
	if(empty_check(form.id))
	{
		alert('¾ÆÀÌµðÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
		form.id.focus();
		return;
	}
	if(empty_check(form.passwd))
	{
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
		form.passwd.focus();
		return;
	}
	form.action='manager_result.php';
	form.submit();
}

function handling_check(flag)
{
	if(flag == 'modify')
	{
		document.DATA.action='modify.php';
		document.DATA.submit();
	}
	else if(flag == 'delete')
	{
		if(confirm('Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?'))
		{
			document.DATA.action='delete.php';
			document.DATA.submit();
		}
	}
}

function change_language(url, flag)
{
	if( flag == 1 )
	{
		document.DATA.language.value='korea';
		document.DATA.action=url;
	}
	else if( flag == 2 )
	{
		document.DATA.language.value='english';
		document.DATA.action=url;
	}
	else if( flag == 3 )
	{
		document.DATA.language.value='japanese';
		document.DATA.action="./japan/"+url;
	}

	document.DATA.submit();
}


function show_partners(image_name, flag, image_no)
{
	if(flag == 1)
	{
		document.image_17.style.display='block';
	    document.images[image_name].src = document.p_images[image_no].src;
	}
	else
	{
		document.image_17.style.display='none';
	    document.images['image_17'].src = document.p_images[image_no].src;
	}
}



//-->

