// POPUP WINDOW SCRIPTS
//<a href="javascript:displayWindow('LINK_TO_WEBSITE','windowname','401','450','status,resizable=no');">LINKTXT</a>


function calcHeight () {
	var table_height= window.innerHeight;
	return table_height;
}
calcHeight();

function displayWindow(theURL,winName,width,height,features) { //v3.1
    var window_width = width;
    var window_height = height;
    var newfeatures= features;
    var window_top = (screen.height-window_height)/2;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
    newWindow.focus();
}

function displayWindow2(theURL,winName,width,height,features) { //v3.1
    var window_width = width;
    var window_height = height;
    var newfeatures= features;
    var window_top = 10;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
    newWindow.focus();
}

function checkBrowser2() {
	// check out Internet Explorer
	if (document.all) {
 		if (navigator.platform.indexOf("PPC")!=-1) {
  			return 1;
  		} else {
  			return 3;
  		}
	// check out Netscape
	} else if (document.layers||document.getElementById) {
		if (navigator.platform.indexOf("PPC")!=-1) {
			return 2;
		} else {
			return 2;
		}
    // Others
   	} else {
		return 2;			 
 	}
}


function checkBrowser() { 
	var newURL='', verStr=navigator.appVersion, app=navigator.appName, version = parseFloat(verStr);
	if (app.indexOf('PPC') != -1) {
		if (app.indexOf('Netscape') != -1) {
			return false;
		} else {
			return true;
		}
	} else {
		return false;
	}
}


function jumpShip()  // use ifBVPjump() to jump to BVP-specific page
  {
  //ifBVPjump("netscape", "4.x", "mac", "NE/index.html");  // Netscape 4.x, Mac platform
  //ifBVPjump("netscape", "4.x", "win", "NE/index.html");  // Netscape 4.x, Win platform
  ifBVPjump("ie", "4.0", "mac", "index_ie.html");    // IE 4.x, Mac platform
  ifBVPjump("ie", "4.x", "win", "index_ne.html");    // IE 4.x, Windows platform
  ifBVPjump("ie", "5.x", "mac", "index_ie.html");   // IE 5.x Mac platform
  ifBVPjump("ie", "5.x", "win", "index_ne.html");   // IE 5.x Windows platform
  }
  
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { 
  var newURL='', verStr=navigator.appVersion, app=navigator.appName, version = parseFloat(verStr);
  if (app.indexOf('Netscape') != -1) {
    if (version >= NSvers) {if (NSpass>0) newURL=(NSpass==1)?URL:altURL;}
    else {if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;}
  } 
  if (newURL) { self.location=unescape(newURL); document.MM_returnValue=false; }
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function closewin() {
	opener = self;
	window.close();
}