function openPic(url,winName,winParams)	{	//
		var theWindow = window.open(url,winName,winParams);
		if (theWindow)	{theWindow.focus();}
}		

function check_plz()	{
    var pregmatch = "/[0-9]{5}/" ;
    var plz       = document.getElementById('plz') ;
    plz = plz.value ;
    var erg = plz.match ( /[0-9]{5}/ ) ;
    if  ( erg == null ) {
        alert ( "Um die Umkreissuche nutzen zu können, müssen sie bitte eine 5-stellige Postleitzahl angeben.") ;
    }
}

function rechtsgebiete_waehlen ( id, select, swap ) {

    var i       = 0 ;
	var j       = 0 ;
    var k       = 1 ;
	var auswahl = document.getElementById('rechtsgebiet') ;
    
	for( j = auswahl.options.length -1; j >= 0; j-- ) {
	    
		auswahl.options[j] = null ;
		
	}

    if ( id != '0' ) {
           
		auswahl.options[0] = new Option( '[ Bitte Rechtsgebiet auswählen ]', ' ' , false , false ) ;
            
        if( !select ) {
            
			auswahl.options[0].selected = true ;
			
	    }
	    
		for( i=0; i<cats[id].length; i++ ) {
		    
		    if( cats[id][i] == '' || cats[id][i] == undefined ) {
			    
				continue;
				
			}
			
			eintraege = cats[id][i].split('##', 2);
			auswahl.options[k] = new Option( eintraege[1], eintraege[0], false, false );
			
            if( select && select == eintraege[0] ) {
                
				auswahl.options[k].selected = true;
				
			}
			
			k++;
		}
		
	} else {
	    
		auswahl.options[0] = new Option( '[ Bitte zuerst eine Kategorie auswählen ]', ' ', false, false );
		
	}	
	
}

function vergoessern ( id ) {
	var auswahl = document.getElementById('test') ;
	
	auswahl.style.width = 300 ;
	
}

function verkleinern ( id ) {
	var auswahl = document.getElementById('test') ;
	
	auswahl.style.width = 220 ;
	
}


