function openWindow(winName, windowWidth, windowHeight, newWindow) {
	var rand = 0;
	
	// This generates a new window if specified
	if ( newWindow == true ) {
		rand = Math.random()*100;
		rand = Math.round(rand, 0);
	}
	
	window.open(winName, 'window' + rand, 'width=' + windowWidth + ',height=' + windowHeight + ',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no,left=0,top=0');
}

function closeWindow() {
	window.close();
}