/*
javascripts
*/
function showBig(img, legendentext)
{
	bild = document.getElementById('grossesbild');
	bild.src = img;
	legende = document.getElementById('anzeigelegende');
	legende.innerHTML = '<span>'+legendentext+'</span>';
}

function doMail(m)
{
	e = str_replace(' [at] ', '@', m);
	e = str_replace(' [dot] ', '.', e);
	
	document.location.href='mailto:'+e;
}

function str_replace(search, replace, subject) {
	return subject.split(search).join(replace);
}

function trim(s)
{
    while (s.substring(0,1) == ' ')
    {
        s = s.substring(1,s.length);
    }
    while (s.substring(s.length-1,s.length) == ' ') {
        s = s.substring(0,s.length-1);
    }
    return s;
}

/*
erstellt ein requestobjekt
für ajax
*/

function makeRequest()
{
    /*
    try
    {
        request = new XMLHttpRequest();
    }
    catch(e)
    {
        request = false;
    }
    */
    
    /* Ein neues XMLHttpRequest Objekt erstellen, um mit dem Webserver zu sprechen */
    var xmlHttp = false;
    /*@cc_on @*/
    /*@if (@_jscript_version >= 5)
    try {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
        xmlHttp = false;
      }
    }
    @end @*/

    if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
        xmlHttp = new XMLHttpRequest();
    }

    
    
    return xmlHttp;
}
