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);

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function butchange(butid,color){
	if (document.getElementById(butid))
		document.getElementById(butid).style.backgroundColor = color;
}

function move(e,ttid) {
iDistanceX = 10;
iDistanceY = 15;
e = e || window.event;
var dbody = (document.compatMode && document.compatMode != 'BackCompat')?document.documentElement:document.body;
var elm = document.getElementById(ttid);
elm.style.left = e.clientX + iDistanceX + dbody.scrollLeft+'px';
elm.style.top  = e.clientY + iDistanceY + dbody.scrollTop+'px';
}
function move2(e,ttid) {
iDistanceX = -100;
iDistanceY = 15;
e = e || window.event;
var dbody = (document.compatMode && document.compatMode != 'BackCompat')?document.documentElement:document.body;
var elm = document.getElementById(ttid);
elm.style.left = e.clientX + iDistanceX + dbody.scrollLeft+'px';
elm.style.top  = e.clientY + iDistanceY + dbody.scrollTop+'px';
}
function moveall(e,ttid,topx,leftx) {
iDistanceX = topx;
iDistanceY = leftx;
e = e || window.event;
var dbody = (document.compatMode && document.compatMode != 'BackCompat')?document.documentElement:document.body;
var elm = document.getElementById(ttid);
elm.style.left = e.clientX + iDistanceX + dbody.scrollLeft+'px';
elm.style.top  = e.clientY + iDistanceY + dbody.scrollTop+'px';
}

function moveoff(ttid){
	document.getElementById(ttid).style.left=-400+'px';
	document.getElementById(ttid).style.top=-400+'px';
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) {
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
function search_it() {
	if (document.search.searchstr.value.length>2) {
		document.search.submit();
	} else {
		alert('Riempa prego la stringa di ricerca!\n(3 caratteri)');
	}
}
function search_en() {
	if (document.search.searchstr.value.length>2) {
		document.search.submit();
	} else {
		alert('Please fill in search string!\n(3 characters)');
	}
}
function search_de() {
	if (document.search.searchstr.value.length>2) {
		document.search.submit();
	} else {
		alert('Bitte Suchbegriff eingeben!\n(mind. 3 Zeichen)');
	}
}
function popupWindow(datei,winname,w,h,x,y) {
  var properties = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes";
  popup = window.open(datei,winname,"width="+w+",height="+h+","+properties+"");
  if(window.moveTo) popup.moveTo(x,y);
  if(window.focus) popup.focus();
}

function frmGlobalWetter(x) {
 //tmp = "/cgi-bin/linkextern.pl?uri=http%3A%2F%2Fwww.procumulus.de%2Fcgi-bin%2Fwetter-net%2Fwetter_stadt.pl%3FNAME%3D"+escape(x);
tmp = "/cgi-bin/linkextern.pl?uri=http%3A%2F%2Fwww.wetteronline.de%2Fcgi-bin%2Fregframe%3F3%26LANG%3Dde%26PLZ%3D09456%26PRG%3Dcitybild%26PLZN%3D"+escape(x);

 wtwindow = window.open(tmp);
 wtwindow.focus();
}