<!--
function resize(x, y, width, height) {
    if (x > width || y > height) {
			if (x > y) {
					rate = width*100/x;
			}
			else {
					rate = height*100/y;
			}
			x_s = x*rate/100;
			y_s = y*rate/100;
	} else {
			x_s = x;
			y_s = y;
	}
	//alert('x='+x+' y='+y+' x_s='+x_s+' y_s='+y_s);
	ReturnSize = [parseInt(x_s), parseInt(y_s)];
	return ReturnSize;
}
function frm_submit(){
    if (document.upload.pName.value == '') {
	alert('Enter your name.');document.upload.pName.focus();
	return false;
    }
    email_fmt = /(^[_0-9a-zA-Z-]+(.[_0-9a-zA-Z-]+)*@[0-9a-zA-Z-]+(.[0-9a-zA-Z-]+)*$)/;
    if (!email_fmt.test(document.upload.pEmail.value)) {
	alert('Wrong E-mail format.');document.upload.pEmail.focus();
	return false;
    }
    pswd_fmt = /(^[0-9a-zA-Z-])/;
    if (!pswd_fmt.test(document.upload.pPassword.value)) {
	alert('Password: 1 ~ 8 Alphanumeric characters');
	document.upload.pPassword.focus();
	return false;
    }
    if (document.upload.pSubject.value == '') {
	alert('Enter subject.');document.upload.pSubject.focus();
	return false;
    }
    if (document.upload.pUploadFile.value == '') {
	alert('Select your photo file.');document.upload.pUploadFile.focus();
	return false;
    }
}

function update_form_submit(){
    if (document.update.NAME.value == '') {
	alert('Enter your name.');document.update.NAME.focus();
	return false;
    }
    email_fmt = /(^[_0-9a-zA-Z-]+(.[_0-9a-zA-Z-]+)*@[0-9a-zA-Z-]+(.[0-9a-zA-Z-]+)*$)/;
    if (!email_fmt.test(document.update.MAIL.value)) {
	alert('Wrong E-mail format.');document.update.MAIL.focus();
	return false;
    }
    pswd_fmt = /(^[0-9a-zA-Z-])/;
    if (!pswd_fmt.test(document.update.PSWD.value)) {
	alert('Password: 1 ~ 8 Alphanumeric characters');
	document.update.PSWD.focus();
	return false;
    }
    if (document.update.SBJT.value == '') {
	alert('Enter a subject.');document.update.SBJT.focus();
	return false;
    }
}

function prevImg()
{
    document.upload.orgImg.style.visibility = 'hidden';
    document.upload.orgImg.src = document.upload.pUploadFile.value;

    orgImgTD.style.display = 'none';

    UpImg = new Image();
    UpImg.src = document.upload.orgImg.src;
    y = parseInt(UpImg.height);
    x = parseInt(UpImg.width);

    Up_arr_size = resize(x, y, 600, 600);
    document.upload.orgImg.height = Up_arr_size[1];
    document.upload.orgImg.width = Up_arr_size[0];

    if(document.upload.pUploadFile.value)
    {
			document.upload.orgImg.style.visibility = 'visible';
			orgImgTD.style.display = '';
    }
}

var child = null;
var s_width = 0;
var s_height = 0;

function term() {
    if(child != null) {
	if(!child.closed) child.close();
    }
    return;
}
// -->

