// JavaScript Document
agent = navigator.userAgent
browserVer = 2
if ((navigator.userAgent.substring(0,9) == "Mozilla/3") ||
(navigator.userAgent.substring(0,9) == "Mozilla/4") ||
	(navigator.userAgent.substring(0,9) == "Mozilla/5"))
	(browserVer = 1)

function hiLite2(imgDocID) {
	if (browserVer == 1) {
		s=document.images[imgDocID].src;
		s=s.replace(".gif", "O.gif");
		s=s.replace(".jpg", "O.jpg");
		document.images[imgDocID].src=s;
	}
}

function unLite2(imgDocID, s) {
	if (browserVer == 1) {
		s=document.images[imgDocID].src;
		s=s.replace("O.gif", ".gif");
		s=s.replace("O.jpg", ".jpg");
		document.images[imgDocID].src=s;
	}
}

function SetImg(imgDocID, s) {
	if (browserVer == 1) {
		document.images[imgDocID].src=s;
	}
}

function trim(str) {
	return str.replace(/^\s*|\s*$/g,"");
}

function HelpSay(theTxt) {
	var s;
	s=theTxt;
	if (s=='')
		s='&nbsp;';
	document.all.rdzHelp.innerHTML = s;
}

function checkUncheckAll(theElement) {
//<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
	//documentation for this script at http://www.shawnolson.net/a/693/
  var theForm = theElement.form, z = 0;
  while (theForm[z].type == 'checkbox' && theForm[z].name != 'checkall') {
  	theForm[z].checked = theElement.checked;
		z++;
  }
}

function chkSwap(theElement, Tipo) {
//<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
	//documentation for this script at http://www.shawnolson.net/a/693/
  var theForm = theElement.form, z = 0, n;
	while (theForm[z].type == 'checkbox') {
		//if (z>=50)
			//alert("a]" + theForm[z].checked);
		if (Tipo == 'Swap')
			n=!(theForm[z].checked)
		else if (Tipo == 'Off')
			n=false
		else
			n=true;
		theForm[z].checked = n;
		z++;
  }
}

function chkSwap2(theElement, Tipo) {
//<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>
	//documentation for this script at http://www.shawnolson.net/a/693/
  var theForm = document.forms[theElement], z = 0, n;
	while (theForm[z].type == 'checkbox') {
		//if (z>=50)
			//alert("a]" + theForm[z].checked);
		if (Tipo == 'Swap')
			n=!(theForm[z].checked)
		else if (Tipo == 'Off')
			n=false
		else
			n=true;
		theForm[z].checked = n;
		z++;
  }
}