// JavaScript Document
function logout (usertype) {
	if (confirm(' Sure to logout ? ')){
		window.location.href='index.php?page='+usertype+'&action=logout';
	}
	else return false;
}
function moduleRedirect(mod_name) {
	window.location.href='?page='+mod_name;
}

function openPopWindow(url, width, height, wname) {
	var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
	var x = parseInt(screen.width / 2.0) - (width / 2.0);
	var y = parseInt(screen.height / 2.0) - (height / 2.0);

	if (isMSIE) {
		// Pesky MSIE + XP SP2
		width += 15;
		height += 35;
	}

	var win = window.open(url, wname, "top=" + y + ",left=" + x + ",scrollbars=yes,width=" + width + ",height=" + height 
						+ ",resizable=no");

	try {
		win.focus();
	} catch (e) {
	}
}
