// JavaScript Document
// Author: Christian Premm
// Date: 20.02.2010

// put following code below the body tag: <div id="splashcontainer"><div id="splash" style="display:none;" onClick="hidesplash()"></div></div>

var top = "20px";	// distance to the top of the window in pixel
var left = "auto";		// distance to the left of the window in pixel or "auto" for center
var image = "http://teamaxess.com/images/Alpitec_badge.jpg";	// source of the image
var imagewidth = "956px";	// width of the image in px, only required if "auto" mode is used  
var imglink = "";	// link opened in a new window if clicking on the image, use empty string "" if no link is required
var closebtn = '<div style="margin-top:-7px; margin-right:-7px; padding-bottom: 5px; font-weight:bold;"><span style="cursor:pointer;">Close X</span></div>';	// style an behaviour of the close button


var splash;
window.onload = showsplash;

function showsplash() {
	splash = document.getElementById("splash");
	var splashcontainer = document.getElementById("splashcontainer");
	if (left == "auto") {
		splashcontainer.style.width = "100%";
		splash.style.width = imagewidth;
		splashcontainer.style.textAlign = "center";		// required for internet explorer
	}
	else {
		splashcontainer.style.marginLeft = left;
	}
	splashcontainer.style.marginTop = top;
	// all style informations could also be set into the html code except display = "block";
	splashcontainer.style.position = "absolute";
	splash.style.margin = "auto";
	splash.style.padding = "10px";
	splash.style.border = "1px solid black";
	splash.style.background = "white";
	splash.style.textAlign = "right";
	if (imglink == "") {
		splash.innerHTML = closebtn + '<img src="' + image + '">';	
	}
	else {
		splash.innerHTML = closebtn + '<a href="' + imglink + '" target="blank" onclick="hidesplash();"><img src="' + image + '"></a>';
	}
	splash.style.display = "block";
}

function hidesplash() {
	splash.style.display = "none";
}