
function getSelectedRadioValue(buttonGroup) {
   // returns the value of the selected radio button or "" if no button is selected
   var i = getSelectedRadio(buttonGroup);
   if (i == -1) {
      return "";
   } else {
      if (buttonGroup[i]) { // Make sure the button group is an array (not just one button)
         return buttonGroup[i].value;
      } else { // The button group is just the one button, and it is checked
         return buttonGroup.value;
      }
   }
} // Ends the "getSelectedRadioValue" function

function getSelectedRadio(buttonGroup) {
   // returns the array number of the selected radio button or -1 if no button is selected
   if (buttonGroup[0]) { // if the button group is an array (one button is not an array)
      for (var i=0; i<buttonGroup.length; i++) {
         if (buttonGroup[i].checked) {
            return i
         }
      }
   } else {
      if (buttonGroup.checked) { return 0; } // if the one button is checked, return zero
   }
   // if we get to this point, no radio button is selected
   return -1;
} // Ends the "getSelectedRadio" function
	
	
function di(id,name){
  if (document.images) {document.images[id].src=eval(name+".src"); }
}

function dm(msgStr) {
  document.returnValue = false;
  if (document.images) { 
     window.status = msgStr;
     document.returnValue = true;
  }
}
var showMsg = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)";
function dmim(msgStr) {
  document.returnValue = false;
  if (showMsg) { 
    window.status = msgStr;
    document.returnValue = true;
  }
}


browser_version = parseInt(navigator.appVersion);
browser_type = navigator.appName;
browser_agent = navigator.userAgent;
if (browser_type == "Netscape" && (browser_version >= 4)) {

	if (browser_agent.indexOf("6.0") >= 0) {	
		// Netscape 6
		document.write("<link rel='stylesheet' href='css/styles_net6.css' type='text/css'>");
	} else if (browser_agent.indexOf("4.7") >= 0) {	
		// Netscape 4.7
		document.write("<link rel='stylesheet' href='css/styles_net4.css' type='text/css'>");
	} else {
		// Other version
		document.write("<link rel='stylesheet' href='css/styles_net.css' type='text/css'>");
	}
	
}


var active = false;
function showLanguage() {
	
	if (active) {
		active=false;
		hideNow();
		
	} else {
		active = true;
		languageDiv.style.visibility='visible';
	}
	
}

function hideLanguage() {
	setTimeout("hideNow()",300);
	active=false;
}

function hideNow() {
	if (!active) {
		languageDiv.style.visibility='hidden';
	}	
}

function goToURL() {
	var selectedIndex = document.search.language.selectedIndex;
	var theURL = document.search.language[selectedIndex].value;
	location.href=theURL;
}

function openWindow(theWidth, theHeight, theURL) {
	  winSettings ='toolbar=no,location=no,directories=no,resizable=yes,width='+theWidth+',height='+theHeight+',left=10,top=25';
	  floater = window.open(theURL,"",winSettings);
	  
}



function popUp(URL) {
		day = new Date();
		id = day.getTime();
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=400,left = 50,top = 50');");
		}
