// Javascript functions
function GetProperty(cTagID, cProperty) {
  // Get the property value for cTagID item, if cTagID is a list retrieves first element only
  var aObjects = cTagID.split(",");
  return document.getElementById(aObjects[0])[cProperty];
}

function SetProperty(cTagID, cProperty, cValue) {
  // assign a cValue value to all cTagID list items for the specified cProperty Property. 
  // ie: "Photo1, Photo2, Photo3" same "image.jpg" pic for the "src" property
  var aObjects = cTagID.split(",");
  for (n=0; n < aObjects.length; n++) {
    document.getElementById(aObjects[n])[cProperty] = cValue;
  }
}

function GetStyleProperty(cTagID, cProperty) {
  // Get the style property value for cTagID item, if cTagID is a list retrieves first element only
  var aObjects = cTagID.split(",");
  return document.getElementById(aObjects[0]).style[cProperty];
}

function SetStyleProperty(cTagID, cProperty, cValue) {
  // assign a cValue value to all cTagID list items for the specified cProperty style type Property. 
  // ie: "Photo1, Photo2, Photo3" same "120px" for the "width" style property
  var aObjects = cTagID.split(",");
  for (n=0; n < aObjects.length; n++) {
    document.getElementById(aObjects[n]).style[cProperty] = cValue;
  }
}
