// Browser detect
if (document.layers) {
	navigator.family = "nn4";
}
if (document.all) {
	navigator.family = "ie4";
}
if (window.navigator.userAgent.toLowerCase().match(/gecko/)) {
	navigator.family = "gecko";
}
if (window.navigator.userAgent.toLowerCase().indexOf('opera') != -1) {
	navigator.family = 'opera';
}
topz="4";
bottomz="1";
toplevel="block";
bottomlevel="none";

offclass="sidetext";
onclass="sidetexton";

function riseup(num,minnum,maxnum,lines) {
	box = "pagetext" + num;
	setClassName(num,minnum,maxnum);
	if (navigator.family == "ie4") {
		for (var i=maxnum; i>0; i--) { pageindex = "pagetext" + i;
			if (i != num) {
				document.all[pageindex].style.display = bottomlevel;
				document.all[pageindex].style.zIndex = bottomz;
			}
		}
		document.all[box].style.zIndex = topz;
		document.all[box].style.display = toplevel;
	}
	if (navigator.family == "opera" || navigator.family == "gecko") {
		for (var i=maxnum; i>0; i--) { pageindex = "pagetext" + i;
			if (i != num) {
				document.getElementById(pageindex).style.display = bottomlevel;
				document.getElementById(pageindex).style.zIndex = bottomz;
			}
		}
		document.getElementById(box).style.zIndex = topz;
		document.getElementById(box).style.display = toplevel;
	}
	rollon(num,minnum,maxnum,lines);
}

function setClassName(num, minnum, maxnum) {
	objId = "sl" + num;
	for (var i=maxnum; i>minnum; i--) { slindex = "sl" + i;
		if (slindex != objId)
		document.getElementById(slindex).className = offclass;
	}
	if (num != minnum)
		document.getElementById(objId).className = onclass;
}

function stepdown(box) {
	if (navigator.family == "ie4") {
		document.all[box].style.display = bottomlevel;
	}
	if (navigator.family == "opera" || navigator.family == "gecko") {
		document.getElementById(box).style.display = bottomlevel;
	}
}

function Form_Validator(theForm)
{

  if (theForm.FormEmail.value == "")
  {
    alert("You must enter your complete e-mail address.");
    theForm.FormEmail.focus();
    return (false);
  }

  return (true);
}

if (document.images) {
	imgon = new Image();
	imgon.src = "/graphics/on1.gif";
	imgon2 = new Image();
	imgon2.src = "/graphics/on2.gif";
	imgoff = new Image();
	imgoff.src = "/graphics/space.gif";
}

function rollon(imgNum,minnum,maxnum,lines) {
	imgName = "img" + imgNum;
	if (document.images) {
		for (var i=maxnum; i>minnum; i--) { imgindex = "img" + i;
			document.getElementById(imgindex).src = eval("imgoff.src");
		}
		if (imgNum != minnum) {
			if (lines == 2) {
				document.getElementById(imgName).src = eval("imgon2.src");
			} else {
				document.getElementById(imgName).src = eval("imgon.src");
			}
		}
	}
}

function rolloff(imgName) {
	if (document.images) {
		document[imgName].src = eval("imgoff.src");
	}
}

