<!-- 
var ns4=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);

function hidediv(groupid)
{
    if(!ns4 && !ie && !w3) return;
    if(ie) thisgroup=eval('document.all.' + groupid + '.style');
    else if(ns4) thisgroup=eval('document.layers["' + groupid +'"]');
    else if(w3) thisgroup=eval('document.getElementById("' + groupid + '").style');
		thisgroup.display ="none";
}

function showdiv(groupid){
    if(!ns4 && !ie && !w3) return;
    if(ie) thisgroup=eval('document.all.' + groupid + '.style');
    else if(ns4) thisgroup=eval('document.layers["' + groupid +'"]');
    else if(w3) thisgroup=eval('document.getElementById("' + groupid + '").style');
    thisgroup.display=""; 
}

function showhide(groupid){
    if(!ns4 && !ie && !w3) return;
    if(ie) thisgroup=eval('document.all.' + groupid + '.style');
    else if(ns4) thisgroup=eval('document.layers["' + groupid +'"]');
    else if(w3) thisgroup=eval('document.getElementById("' + groupid + '").style');
    if (thisgroup.display == "none")
        thisgroup.display=""; 
    else
        thisgroup.display ="none"; 
}

function changeClass(groupid,dState){
    document.getElementById(groupid).className = dState;
}

var newWindow;
function popup(URL,width,height) 
{
	if(!newWindow || newWindow.closed )
	{
      newWindow = window.open(URL, 
                        'script','toolbar=0,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=yes,dependent=yes,width='+width+',height='+height+',left=60,top=60');
      newWindow.focus();
	}
	else
	{
      newWindow.resizeTo(width+12,height+30);
      newWindow.focus();
	}
}

function externalLinks() { 

 if (!document.getElementsByTagName) return; 

 var anchors = document.getElementsByTagName("a"); 

 for (var i=0; i<anchors.length; i++) { 

   var anchor = anchors[i]; 

   if (anchor.getAttribute("href") && 

       anchor.getAttribute("rel") == "external") 

     anchor.target = "_blank"; 

 } 

} 

// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

// set the radio button with the given value as being checked
// do nothing if there are no radio buttons
// if the given value does not exist, all the radio buttons
// are reset to unchecked
function setCheckedValue(radioObj, newValue) 
{
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}

function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}


// -->