pic1= new Image(1,1); pic1.src="/sitegraphics/blank.gif"; 
pic2= new Image(3,3); pic2.src="/sitegraphics/grey1.gif"; 
pic3= new Image(5,5030); pic3.src="/sitegraphics/sidebar.jpg"; 


function swapImages(Image1,Image2) { turnOffImage(Image1); turnOnImage(Image2); }
function turnOffImage(ImageName) { var x = document.getElementById(ImageName); x.style.display="none"; }
function turnOnImage(ImageName) { var x = document.getElementById(ImageName); x.style.display="block"; }
function turnOff(DivName) { var x = document.getElementById(DivName); x.style.display="none"; }
function turnOn(DivName) { var x = document.getElementById(DivName); x.style.display="block"; }

function popup(url,name,width,height) {
        var left = Math.floor((screen.width - width) / 2);
        var top = Math.floor((screen.height - height) / 2);
        var popwindow = window.open(url,name,"top=" + top + ",left=" + left + ",height=" + height + ",width=" + width +",status=0,menubar=0,toolbar=0,location=0,directories=0,resizable=1,scrollbars=1");
        if (parseInt(navigator.appVersion) >= 4) { popwindow.window.focus(); }
}

var amp = "&";

var buildButtonSeq = 0;

function buildButton(offImage,onImage,width,height,url,newWindow,title,reverse) {
//typical call: buildButton('sitegraphics/buttons/xxx-OFF.jpg','sitegraphics/buttons/xxx-ON.jpg',175,100,'xxx.html',false,'Image Title',false);

	if (reverse) { var tmp_onImage = onImage; onImage = offImage; offImage = tmp_onImage; }

	var target = "";
	if (newWindow) { target = "target=\"_blank\""; }

	buildButtonSeq++;
	var offID = "off" + buildButtonSeq;
	var onID = "on" + buildButtonSeq;

	var overcode = "onmouseover=\"swapImages('" + offID + "','" + onID + "');return(true);\"";
	var outcode = "onmouseout=\"swapImages('" + onID + "','" + offID + "');return(true);\"";
	var offimg = "<img width=\"" + width + "\" height=\"" + height + "\" src=\"" + offImage + "\" border=\"0\" id=\"" + offID + "\" title=\"" + title + "\" alt=\"" + title + "\">";
	var onimg = "<img width=\"" + width + "\" height=\"" + height + "\" src=\"" + onImage + "\" border=\"0\" id=\"" + onID + "\" style=\"display:none;\" title=\"" + title + "\" alt=\"" + title + "\">";


	document.write( "<div style='width:" + width + ";height:" + height + ";'><a " + target + " href='" + url + "' " + overcode + " " + outcode + " title='" + title + "' alt='" + title + "'>" + offimg + onimg + "</a></div>");

}


	function videoWindow(url) {
		popup(url,"video",570,500);
	}


