// path to media directory
var imgPath = "/images/"

// configure random image
var theImages = new Array("saz-home-b1-illu.jpg", "saz-home-b3-illu.jpg");
var imgID = "random_image";
var n = theImages.length;

function getRandomImage () {
	this.theImage = imgPath + theImages[Math.floor((Math.random() * n) - 0.00001)];
}

function changeRandomImage () {
	newImage = new getRandomImage ();
	document.getElementById(imgID).src = newImage.theImage;
}

function openBlankWindow (theURL) {
	_blank = window.open (theURL);
}

function collapsLayer (theID) {
	document.getElementById(theID).style.display = "none";
}

function expandLayer (theID) {
	document.getElementById(theID).style.display = "block";
}

function changeImage (theID, imgPath) {
	document.getElementById(theID).src = imgPath;
}

function changeLanguage (lang) {
	var doc = location.pathname;
	location.href = '/'+lang+'/'+doc.slice(4);
}