function openWindow(url) {
	var width = getWindowWidth() * .8;
	var height = getWindowHeight() * .8;
	var left = ((document.all) ? window.screenLeft:window.screenX) + (width * .2);
	var top = ((document.all) ? window.screenTop:window.screenY) + (height * .2);
	window.open(url,'','scrollbars=1,resizable=1,menubar=1,toolbar=1,status=1,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left);
}

function getWindowWidth() {
	var x = 0;
	if (self.innerHeight) {
		x = self.innerWidth;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		x = document.documentElement.clientWidth;
	} else if (document.body) {
		x = document.body.clientWidth;
	}
	return x;
}

function getWindowHeight() {
	var y = 0;
	if (self.innerHeight) {
		y = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		y = document.documentElement.clientHeight;
	} else if (document.body) {
		y = document.body.clientHeight;
	}
	return y;
}