isIE = false;
navVer = navigator.appVersion;
ver = parseFloat(navVer);
IEPos = navVer.indexOf('MSIE');
if (IEPos !=-1) {
  isIE = true;
  ver = parseFloat(navVer.substring(IEPos+5,navVer.indexOf(';',IEPos)));
}

isIE5up = (isIE && ver >= 5);

function setNSHomepage(URL) {  // this HAS to be signed if it is to run on the web
  var Text = '';
  Text += 'Due to Netscapes security handling, making this page your homepage, will show you a dialog with a warning.\n';
  Text += 'If you do not wish to grant this site the access to your browser settings,';
  Text += ' you can manually copy the current location and paste it in the location field in Edit / Preferences / Navigator.';
  if (confirm(Text)) {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWrite");
    navigator.preference('browser.startup.homepage',URL);
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openWindow(URL, name, width, height, resizable)
{
	var left, top;
	left=window.screen.width/2-width/2;
	top=window.screen.height/2-height/2;
	window.open(URL, name,"width="+width+", height="+height+", directories=0, location=0, menubar=0, resizable="+resizable+", scrollbars=1, status=1, toolbar=0, top="+top+", left="+left, true);
}

function showVideo(id_video)
{
	openWindow("/watch/show_video.aspx?id_video=" + id_video, "video", 430, 445, 0);
}
function showNetGeoView()
{
	openWindow("/clubnatgeo/NetGeoView.aspx", "View", 430, 445, 0);
}

function showReminder(id_txdate)
{
	openWindow("/watch/reminder.aspx?id_txdate=" + id_txdate, 'email_reminder', 430, 250, 0)
}

function showAskQuestion()
{
	openWindow("/clubnatgeo/ask_ask.aspx", "askquestion", 542, 350, 0);
}