
function loadStuff()
{
 if(functionExists("animateBackground"))
  animateBackground();
 if(functionExists("animateIndexes"))
  animateIndexes();
 if(functionExists("animateNavigation"))
  animateNavigation();
 if(functionExists("animateQuicklinks"))
  animateQuicklinks();
 if(functionExists("animateHoverElements"))
  animateHoverElements();
 if(functionExists("animateTooltips"))
  animateTooltips();
 if(functionExists("fadeInPicture"))
  fadeInPicture();
 if(functionExists("animateSearch"))
  animateSearch();
 if(functionExists("animateDownloads"))
  animateDownloads();
 if(functionExists("animateGraphs"))
  animateGraphs();
 if(functionExists("animateSwitchboxes"))
  animateSwitchboxes();
 if(functionExists("animateTV"))
  animateTV();

 convLinks();

 return true;
}

function functionExists(name)
{
 if(typeof(name)=="string"&&eval("typeof("+name+")")=="function")
  return true;

 return false;
}

function convLinks()
{
 links=document.getElementsByTagName("a");
 for(c=0;c<links.length;c++)
 {
  email=links[c].href.split(":");
  if(email[0]=="mailto"&&email[1].match(/^[0-F]+$/i))
  {
   realmail="";
   email=email[1];
   for(x=0;x<email.length;x+=2)
   {
    temp=email.substr(x, 2);
    temp=parseInt(temp,16)
    realmail+=String.fromCharCode(temp);
   }

   links[c].href="mailto:"+realmail;
  }
 }
}

var alreadyrunflag=0 //flag to indicate whether target function has already been run

if(/Safari/i.test(navigator.userAgent)){ //Test for Safari
  var _timer=setInterval(function(){
  if(/loaded|complete/.test(document.readyState)){
    clearInterval(_timer)
    alreadyrunflag=1; 
    loadStuff() // call target function
  }}, 10)
}
else if (document.addEventListener)
  document.addEventListener("DOMContentLoaded", function(){alreadyrunflag=1; loadStuff()}, false)
else if (document.all && !window.opera){
  document.write('<script type="text/javascript" id="contentloadtag" defer="defer" src="javascript:void(0)"><\/script>')
  var contentloadtag=document.getElementById("contentloadtag")
  contentloadtag.onreadystatechange=function(){
    if (this.readyState=="complete"){
      alreadyrunflag=1
      loadStuff()
    }
  }
}

window.onload=function(){
  setTimeout("if (!alreadyrunflag) loadStuff()", 0)
}

/*
if(version=navigator.userAgent.match(/Opera\/(\d+\.\d+)/))
{
 document.onload=loadStuff;
}
else if(version=navigator.userAgent.match(/Firefox\/(\d+\.\d+)/))
{
 window.onload=loadStuff;
}
else if(version=navigator.userAgent.match(/SeaMonkey\/(\d+\.\d+)/))
{
 window.onload=loadStuff;
}
else if(version=navigator.userAgent.match(/MSIE (\d+\.\d+)/))
{
 window.attachEvent("onload", loadStuff);
}
else if(version=navigator.userAgent.match(/(\d+\.\d+)\.\d+ Safari/))
{
 window.onload=loadStuff;
}
*/
