// Leonard den Ottolander, 2004-2006
//
// Script is hereby placed in the public domain

IE = (document.all);
NS4 = (document.layers);

image = "images/Vercors.jpg";
imageWidth= 1280;
imageHeigth = 960;


function setResize() {
    setTimeout("window.onresize=DoResize;", 500);
}

function DoResize() {
    if (NS4)
	window.location.reload();
    else // firefox
	window.location.href = window.location.href;
}


function DoResizeIE() {
    background.width = document.body.clientWidth;
    background.height = background.width * imageHeigth / imageWidth;
}

if (!IE) window.onload = setResize;
if (IE) window.onresize = DoResizeIE;

function MakeBackground() {
    winWidth = ((IE) ? document.body.clientWidth : innerWidth);
    winHeight = ((IE) ? document.body.clientHeight : innerHeight);
    ImageString = "<div id=IDBackground style=\"position:absolute;right:0;top:0;z-index:";
    NS4 ? ImageString += "-1" : ImageString += "0";
    ImageString += "\"><a href=\"main.php\" title=\"Enter site\"><img name=\"background\" border=0 src=\"" + image + '" width=' +
	winWidth + ' height=' + winWidth * imageHeigth / imageWidth + '></a></div>'
    document.write(ImageString);
}
