// Javascript for RPUC site

// Set the heading background colour to be the same as that of the body
// Return true iff successful
function setheadingbg() {
	var heading = document.getElementById("heading");
   if (heading) {
   	heading.style.backgroundColor = 
         getStyle(document.body, "backgroundColor");
      return true;
   }
   return false;
}

// Cross browser function to get (current) style value
function getStyle(el, cssprop){
 if (el.currentStyle) //IE
  return el.currentStyle[cssprop]
 else if (document.defaultView && document.defaultView.getComputedStyle) //Firefox
  return document.defaultView.getComputedStyle(el, "")[cssprop]
 else //try and get inline style
  return el.style[cssprop]
}

