var newWidth = 600;
var newHeight = 500;

function resizeClick(event) {
	var notifyJava = document.getElementById('chk_notify_java').checked;

	if (document.getElementById('radio_x').checked) {
		resizeX(notifyJava);
	} else if (document.getElementById('radio_y').checked) {
		resizeY(notifyJava);
	} else if (document.getElementById('radio_xy').checked) {
		resizeXY(notifyJava);
	} else if (document.getElementById('radio_xty').checked) {
		resizeX(notifyJava);
		resizeY(notifyJava);
	}
}

function resizeX (boolNotifyJava) {
	var a = document.getElementById('applet');

	a.log("JS: Setting HTML attributes");
	a.width = newWidth;

	if (boolNotifyJava == true) {
		a.log("JS: Calling Java Resize Method");
		a.resize(newWidth, a.height);
	}
}

function resizeY (boolNotifyJava) {
	var a = document.getElementById('applet');

	a.log("JS: Setting HTML attributes");
	a.height = newHeight;
	
	if (boolNotifyJava == true) {
		a.log("JS: Calling Java Resize Method");
		a.resize(a.width, newHeight);
	}
}

function resizeXY (boolNotifyJava) {
	var a = document.getElementById('applet');

	a.log("JS: Setting HTML attributes");
	a.width = newWidth;
	a.height = newHeight;
	
	if (boolNotifyJava == true) {
		a.log("JS: Calling Java Resize Method");
		a.resize(newWidth, newHeight);
	}
}