/* Java Script Datei für Adressen Datenbank */

// Example:
// var b = new BrowserInfo();
// alert(b.version); 
function BrowserInfo()
{
  this.name = navigator.appName;
  this.codename = navigator.appCodeName;
  this.version = navigator.appVersion.substring(0,4);
  this.platform = navigator.platform;
  this.javaEnabled = navigator.javaEnabled();
  this.screenWidth = screen.width;
  this.screenHeight = screen.height;
}
/* 
Example:
function test()
{
  if (document.layers) getMouseLoc;     //NS
  else if (document.all) getMouseLoc(); //IE
  alert(mouseLocation.x+","+mouseLocation.y);
}
in the BODY:
<a href="#" onmouseover="test()">test</a>
*/
function Point(x,y) {  this.x = x; this.y = y; }
mouseLocation = new Point(-500,-500);
function getMouseLoc(e)
{
  if(!document.all)  //NS
  {
    mouseLocation.x = e.pageX;
    mouseLocation.y = e.pageY;
  }
  else               //IE
  {
    mouseLocation.x = event.x + document.body.scrollLeft;
    mouseLocation.y = event.y + document.body.scrollTop;
  }
  return true;
}

function setStatusBar(msgStr) { self.status = msgStr; }
setStatusBar("PUNKROTT RULEZ -- Browser: " + navigator.appName + ", Version: "+ navigator.appVersion.substring(0,4)+", Platform: "+ navigator.platform + ", Auflösung: " + screen.width + " x " + screen.height + " ---" );



/*
Count down until any date script-
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/



function chkFormular()
{

 if(document.formBemerkung.Kommentar.value == "")
  {
   alert("Bitte einen Kommentar eingeben!");
   document.formBemerkung.Kommentar.focus();
   return false;
  }
else
{
return true;
}
}
function changeFrame(zieleins, zielzwei) {
  parent.Bild.location = zieleins;
  parent.Bemerkungen.location = zielzwei;
}



function FensterAuf(url,wintitel,breite,hoehe,varscrollbars) {
	var links=screen.width/2-breite/2;
	var oben=screen.height/2-hoehe/2;
	NewWin = window.open(url, wintitel, "width="+breite+",height="+hoehe+",top="+2+" ,left="+links+",resizable=1,toolbar=0,location=0,scrollbars="+varscrollbars+"");
}


function printPage() {
if (window.print) {
jetztdrucken = confirm('Fenster drucken ?');
if (jetztdrucken) window.print();
   }
}


function checkAll()
{
    for(i=0;i<document.forms[0].elements.length;i++)
    {
        if(document.forms[0].elements[i].type=="checkbox")
        {
            document.forms[0].elements[i].checked=true;
        }
    }
}

function uncheckAll()
{
    for(i=0;i<document.forms[0].elements.length;i++)
    {
        if(document.forms[0].elements[i].type=="checkbox")
        {
            document.forms[0].elements[i].checked=false;
        }
    }
}


