
function senden(seite) {
  document.getElementById('OFFSET').value = seite;
  sendForm();
}

function show_details(anzeige, sitepos){
	document.getElementById('DETAILS').value	= anzeige;
	document.getElementById('SITEPOS').value	= sitepos;
	document.forms[0].action= 'detailanzeige.php';
	document.forms[0].submit();
}

function sendForm(){
  document.forms['detail'].target = '_self'; 
  document.forms['detail'].submit();
}

function gotoSuche(){
	document.forms['detail'].target = '_self'; 
	document.forms['detail'].action  = 'index.php';
    document.forms['detail'].submit();
    
}
function gotoTreffer(){
	document.forms['detail'].target = '_self'; 
    document.forms['detail'].action  = 'ergebnisse.php';
    document.forms['detail'].submit();
}

function get_cookie( cookieName ){
    strValue = false;    
    if( strCookie = document.cookie ){
            if( arrCookie = strCookie.match( new RegExp( cookieName + '=([^;]*)', 'g'))){
                    strValue=RegExp.$1;
                }
        }
    return(strValue);
}

function setAnzahl(){
	if (get_cookie('anz'))
		anz =  get_cookie('anz')
		else
			anz = 0; 
    if (document.getElementById('anzahl'))
			document.getElementById('anzahl').innerHTML = '<strong>'+anz+'</strong>';  
    }
    
    
function OpenGarage(anzeigeID){
	if (anzeigeID != 0){						
		document.getElementById('ANZEIGE_ID').value	= anzeigeID;
		document.forms['garage'].action= 'garage.php';
		document.forms['garage'].target = 'parken'
		document.forms['garage'].onsubmit = window.open('about:blank','parken','height=180,width=350');
		document.forms['garage'].submit();
		window.setTimeout("setAnzahl()",4500);	
		}else {
			document.forms['detail'].action= 'parken.php';
			document.forms['detail'].target = '_self'; 
			document.forms['detail'].submit();
	}
}


function anfrageSenden(){
	document.getElementById('SUBMITANFRAGE').value	= 1;
	document.forms['detail'].submit();
}

function Suchanfrage(what){
	document.getElementById('SUCHANFRAGE').value	= what;
	gotoSuche(); 

}


