var isopen=false;

// Fenster schliessen
function winClose(winname)
{
	winname.close();
}

// Fenster oeffnen
function winOpen(url,windowname,breite,hoehe,scroll,resize,tool,status,menu)
{
	if( (isopen) && (!popUp.closed) )
	{
		winClose(popUp);
	}
	popUp = window.open(url,windowname,"width="+breite+",height="+hoehe+",screenX=40,screenY=20,scrollbars="+scroll+",resizeable="+resize+",toolbar="+tool+",statusbar="+status+",menubar="+menu+"");
	isopen=true;
}

// Sprachauswahl
function wechsel(sprache)
{
	this.location.href = "/"+sprache;
}

//Segmentauswahl
function gotoURL(url)
{
        this.location.href = url;
}


function raw_popup(u, target, features) {
    if (!features) features = '';
    if (!target) target   = '_blank';
    theWindow = window.open(u, target, features);
    theWindow.focus();
    return theWindow;
}

function link_popup(src, features) {
    return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features);
}

function event_popup(e) {
    link_popup(e.currentTarget);
    e.preventDefault();
}
function picture_popup(url) {
	if(document.getElementById)
	{
		w=window.open('about:blank','picpop','location=0,statusbar=0,menubar=0');
		w.focus();
		d=w.document;
		b=d.body;
		b.className="imagepopup";
		
		h=d.getElementsByTagName('HEAD')[0];
		l=d.createElement('LINK');
		l.type="text/css";
		l.rel='stylesheet';
		l.href='/css/kaldewei.css';
		h.appendChild(l);
		
		i=d.createElement('IMG');
		i.src=url;
		b.appendChild(i);
		
		i.window=w;
		i.onclick=function(){this.window.close();}
		i.onload=function()
		{
			this.window.resizeTo(this.width,this.height);
		}
	}
	return false;
}

function show () 
{
	if (document.getElementById)
        	  document.getElementById("denny").style.visibility = "visible";
}

function hide ()
{
        if (document.getElementById)
                  document.getElementById("denny").style.visibility = "hidden";
}

function hide_select(value)
{
	if(value != 'de')
        {
        	document.getElementById('umkreisfeld').style.visibility='hidden';
        }
        else
        {
                document.getElementById('umkreisfeld').style.visibility='visible';
        }
}

function hide_select1(value)
{
        if(value != 'de')
        {
                document.getElementById('umkreisfeld1').style.visibility='hidden';
        }
        else
        {
                document.getElementById('umkreisfeld1').style.visibility='visible';
        }
}


window.onload = function(e){
	if(!e)	{ var e = window.event;}
	

	var as = document.getElementsByTagName('A');
	var asl  = as.length;
	for( var i = 0; i < asl; i ++ ){
		var a = as[i]	;
		if( a.className.indexOf('award_pop') > -1 ){
				a.style.cursor = 'default';
			a.onmouseover = function(e){
				this.className += ' hover';
			}
			a.onmouseout = function(e){
				this.className = this.className.split(' hover').join('');
			}
			a.onclick = function(e){
				if(!e) var e = window.event;
				if(e.stopPropagation) e.stopPropagation();
				if(e.preventDefault) e.preventDefault();
				if(e.returnValue) e.returnValue = false;
				return false;
			}
		}
	}
	
	
}