
var tmpwndw = null;
function openView(obj, width, height) {
	var url = './pictures/' + obj + '.jpg';
	if (tmpwndw) {
		tmpwndw.close();
		tmpwndw = null;
	}
	tmpwndw = window.open(url, 'picviewer', 'width='+width+',height='+height);
	tmpwndw.focus();
}

function closeView(e) {
	if (tmpwndw) {
		tmpwndw.close();
		tmpwndw = null;
	}
}

function resizePort() {
	var port;
	var idport = document.getElementById("content");
	port = top.frames[0];
	if (!port ) {
		alert('Content Frame not found.');
		return true;
	}
	alert('Iwidth: ' + document.body.clientHeight);
	alert('width: ' + idport.clientWidth);

	alert('Iheight: ' + document.body.clientWidth);
	alert('height: ' + idport.clientHeight);

	port.innerWidth = (window.innerWidth - 200) + 'px';
	
	port.innerHeight = (window.innerHeight - 184) + 'px';

	//alert('Width: ' + port.innerWidth);
	//alert('Height: ' + port.innerHeight);
}