function Z(id) {
  var scr_width = 400;
  var scr_height = 480;
  window.open("/zoom."+id,"","width=" + scr_width + ",height=" + scr_height + ",scrollbars=no,resizable=yes");
}

function pop(mylink){
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
  var new_win = window.open(base_url+'blank.php?url='+href, 'windowname', 'left=180,top=80,width=445,height=155,scrollbars=yes,resizable=yes');
  /*
  new_win.document.location = href;
  new_win.window.moveTo(0,0);
	if (document.all) {
	new_win.window.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById) {
		if (new_win.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
		new_win.window.outerHeight = screen.availHeight;
		new_win.window.outerWidth = screen.availWidth;
		}
	}
	*/
}

function l_pop(mylink){
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
  var new_win = window.open(base_url+'blank.php?url='+href, 'windowname', 'left=280,top=80,width=650,height=455,scrollbars=yes,resizable=yes');
  new_win.document.location = href;
  new_win.window.moveTo(0,0);
	if (document.all) {
	new_win.window.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById) {
		if (new_win.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
		new_win.window.outerHeight = screen.availHeight;
		new_win.window.outerWidth = screen.availWidth;
		}
	}
}


//Uses code from:
// JavaScript Browser Sniffer
// Eric Krok, Andy King, Michel Plungjan Jan. 31, 2002
// see http://www.webreference.com/ for more information
function checkGeko() {
  // convert all characters to lowercase to simplify testing
  var agt=navigator.userAgent.toLowerCase();
  var appVer = navigator.appVersion.toLowerCase();

  // *** BROWSER VERSION ***

  var is_minor = parseFloat(appVer);
  var is_major = parseInt(is_minor);

  var is_opera = (agt.indexOf("opera") != -1);
  var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
  var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
  var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
  var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
  var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1); // new 020128- abk
  var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1); // new 021205- dmr
  var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
  var is_opera6up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5); // new020128
  var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6); // new021205 -- dmr

  // Note: On IE, start of appVersion return 3 or 4
  // which supposedly is the version of Netscape it is compatible with.
  // So we look for the real version further on in the string
  // And on Mac IE5+, we look for is_minor in the ua; since 
  // it appears to be more accurate than appVersion - 06/17/2004

  var is_mac = (agt.indexOf("mac")!=-1);
  var iePos  = appVer.indexOf('msie');
  if (iePos !=-1) {
     if(is_mac) {
         var iePos = agt.indexOf('msie');
         is_minor = parseFloat(agt.substring(iePos+5,agt.indexOf(';',iePos)));
     }
     else is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
     is_major = parseInt(is_minor);
  }

  // ditto Konqueror
  
  var is_konq = false;
  var kqPos   = agt.indexOf('konqueror');
  if (kqPos !=-1) {                 
     is_konq  = true;
     is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));
     is_major = parseInt(is_minor);
  }                                 
  
  var is_getElementById   = (document.getElementById) ? "true" : "false"; // 001121-abk
  var is_getElementsByTagName = (document.getElementsByTagName) ? "true" : "false"; // 001127-abk
  var is_documentElement = (document.documentElement) ? "true" : "false"; // 001121-abk
  
  var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
  var is_khtml  = (is_safari || is_konq);
  
  var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
  return is_gecko; 
}
