﻿window.onload = function start() {
    externalLinks();
    showImage();
}

function externalLinks() {
    if (!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
    }
} 



function showImage(){
    
    if (document.getElementById('header')) {
    var cssClass = new Array();
    cssClass[0] = 'header1';
    cssClass[1] = 'header2';
    
    var introTitle = new Array();
    introTitle[0] = 'Louis Golay International SA';
    introTitle[1] = 'Louis Golay International SA';
    
    var introDescription = new Array();
    introDescription[0] = 'Corporate identity & Website design and development';
    introDescription[1] = 'Corporate identity & Website design and development';
    
    var position = Math.round(Math.random()*(cssClass.length-1));
    document.getElementById('header').className = cssClass[position];
    document.getElementById('title').innerHTML = introTitle[position];
    document.getElementById('description').innerHTML = introDescription[position];
    }
}
function changeImg(e,l) {
	e.src = l;
}
    