//---- Set this variable only! ----
var buildDir = "js/";
//---------------------------------

var ie4 = false, ie5_mac = false, ie55 = false;
var nn4 = false, dom = false, opera = false, safari = false;
var agent = navigator.userAgent.toLowerCase();

if (agent.indexOf("opera") != -1)
	opera = true;
else if (agent.indexOf("chrome") != -1)
	dom = true;
else if (agent.indexOf("safari") != -1)
	safari = true;
else if (document.all)
{
	var version = parseFloat(agent.substr(agent.indexOf("msie")+5, 3));
	if (agent.indexOf("mac") != -1 && version >= 5)
		ie5_mac = true;
	else
	{
		if (version >= 5.5)
			ie55 = true;
		else if (version >= 4)
			ie4 = true;
	}
}
//else if (document.layers)
else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4 && 
	parseInt(navigator.appVersion) < 5)
	nn4 = true;
else if (document.getElementById)
	dom = true;

var blank = new Image();
blank.src = buildDir + "blank.gif";
if (ie4)
	document.write('<script type="text/javascript" src="' + buildDir + 'ie4-build.js"></script>');
else if (ie5_mac)
	document.write('<script type="text/javascript" src="' + buildDir + 'ie5m-build.js"></script>');
else if (ie55)
	document.write('<script type="text/javascript" src="' + buildDir + 'ie55-build.js"></script>');
else if (nn4)
	document.write('<script type="text/javascript" src="' + buildDir + 'ns4-build.js"></script>');
else if (dom)
	document.write('<script type="text/javascript" src="' + buildDir + 'dom-build.js"></script>');
else if (opera)
	document.write('<script type="text/javascript" src="' + buildDir + 'op7-build.js"></script>');
else if (safari)
	document.write('<script type="text/javascript" src="' + buildDir + 'saf-build.js"></script>');
else
{
	alert("Your browser doesn't support this script.");
	location.href = buildDir + "upgrade.php";
	document.write('<script type="text/javascript" src="' + buildDir + 'no-build.js"></script>');
}


<!-- //Print function
var gAutoPrint = true;

function printSpecial()
{
var printReadyElem = null;
if (document.getElementById != null)
{
var html = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n"+
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n"+
"<head>\r\n"+
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n"+
"<title>International Medical University (IMU) - Medicine, Medical, MBBS, MB BS, Pharmacy, Nursing, Health Sciences, Postgraduates, Community Health, Medical Sciences, MSc, PhD, Nurse, Master, Clinical School - IMU In The News</title>\r\n"+
"<!--[if lt IE 7]><script src=\"js/IE7.js\" type=\"text/javascript\"></script><![endif]-->\r\n"+
"</head>\r\n"+
"<body>\r\n"+
"<div id=\"popup\">\r\n"+
"	<div id=\"pop-header\">\r\n"+
"  <div class=\"pop-logo\"><img src=\"i/logo-popup-trans.png\" width=\"158\" height=\"132\" /></div>\r\n"+
"  <div class=\"header-title\"><img src=\"i/white.gif\" width=\"78\" height=\"17\"/></div>\r\n"+
"  </div>\r\n"+
"  <div id=\"pop-content\"><div class=\"pop-content\"><div id=\"bodytext\">\r\n"+
"<!-- BEGIN MAIN CONTENT -->";

printReadyElem = document.getElementById("bodytext");
html += printReadyElem.innerHTML;
if (printReadyElem == null) {
	alert("Could not find the printReady section in the HTML");
	return;
}
	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	var szPrintMe = '';
	if (!(ver == "Microsoft Internet Explorer"))
		szPrintMe = "<scr"+"ipt language='javascript'>setTimeout('window.print();', 2000);</sc"+"ript>";

	html += '<!-- END MAIN CONTENT -->\r\n'+
'  </div></div></div>\r\n'+
'  <div style="clear:both;"></div><div class="footer">&copy; 2005-2009 International Medical University. All rights reserved.</div>\r\n'+
'</div>'+szPrintMe+
'</body>\r\n'+
'</html>';

var printWin = window.open("","printSpecial","left=20,top=20,width=700,height=500,scrollbars=yes,resizable=yes,location=no,address=no,toolbars=no");
	printWin.document.open();
	printWin.document.write(html);
	printWin.document.close();
	//printWin.location.reload();
var headID = printWin.document.getElementsByTagName("head")[0];         
var cssNode = printWin.document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = 'css/imuprint.css';
cssNode.media = 'screen,print';
headID.appendChild(cssNode);
if (gAutoPrint)
	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	// don't auto print for mozilla
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		setTimeout(function() {printWin.print();}, 2000);
	}
}else {
alert("Sorry, the print ready feature is only available in modern browsers.");
}
}
//-->
<!-- //Bookmark Us
function bookmarkUs()
{
	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	var szTitle = 'International Medical University (IMU)';
	var szURL = 'http://www.imu.edu.my';
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		window.external.AddFavorite(szURL, szTitle)
	}else{
		if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))	{
			window.sidebar.addPanel (szTitle, szURL,"");
		}
	}
}
//-->
