// jQuery: Bildblaettern mit Keys aktivieren
$(document).ready(function(){
	$(document).keyup(function(event){
		var docLink = '';
	    if (event.keyCode == 37) { // left
	        if($('#prev_icon')){
				docLink = $('#prev_icon').parent().attr('href');
			}
	    }
	    else if (event.keyCode == 38) { // up
	        if($('#up_icon')){
				docLink = $('#up_icon').parent().attr('href');
			}
	    }		
	    else if (event.keyCode == 39) { // right
	        if($('#next_icon')){
				docLink = $('#next_icon').parent().attr('href');
			}
	    }
		if(docLink != '' && docLink != undefined){
			document.location = docLink;
		}
	});
});

// Bei einem Fehler, Inputfeld mit einem Anderen Style definieren
function form_hi(inputfeld){
	inputfeld.className = "formhi";
}
function form_lo(inputfeld){
	inputfeld.className = "form";
}
function winOpen(url, breite, hoehe, scrollYes) {
	  if(typeof scrollYes == "undefined") scrollYes = "no";
	  links = (screen.width/2)-(breite/2);
      oben = (screen.height/2)-(hoehe/2);
      window.open(url,"popup","height="+hoehe+",width="+breite+",status = no,toolbar = no,menubar = no,location = no,resizable = no,titlebar = no,scrollbars = "+ scrollYes +",fullscreen = no,top ="+oben+",left ="+links);
}