
function changeLanguage(lang){
	var newURL="";
	if(lang=="deu"){
		if(window.location.href.indexOf("default.aspx") >-1){
			newURL=document.URL.replace("/fra/", "/deu/");
			newURL=newURL.substring(0, newURL.indexOf("?"));
			window.location.href=newURL;
		}
		else{
			window.location.href=document.URL.replace("/fra/", "/deu/");
		}
	}
	else{
		if(window.location.href.indexOf("default.aspx") >-1){
			newURL=document.URL.replace("/deu/", "/fra/");
			newURL=newURL.substring(0, newURL.indexOf("?"));
			window.location.href=newURL;
		}
		else{
			window.location.href=document.URL.replace("/deu/", "/fra/");
		}
	}
}

var last
last=""

    	function show(objName) {
    		if (document.getElementById(objName).style.display == "none") {
    			if (last != "") {
    			document.getElementById(last).style.display = "none"
    			}
    			document.getElementById(objName).style.display = "block"
    			last = objName
    		}
    		else {
    		document.getElementById(objName).style.display = "none"
    		last = ""
    		}
    	}

// Part imgPupUp


function showImgPupUp(object,imageSrc)
{

	var pupUpImage = new Image();

	document.PopImage.src="../img/loading.gif";

	pupUpImage.onload = function(){
		document.PopImage.src = pupUpImage.src;
		var top =  (insyma.window.getScrollTop() + parseInt((insyma.window.getInnerHeight() - pupUpImage.height) / 2))
		top  = (top > 0) ? top : 0
		var left = (parseInt((insyma.window.getInnerWidth() - pupUpImage.width) / 2))
		left = (left > 0) ? left : 0
		document.getElementById(object).style.top = top + 'px';
		document.getElementById(object).style.left = left + 'px';
		document.getElementById(object).style.display = 'block';
	}

	pupUpImage.src = imageSrc;


}

function ClosePupUp(object)
{
	document.getElementById(object).style.display = 'none';
}

// Inhalt ausklappen (ausgeklappter Inhalt automatisch einklappen)
var sublast = ""
function displaySubDiv(objName)
{
	if (document.getElementById)
	{
		if (document.getElementById(objName).style.display == 'none')
		{
			if (sublast != "")
			{
				document.getElementById(sublast).style.display = 'none';
			}
			document.getElementById(objName).style.display = 'block';
			sublast = objName;
		}
		else
		{
			document.getElementById(objName).style.display = 'none';
			sublast = "";
		}
	}
}

function UnCryptMailto( s )
    {
        var n = 0;
        var r = "";
        for( var i = 0; i < s.length; i++)
        {
            n = s.charCodeAt( i );
            if( n >= 8364 )
            {
                n = 128;
            }
            r += String.fromCharCode( n - 1 );
        }
        return r;
    }

    function linkTo_UnCryptMailto( s )
    {
        location.href=UnCryptMailto( s );
    }