// JavaScript Document

//<!--
// Source: CodeFoot.com
// Please leave in this header.
var isReady = false;
window.onload = AW_printerFriendly;isReady=true;

function doSaveAs(){
var firefox = document.getElementById && !document.all;
	if (!firefox && isReady) {
		document.execCommand("SaveAs");
	}
	if (firefox) {
		alert('Feature available only in Internet Exlorer 4.0 and later.');
	}
}


function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function AW_printerFriendly() {
	// Create variable is_input to see if there is a ? in the url
	var is_input = document.URL.indexOf('?');

	// Check the position of the ? in the url
	if (is_input != -1) { 
		// Create variable from ? in the url to the end of the string
		addr_str = document.location.search.substring(1,255);
		// if addr_str = 'printme', use print style sheet
		if (addr_str == "printme")
			setActiveStyleSheet('printer')
		// If there is no ? in the url state no values found
		else
			// Use screen style sheet
			setActiveStyleSheet('screen')
	}
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// replaced MM_preloadImages() DSK 8/14/09

var preload = ['../images2/ro_42_topbar_r1_c1.gif','../images2/ro_42_topbar_r1_c2.gif','../images2/ro_42_topbar_r1_c3.gif','../images2/ro_42_topbar_r1_c4.gif','../images2/ro_42_topbar_r1_c6.gif','../images2/ro_42_topbar_r1_c8.gif','../images2/ro_42_sidebar_01.gif','../images2/ro_42_sidebar_02.gif','../images2/ro_42_sidebar_03.gif','../images2/ro_42_sidebar_04.gif','../images2/ro_42_sidebar_05.gif','../images2/ro_42_sidebar_06.gif','../images2/ro_42_sidebar_12.gif','../images2/ro_42_topbar_r1_c5.gif'];

var images = [];
for (i = 0; i < preload.length; i++) {
    images[i] = new Image();
    images[i].src = preload[i];
}
//-->
