var rtImgQty = 25;

// Example:
// simplePreload( '01.gif', '02.gif' ); 
function simplePreload()
{ 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

function swap (imgName) {
	img = document.getElementById(imgName);
	temp = img.src;
	if (temp.indexOf("_over")>0) {
		if (document.URL.indexOf(imgName)<0) {
			temp = temp.replace(/_over/,"");
		}
	} else {
		if (temp.indexOf(".jpg") > 0) {
			temp = temp.replace(/\.jpg/,"_over.jpg");
		}
		if (temp.indexOf(".gif") > 0) {
			temp = temp.replace(/\.gif/,"_over.gif");
		}
	}
	img.src = temp;
}
	
function show(divname) {
	document.getElementById(divname).style.visibility = "visible";
	}
	
function hide(divname) {
	document.getElementById(divname).style.visibility = "hidden";
	}
	
function rollover(id) {
	td = document.getElementById(id);
	//alert(td.style.backgroundColor);
	if (td.style.backgroundColor == "#99ccff") {
		td.style.backgroundColor = "#FFFFFF";
	} else {
		td.style.backgroundColor = "#99ccff";
	}
}

$(document).ready( function() {
	if ($("#main").height() + $("#menu").outerHeight() + $("#footer").outerHeight() < $(window).height()) {
		$("#main").css("height", ($("#outer-frame").height() - $("#menu").outerHeight() - $("#footer").outerHeight() - 2) + "px");
	}
});