// JavaScript Document

function popup(argURL,argWidth, argHeight, argOtherOptions) {
	nWidth = argWidth;
	nHeight = argHeight;
	
	if (argOtherOptions == null) {
		argOtherOptions=", noresize";
	}
	
	newWindow = window.open(argURL, "nWindow","resizeable=1, scrollbars=1,width="+nWidth+",height="+nHeight+argOtherOptions);
	newWindow.focus();
}

function closeWindow() {
	window.close();
}

function resizeToImage() {
	var nHeight;
	//document.mainImage.width = 600;
	
	nHeight = document.mainImage.height + 40;
	
	//alert(nHeight);
	
	window.resizeTo(640, nHeight);
}

function toolSelect(argURL, argW, argH) {
	popup(argURL, argW, argH, ", resizable , scrollbars, menubar")
}
