b=navigator.appName;
v=parseInt(navigator.appVersion);
function f(url, names){
    if ((b="Netscape"&&v=="3")||(v>="4")) document[names].src=url;
}
function __keydown() {
    k=event.keyCode;
    if(k==113) { x=document.all["TRM"]; if(x) x.focus(); }
}
pu="";
popup="";
function Popup(URL,w,h,NAME) {
    if (v>="3") {
        if (typeof NAME == 'undefined' || NAME == "") {
          NAME="_blank";
        }
        var TEILNAME=NAME.substr(0,7);
        if (TEILNAME == "toolbar") {
          WINDOW='toolbar=1,menubar=1,status=1,location=1,scrollbars=1,resizable=1';
        } else {
          WINDOW='top=10,left=10,width='+w+',height='+h+',scrollbars=1,resizable=1,status=0,toolbar=0';
        }
        popup=window.open(URL,NAME,WINDOW);
        popup.focus();
        if (pu!=popup) {
            pu=popup;
        }
    } else {
        window.location.href=URL;
    }
}

function helpselect() {
     x = document.main.searchField.selectedIndex;
     help_docs = new Array(
		"help-full.php",
		"help-author.php",
        "help-title.php");
     help_url = '/typo3conf/ext/metasuchexml/pi1/'+help_docs[x]+'?ref='+ document.URL;
     Popup(help_url,600,400,'Hilfe');
}

// nachfolgend Code für Multilingual Keyboard
var last_used_searchfield = null; 
function keyboard() {
	var searchfield = "query";		//query ist der Name des Suchfeldes im iport-Formular
	if (last_used_searchfield != null) searchfield = last_used_searchfield.name;
	  	keybd = window.open("http://www.slavistik-portal.de/fileadmin/keyboard.htm?field=main."+searchfield, "Keybord", "height=300, width=500,top=0, left=300, scrollbars=auto, toolbar=no, status=no");
		//main ist der Name des iport-Suchformulares
	}
	
var keybd;
function keybd_close() {
	if (keybd) {
	 keybd.close();
	 keybd = null;
	}
}

function keyboard_roll(img_swap, img_name){
	img_name.src = img_swap;
}