
// ab- und anstellen ------------------------------
function imgon(who){
	document.getElementById(who).style.visibility = "visible";
}
function imgof(who){
	document.getElementById(who).style.visibility = "hidden";
}

/* safemail func */
function safemail(name, domain, display, linkclass) {
	displayed=(display.length)<1 ? name+"@"+domain : display;
	document.write('<a class="'+linkclass+'" href="mailto:' + name + '@' + domain + '">' + displayed + '</a>');
}

function checkMainContent()
{
   nWho = document.getElementById('homeContent2');
   if(nWho != undefined)
   {
       bWidth           = document.body.clientWidth - 700;
       nWho.style.width = bWidth > 300 ? bWidth+"px" : "300px";       
   }
   
   nWho = document.getElementById('content2');
   if(nWho != undefined)
   {
       bWidth           = document.body.clientWidth - 700;
       nWho.style.width = bWidth > 300 ? bWidth+"px" : "300px";       
   }
   
   nWho = document.getElementById('content2b');
   if(nWho != undefined)
   {
       bWidth           = document.body.clientWidth - 535;
       nWho.style.width = bWidth > 465 ? bWidth+"px" : "465px";       
   }
}

function changeBigImg(which, width, height, id)
{
    // altes abwählen
    document.getElementById('imgNentry'+nowBigImg).className = "imgNavEntry";
    
    // neus setzeb
    nowBigImg = id; 
    html      = "<img src='"+which+"' border='0' width='"+width+"' height='"+height+"' alt='"+which+"'>";
    document.getElementById('bigImg').innerHTML              = html;    
    document.getElementById('imgNentry'+nowBigImg).className = "imgNavEntryActiv";
}

function popup(url, w, h, f, x, y){
    if(navigator.userAgent.indexOf("Safari") != -1){
        w = w - 2;
    }
    var day = new Date();
    var id = day.getTime();
    var name = "ilovefu" + id;
    
    if(x == null){
        x = Math.round((screen.availWidth-w)/2);
    }
    if(y == null){
        y = Math.round((screen.availHeight-h)/2);
    }
    var features = "width="+w+",height="+h+",left="+x+",top="+y+",screenX="+x+",screenY="+y+",toolbar=no,location=no,status=no,menubar=no,history=no,titlebar=no,alwaysRaised";

    if(f != null){
        features += "," + f;
    }

    eval("var win"+id+" = window.open('"+url+"', '"+name+"', '"+features+"');");
    eval("win"+id+".moveTo("+x+","+y+");");
    eval("win"+id+".focus();");
}

function open_example_win(url, width, height) {
    popup(url,width,height, 'resizable=yes,scrollbars=yes')
}
