/****************************************************************************************/
/*																						*/
/*	Accordent Link Menu v1.00															*/
/*	=========================															*/
/*																						*/
/*	Last Edited: 9/2/2005																*/
/*	Please send all comments & bug reports to: John Malick <jmalick@accordent.com>		*/
/*																						*/
/****************************************************************************************/
	

function isBrowserIeWin() {
	var iewin = false;
	var ua = navigator.userAgent.toLowerCase();
	if ((ua.indexOf('ie') > -1) & (ua.indexOf('win') > -1))
		iewin = true;
	return iewin;
}

function MenuCheck() {
	try{
		var emailHtml = '';
		var emailTo = '';
		var chkNoTag = emailTo.indexOf("<<@");
		if (emailTo != '' & chkNoTag < 0)	// email address
			emailHtml = '&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"mailto:' + emailTo + '?subject=The Global Food System And Driving Forces\" id=\"whiteLink\">Email</a>';
		document.getElementById('email').innerHTML = emailHtml;
		var downloadFile = 'TRUE';
		chkNoTag = downloadFile.indexOf("@");
		if (downloadFile != 'TRUE' || chkNoTag > -1)	// no downloadable file
			document.getElementById('download').innerHTML = '';
		var showChapters = 'FALSE';
		chkNoTag = downloadFile.indexOf("@");
		if (showChapters != 'TRUE' || chkNoTag > -1)	// no downloadable file
			document.getElementById('chapters').innerHTML = '';
	} catch(e) {}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Lvl_openWin(u,n,w,h,l,t,c,f) {
  var x=((screen.width-w)/2);if(c==1){l=x;t=(screen.height-h)/2;}if(c==2){l=x}
	f+=',top='+t+',left='+l;LvlWin=window.open(u,n,f);LvlWin.focus();
}
