﻿function clickButton(e, id) {
	var evt = e ? e : window.event;
	var but = document.getElementById(id);
	if (typeof but == "object") {
		if (evt.keyCode == 13) {
			but.click();
			return false;
		}
	}
}
function popUp(url, name, w, h, extra) {
	/*
	location   = { yes | no | 1 | 0 }
	menubar    = { yes | no | 1 | 0 }
	resizable  = { yes | no | 1 | 0 }
	scrollbars = { yes | no | 1 | 0 }
	status     = { yes | no | 1 | 0 }
	titlebar   = { yes | no | 1 | 0 }
	toolbar    = { yes | no | 1 | 0 }
	*/
	str = "height=" + h + ",width=" + w + "," + extra;
	if (parseInt(navigator.appVersion) > 3)
		str += ",left=" + (screen.width - w) / 2 + ",top=" + parseInt((screen.height - h) / 2);
	win = window.open(url, name, str);
}