///////////////
// script.js //
///////////////
//
// PENSION ANGELA Webpage
////////////////////////////////////
// author: Christian Schafleitner
// email: christian@cs1.at
// date: FEB/07/2007
///////
// (c) 2007 Christian Schafleitner
// All Rights reserved.
//////////////////////////////////////

function mainNav_MouseOver(buttonName) {
	button = document.getElementById(buttonName);
	buttonText = document.getElementById(buttonName + "Text");
	button.src = "/images/navigation/button.hi.png";
	buttonFile = buttonText.src;
	buttonNewFile = buttonFile.substring(0, buttonFile.length-3) + "hi." + buttonFile.substring(buttonFile.length-3);
	buttonText.src = buttonNewFile;
}

function mainNav_MouseOut(buttonName) {
	button = document.getElementById(buttonName);
	buttonText = document.getElementById(buttonName + "Text");
	button.src = "/images/navigation/button.png";
	buttonFile = buttonText.src;
	buttonNewFile = buttonFile.substring(0, buttonFile.length-6) + buttonFile.substring(buttonFile.length-3);
	buttonText.src = buttonNewFile;
}

function subNav_mouseOver(nr) {
	try {
		document.getElementById("subnavigation_overlay").src = '/images/subnavigation/frame_'+nr+'.png';
	} catch (e) { }
	try {
		document.getElementById("subnavAltText1").style.color = "#000000";
		document.getElementById("subnavAltText1").style.fontWeight = "normal";
	} catch (e) { }
	try {
		document.getElementById("subnavAltText2").style.color = "#000000";
		document.getElementById("subnavAltText2").style.fontWeight = "normal";
	} catch (e) { }
	try {
		document.getElementById("subnavAltText3").style.color = "#000000";
		document.getElementById("subnavAltText3").style.fontWeight = "normal";
	} catch (e) { }
	try {
		document.getElementById("subnavAltText4").style.color = "#000000";
		document.getElementById("subnavAltText4").style.fontWeight = "normal";
	} catch (e) {}
	if (nr > 0) {
		try {
			document.getElementById("subnavAltText"+nr).style.color = "#7f000c";
			document.getElementById("subnavAltText"+nr).style.fontWeight = "bold";
		} catch (e) {}
	}
}
	
function preloadImages() {

	sn_frame1= new Image()
	sn_frame1.src = "/images/subnavigation/frame_1.png";
	
	sn_frame2 = new Image()
	sn_frame2.src = "/images/subnavigation/frame_2.png";
	
	sn_frame3 = new Image()
	sn_frame3.src = "/images/subnavigation/frame_2.png";
	
	sn_frame4 = new Image()
	sn_frame4.src = "/images/subnavigation/frame_2.png";
	
}



