// ##################################################################################
// encrypt electronic message address
// different functions for different styles, copy and add style class to the a-tag.
// ##################################################################################
// normal content
function letter(t1, n1, d1, t2) {
	var adi = "";
	if(t2 == "same") {
		adi = "<a class='normlink' href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;"+n1+"&#64;"+d1+"&#46;"+t1+"' title='&#69;&#109;&#97;&#105;&#108;&#32;&#97;&#110;&#32;"+n1+"&#64;"+d1+"&#46;"+t1+"'>"+n1+"&#64;"+d1+"&#46;"+t1+"</a>";
	} else {
		adi = "<a class='normlink' href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;"+n1+"&#64;"+d1+"&#46;"+t1+"' title='&#69;&#109;&#97;&#105;&#108;&#32;&#97;&#110;&#32;"+t2+"'>"+t2+"</a>";
	}
	document.write(adi);
}

// with "Email: " 
function letter2(t1, n1, d1, t2) {
	var adi = "";
	if(t2 == "same") {
		adi = "&#69;&#109;&#97;&#105;&#108;&#58;&#32;<a class='normlink' href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;"+n1+"&#64;"+d1+"&#46;"+t1+"' title='&#69;&#45;&#77;&#97;&#105;&#108;&#32;&#97;&#110;"+n1+"&#64;"+d1+"&#46;"+t1+"'>"+n1+"&#64;"+d1+"&#46;"+t1+"</a>";
	} else {
		adi = "&#69;&#109;&#97;&#105;&#108;&#58;&#32;<a class='normlink' href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;"+n1+"&#64;"+d1+"&#46;"+t1+"' title='&#69;&#45;&#77;&#97;&#105;&#108;&#32;&#97;&#110;"+t2+"'>"+t2+"</a>";
	}
	document.write(adi);
}

// ##################################################################################
// target for links
// ##################################################################################
function blankWindow(obj) {
	obj.target = '_blank';
}
	
function sameWindow(obj) {
	obj.target = '_top';
}

// ##################################################################################
// mouseover navigation
// ##################################################################################
function switchbtn(id, button) {
	document.getElementById(id).src="images/main/" + button + ".gif";
}

// ##################################################################################
// show/hide
// ##################################################################################
function ShowHide(id) {
    var obj = document.getElementsByTagName("div");
    if (obj[id].style.visibility == 'visible'){
    	obj[id].style.visibility = 'hidden';
    }
    else {
    	obj[id].style.visibility = 'visible';
    }
}

// ##################################################################################
// window popup
// ##################################################################################
function fenster(xfilename, xtitle, xwidth, xheight) {
	var win = window.open(xfilename, xtitle,"width="+xwidth+",height="+xheight+",resizable=no,menubar=no,hotkeys=no,scrollbars=no,screenX=1,screenY=1");
}
