﻿var ActiveWindow = "";
var ActiveThumbnail = "home";


function send_mail(name,domain,subjectText) {
 mailAddr=name + "@" + domain;
 window.location.href = "mailto:" + mailAddr + "?subject=" + subjectText;
}

function show_edelweiss(InhaltThema,ActivePage) {
 if (ActivePage != "") {
	ActiveWindow = ActivePage;
 }
 if ((InhaltThema != "") && (ActiveWindow != "") && (document.images[ActiveWindow]) && (document.images[InhaltThema])) {
   document.images[ActiveWindow].src = "images/edelweiss_symbol.gif";
   document.images[InhaltThema].src = "images/edelweiss_symbol.gif";
 }
}

function show_blank(InhaltThema) {
 if ((InhaltThema != "") && (ActiveWindow != "") && (document.images[ActiveWindow]) && (document.images[InhaltThema])) {
   document.images[InhaltThema].src = "images/green_symbol.gif";
   document.images[ActiveWindow].src = "images/edelweiss_symbol.gif";
 }
}

function reset_thumbnails()
{
	document.images['home'].src = "images/home_passive.jpg";
	document.images['lage'].src = "images/lage_passive.jpg";
	document.images['gasthaus'].src = "images/gasthaus_passive.jpg";
	document.images['alpenkurszentrum'].src = "images/alpenkurszentrum_passive.jpg";
	document.images['seminarhaus'].src = "images/seminarhaus_passive.jpg";
	document.images['erlebnis'].src = "images/erlebnis_passive.jpg";
	document.images['ferien'].src = "images/ferien_passive.jpg";
	document.images['faq'].src = "images/faq_passive.jpg";
	document.images['echo'].src = "images/echo_passive.jpg";
	document.images['kontakt'].src = "images/kontakt_passive.jpg";
}

function open_index(part)
{
	document.getElementById(part+"Open").style.display='block'; 
	document.getElementById(part+"Closed").style.display='none'; 
}

function show_active(thumbnail)
{
	document.images[thumbnail].src = "images/"+thumbnail+"_active.jpg";
}

function show_passive(thumbnail)
{
	var myThumbnail = 'i'+thumbnail.toLowerCase()+'o';
	var positionO = myThumbnail.lastIndexOf('o');
	var myActiveWindow = ActiveWindow.toLowerCase();
	myActiveWindow = 'i'+myActiveWindow.substring(1,positionO)+'o';
	if (myThumbnail != myActiveWindow)
	{
	document.images[thumbnail].src = "images/"+thumbnail+"_passive.jpg";
	}
}


