window.onload = addFormEvent;

function addFormEvent(func) {
  if (!document.getElementById | !document.getElementsByTagName) return
  var oldonload=window.onload
  if (typeof window.onload != 'function') { window.onload=func }
  else {
    window.onload=function() { oldonload(); func() }
  }
}

function replaceContent(id,content){
  document.getElementById(id).innerHTML = content
}


function replaceLink1(){
 if (document.getElementById) replaceContent('email'  , ' Send an e-mail to: <a href="mailto:email@bada-uk.org">email@bada-uk.org</a>') 
}

function replaceLink2(){ 
 if (document.getElementById) replaceContent('cform'  , 'Send a message using our <a href="f42442.php">contact form</a>')
} 

function replaceLink3(){ 
 if (document.getElementById) replaceContent('swap3'  , ' <a  href="3js.html">JavaScript link 3</a>')
} 

function replaceLink4(){ 
 if (document.getElementById) replaceContent('swap4'  , ' <a href="4js.html">JavaScript link 4</a>')
}
addFormEvent(replaceLink1)
addFormEvent(replaceLink2)
addFormEvent(replaceLink3)
addFormEvent(replaceLink4)