function openDoc(id, div2Pos) {    
	var url = "../exist/servlet/db/mgh/scripts/tpm_mgh.xql";

//	var par = "id="+id;
    var par = "id=" + id + "&div2Pos=" + div2Pos+"&anzeige=paras";
	
	new Ajax.Updater('content', url, {parameters:par, asynchronous:true});	
//   alert("Hallo! " + url + "?" + par );
}


function openKapitel(id, div2Pos) {    
	var url = "/exist/servlet/db/mgh/scripts/tpm_mgh_kap.xql";

//	var par = "id="+id;
    var par = "id=" + id + "&div2Pos=" + div2Pos+"&anzeige=paras";
	
	new Ajax.Updater('content', url, {parameters:par, asynchronous:true});	
//   alert("Hallo! " + url + "?" + par );
}



/* Inhaltsübersicht anzeigen */
function showContent(id) {    
	var url = "/exist/servlet/db/mgh/scripts/showContent.xql";

	var par = "id="+id;

	new Ajax.Updater('content', url, {parameters:par, asynchronous:true});	

}



/* Text anzeigen; seitenweise, abschnittsweise oder alles */
function anzeigeVersion(id) {

    var url = "/exist/servlet/db/mgh/scripts/tpm_mgh.xql";
    var par = "id="+id; 
    
    
    if (id == "vorbemerkungen_des_uebersetzers.xml") {
	par +="&anzeige=all"; 
    }
    else if (document.anzeigeForm.anzeige[0].checked==true){
        par +="&anzeige="+document.anzeigeForm.anzeige[0].value;
    }  
    else if  (document.anzeigeForm.anzeige[1].checked==true){
        par +="&anzeige="+document.anzeigeForm.anzeige[1].value; 
    }
        
    else if (document.anzeigeForm.anzeige[2].checked==true){
        par +="&anzeige=" + document.anzeigeForm.anzeige[2].value;
    }
    
    Element.show('content');
     
    new Ajax.Updater('content', url, {parameters:par, asynchronous:true});	

}



// evtl benötigte Suchfunktion

function search() {
	var url = "/exist/servlet/db/mgh/scripts/search.xql";
	var par = Form.serialize("searchForm");
	
	Element.show('searchResults');
	
	new Ajax.Updater('searchResults', url, {parameters:par, asynchronous:true});
	
}




function showCSR() {
	var url = "/exist/servlet/db/mgh/scripts/search.xql";
	var par = "getCurrentSearchResults=true";
	new Ajax.Updater('content', url, {parameters:par, asynchronous:true});
}


function test(){
alert("Hallo!");
}
