var smaller;

function getscreensize() {
	var screenwidth = screen.width;
	var screenheight = screen.height;
	if(screenwidth < 1024 && screenheight < 768){
		smaller = true;
	} else {
		smaller = false;
	}
}

function launchWindow(URL, name) {
	if (smaller){
		width = 790;
		height = 563;
	} else {
		width = 995;
		height = 711;
	}
	if (document.all) {
		attr = "location=0,status=0,menubar=0,toolbar=0,resizable=0,width=" + width + ",height=" + height +",left=0,top=0";
	} else {
		attr = "location=0,status=0,menubar=0,toolbar=0,resizable=0,width=" + width + ",height=" + height +",screenX=0,screenY=0";
	}
	//bWindow = window.open(URL, name,attr);
	if(! window.focus) return;
	var bWindow=window.open(URL,name,attr);
	bWindow.focus();
	URL.target = name;
	if (!bWindow.opener) bWindow.opener = top.frames[1];
}
//= Determines layer ID depending on the browser

function CheckIfSmallScreen(){
	var screenwidth = screen.width;
	var screenheight = screen.height;
	if(screenwidth < 1024 && screenheight < 768){
		alert('To view this page properly set your \nscreen resolution to at least 1024 x 768 \nand maximize your browser window.');
		return true;
	}
}