// <!-- Roll_over script code http://www.designplace.org/static/roll_over_button_example.html -->
// Please credit designplace.org if any of this code is re-used.

<!-- // DEFAULT IMAGES
home_img = new Image(58,22);
home_img.src = "images/navigate/home-0.gif";
torc_img = new Image(128,22);
torc_img.src = "images/navigate/toro-cos-0.gif";
torm_img = new Image(145,22);
torm_img.src = "images/navigate/toro-com-0.gif";
tlce_img = new Image(278,22);
tlce_img.src = "images/navigate/toro-cnt-0.gif";
tors_img = new Image(130,22);
tors_img.src = "images/navigate/toro-sit-0.gif";
kohl_img = new Image(132,22);
kohl_img.src = "images/navigate/kohler-0.gif";
used_img = new Image(149,22);
used_img.src = "images/navigate/used-0.gif";
brus_img = new Image(121,22);
brus_img.src = "images/navigate/brushcut-0.gif";
pola_img = new Image(115,22);
pola_img.src = "images/navigate/polaris-0.gif";
cont_img = new Image(162,22);
cont_img.src = "images/navigate/contact-0.gif";


// OVER
home_ova = new Image(58,22);
home_ova.src = "images/navigate/home-1.gif";
torc_ova = new Image(128,22);
torc_ova.src = "images/navigate/toro-cos-1.gif";
torm_ova = new Image(145,22);
torm_ova.src = "images/navigate/toro-com-1.gif";
tlce_ova = new Image(278,22);
tlce_ova.src = "images/navigate/toro-cnt-1.gif";
tors_ova = new Image(130,22);
tors_ova.src = "images/navigate/toro-sit-1.gif";
kohl_ova = new Image(132,22);
kohl_ova.src = "images/navigate/kohler-1.gif";
used_ova = new Image(149,22);
used_ova.src = "images/navigate/used-1.gif";
brus_ova = new Image(121,22);
brus_ova.src = "images/navigate/brushcut-1.gif";
pola_ova = new Image(115,22);
pola_ova.src = "images/navigate/polaris-1.gif";
cont_ova = new Image(162,22);
cont_ova.src = "images/navigate/contact-1.gif";

// DOWN (HOME/SIDE BUTTONS ONLY)
rsvp = location.search.substring(1);

// disable default link status
document.onmouseover = function ( e ) {
if ( !e ) e = window.event;
var el = e.target ? e.target : e.srcElement;
while ( el != null && el.tagName != "A" ) el = el.parentNode;
if ( el == null ) return;
if ( e.preventDefault ) e.preventDefault();
else e.returnValue = true;
};

function reframe () {
  if (rsvp) {
  	shoot = rsvp.split("snapshot=");
	shot = shoot[1].substr(0,5);
	// LOAD IFRAME AS PER QUERY
    document.getElementById('software').src = "software.html#" + shoot[1];
	// ENSURE ITS BUTTON IS DOWN
	swapova(shot + '0',shot + '_down');
  //  }
  } else {
    force_swap('home10', 'home1_down');  
  }
}
function reimage() {
  force_swap('home10','home1_img','hiret0','hiret_img','casht0','casht_img','cabs10','cabs1_img','payma0','payma_img','asset0','asset_img','notes0','notes_img','forum0','forum_img' );
}

function hideurl() {
   window.status = document.getElementById(hideurl.arguments[0]).title;
}

function swapova () {
  if (document.images){
    // skip if image is in down state (filename ends in '2' b/4 extension), show status when done
    istwo = "" + document[swapova.arguments[0]].src;
    istwo = istwo.substring((istwo.length-5), (istwo.length-4));
    if ( parseInt(istwo) < 2) {
      force_swap(swapova.arguments[0], swapova.arguments[1]);
    } // else {
	  // force_swap('home0, home_down');
	  // }
	hideurl(swapova.arguments[0]);
  }
}

function force_swap() {
  for (x=0;x<force_swap.arguments.length;x+=2) {
    document[force_swap.arguments[x]].src = eval(force_swap.arguments[1+x] + ".src");
  }
}

function open_windoh(theURL,winName,wid) { //v2.0
  features = "directories=no,location=no,menubar=no,toolbar=no,scrollbars=yes,height=480,width=" + wid
  window.open(theURL,winName,features);
}

