//TRINPsite, 55.52.4-56.06.2, JS/ShowPics.js for TRINP location

function Get_HomeS()  // adjusted on 65.36.3
 {  // adjusted so that homeS does not depend on (C or D) drive used
  var URL_S=document.URL
  var I=-1; var J=-1

  homeS="http://www.trinp.org/";
  if (URL_S.indexOf(homeS)==-1) 
   { I=URL_S.indexOf("WWW");
     if (I>0)
      { J=URL_S.indexOf("TRINP");
        if (J==I+4) homeS=URL_S.substring(0,I+10)
      }  // ends with \WWW\TRINP\ or /WWW/TRINP/
   }
 }

function Get_FileChar()
 {
  fileC="0";
  if ((document.URL.indexOf("MNI")>0) || (document.URL.indexOf("mni")>0))
   { if (document.URL.indexOf(".HTM")>0) fileC="8"; else fileC="3" };
  if (fileC=="0") // 'else' again does not work with Netscape 4.51!
   { if (document.URL.indexOf(".HTM")>0) fileC="6"; else fileC="1" };
 }

function Load_ImgTopC()
 {
  AdTopC_On = new Image(156,78);
  AdTopC_On.src = homeS+"Graf/Ad/ArrTopC"+fileC+".gif";
  AdTopC_Off = new Image(156,78);
  AdTopC_Off.src = homeS+"Graf/Ad/NewTopC"+fileC+".gif";
 }
function Load_ImgBotL()
 {
  AdBotL_On = new Image(200,100);
  AdBotL_On.src = homeS+"Graf/Ad/ArrBotL"+fileC+".gif";
  AdBotL_Off = new Image(200,100);
  AdBotL_Off.src = homeS+"Graf/Ad/NewBotL"+fileC+".gif";
 }
function Load_ImgBotR()
 {
  AdBotR_On = new Image(200,100);
  AdBotR_On.src = homeS+"Graf/Ad/ArrBotR"+fileC+".gif";
  AdBotR_Off = new Image(200,100);
  AdBotR_Off.src = homeS+"Graf/Ad/NewBotR"+fileC+".gif";
 }
function Load_Images()
 {
 Get_HomeS(); Get_FileChar();
 Load_ImgTopC(); Load_ImgBotL(); Load_ImgBotR();
 }

function Show_Pic(plaS,onT)
{
 var addrS="";
 if (plaS.length==5) plaS=plaS.substring(0,4); 
                     // new plaS value does not have a fileC at end anymore!
 if (plaS=="TopC") { OnS=AdTopC_On.src; OffS=AdTopC_Off.src }
 if (plaS=="BotL") { OnS=AdBotL_On.src; OffS=AdBotL_Off.src }
 if (plaS=="BotR") { OnS=AdBotR_On.src; OffS=AdBotR_Off.src }
                      // place of picture in image table depends on browser!
 for (n=0; n<document.images.length; n++)
 { addrS=document.images[n].src; lI=addrS.length;
   addrS=addrS.substring(lI-9);
   if (addrS==plaS+fileC+".gif")
    { if (onT) document.images[n].src=OnS;
       else document.images[n].src=OffS;
      break }
 }
}

//Copyright 56 aSWW, M.Vincent van Mechelen, DNI Foundation
