// JavaScript Document

startListTop = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("topRun");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}


startListBottom = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("bottomRun");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}

function toggleRadio(thisField,thisValue) {
	radioSet = eval("document.myForm."+thisField)

	for (i=0;i<radioSet.length;i++) {
		if (radioSet[i].value == thisValue)
			radioSet[i].checked = true
	}
}


selectRow = function(obj) {
navRoot = obj.parentNode;
for (i=0; i<navRoot.childNodes.length; i++) {
	node = navRoot.childNodes[i];
	if (node.className=='reportOddRowSelected') {
		node.className='reportOddRow';
	} else if (node.className=='reportEvenRowSelected') {
		node.className='reportEvenRow';
	}
}
if (obj.className=='reportOddRow') {
	obj.className='reportOddRowSelected';
} else if (obj.className=='reportEvenRow') {
	obj.className='reportEvenRowSelected';
}
tag = obj.childNodes[1].firstChild.tagName;
if (tag=='INPUT') {
	obj.childNodes[1].firstChild.checked=true;
} else {
	obj.childNodes[3].firstChild.checked=true; //workaround for Firefox DOM problem
}
}

selectCheckedRow = function(tableId) {
startTable = document.getElementById(tableId);
if (startTable.firstChild.tagName=='THEAD') {
	navRoot = startTable.firstChild.nextSibling;
} else {
	navRoot = startTable.childNodes[1].nextSibling.nextSibling;
}
for (i=0; i<navRoot.childNodes.length; i++) {
	node = navRoot.childNodes[i];
	if (node.className=='reportOddRow') {
		tag = node.childNodes[1].firstChild.tagName;
		if (tag=='INPUT') {
			if (node.childNodes[1].firstChild.checked) {
				node.className='reportOddRowSelected';
			}
		} else {
			if (node.childNodes[3].firstChild.checked) { //workaround for Firefox DOM problem
				node.className='reportOddRowSelected';		
			}
		}
	} else if (node.className=='reportEvenRow') {
		tag = node.childNodes[1].firstChild.tagName;
		if (tag=='INPUT') {
			if (node.childNodes[1].firstChild.checked) {
				node.className='reportEvenRowSelected';
			}
		} else {
			if (node.childNodes[3].firstChild.checked) { //workaround for Firefox DOM problem
				node.className='reportEvenRowSelected';		
			}
		}
	}
}
}

fixLibraryHeader = function(id) {
table = document.getElementById(id);
if(table != null)
{

	nodes = table.getElementsByTagName('th');
	if(nodes == null)
	{
		firefox = false;
		nodes = table.getElementsByTagName('TH');
	}
	else
	{
		firefox = false;
	}

	if (!firefox) {
		leftHeadingNoPad = nodes.item(1);
		leftHeadingNoPad.className='thReportHeaderL';

		rightHeading = nodes.item(2);
		rightHeading.className='thReportHeaderR';
	} else {
		leftHeadingNoPad = nodes.item(2);
		leftHeadingNoPad.className='thReportHeaderL';

		rightHeading = nodes.item(4);
		rightHeading.className='thReportHeaderR';
	}
}
}

fixPermissionsHeader = function(id) {
table = document.getElementById(id);
if(table != null)
{

	nodes = table.getElementsByTagName('th');
	if(nodes == null)
	{
		firefox = false;
		nodes = table.getElementsByTagName('TH');
	}
	else
	{
		firefox = false;
	}

	if (!firefox) {
		leftHeadingNoPad = nodes.item(0);
		leftHeadingNoPad.className='permissionsHeaderL';
	} else {
		leftHeadingNoPad = nodes.item(2);
		leftHeadingNoPad.className='permissionsHeaderL';
	}
}
}

