// This Javascript Source File is protected by Copyright laws 2004 January Pinched LTSIII Production and Design.
// Please use this code AT WILL with NO WARRANTY but please keep the following notice in place and give credit where credit is due.
// Special thanks to all of those astounding people who taught through their actions.
//*************************************************
// Javascript composed by Len Schwalm III http://www.pinched.com LTSIII Production and Design
// Please contact Len if you need installation help, have suggestions or would like be a part of any projects
// Phone: (909) 319-1137 Ontario, CA USA
// or
// Fill out the contact form at http://www.pinched.com/contact
//*************************************************

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// Slideshow

// Path
var path="images/monitor/";
// ID of Element
var id="footer";
//Specify background images to slide
var bgslides=new Array(
						"service_solutions.jpg",
						"sales_and_repair.jpg",
						"graphics_card.jpg",
						"networking.jpg",
						"nework_diag.jpg",
						"service_and_support.jpg",
						"server_diag.jpg"
						)

//Specify interval between slide (in miliseconds)
var speed=3500

//preload images
var processed=new Array()
for (i=0;i<bgslides.length;i++){
processed[i]=new Image()
processed[i].src=path+bgslides[i]
}

var inc=-1
var ntimes=0

function slideback(){
if (ntimes>=1){
clearInterval(keeptrack)
return
}
if (inc<bgslides.length-1)
inc++
else{
inc=0
ntimes++
}
setBackgroundImage(id, processed[inc].src);
}

function setBackgroundImage (id, imageURL) {
var imageprops = "20px bottom no-repeat";
  if (document.layers)
    document[id].background.src = imageURL == 'none' ? null : imageURL;
  else if (document.all)
    document.all[id].style.background = imageURL == 'none' ? 'none' 
: 'url(' + imageURL + ') '+imageprops+'';
  else if (document.getElementById)
    document.getElementById(id).style.background = imageURL == 
'none' ? 'none' : 'url(' + imageURL + ') '+imageprops+'';
}
if (document.all||document.getElementById){
window.onload=new Function('keeptrack=setInterval("slideback()",speed)')
}
//end Slideshow

//adds additional onload events
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
//window.onload=startresize();
// Resize function will not work called from body onload
