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 "";
}

document.createNamedElement = function(type, name) {
  var element;
  try {
    element = document.createElement('<'+type+' name="'+name+'">');
  } catch (e) { }
  if (!element || !element.name) { // Not in IE, then
    element = document.createElement(type)
    element.name = name;
  }
  return element;
}

function confirmLink(confirmMsg)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg);

    return is_confirmed;
}

function showhide( whichLayer ){  var elem, vis;  if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work     
elem = document.all[whichLayer]; 
else if( document.layers ) // this is the way nn4 works  
elem = document.layers[whichLayer];  vis = elem.style;  // if the style.display value is blank we try to figure it out here  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined) 
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; 
vis.display = (vis.display==''||vis.display=='block')?'none':'block';}