// Statusleiste
self.defaultStatus = 'Welcome to the city of Melle';

function show(text){
myText = text;
 setTimeout("window.status = myText", 0);
 return true;
}

// Adress-Datenblatt
function adresse(adresse_id) {
  var breite=350;
  var hoehe=450; 
  var positionX=((screen.availWidth / 2) - breite / 2); 
  var positionY=((screen.availHeight / 2) - hoehe / 2); 
  var url='http://www.melle.info/ap_static/print_adresse.cfm?adresse_id='+adresse_id;
  pop=window.open('','adresse','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,fullscreen=0,width='+breite+',height='+hoehe+',top=10000,left=10000'); 
  pop.resizeTo(breite,hoehe); 
  pop.moveTo(positionX,positionY); 
  pop.location=url;
}

// GIS-Link ALT
/*
function open_ortsplan_adresse(str, nr, erw, gem)	{
	url =
"http://gis2.melle.info/proStrassenWebService/index.aspx?str=" + str + "&nr="
+ nr + "&erw=" + erw + "&gem=" + gem;
	gis = window.open (url,"","resizable=yes");
}
*/

// GIS-Link
function open_ortsplan_adresse(str, nr, erw, gem)
{
	url = "http://gis2.melle.info/promegisMAPnet2006/default.aspx?adress_suche=true&str=" + str + "&nr=" + nr + "&erw=" + erw + "&gem=" + gem;
	gis = window.open (url,"","resizable=no");
}

// Bebauungsplaene
function open_bpl_daten() {
  url='http://gis2.melle.info/bpl.htm';
  gis=window.open(url,'',resizable='no');
}

// Stadtplan
function stadtplanstatic() {
	url = "http://gis2.melle.info/promegisMAPnet2006/";
	gis = window.open (url,"","resizable=yes");
}

// Voting
function voting_results() {
  window.open('http://www.melle.info/ap_static/voting_results.cfm?o_lang_id=2','voting_results','width=600,height=300,locationbar=yes,menubar=no,toolbar=no,status=no,resizeable=no,scrollbars=1');
}

// Voting blank
function voting_blank() {
  window.open('http://www.melle.info/ap_static/leer.htm','voting_results','width=600,height=300,locationbar=yes,menubar=no,toolbar=no,status=no,resizeable=no,scrollbars=1');
}

// WebCam
function webcam() {
window.open('http://www.melle.info/ap_static/webcam.cfm?o_lang_id=2','webcam','width=420,height=400,locationbar=yes,menubar=no,toolbar=no,status=no,resizeable=no,scrollbars=0');
}

// Melle-Song
function song() {
window.open('http://www.melle.info/ap_static/song.cfm?o_lang_id=2','song','width=570,height=260,locationbar=yes,menubar=no,toolbar=no,status=no,resizeable=no,scrollbars=0');
}

// Virtuelles Rathaus
function rathaus() {
  var breite=1020;
  var hoehe=655; 
  var positionX=0; 
  var positionY=0; 
  pop=window.open('http://rathaus.melle.info','rathaus','toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,fullscreen=0,width='+breite+',height='+hoehe+',top='+positionX+',left='+positionY); 
}

// Veranstaltungskalender
function show_event(item) {
  window.open('http://www.melle.info/ap_static/event.cfm?obj_id='+item+'&o_lang_id=2','event','width=500,height=400,locationbar=yes,menubar=no,toolbar=no,status=no,resizeable=no,scrollbars=1');
}

// Verwaltung
function person(famname) {
window.open('http://www.melle.info/ap_static/person.cfm?o_lang_id=2&famname='+famname,'person','width=180,height=225,locationbar=no,menubar=no,toolbar=no,status=no,resizeable=no,scrollbars=0');
}

// Rechter Mausklick
var text="© Stadt Melle";

if (document.layers){
    window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
    window.onmousedown=rightclick;
    window.onmouseup=rightclick;
    
    function rightclick(e) {
    if (e.which == 3) {
    alert(text);
    return false; 
    }
    else {
        return true; 
        }
    }
}

if (document.all){
    function click() {
    if (event.button==2) {
    alert(text)
    }
    
    if (event.button==3) {
    alert(text)}
    }
    document.onmousedown=click
}

