var DivNameG = ''
function updateLicense(ImageID,DivName){
	DivNameG = DivName;
	License = getSelectedRadioValue(document.licenseForm.licenseRadio);
	AJAXGet('/updateLicense.php?ImageID='+ImageID+'&License='+License,handelLis,false)
	
}

function handelLis(sText){
	if(sText != 0){
		values = sText.split("::");
		_("LicenseHref").innerHTML= values[0];
		_("licenseDescDiv").innerHTML= values[1];
		hideDiv1(DivNameG);
	}
	
}
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;
} //

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



