var i,preload = new Array(7);
var btnNames = new Array("Welcome","Products","Calendar","Benefits","Gallery","AboutUs","ContactUs");
for(i=0;i<7;i++) {
 preload[i] = new Array(3);
 preload[i][0] = new Image(181,32);
 preload[i][0].src = "images/btn_"+btnNames[i]+"_up.gif";
 preload[i][1] = new Image(181,32);
 preload[i][1].src = "images/btn_"+btnNames[i]+"_dn.gif";
 preload[i][2] = new Image(181,32);
 preload[i][2].src = "images/btn_"+btnNames[i]+"_hv.gif";
 }

function RollOver(indx) {
 if(document.layers) {
  document.layers["btn"+indx].src = preload[indx][2].src;
  }
 else if(document.getElementById)	{
  var obj1 = document.getElementById("btn"+indx);
  obj1.src = preload[indx][2].src;
  }
 else if(document.all)	{
  document.all["btn"+indx].src = preload[indx][2].src;
  }
 }

function RollOut(indx,active_flag) {
 if(document.layers) {
  if(active_flag==1)
   document.layers["btn"+indx].src = preload[indx][1].src;
  else
   document.layers["btn"+indx].src = preload[indx][0].src;
  }
 else if(document.getElementById)	{
  var obj1 = document.getElementById("btn"+indx);
  if(active_flag==1)
   obj1.src = preload[indx][1].src;
  else
   obj1.src = preload[indx][0].src;
  }
 else if(document.all)	{
  if(active_flag==1)
   document.all["btn"+indx].src = preload[indx][1].src;
  else
   document.all["btn"+indx].src = preload[indx][0].src;
  }
 }

function NewWindow(URL) {
  var w,width,height;
  
  width = 768;
  height = 500;
  if( navigator.appName == "Netscape" ) {
    OptionString=""
    w = window.open("images/"+URL,"Pix","resizable=yes, scrollbars=yes, menubar=yes");
    w.screenX = ((screen.availWidth)-(width+33))/2;
    w.screenY = ((screen.availHeight)-(height+30))/2;
    w.innerWidth  = width+20;
    w.innerHeight = height+25;
    }   
  else {   
    OptionString="resizable=yes, scrollbars, width="+(width+38)+", height="+(height+30)+", menubar=yes";
    OptionString = OptionString+", top="+(((screen.availHeight)-(height+30))/2)+", left="+((screen.availWidth-(width+33))/2);
    w = window.open("images/"+URL,"Pix",OptionString);
    }
  w.focus()
 }
 
function ViewPix(URL,width,height) {
  var w;
  
  if( navigator.appName == "Netscape" ) {
    OptionString=""
    w = window.open("images/"+URL,"Pix","resizable=yes, scrollbars=yes");
    w.screenX = ((screen.availWidth)-(width+33))/2;
    w.screenY = ((screen.availHeight)-(height+30))/2;
    w.innerWidth  = width+20;
    w.innerHeight = height+25;
    }   
  else {   
    OptionString="resizable=yes, scrollbars, width="+(width+38)+", height="+(height+30);
    OptionString = OptionString+", top="+(((screen.availHeight)-(height+30))/2)+", left="+((screen.availWidth-(width+33))/2);
    w = window.open("images/"+URL,"Pix",OptionString);
    }
  w.focus()
 }
