// JavaScript Document

var imgNames = new Array(	'medizinrecht',
													'wirtschaftsrecht',
													'krankenhausrecht-chefarztrecht',
													'apothekenrecht');

var imgList = new Array(imgNames.length);
var imgPath = 'images/';
var imgType = '.jpg';
var overSuffix = '_over';


function preloadImages() {
	for (var i=0; i < imgNames.length; i++) {
		imgList[i*2] = new Image;
		imgList[i*2].src = imgPath + imgNames[i] + imgType;
		
		// create Image fpr mouseover event
		
		imgList[i*2+1] = new Image;
		imgList[i*2+1].src = imgPath + imgNames[i] + overSuffix + imgType;
		
	}
}

function roll(id, img) {
	var hnd = document.getElementById(id);
	hnd.src = imgList[img].src
}

function rollToolBar(id, img, text) {
	var hnd = document.getElementById(id);
	hnd.src = imgList[img].src
	document.getElementById('bottom_text').firstChild.nodeValue = text;
}

function mailTo(addString)	{
		
		addString = addString.replace("((at))", "@");
		addString = addString.replace("((dot))", ".");
		
		window.location.href = "mailto:" + addString;
}

preloadImages();

imgList[8] = new Image;
imgList[8].src = 'images/pfeil_links.gif';
imgList[9] = new Image;
imgList[9].src = 'images/pfeil_links_over.gif';
imgList[10] = new Image;
imgList[10].src = 'images/drucker.gif';
imgList[11] = new Image;
imgList[11].src = 'images/drucker_over.gif';