// common.js - General common javascript functions

function openDonateWindow( donateID ) {
				var thisHeight = screen.availHeight-90;
				var up1Level;
				if (donateID == "1plm")
					up1Level="../";
				else
					up1Level="";
				var htmlFileStr = up1Level+'donate.htm?'+donateID;
				var winRef = window.open(
					htmlFileStr,
					'MakeADonation',
'width=800,height='+thisHeight+',location=yes,toolbar=yes,status=no,top=0,scrollbars=1,resizable=1');
				winRef.moveBy(80,0);
		}

function linkOnOff( onlLink, offlLink ) {
        if (window.location.protocol == "http:")
           top.location.href=onlLink;
        else
           top.location.href=offlLink;
    }

function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

