
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function repH() {
	if(document.getElementById("rightcol")) {
		var rightcol = document.getElementById("rightcol");
		var aitems = rightcol.getElementsByTagName("a");
		for(var i = 0; i < aitems.length; i++){
			aitems[i].innerHTML = aitems[i].innerHTML.replace("-", "<br />-");
		}
	}
}

addLoadEvent(repH);

// Move news img to pageimg div
function moveNewsImg() {

if (!document.getElementsByTagName) return false;
if (!document.getElementById) return false;
if (!document.getElementById("news_img_to_move")) return false;
if (!document.getElementById("pageimg")) return false;

var newsimgdiv = document.getElementById("news_img_to_move");
var newsimg = newsimgdiv.getElementsByTagName("img");
var splashimg = document.getElementById("pageimg");
var src = newsimg[0].getAttribute("src");

if (newsimg.length == 0) return false;

newsimgdiv.innerHTML = "";
splashimg.innerHTML = "<img src=\""+src+"\" alt=\"Nyheds billede\" />";

}

addLoadEvent(moveNewsImg);