 //Global Variable to hold the current Top Menu TD

 var currentTopMenuTD;
 var subMenuDisplayed;
 
 subMenuDisplayed = false;
 currentTopMenuTD = "";

  function showSubMenu(aTableData, aTopMenuIndex, aSubMenuDiv) 
  {}

 function showSubMenu2(aTableData, aTopMenuIndex) 
  {
  var proceed;
  var subMenuTextArray;
  var subMenuLinkArray;

	//alert("inshowSubMenu2");

  hideSubMenu2();

   var aSubMenuDiv;
   aSubMenuDiv = document.getElementById("topNavSubItems");

  if (!subMenuDisplayed)
  {
  proceed = false;

  //Change the color of the cell in the main menu
  aTableData.bgColor = "#000000";
  currentTopMenuTD = aTableData.id;
  switch(aTopMenuIndex){
  case 1:
	  //Text
	  subMenuTextArray = new Array();
	  subMenuTextArray[0] = "Feature Extraction";
	  subMenuTextArray[1] = "Geo Specific Modelling";
	  subMenuTextArray[2] = "Urban Ops & Visualization";
	  //subMenuTextArray[3] = "Urban Terrain Vizualization";
	  //links
	  subMenuLinkArray = new Array();
	  subMenuLinkArray[0] = "http://www.objectraku.com/06_prodserv/fti_index.htm";
	  subMenuLinkArray[1] = "http://www.objectraku.com/06_solutions/geospecificmodelling.htm";
	  subMenuLinkArray[2] = "http://www.objectraku.com/06_solutions/urbanterrainviz.htm";
	  //subMenuLinkArray[3] = "http://www.objectraku.com/06_solutions/urbanterrainviz.htm";
	  proceed = true;
	  break;
  
  case 2:
  	  //Text
	  subMenuTextArray = new Array();  
	  subMenuTextArray[0] = "LiDAR FTI";
	  subMenuTextArray[1] = "Sextant";
	  subMenuTextArray[2] = "Geo Services";
	  subMenuTextArray[3] = "Symbology";

	  
	  
	  
	  //Links
	  subMenuLinkArray = new Array();
	  subMenuLinkArray[0] = "http://www.objectraku.com/06_prodserv/fti_index.htm";	
	  subMenuLinkArray[1] = "http://www.objectraku.com/06_prodserv/sextantindex.htm";	  
	  subMenuLinkArray[2] = "http://www.objectraku.com/06_prodserv/geoservicesindex.htm";
	  subMenuLinkArray[3] = "http://www.objectraku.com/06_prodserv/symbolsindex.htm";	  
	  //subMenuLinkArray[1] = "http://www.objectraku.com/06_prodserv/componentsindex.htm";
	  //subMenuLinkArray[2] = "http://www.objectraku.com/06_prodserv/mrc/mrcpackage.htm";
 	  //subMenuLinkArray[5] = "http://www.objectraku.com/06_prodserv/fti_index.htm";
	  proceed = true;
	  break;

  case 3:
  	  //Text
	  subMenuTextArray = new Array();  
	  subMenuTextArray[0] = "News";
	  subMenuTextArray[1] = "Profile";
	  subMenuTextArray[2] = "Testimonials";
	  subMenuTextArray[3] = "Customers";
	  subMenuTextArray[4] = "Partners";
	  subMenuTextArray[5] = "Contact";
	  //Links
	  subMenuLinkArray = new Array();
	  subMenuLinkArray[0] = "http://www.objectraku.com/06_company/news/news2010.htm";
	  subMenuLinkArray[1] = "http://www.objectraku.com/06_company/profile.htm";
	  subMenuLinkArray[2] = "http://www.objectraku.com/06_company/testimonials.htm";
	  subMenuLinkArray[3] = "http://www.objectraku.com/06_company/customers.htm";
	  subMenuLinkArray[4] = "http://www.objectraku.com/06_company/partners.htm";
	  subMenuLinkArray[5] = "http://www.objectraku.com/06_company/contact.htm";
	  proceed = true;
	  break;

  case 4:
  	  //Text
	  subMenuTextArray = new Array();  
	  subMenuTextArray[0] = "Demos";
	  subMenuTextArray[1] = "Training";
	  subMenuTextArray[2] = "Gallery";
	  subMenuTextArray[3] = "Online Resources";
	  subMenuTextArray[4] = "Tech Support";
	  //Links
	  subMenuLinkArray = new Array();
	  subMenuLinkArray[0] = "http://www.objectraku.com/06_support/demos.htm";
	  subMenuLinkArray[1] = "http://www.objectraku.com/06_support/workshop.htm";
	  subMenuLinkArray[2] = "http://www.objectraku.com/06_support/gallery.htm";
	  subMenuLinkArray[3] = "http://www.objectraku.com/06_support/resources.htm";
	  subMenuLinkArray[4] = "http://www.objectraku.com/06_support/techsupport.htm";
	  proceed = true;
	  break;
  	  
  }//End Switch

  //alert('before proceed' + proceed);
  if (proceed)
  {
   
  var tmpContent;
  var oTable = document.createElement("TABLE");
  var oTBody0 = document.createElement("TBODY");
  var oRow = document.createElement("TR");
  var oCell;
  var oAnchor;
  var oText;

  // Set oTables properties
  oTable.id = "subMenuTable";
  oTable.bgColor = "#000000";
  //oTable.align = "center";
  oTable.valign = "top"; 
  oTable.border = 0; 
  oTable.cellspacing = 0;
  oTable.width = "600";

  // Set oRows properties
  oRow.align = "center"; 
  oRow.valign = "top"; 

  // Create required cells, set properties and text, insert into row
  oCell = document.createElement("TD");

  oRow.appendChild(oCell);

  for (i=0; i<subMenuTextArray.length; i++)
  {
  oCell = document.createElement("TD");
  oAnchor = document.createElement("A");
  oText = document.createTextNode(subMenuTextArray[i]);
  oAnchor.href = subMenuLinkArray[i];
  oAnchor.appendChild(oText);
  oCell.appendChild(oAnchor);
  oRow.appendChild(oCell);
  }

  oCell = document.createElement("TD");

  oRow.appendChild(oCell);


  // Insert the created elements into oTable.
  oTBody0.appendChild(oRow);
  oTable.appendChild(oTBody0);
  aSubMenuDiv.appendChild(oTable);

  subMenuDisplayed = true;
  } //End if (proceed)
  } //End if (subMenuDisplayed)
};  //End function showSubMenu

function hideSubMenu() 
  {
  }
function hideSubMenu2() 
  {
   var oTable;
   var i;
   var aSubMenuDiv;
   var cTD;
   //alert("inhideSubMenu2 + " + subMenuDisplayed);
   
   if (subMenuDisplayed)
    {
    oTable = document.getElementById("subMenuTable");
    if(oTable)
    {
    aSubMenuDiv = oTable.parentNode;
    aSubMenuDiv.removeChild(oTable);
     }
     //alert(currentTopMenuTD);
     cTD = document.getElementById(currentTopMenuTD);
     cTD.bgColor="#c3624a";
    }
    subMenuDisplayed = false;
    

  };

  function processMainMenuEvent(evt) {
      evt = (evt) ? evt : ((window.event) ? window.event : "")
      if (evt) {
          var elem = (evt.target) ? evt.target : evt.srcElement
  
    switch(elem.parentNode.id){
    case "SolutionsTD":
  	  //alert(elem.parentNode.id)
  	  showSubMenu2(elem.parentNode, 1)
  	  break;
  
    case "ProdServTD":
  	  //alert(elem.parentNode.id)
  	  showSubMenu2(elem.parentNode, 2)
  	  break;
  
    case "SupportTD":
  	  //alert(elem.parentNode.id)
  	  showSubMenu2(elem.parentNode, 4)
  	  break;
  
    case "CompanyTD":
  	  //alert(elem.parentNode.id)
  	  showSubMenu2(elem.parentNode, 3)
  	  break;
  
    }//End Switch
  
      }
}

  function rebuildTopMenu() 
    {

     var aTopMenuTD;
     var oSpan;
     var oText;
     var nText;

     aTopMenuTD = document.getElementById("SolutionsTD");
     oText =  aTopMenuTD.firstChild;
     if(oText)
     	{
     	aTopMenuTD.removeChild(oText);
	nText = document.createTextNode(" SOLUTIONS ");
	oSpan = document.createElement("SPAN");
	oSpan.onmouseover = processMainMenuEvent;
	oSpan.appendChild(nText);
	aTopMenuTD.appendChild(oSpan);
	}

     aTopMenuTD = document.getElementById("ProdServTD");
     oText =  aTopMenuTD.firstChild;
     if(oText)
        {
        aTopMenuTD.removeChild(oText);
    	nText = document.createTextNode(" PRODUCTS & SERVICES ");
    	oSpan = document.createElement("SPAN");
    	oSpan.onmouseover = processMainMenuEvent;
    	oSpan.appendChild(nText);
    	aTopMenuTD.appendChild(oSpan);
	}

     aTopMenuTD = document.getElementById("SupportTD");
     oText =  aTopMenuTD.firstChild;
     if(oText)
        {
        aTopMenuTD.removeChild(oText);
    	nText = document.createTextNode(" SUPPORT ");
    	oSpan = document.createElement("SPAN");
    	oSpan.onmouseover = processMainMenuEvent;
    	oSpan.appendChild(nText);
    	aTopMenuTD.appendChild(oSpan);
	}

     aTopMenuTD = document.getElementById("CompanyTD");
     oText =  aTopMenuTD.firstChild;
     if(oText)
        {
        aTopMenuTD.removeChild(oText);
    	nText = document.createTextNode(" COMPANY ");
    	oSpan = document.createElement("SPAN");
    	oSpan.onmouseover = processMainMenuEvent;
    	oSpan.appendChild(nText);
    	aTopMenuTD.appendChild(oSpan);
	}

      
  
  };

 function buildNewsDiv() 
  {
   var oAnchor;
   var oText;
   var oBR;
   var i;
   var newsTextArray;
   var newsLinkArray;

   rebuildTopMenu();	//Do this here as it gets run by every page

   var aNewsDiv=document.getElementById("news_body");


 //Edit the text and Link arrys below to update the news on all pages

  newsTextArray = new Array();
  newsTextArray[0] = "Sextant Workshops announced for Summer and Fall";
  newsTextArray[1] = "Object Raku announces Research Collaboration with SFU";
  newsTextArray[2] = "Come see us at GEOINT 2010!";
  newsTextArray[3] = "FTI extraction accuracy looking good";
  //links
  newsLinkArray = new Array();
  newsLinkArray[0] = "http://www.objectraku.com/06_company/news/news2010.htm#news1";
  newsLinkArray[1] = "http://www.objectraku.com/06_company/news/news2010.htm#news2";
  newsLinkArray[2] = "http://www.objectraku.com/06_company/news/news2010.htm#news3";
  newsLinkArray[3] = "http://www.objectraku.com/06_company/news/news2010.htm#news4";

  for (i=0; i<newsTextArray.length; i++)
  {
   oAnchor = document.createElement("A");
   oBR = document.createElement("BR");
   oText = document.createTextNode(newsTextArray[i]);
   oAnchor.href = newsLinkArray[i];
   oAnchor.appendChild(oText);
   aNewsDiv.appendChild(oAnchor);
   aNewsDiv.appendChild(oBR);
   }

  setUpFooter();
  };

  function setUpHomePage() 
  {
   var mainImageDiv=document.getElementById("LargeCenterBannerImage");
   
   var SplashFiles = new Array();
   SplashFiles[0] = "url(image/general/Splashbanner1.gif)";
   SplashFiles[1] = "url(image/general/Splashbanner2.gif)";
   SplashFiles[2] = "url(image/general/Splashbanner1.gif)";
   SplashFiles[3] = "url(image/general/Splashbanner2.gif)";
   SplashFiles[4] = "url(image/general/Splashbanner1.gif)";
   SplashFiles[5] = "url(image/general/Splashbanner2.gif)";
   var imgCt = SplashFiles.length;
   var randomNum = Math.floor((Math.random() * imgCt));
   mainImageDiv.style.backgroundImage = SplashFiles[randomNum];
   buildNewsDiv();

  };

  function setUpFooter() 
    {
     var footerDiv = document.getElementById("footer");
     var fAnchor;
     var oText;
     footerDiv.innerText = "";
     fAnchor = document.createElement("A");
     oText = document.createTextNode("Copyright Object Raku Technology Inc. 2010");
     fAnchor.href = "http://www.objectraku.com/06_company/termsofuse.htm";
     fAnchor.appendChild(oText);
     footerDiv.appendChild(fAnchor);     
  
     };


 /***********************************************
 * Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
 * This notice MUST stay intact for legal use
 * Visit http://www.dynamicdrive.com/ for this script and 100s more.
 ***********************************************/
  
 var fadeimages=new Array()
 //SET IMAGE PATHS. Extend or contract array as needed
 fadeimages[0]=["image/company/customers/USMC.jpg", "06_company/customers.htm", "_new"] //plain image syntax
 fadeimages[1]=["image/company/customers/Lockmart.jpg", "06_company/customers.htm", "_new"] //image with link syntax
 fadeimages[2]=["image/company/customers/CFJIC_logo_small.jpg", "06_company/customers.htm", "_new"] //plain image syntax
 fadeimages[3]=["image/company/customers/iasfos_med_websm.gif", "06_company/customers.htm", "_new"] //plain image syntax
 fadeimages[4]=["image/company/customers/CDN_Army_logo3.jpg", "06_company/customers.htm", "_new"] //plain image syntax
 fadeimages[5]=["image/company/customers/Ratheon_logo_small.jpg", "06_company/customers.htm", "_new"] //plain image syntax
 fadeimages[6]=["image/company/customers/Boeingsm.gif", "06_company/customers.htm", "_new"] //plain image syntax
 fadeimages[7]=["image/company/customers/ngasm.gif", "06_company/customers.htm", "_new"] //plain image syntax
 fadeimages[8]=["image/company/customers/tpc_sm2.gif", "06_company/customers.htm", "_new"] //plain image syntax
  
 var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
 //SET IMAGE PATHS. Extend or contract array as needed
 fadeimages2[0]=["../image/support/gallery/2storey_textured_irregular_terrain.jpg", "../image/support/gallery/2storey_textured_irregular_terrain.jpg", "_new"] //plain image syntax
 fadeimages2[1]=["../image/support/gallery/3dPic1x.jpg", "../image/support/gallery/3dPic1x.jpg", "_new"] //plain image syntax
 fadeimages2[2]=["../image/support/gallery/AftonCanyonImageDrape.jpg", "../image/support/gallery/AftonCanyonImageDrape.jpg", "_new"] //plain image syntax
 fadeimages2[3]=["../image/support/gallery/AssayOffice.jpg", "../image/support/gallery/AssayOffice.jpg", "_new"] //plain image syntax
 fadeimages2[4]=["../image/support/gallery/BiLevel_Inset_Concourse.jpg", "../image/support/gallery/BiLevel_Inset_Concourse.jpg", "_new"] //plain image syntax
 fadeimages2[5]=["../image/support/gallery/Bldg75_Label_InteriorWallswFloorBrown2small.jpg", "../image/support/gallery/Bldg75_Label_InteriorWallswFloorBrown2small.jpg", "_new"] //plain image syntax
 fadeimages2[6]=["../image/support/gallery/BuildingTextured_CarReflection.jpg", "../image/support/gallery/BuildingTextured_CarReflection.jpg", "_new"]
 fadeimages2[7]=["../image/support/gallery/BuildingTextured_TreeReflectionsX.jpg", "../image/support/gallery/BuildingTextured_TreeReflectionsX.jpg", "_new"]
 fadeimages2[8]=["../image/support/gallery/CampLejeuneMOUT_V2_Bldg8_9_inset.jpg", "CampLejeuneMOUT_V2_Bldg8_9_inset.jpg", "_new"]
 fadeimages2[9]=["../image/support/gallery/CampLejeuneMOUT_V2_rubble_inset.jpg", "../image/support/gallery/CampLejeuneMOUT_V2_rubble_inset.jpg", "_new"]
 fadeimages2[10]=["../image/support/gallery/CampLejeuneMOUT_V2_sandbags_inset.jpg", "../image/support/gallery/CampLejeuneMOUT_V2_sandbags_inset.jpg", "_new"]
 fadeimages2[11]=["../image/support/gallery/CampLejeuneMOUT_V2_viewBldg8_9_inset.jpg", "../image/support/gallery/CampLejeuneMOUT_V2_viewBldg8_9_inset.jpg", "_new"]
 fadeimages2[12]=["../image/support/gallery/CampLejeuneMOUT_V2_wreck_inset.jpg", "../image/support/gallery/CampLejeuneMOUT_V2_wreck_inset.jpg", "_new"]
 fadeimages2[13]=["../image/support/gallery/CBRN_Lab2.jpg", "../image/support/gallery/CBRN_Lab2.jpg", "_new"]
 fadeimages2[14]=["../image/support/gallery/CBRN_Lab.jpg", "../image/support/gallery/CBRN_Lab.jpg", "_new"]
 fadeimages2[15]=["../image/support/gallery/Picture4x.jpg", "../image/support/gallery/Picture4x.jpg", "_new"]
 fadeimages2[16]=["../image/support/gallery/Crystal City Subway.jpg", "../image/support/gallery/Crystal City Subway.jpg", "_new"]
 fadeimages2[17]=["../image/support/gallery/DamagedBuilding1.jpg", "../image/support/gallery/DamagedBuilding1.jpg", "_new"]
 fadeimages2[18]=["../image/support/gallery/DawnatKnox.jpg", "../image/support/gallery/DawnatKnox.jpg", "_new"]
 fadeimages2[19]=["../image/support/gallery/DRDC_bldg75_insidex.jpg", "../image/support/gallery/DRDC_bldg75_insidex.jpg", "_new"]
 fadeimages2[20]=["../image/support/gallery/DRDC_overhead.jpg", "../image/support/gallery/DRDC_overhead.jpg", "_new"]
 fadeimages2[21]=["../image/support/gallery/Hyson at JCFAWE2.jpg", "../image/support/gallery/Hyson at JCFAWE2.jpg", "_new"]
 fadeimages2[22]=["../image/support/gallery/Inlet 3.jpg", "../image/support/gallery/Inlet 3.jpg", "_new"]
 fadeimages2[23]=["../image/support/gallery/Jail2.jpg", "../image/support/gallery/Jail2.jpg", "_new"]
 fadeimages2[24]=["../image/support/gallery/JMR Street w_logo.jpg", "../image/support/gallery/JMR Street w_logo.jpg", "_new"]
 fadeimages2[25]=["../image/support/gallery/Knox_SouthfromtheBank.jpg", "../image/support/gallery/Knox_SouthfromtheBank.jpg", "_new"]
 fadeimages2[26]=["../image/support/gallery/MiscSofa.jpg", "../image/support/gallery/MiscSofa.jpg", "_new"]
 fadeimages2[27]=["../image/support/gallery/NewKabul3Dx.jpg", "../image/support/gallery/NewKabul3Dx.jpg", "_new"]
 fadeimages2[28]=["../image/support/gallery/NightVisionatKnox.jpg", "../image/support/gallery/NightVisionatKnox.jpg", "_new"]
 fadeimages2[29]=["../image/support/gallery/OtterbeinChurchFinal.jpg", "../image/support/gallery/OtterbeinChurchFinal.jpg", "_new"]
 fadeimages2[30]=["../image/support/gallery/Pendleton1V2.jpg", "../image/support/gallery/Pendleton1V2.jpg", "_new"]
 fadeimages2[31]=["../image/support/gallery/Phoenix_PortGastin3x.jpg", "../image/support/gallery/Phoenix_PortGastin3x.jpg", "_new"]
 fadeimages2[32]=["../image/support/gallery/Port04x.jpg", "../image/support/gallery/Port04x.jpg", "_new"]
 fadeimages2[33]=["../image/support/gallery/QualcommNewestx.jpg", "../image/support/gallery/QualcommNewestx.jpg", "_new"]
 fadeimages2[34]=["../image/support/gallery/Recruit1x_med.jpg", "../image/support/gallery/Recruit1x_med.jpg", "_new"]
 fadeimages2[35]=["../image/support/gallery/Recruit4_med.jpg", "../image/support/gallery/Recruit4_med.jpg", "_new"]
 fadeimages2[36]=["../image/support/gallery/semibusonbridge.jpg", "../image/support/gallery/semibusonbridge.jpg", "_new"]
 fadeimages2[37]=["../image/support/gallery/Sextant Buildings_3DSymbols_2small_labelsX.jpg", "../image/support/gallery/Sextant Buildings_3DSymbols_2small_labelsX.jpg", "_new"]
 fadeimages2[38]=["../image/support/gallery/SextantHUD1x.jpg", "../image/support/gallery/SextantHUD1x.jpg", "_new"]
 fadeimages2[39]=["../image/support/gallery/Smoke from the station.jpg", "../image/support/gallery/Smoke from the station.jpg", "_new"]
 fadeimages2[40]=["../image/support/gallery/Smoke_from_Subway3.jpg", "../image/support/gallery/Smoke_from_Subway3.jpg", "_new"]
 fadeimages2[41]=["../image/support/gallery/Subway2.jpg", "../image/support/gallery/Subway2.jpg", "_new"]
 fadeimages2[42]=["../image/support/gallery/symbols_1.gif", "../image/support/gallery/symbols_1.gif", "_new"]
 fadeimages2[43]=["../image/support/gallery/TEPwLejeuneWreck.jpg", "../image/support/gallery/TEPwLejeuneWreck.jpg", "_new"]
 fadeimages2[44]=["../image/support/gallery/Terrain DrapeX.jpg", "../image/support/gallery/Terrain DrapeX.jpg", "_new"]
 fadeimages2[45]=["../image/support/gallery/TownHouse1.jpg", "../image/support/gallery/TownHouse1.jpg", "_new"]
 fadeimages2[46]=["../image/support/gallery/UAV_AirRouteWith4SensorViews.jpg", "../image/support/gallery/UAV_AirRouteWith4SensorViews.jpg", "_new"]
 fadeimages2[47]=["../image/support/gallery/UAVHPP.jpg", "../image/support/gallery/UAVHPP.jpg", "_new"]
 fadeimages2[48]=["../image/support/gallery/Undertakers.jpg", "../image/support/gallery/Undertakers.jpg", "_new"]
 fadeimages2[49]=["../image/support/gallery/Vancouver7a.jpg", "../image/support/gallery/Vancouver7a.jpg", "_new"]
 fadeimages2[50]=["../image/support/gallery/VancouverDowntown.jpg", "../image/support/gallery/VancouverDowntown.jpg", "_new"]
 fadeimages2[51]=["../image/support/gallery/VectorData.jpg", "../image/support/gallery/VectorData.jpg", "_new"]
 fadeimages2[52]=["../image/support/gallery/VehicleAmbulance.jpg", "../image/support/gallery/VehicleAmbulance.jpg", "_new"]
 fadeimages2[53]=["../image/support/gallery/View from the bow.jpg", "../image/support/gallery/View from the bow.jpg", "_new"]
 fadeimages2[54]=["../image/support/gallery/ViewFromEscalatorx.jpg", "../image/support/gallery/ViewFromEscalatorx.jpg", "_new"]
 fadeimages2[55]=["../image/support/gallery/WorldSeries2002.jpg", "../image/support/gallery/WorldSeries2002.jpg", "_new"]
 fadeimages2[56]=["../image/support/gallery/WreckedChurch_WaterTower.jpg", "../image/support/gallery/WreckedChurch_WaterTower.jpg", "_new"]


 //fadeimages2[1]=["photo2.jpg", "http://www.cssdrive.com", ""] //image with link syntax
 //fadeimages2[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax
  
 var fadebgcolor="white"
 var fadeWD=550
  
 ////NO need to edit beyond here/////////////
  
 var fadearray=new Array() //array to cache fadeshow instances
 var fadeclear=new Array() //array to cache corresponding clearinterval pointers
  
 var dom=(document.getElementById) //modern dom browsers
 var iebrowser=document.all
  
 function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
 this.pausecheck=pause
 this.mouseovercheck=0
 this.delay=delay
 this.degree=10 //initial opacity degree (10%)
 this.curimageindex=0
 this.nextimageindex=1
 fadearray[fadearray.length]=this
 fadeWD=fadewidth
 this.slideshowid=fadearray.length-1
 this.canvasbase="canvas"+this.slideshowid
 this.curcanvas=this.canvasbase+"_0"
 if (typeof displayorder!="undefined")
 theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
 this.theimages=theimages
 this.imageborder=parseInt(borderwidth)
 this.postimages=new Array() //preload images
 for (p=0;p<theimages.length;p++){
 this.postimages[p]=new Image()
 this.postimages[p].src=theimages[p][0]
 }
  
 var fadewidth=fadewidth+this.imageborder*2
 var fadeheight=fadeheight+this.imageborder*2
  
 if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
 document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
 else
 document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
  
 if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
 this.startit()
 else{
 this.curimageindex++
 setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
 }
 }
 
 function fadepic(obj){
 if (obj.degree<100){
 obj.degree+=10
 if (obj.tempobj.filters&&obj.tempobj.filters[0]){
 if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
 obj.tempobj.filters[0].opacity=obj.degree
 else //else if IE5.5-
 obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
 }
 else if (obj.tempobj.style.MozOpacity)
 obj.tempobj.style.MozOpacity=obj.degree/101
 else if (obj.tempobj.style.KhtmlOpacity)
 obj.tempobj.style.KhtmlOpacity=obj.degree/100
 }
 else{
 clearInterval(fadeclear[obj.slideshowid])
 obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
 obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
 obj.populateslide(obj.tempobj, obj.nextimageindex)
 obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
 setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
 }
 }
  
 fadeshow.prototype.populateslide=function(picobj, picindex){
 var slideHTML=""
 var widthFactor=100
 var picWidth = this.postimages[picindex].width
 var picHeight = this.postimages[picindex].height
 if (picWidth > fadeWD)
 {
  widthFactor = (fadeWD / picWidth)
  picWidth = Math.round(picWidth*widthFactor)
  picHeight = Math.round(picHeight*widthFactor)
 }

 if (this.theimages[picindex][1]!="") //if associated link exists for image
 slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
 slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px" width="'+picWidth+'px" height="'+picHeight+'px">'
 if (this.theimages[picindex][1]!="") //if associated link exists for image
 slideHTML+='</a>'
 picobj.innerHTML=slideHTML
 }
  
  
 fadeshow.prototype.rotateimage=function(){
 if (this.pausecheck==1) //if pause onMouseover enabled, cache object
 var cacheobj=this
 if (this.mouseovercheck==1)
 setTimeout(function(){cacheobj.rotateimage()}, 100)
 else if (iebrowser&&dom||dom){
 this.resetit()
 var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
 crossobj.style.zIndex++
 fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
 this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
 }
 else{
 var ns4imgobj=document.images['defaultslide'+this.slideshowid]
 ns4imgobj.src=this.postimages[this.curimageindex].src
 }
 this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
 }
  
 fadeshow.prototype.resetit=function(){
 this.degree=10
 var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
 if (crossobj.filters&&crossobj.filters[0]){
 if (typeof crossobj.filters[0].opacity=="number") //if IE6+
 crossobj.filters(0).opacity=this.degree
 else //else if IE5.5-
 crossobj.style.filter="alpha(opacity="+this.degree+")"
 }
 else if (crossobj.style.MozOpacity)
 crossobj.style.MozOpacity=this.degree/101
 else if (crossobj.style.KhtmlOpacity)
 crossobj.style.KhtmlOpacity=obj.degree/100
 }
  
  
 fadeshow.prototype.startit=function(){
 var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
 this.populateslide(crossobj, this.curimageindex)
 if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
 var cacheobj=this
 var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
 crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
 crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
 }
 this.rotateimage()
 }
  
