<!--

function open_popup_dialog(url,width,height){
	if (!width) { width = 100; }
	if (!height) { height = 100; }
	options = "dialogHeight: " + height + "px; dialogWidth: " + width + "px; edge: Sunken; center: 1; help: 0; resizable: 0; status: 0;";
	window.showModalDialog(url,"",options);
}

function adjust_popup_dialog() {
	if(window.dialogWidth) {
		frameWidth = window.dialogWidth.substring(0,window.dialogWidth.length - 2) - document.body.clientWidth;
		frameHeight = window.dialogHeight.substring(0,window.dialogHeight.length - 2) - document.body.clientHeight;
		window.dialogHeight = document.body.scrollHeight + frameHeight + "px";
		window.dialogWidth = document.body.scrollWidth + frameWidth + "px"
	}
}

function open_popup_window(url,target,width,height){
	if (!width) { width = 100; }
	if (!height) { height = 100; }
	options = "channelmode=0,directories=0,fullscreen=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,width=" + width + ",height=" + height;
	window.open(url,target,options);
}

function adjust_popup_window() {
	if(window.opener) {
		initialWidth = document.body.clientWidth;
		initialHeight = document.body.clientHeight;
		
		window.resizeTo(150, 150);
		
		frameWidth = 150 - document.body.clientWidth;
		frameHeight = 150 - document.body.clientHeight;
		
		initialWidth += frameWidth;
		initialHeight += frameHeight;
		
	//	alert ("Frame size: " + frameWidth + " x " + frameHeight);
		
		window.resizeTo(initialWidth, initialHeight);
		window.resizeTo(document.body.scrollWidth + frameWidth, document.body.scrollHeight + frameHeight);
	}
}

//-->