function windowopen(url,width,height) {
 if(width>0 && height>0) {
  fenster=window.open(url,"fenster","width="+width+",height="+height+",status=yes,scrollbars=yes,resizable=no");
 }
 else {
  fenster=window.open(url);
 }
 fenster.focus();
 return false;
}

function browsersearch() {
 try {
  window.external.AddSearchProvider("http://www.panzer-archiv.de/basic/panzer-archiv-de.xml"); // OpenSearch-Datei: URL ersetzen!
 }
 catch(ex1) {
  try { // Falls OpenSearch nicht klappt - Sherlock installieren
   window.sidebar.addSearchEngine(
	  "http://www.panzer-archiv.de/basic/panzer-archiv-de.src",
		"http://www.panzer-archiv.de/basic/panzer-archiv-de.png",
		"Panzer-Archiv.de",
		"Alles über die stählernen Giganten im Zweiten Weltkrieg" );
  } 
  catch(ex2) {
   alert("Die Suche können Sie nur in den Firefox\noder Internet Explorer ab Version 7 einfügen!");
  }
 }
}

function jump(url) {
 this.jumpID=0;
 this.jumpURL=url;
 this.jumpIDInput='';
 this.jumpIDLink='';
  
 this.jumpInput=function(id) {
  this.jumpID=id;
  this.jumpSetIDs();
  this.jumpDisplay('none','inline');
  this.jumpIDInput.focus();
  this.jumpIDInput.onkeyup=function(e) { pj.jumpStart(e) };
  this.jumpIDInput.onblur=function() { pj.jumpStop() };
 }
 this.jumpStart=function(event) {
	if(!event) event=window.event;
	if(event.which) {
   var key=event.which;
	}
	else if (event.keyCode) {
	 var key=event.keyCode;
	}
	var input=this.jumpIDInput.value;
	if(key==13) {
	 this.jumpGo(input);
	}
	else if(key==27) {
	 this.jumpStop()
	}
 }
 this.jumpStop=function() {
  this.jumpDisplay('inline','none');
 }
 this.jumpSetIDs=function() {
  this.jumpIDLink=document.getElementById('p-a-'+this.jumpID);
  this.jumpIDInput=document.getElementById('p-i-'+this.jumpID);
 }
 this.jumpDisplay=function(link,input) {
  this.jumpIDLink.style.display=link;
  this.jumpIDInput.style.display=input;
 }
 this.jumpGo=function(input) {
  document.location.href = this.jumpURL.replace(/%p%/,parseInt(input));
 }
}

