<!-- Begin



/* Here follows the code for the FIRMAMENT IMAGE VIEWER (thumbnail popup with maximized window) */
/* Update November 26, 2009 - adjusted to maximum user screensize; parms ix and iy are no longer used but have been left in so that the existing HTML can remain as it is */

function ViewImage(ifile,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
if (document.layers) 
{ /* NS4+ */
win = window.open("","","width="+aw+",height="+ah+",fullscreen, fullscreen=yes,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no");
sWidth = win.innerWidth;
sHeight = win.innerHeight;
win.document.open();
win.document.write("<html><head><title>FIRMAMENT IMAGE VIEWER</title>");
win.document.write('</head><body bgcolor="black" text="white">');
win.document.write('<div style="position:absolute;width:'+aw+'px;height:'+ah+'px;left:0px;top:0px">');
win.document.write("<center><font color=yellow>*** Please browse down for details ***</font></center><br>");
win.document.write("<center><img src="+ifile+"><p>"+ititle+"</p>");
win.document.write('<P><form><input type="button" value="Close window" onclick="window.close()";></form>');
win.document.write("</center></div></body></html>");
win.document.close();
} else            
if (document.getElementById)  
{ /* NS6+ */
win = window.open("","","width="+aw+",height="+ah+",scrollbars=yes,resizable=yes,menubar=no,toolbar=no,left=0,top=0,location=no");
sWidth = document.getElementByIdWidth;
sHeight = document.getElementByIdHeight;
win.document.open();
win.document.write("<html><head><title>FIRMAMENT IMAGE VIEWER</title>");
win.document.write('</head><body bgcolor="black" text="white">');
win.document.write('<div style="position:absolute;width:'+aw+'px;height:'+ah+'px;left:0px;top:0px">');
win.document.write("<center><font color=yellow>*** Please browse down for details ***</font></center><br>");
win.document.write("<center><img src="+ifile+"><p>"+ititle+"</p>");
win.document.write('<P><form><input type="button" value="Close window" onclick="window.close()";></form>');
win.document.write("</center></div></body></html>");
win.document.close();
}

}
/* Here ends the code for the FIRMAMENT IMAGE VIEWER */


/* Here follows the code for the FIRMAMENT ROLLOVER IMAGE VIEWER (thumbnail popup with rollover) */
/* Update November 26, 2009 - adjusted to maximum user screensize; parms ix and iy are no longer used but have been left in so that the existing HTML can remain as it is */

function ViewImageWithRollover(ifile,ifileroll,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
if (document.layers) 
{ /* NS4+ */
win = window.open("","","width="+aw+",height="+ah+",fullscreen, fullscreen=yes,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no");
sWidth = win.innerWidth;
sHeight = win.innerHeight;
win.document.open();
win.document.write("<html><head><title>FIRMAMENT IMAGE VIEWER</title>");
win.document.write("<SCRIPT LANGUAGE='JAVASCRIPT'><!--var image1 = new Image();image1.src = "+ifile+";var image2 = new Image();image2.src = "+ifileroll+";//--></SCRIPT>");
win.document.write('</head>');
win.document.write('<body bgcolor="black" text="white">');
win.document.write('<div style="position:absolute;width:'+aw+'px;height:'+ah+'px;left:0px;top:0px">');
win.document.write("<center><font color=yellow>*** Please browse down for details - mouse in/out to see/hide another version of this image ***</center><br>");
win.document.write("<center>*** HINT: ZOOM in/out with Ctrl and +/- keys ***</font></center>");
win.document.write("<center><img src="+ifile+" NAME='baseimage' onmouseover=document.baseimage.src='"+ifileroll+"' onmouseout=document.baseimage.src='"+ifile+"'><p>"+ititle+"</p>");
win.document.write('<P><form><input type="button" value="Close window" onclick="window.close()";></form>');
win.document.write("</center></div></body></html>");
win.document.close();
} else            
if (document.getElementById)  
{ /* NS6+ */
win = window.open("","","width="+aw+",height="+ah+",scrollbars=yes,resizable=yes,menubar=no,toolbar=no,left=0,top=0,location=no");
sWidth = document.getElementByIdWidth;
sHeight = document.getElementByIdHeight;
win.document.open();
win.document.write("<html><head><title>FIRMAMENT IMAGE VIEWER</title>");
win.document.write("<SCRIPT LANGUAGE='JAVASCRIPT'><!--var image1 = new Image();image1.src = "+ifile+";var image2 = new Image();image2.src = "+ifileroll+";//--></SCRIPT>");
win.document.write('</head>');
win.document.write('<body bgcolor="black" text="white">');
win.document.write('<div style="position:absolute;width:'+aw+'px;height:'+ah+'px;left:0px;top:0px">');
win.document.write("<center><font color=yellow>*** Please browse down for details  - mouse in/out to see/hide another version of this image ***</center>");
win.document.write("<center>*** HINT: ZOOM in/out with Ctrl and +/- keys ***</font></center><br>");
win.document.write("<center><img src="+ifile+" NAME='baseimage' onmouseover=document.baseimage.src='"+ifileroll+"' onmouseout=document.baseimage.src='"+ifile+"'><p>"+ititle+"</p>");
win.document.write('<P><form><input type="button" value="Close window" onclick="window.close()";></form>');
win.document.write("</center></div></body></html>");
win.document.close();
}

}
/* Here ends the code for the FIRMAMENT ROLLOVER IMAGE VIEWER */

/* Here follows the code for the FIRMAMENT IMAGE VIEWER 2(thumbnail popup with maximized window with another popup for full sized image) */
/* Update November 26, 2009 - adjusted to maximum user screensize; parms ix and iy are no longer used but have been left in so that the existing HTML can remain as it is */
/* Update January 11, 2010 added parameter ifilefull = full sized image */

function ViewImage2(ifile,ifilefull,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
if (document.layers) 
{ /* NS4+ */
win = window.open("","","width="+aw+",height="+ah+",fullscreen, fullscreen=yes,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no");
sWidth = win.innerWidth;
sHeight = win.innerHeight;
win.document.open();
win.document.write("<html><head><title>FIRMAMENT IMAGE VIEWER</title>");
win.document.write('</head><body bgcolor="black" text="white">');
win.document.write('<div style="position:absolute;width:'+aw+'px;height:'+ah+'px;left:0px;top:0px">');
win.document.write("<center><font color=yellow>*** Please browse down for details or click the image for full size ***</font><br>");
win.document.write("<font color=yellow>*** Note: for viewing the full sized image it is recommended that automatic resizing has been disabled for your browser ***</font></center><br>");
win.document.write("<center><a href="+ifilefull+" border=0><img src="+ifile+" border=0></a><p>"+ititle+"</p>");
win.document.write('<P><form><input type="button" value="Close window" onclick="window.close()";></form>');
win.document.write("</center></div></body></html>");
win.document.close();
} else            
if (document.getElementById)  
{ /* NS6+ */
win = window.open("","","width="+aw+",height="+ah+",scrollbars=yes,resizable=yes,menubar=no,toolbar=no,left=0,top=0,location=no");
sWidth = document.getElementByIdWidth;
sHeight = document.getElementByIdHeight;
win.document.open();
win.document.write("<html><head><title>FIRMAMENT IMAGE VIEWER</title>");
win.document.write('</head><body bgcolor="black" text="white">');
win.document.write('<div style="position:absolute;width:'+aw+'px;height:'+ah+'px;left:0px;top:0px">');
win.document.write("<center><font color=yellow>*** Please browse down for details or click the image for full size ***</font><br>");
win.document.write("<font color=yellow>*** Note: for viewing the full sized image it is recommended that automatic resizing has been disabled for your browser ***</font></center><br>");
win.document.write("<center><a href="+ifilefull+" border=0><img src="+ifile+" border=0></a><p>"+ititle+"</p>");
win.document.write('<P><form><input type="button" value="Close window" onclick="window.close()";></form>');
win.document.write("</center></div></body></html>");
win.document.close();
}

}
/* Here ends the code for the FIRMAMENT IMAGE VIEWER2 */




/* Here starts the code to open a full screen window for the astroshow */

function fullScrn(ASTROSHOW) {
window.open(ASTROSHOW, '','type=fullscreen,channelmode=yes,fullscreen,scrollbars=no,menubar=no,toolbar=no,titlebar=no,width=1800,height=1600,location=no');
}

/* Here ends the code to open a full screen window for the astroshow */


/* Here follows the code to process arrow/home/end keys */


//first, tell the browsers to react to the event
if( document.captureEvents && Event.KEYDOWN ) {
  //remove this part if you do not need Netscape 4 to work
  document.captureEvents( Event.KEYDOWN );
}
//this is the event handler function to process the event
function prevnext(e) {

  if( !e ) {
    //if the browser did not pass the event information to the
    //function, we will have to obtain it from the event register
    if( window.event ) {
      //Internet Explorer
      e = window.event;
    } else {
      //total failure, we have no way of referencing the event
      return;
    }
  }
  if( typeof( e.keyCode ) == 'number'  ) {
    //DOM
    e = e.keyCode;
  } else if( typeof( e.which ) == 'number' ) {
    //NS 4 compatible
    e = e.which;
  } else if( typeof( e.charCode ) == 'number'  ) {
    //also NS 6+, Mozilla 0.9+
    e = e.charCode;
  } else {
    //total failure, we have no way of obtaining the key code
    return;
  }


switch(e){

/* Right arrow */
case 39:
next();
break

/* Left arrow */
case 37:
previous();
break

/* Home */
case 36:
first();
break

/* End */
case 35:
last();
break
          
/* Escape */
case 27:
window.close();
break

    }

}







/* Here ends the code to process arrow/home/end keys and mousewheel*/




/* Here follows the code for the slideshow */
var rotate_delay = 7000; // delay in milliseconds (7000 = 7 secs)
current = 0;


function set_delay() {
var i = document.slideform.delay_menu.selectedIndex;
rotate_delay = document.slideform.delay_menu.options[i].value;
}
function next() {
if (document.slideform.slide[current+1]) {
generateimage(document.slideform.slide[current+1].value);
document.slideform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
generateimage(document.slideform.slide[current-1].value);
document.slideform.slide.selectedIndex = --current;
   }
else last();
}
function first() {
current = 0;
generateimage(document.slideform.slide[0].value);
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
generateimage(document.slideform.slide[current].value);
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Auto" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
generateimage(document.slideform.slide[current].value);
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
generateimage(document.slideform.slide[current].value);
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
   }
}




/* this portion belongs to the slideshow: start of the iframe part */

function generateimage(which){

if (document.layers) 

{ /* NS4+ */
document.dynamic1.document.dynamic2.document.write('<center><img src="'+which+'"></center>');
document.dynamic1.document.dynamic2.document.close();
} 

else if (document.getElementById) 
 
{ /* NS6+ */
window.frames[0].document.open();
window.frames[0].document.write('<body bgcolor="black"><center><img src="'+which+'"></center>');
window.frames[0].document.close();
}
/* this portion belongs to the slideshow: end of the iframe part */                          }

function generatedefault()
{
generateimage(document.slideform.slide.options[document.slideform.slide.selectedIndex].value)
}
/* Here ends the code for the slideshow */

/* Here follows the code for the FIRMAMENT rainbow colours */

<!--
function MakeArray(n){
   this.length=n;
   for(var i=1; i<=n; i++) this[i]=i-1;
   return this
}
hex=new MakeArray(16);
hex[11]="a"; hex[12]="B"; hex[13]="C"; hex[14]="D"; hex[15]="E"; hex[16]="F";
function ToHex(x){
   var high=x/16;
   var s=high+"";
   s=s.substring(0,2);
   high=parseInt(s,10);
   var left=hex[high+1];
   var low=x-high*16;
   s=low+"";
   s=s.substring(0,2);
   low=parseInt(s,10);
   var right=hex[low+1];
   var string=left+""+right;
   return string;
}

function rainbow(text){
   text=text.substring(3,text.length-4);
   color_d1=255;
   mul=color_d1/text.length;
   for(i=0;i<text.length;i++){
      color_d1=255*Math.sin(i/(text.length/3));
	  color_h1=ToHex(color_d1);
      color_d2=mul*i;
      color_h2=ToHex(color_d2);
      document.write("<FONT COLOR='#FF"+color_h1+color_h2+"'>"+text.substring(i,i+1)+'</FONT>');
   }
}



/* Here ends the code for the FIRMAMENT rainbow colours */



//  End -->
