// JavaScript Document

function makeListMonth(selVal){
	var list = "<option value=\"%\">...</option>";
	
	for(var i=1; i<=12; i++){
			
			if(selVal == i){
				list +=  "<option selected>"+i+"</option>";
			}else{
				 list += "<option>"+i+"</option>";
			}
	}
	
	return "<select name=\"lstBM\" id=\"lstBM\" class=\"listeshort\">"+list+"</select>";
}


function list_ukm(selVal){
	var list = "<option value=\"0\">Umkreis</option>";
	
	for(var i=1; i<=100; i++){
			
			if(selVal == i){
				list +=  "<option value=\""+i+"\" selected>"+i+" km</option>";
			}else{
				 list += "<option value=\""+i+"\">"+i+" km</option>";
			}
	}
	
	return "<select name=\"lstukm\" id=\"lstukm\" class=\"listeukm\" disabled=\"disabled\">"+list+"</select>";
}

function check_plz_len(plz){
	
	var ukm = d.getElementById("lstukm");
	
	if(plz.value.length == 5){
		ukm.disabled = false;		
	}else{
		ukm.disabled = true;
	}
	
}



function makeListPageSize(selVal){
	var list = "<option value=\"%\">...</option>";
	var sLink = window.location.href+'&pgs='+selVal;
	
	for(var i=20; i<=100; i+=20){
			
			if(selVal == i){
				list +=  '<option selected="selected">'+i+'</option>';
			}else{
				 list += '<option>'+i+'</option>';
			}
	}
	
	
	return '<select name="lstPageSize" id="lstPageSize" class="short" onchange="redir(\''+sLink+'\');">'+list+'</select>';
}


function redir(val){
		window.location.href = val;
}


function pic_edit(pic_id){
	
	var pic = document.getElementById('pic_edit');
	
		pic.value = pic_id;
		
	var info = document.getElementById('pic_edit_info');
	
	if(pic_id.value != ''){
		
		info.innerHTML = 'Bild Nr.: '+pic_id+' ersetzen.';
		
	}
		
}


function question_delete(str, str2){
	var del = window.confirm('Möchtest Du '+str2+' wirklich löschen?');
	if(del){window.location = str;}	
}




<!--
function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
		if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
		if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
		if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    	ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
    	popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    	popupWindow[wp].document.body.onbeforeunload = function() {
  			if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    		window.onbeforeunload = null;	}  
   		autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
  	window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}
//-->




function goback(){
	//var x=detectBrowser();
    //if(x=="f15")
	//return '<a href="#" onclick="javascript:history.back('-2')" class="back">zurück</a>';
	//else
	return '<a href="#" onclick="javascript:history.go(-1)" class="back">zurück</a>';
}
	
	
