//DEUTSCHLANDKARTE
function karte(gif) {
document.getElementById('karte').src='grafik/d'+gif+'.gif';
}
function bgr(num) {
document.getElementById('bl'+num).style.background='#ffa200';
document.getElementById('karte').src='grafik/d'+num+'.gif';
}

function bgr2(num){
	document.getElementById('bl'+num).style.background='#fffbeb';
	document.getElementById('karte').src='grafik/d0.gif';

}

//Startseiten Bildblende
var aktiv = window.setInterval("slideshow()", 30);
var duration=550,anz=4, steps=2,nr= anz,i = duration;
function opacity(el,alpha) {
   ById(el).style.opacity    = alpha/100; 
   ById(el).style.MozOpacity = alpha/100;
   ById(el).style.filter='alpha(opacity=  '+alpha+')';
}
function ById(el) { return document.getElementById(el); }
function slideshow() {
 i=i-steps;
 if (i < 0) {
   ById('pic'+nr).style.zIndex =  ById('pic'+nr).style.zIndex-(anz-1);
   opacity('pic'+nr,100);  
   i=duration;
   nr = (nr==1?anz:nr-1);
  }
  else if(i<=100)  opacity('pic'+nr,i);
}

//ORTSSUCHE
function sendit2(senden) {
 var name = navigator.appName;
 if (senden==1) document.ortsuche.page.value='search';
 page = document.ortsuche.page.value;
 land2 = document.ortsuche.land2.value;
 ort = document.ortsuche.ort.value;
 if (name == "Microsoft Internet Explorer"){
 url='index.php?land2='+land2+'&ort='+ort;
 window.location.href= url;
 this.navigate(url);
 }
 else { document.ortsuche.action='index.php?land2='+land2+'&ort='+ort; document.ortsuche.submit(); }
}
function sendort(senden) {
  var name = navigator.appName;
  if (senden==1) document.ortsuche.page.value='search';
  page = document.ortsuche.page.value;
  land2 = document.ortsuche.land2.value;
  ort = document.ortsuche.ort.value;
  if (ort != "0"){  
 if (name == "Microsoft Internet Explorer"){
 url='index.php?page=search&start=0&anzeige=10&ort='+ort;
 window.location.href= url;
 this.navigate(url); }
 else { document.ortsuche.action='index.php?page=search&start=0&anzeige=10&ort='+ort; document.ortsuche.submit(); }
  }
}

//REGIONSUCHE
function sendit(senden) {
 var name = navigator.appName;
 if (senden==1) document.regionsuche.page.value='search';
 page = document.regionsuche.page.value;
 land1 = document.regionsuche.land1.value;
 region = document.regionsuche.region.value;
 if (name == "Microsoft Internet Explorer"){
 url='index.php?land1='+land1+'&region='+region;
 window.location.href= url;
 this.navigate(url);
 }
 else { document.regionsuche.action='index.php?land1='+land1+'&region='+region; document.regionsuche.submit(); }
}
function sendregion(senden) {
  var name = navigator.appName;
  if (senden==1) document.regionsuche.page.value='search';
  page = document.regionsuche.page.value;
  land1 = document.regionsuche.land1.value;
  region = document.regionsuche.region.value;
  if (region != "0"){ 
 if (name == "Microsoft Internet Explorer"){
 url='fewo_region_0_'+land1+'_'+region+'.htm';
 window.location.href= url;
 this.navigate(url); }
 else { document.regionsuche.action='fewo_region_0_'+land1+'_'+region+'.htm'; document.regionsuche.submit(); }
  }
}


var i4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var n6=document.getElementById&&!document.all
var n4=document.layers
function showm(e){
if (!document.all&&!document.getElementById&&!document.layers)
return
chm()
mo=i4? document.all.popm : n6? document.getElementById("popm") : n4? document.popm : ""
mo.ts=(i4||n6)? mo.style : mo
mo.contentwidth=(i4||n6)? mo.offsetWidth : mo.document.gui.document.width
mo.contentheight=(i4||n6)? mo.offsetHeight : mo.document.gui.document.height
eX=i4? event.clientX : n6? e.clientX : e.x
eY=i4? event.clientY : n6? e.clientY : e.y
var rightedge=i4? document.body.clientWidth-eX : window.innerWidth-eX
var bottomedge=i4? document.body.clientHeight-eY : window.innerHeight-eY
if (rightedge<mo.contentwidth)
mo.ts.left=i4? document.body.scrollLeft+eX-mo.contentwidth : n6? window.pageXOffset+eX-mo.contentwidth : eX-mo.contentwidth
else
mo.ts.left=i4? document.body.scrollLeft+eX : n6? window.pageXOffset+eX : eX
if (bottomedge<mo.contentheight)
mo.ts.top=i4? document.body.scrollTop+eY-mo.contentheight : n6? window.pageYOffset+eY-mo.contentheight : eY-mo.contentheight
else
mo.ts.top=i4? document.body.scrollTop+event.clientY : n6? window.pageYOffset+eY : eY
mo.ts.visibility="visible"
return false
}
function contains_n6(a, b) { while (b.parentNode){ if ((b = b.parentNode) == a) return true;} return false; }
function hidem(){ if (window.mo) mo.ts.visibility=(i4||n6)? "hidden" : "hide"; }
function dh(e){ if (i4&&!mo.contains(e.toElement)) hidem(); else if (n6&&e.currentTarget!= e.relatedTarget&& !contains_n6(e.currentTarget, e.relatedTarget)) hidem()}
function delayhidem(){ if (i4||n6||n4) delayhide=setTimeout("hidem()",500)}
function chm(){ if (window.delayhide) clearTimeout(delayhide)}
function hm(e,state){ if (document.all) source_el=event.srcElement; else if (document.getElementById) source_el=e.target; if (source_el.className=="mitems"){ source_el.id=(state=="on")? "mouseoverstyle" : "" } else{ while(source_el.id!="popm"){ source_el=document.getElementById? source_el.parentNode : source_el.parentElement; if (source_el.className=="mitems"){ source_el.id=(state=="on")? "mouseoverstyle" : "" }}}}
if (i4||n6) document.onclick=hidem;

//Form Handler
function formHandler(){
 var URL = document.Suche.land.options[document.Suche.land.selectedIndex].value;
 var keyword = document.Suche.keyword.value;
 if (keyword =="Suchbegriffe...")keyword="";
 if (document.Suche.land.options[document.Suche.land.selectedIndex].value =="home") {
window.location.href = "index.php";
 }
 else if (document.Suche.land.options[document.Suche.land.selectedIndex].value ==""){
 }
 else if (document.Suche.land.options[document.Suche.land.selectedIndex].value !="home"){
URL = "index.php?start=0&anzeige=10&keyword="+keyword+"&page=search&land="+URL;
window.location.href = URL;
 }
}
//>

//Netscape 4 Resize Reload
<!-- 
this.name = "fewofewo";
function MM_reloadPage(init) { //reloads the window if Nav4 resized
 if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
 else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

//Window
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}
