<!--
if (navigator.userAgent.indexOf('Mozilla') !=-1 && navigator.userAgent.substring(8,9) >=3) {
  var DocumentLoaded=false;
  var menupics=new initArray("AGall-nav1","AGall-nav2","AGall-nav3","AGall-nav4","nav8");
  var NAVa=new initArray(menupics);
  var NAVb=new initArray(menupics);
  for (var x=0;x<menupics.length;x++) {
    NAVa[x]=new Image(); NAVa[x].src="Sub-"+menupics[x]+".gif";
    NAVb[x]=new Image(); NAVb[x].src="Sub-"+menupics[x]+"a.gif";
  }
}
var newwindow;
var wheight = 0, wwidth = 0;
var maxWidth=screen.width-40;
var maxHeight=screen.height-75;

function initArray() {
  this.length=initArray.arguments.length;
  for (var qq=0; qq<this.length; qq++) {
    this[qq]=initArray.arguments[qq];
  }
}
function display(num) {
  var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 4);
  var isNSnew = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 5);
  if (isNSnew || isNS) { document.images[num].src=NAVb[num-3].src; }
  else { document.images[num].src=NAVb[num-3].src; }
}
function revert(num) {
  var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 4);
  var isNSnew = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 5);
  if (isNSnew || isNS) { document.images[num].src=NAVa[num-3].src; }
  else { document.images[num].src=NAVa[num-3].src; }
}
function GalWin(url, title, iwidth, iheight, colour) {
  var pwidth, pheight, shrinkwidth=0, shrinkheight=0;
  if (iwidth > maxWidth && iheight <= maxHeight) {
    pwidth=maxWidth; pheight=(maxWidth/iwidth)*iheight; shrinkwidth=1;
  } else if (iheight > maxHeight && iwidth <= maxWidth) {
    pheight=maxHeight; pwidth=(maxHeight/iheight)*iwidth; shrinkheight=1;
  } else if (iwidth > maxWidth && iheight > maxHeight) {
    if ((maxWidth/iwidth) <= (maxHeight/iheight)) { pwidth=maxWidth; pheight=(maxWidth/iwidth)*iheight; shrinkwidth=1; }
    else { pheight=maxHeight; pwidth=(maxHeight/iheight)*iwidth; shrinkheight=1; }
  } else { pwidth=iwidth; pheight=iheight; }
  if ( !newwindow || newwindow.closed ) {
    newwindow=window.open('','MindsEyeGallery','width='+pwidth+',height='+pheight+',resizable=1,top=5,left='+((screen.width-pwidth)/2));
    wheight=pheight;
    wwidth=pwidth;
  }
  if (wheight!=pheight || wwidth!=pwidth ) {
    newwindow.resizeTo(pwidth, pheight);
    newwindow.moveTo(((screen.width-pwidth)/2), 5);
    wheight=pheight;
    wwidth=pwidth;
  }
  newwindow.document.clear();
  newwindow.focus();
  newwindow.document.writeln('<html><head><title>'+title+'<\/title><\/head><body bgcolor= \"'+colour+'\" marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0><center>');
  if (url.indexOf(".avi") != -1) {
    newwindow.document.writeln('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" data="'+url+'" type="video\/avi"'+((shrinkwidth!=null)?' width=100%':'')+((shrinkheight!=null)?' height=100%':'')+' standby="Loading AVI, Please Wait..."><param name="FileName" value="'+url+'"><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="'+url+'" name="MediaPlayer1"'+((shrinkwidth!=null)?' width=100%':'')+((shrinkheight!=null)?' height=100%':'')+' autostart=1 showcontrols=1></object>');
  } else {
    newwindow.document.writeln('<img src="'+url+'"'+((shrinkwidth!=null)?' width=100%':'')+((shrinkheight!=null)?' height=100%':'')+'>');
  }
  newwindow.document.writeln('<\/center><\/body><\/html>');
  newwindow.document.close();
  newwindow.focus();
}
//-->

