// JavaScript Document


var navigation_rechts_info_togg = new Array();
var navigation_rechts_info_maxx = 100;
var navigation_rechts_info_lastmarker = 0;

var menue_tog = new Array();

var wkvoll = 0;

var wkshow = 0;

						


// START Funktionen zur Menuesteuerung

			var menue_maxx = 5000;
			var menue_last_marker = 0;
			var menue_toggled = 0;
			var menue_bgcolor_out = "#ececec";
			var menue_bgcolor_over = "#e3e3e3";
				
			
			
			
			function menue_togg (i,offen){
			
				if (offen == 0  && menue_tog[i] != 1){
					menue_tog[i] = 0;
				}
				
				if (menue_tog[i] == 0){
					document.getElementById("menue_inh"+i).style.display = "block";
					//new Effect.toggle($('menue_inh'+i),'blind', {duration:0.25});
					document.images["pic"+i].src = "/gfx/offen.gif";
					menue_tog[i] = 1;
					menue_toggled = 1;
				}
				else{
					document.getElementById("menue_inh"+i).style.display = "none";
					//new Effect.toggle($('menue_inh'+i),'blind', {duration:0.25});
					document.images["pic"+i].src = "/gfx/zu.gif";
					menue_tog[i] = 0;
					menue_toggled = 1;
				}
			}
			
			function menue_togg_suche (i,offen){
			
				if (offen == 0  && menue_tog[i] != 1){
					menue_tog[i] = 0;
				}
				if (menue_tog[i] == 0){
					document.getElementById("menue_inh"+i).style.display = "block";
					//new Effect.toggle($('menue_inh'+i),'blind', {duration:0.25});
					document.images["pic"+i].src = "/gfx/offen.gif";
					document.suchformular.suchformular_suchoptionen.value = "block";
					menue_tog[i] = 1;
					menue_toggled = 1;
				}
				else{
					document.getElementById("menue_inh"+i).style.display = "none";
					//new Effect.toggle($('menue_inh'+i),'blind', {duration:0.25});
					document.images["pic"+i].src = "/gfx/zu.gif";
					document.suchformular.suchformular_suchoptionen.value = "none";
					menue_tog[i] = 0;
					menue_toggled = 1;
				}
			}
			
			function menue_click(url){	
			if (menue_toggled != 1) {
					/*document.getElementById('navigation_mitte_tableau').innerHTML = ' loading ...';
					document.getElementById('navigation_mitte_big').innerHTML = ' loading ...';
					document.getElementById('navigation_rechts_info').innerHTML = '';*/
					location.href = url;
				}
			}
			
			
			function menue_over(element) {
				if (element != menue_last_marker){
					document.getElementById(element).style.backgroundColor = menue_bgcolor_over;
					document.getElementById(element).style.cursor = "pointer";
					menue_toggled = 0;
				}
			}
			
			function menue_out(element) {
				if (element != menue_last_marker){
					document.getElementById(element).style.backgroundColor = menue_bgcolor_out;
				}
			}

// END






// funktion, um vom navimenü aus das tableu aufzurufen
function tableauseite_objekt(view,requestUriStart,skip) {
	if(skip != 0){
		location.href = requestUriStart+skip+"/";
	}
	else{
		location.href = requestUriStart;
	}
}

/* ENDE */


// START Funktionen zur Änderung der Darstellung des Dias im Tableu bei over und out

				function tableau_overdia(element) {
					document.getElementById("dia_funktion"+element).style.visibility = "visible";
				}
				
				function tableau_outdia(element) {
					document.getElementById("dia_funktion"+element).style.visibility = "hidden";
				}

// ENDE



// START Funktionen zur Änderung der Darstellung des Dias im Tableu im Navigationsmodus bei click und Aufruf der Bildinformation 
								
				function navigation_tableau_clickdia(element, bildnummer){
						document.getElementById("navigation_rechts_kopf").innerHTML = '';
						document.getElementById("navigation_rechts_kopf").style.backgroundImage = "none";
						//nachricht_OFF();
						if (navigation_tableau_last_element == 0){
							document.getElementById("dia"+element).style.background = "#cacaca";
							document.getElementById("dia"+element).style.borderTopColor = "#9d9d9d";
							document.getElementById("dia"+element).style.borderLeftColor = "#9d9d9d";
							document.getElementById("dia"+element).style.borderBottomColor = "#cacaca";
							document.getElementById("dia"+element).style.borderRightColor = "#cacaca";
							navigation_tableau_last_element = element;
						}
						else if (navigation_tableau_last_element == element) {
							document.getElementById("dia"+element).style.background = "#cacaca";
							document.getElementById("dia"+element).style.borderTopColor = "#9d9d9d";
							document.getElementById("dia"+element).style.borderLeftColor = "#9d9d9d";
							document.getElementById("dia"+element).style.borderBottomColor = "#cacaca";
							document.getElementById("dia"+element).style.borderRightColor = "#cacaca";
							navigation_tableau_last_element = element;
						}
						else{
							document.getElementById("dia"+navigation_tableau_last_element).style.background = "#ececec";
							document.getElementById("dia"+navigation_tableau_last_element).style.borderTopColor = "#ffffff";
							document.getElementById("dia"+navigation_tableau_last_element).style.borderLeftColor = "#ffffff";
							document.getElementById("dia"+navigation_tableau_last_element).style.borderBottomColor = "#cfcfcf";
							document.getElementById("dia"+navigation_tableau_last_element).style.borderRightColor = "#cfcfcf";
							document.getElementById("dia"+element).style.background = "#cacaca";
							document.getElementById("dia"+element).style.borderTopColor = "#9d9d9d";
							document.getElementById("dia"+element).style.borderLeftColor = "#9d9d9d";
							document.getElementById("dia"+element).style.borderBottomColor = "#cacaca";
							document.getElementById("dia"+element).style.borderRightColor = "#cacaca";
							navigation_tableau_last_element = element;
						}
						document.getElementById("navigation").style.backgroundImage = "url('/gfx/bg_all_durch.gif')";
				}
				
// ENDE


				function navigation_tableau_clickdia_info(element, bildnummer,moid,pageskip,imgskip,view){
						var req = new Ajax.Updater (
							'navigation_rechts_info',
							'/info.php',
							{
								method: 'get',
								parameters: { moid: moid, pageskip: pageskip, imgskip: imgskip, bildnummer: bildnummer, view: view }
							}
						);
						
						navigation_rechts_info_togg_ini ();
				}
				



// START  Funktionen zur Änderung der Darstellung der Info-Überschrift in der Bildinfo bei over und out

				var info_marker_color = "#CACACA";
				var info_marker_textcolor = "#000000";
				var info_marker_topbordercolor = "#575757";
				var info_marker_bottombordercolor = "#444444";
				var info_text_color = "#dfdfdf";
				var info_bg_color = "#ececec";
				var info_bg_roll = "#e3e3e3";
				
				function info_overheadline (element) {
					if (element != navigation_rechts_info_lastmarker){
						document.getElementById(element).style.backgroundColor = info_bg_roll;
						document.getElementById(element).style.cursor = "pointer";
					}
				}
				
				function info_outheadline (element) {
					if (element != navigation_rechts_info_lastmarker){
						document.getElementById(element).style.backgroundColor = info_bg_color;
					}
				}

// ENDE



// START  Funktionen zur Änderung zum Ein-/Ausschalten der Info-Inhalte im Navigationsmodus bei click


	
				
				
				for (i=1; i<=navigation_rechts_info_maxx; i++){
					navigation_rechts_info_togg[i] = 1;
				}
				
				function navigation_rechts_info_togg_ini (){	
					navigation_rechts_info_togg[3] = 0;
					navigation_rechts_info_togg[9] = 0;
					navigation_rechts_info_togg[4] = 0;
					navigation_rechts_info_togg[5] = 0;
					navigation_rechts_info_togg[20] = 0;
					navigation_rechts_info_togg[7] = 0;
					navigation_rechts_info_togg[10] = 0;
					navigation_rechts_info_togg[11] = 0;
				}
				
				function navigation_rechts_infotogg (element,i){
					if (navigation_rechts_info_togg[i] == 0){
						document.getElementById(element+'_togg').style.display = "block";
						document.images[element+"_pic"].src = "/gfx/offen.gif";
						navigation_rechts_info_togg[i] = 1;
					}
					else{
						document.getElementById(element+'_togg').style.display = "none";
						document.images[element+"_pic"].src = "/gfx/zu.gif";
						navigation_rechts_info_togg[i] = 0;
					}
				}

// ENDE



function stop(){
			return false;
}



function hinweis(hinweis){
	var req = new Ajax.Updater (
		'aktion',
		'/hinweis/',
		{
			method: 'post',
			parameters: { hinweis: hinweis }
		}
	);
}

function addWarenk(view,mri_warenk_anz_bilder,bildnummer,format_kat) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_wk_add.php',
		{
			method: 'post',
			parameters: { bildnummer: bildnummer, format_kat: format_kat},
			onComplete: function(){
							var req2 = new Ajax.Updater (
								'warenk_status',
								'/status_wk.php',
								{
									method: 'post'
								}
							);
						}
		}
	);
	if(view == 'warenk' && mri_warenk_anz_bilder < 20){
		setTimeout("location.reload();", 600);
	}
}


function nachricht_OFF() {
	if(document.getElementById('aktion')) document.getElementById('aktion').innerHTML = '';
}


function anmelden() {
	document.getElementById('aktion').innerHTML = 'anmelden zack zack';
}


//--

function addLeuchttPrepare(tableau,bildnummer){
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_leuchtt_add_prepare.php',
		{
			method: 'post',
			parameters: { bildnummer: bildnummer, tableau: tableau}
		}
	);
}


function addLeuchtt(erstellungsoption,leuchttName,leuchttNummer,bildnummer,tableau){
	if ((leuchttName <= 0 && document.leuchtt.leuchtt_neu[0].checked == false)){
	}
	else{
		var req = new Ajax.Updater (
			'aktion',
			'/aktion_leuchtt_add.php',
			{
				method: 'post',
				parameters: { erstellungsoption: erstellungsoption, leuchttName: leuchttName, leuchttNummer: leuchttNummer, bildnummer: bildnummer},
				onComplete: function(){
								var req2 = new Ajax.Updater (
									'leuchtt_status',
									'/status_leuchtt.php',
									{
										method: 'post'
									}
								);
								if(tableau == 'account_leuchtt_tableau'){
									setTimeout("location.reload();", 3000);
								}
							}
			}
		);
	}
}


/* Steuerung des Tableaus im Warenkorb-Modus  */

var wk_last_element = 0;

function warenk_over(element) {
	if (document.getElementById("warenk_dia_funktion"+element)){
		document.getElementById("warenk_dia_funktion"+element).style.visibility = "visible";
	}
	if (wk_last_element != element){
			document.getElementById("warenk_zeile"+element).style.background = "#e3e3e3";
	}
}

function warenk_out(element) {
	if (document.getElementById("warenk_dia_funktion"+element)){
		document.getElementById("warenk_dia_funktion"+element).style.visibility = "hidden";
	}
	if (wk_last_element != element){
			document.getElementById("warenk_zeile"+element).style.background = "#ececec";
	}
}

function warenk_over_preview(element) {
	//if (wk_last_element != element){
		document.getElementById("warenk_zeile"+element).style.background = "#e3e3e3";
	//}
}

function warenk_out_preview(element) {
	//if (wk_last_element != element){
		document.getElementById("warenk_zeile"+element).style.background = "#ececec";
	//}
}


function wk_diaAuswahl(element, bildnummer,view){
	document.getElementById("navigation").style.backgroundImage = "url(/gfx/bg_all_durch.gif)";
	if (wk_last_element != element){
		if (wk_last_element == 0){
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			
			document.getElementById("warenk_zeile"+element).style.background = "#cacaca";
			document.getElementById("warenk_zeile"+element).style.color = "#484848";
			document.getElementById("warenk_zeile"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_zeile"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_zeile"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_zeile"+element).style.borderRightColor = "#cacaca";
							
			wk_last_element = element;
		}
		else {
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			
			document.getElementById("warenk_zeile"+element).style.background = "#cacaca";
			document.getElementById("warenk_zeile"+element).style.color = "#484848";			
			document.getElementById("warenk_zeile"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_zeile"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_zeile"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_zeile"+element).style.borderRightColor = "#cacaca";
								
			document.getElementById("warenk_dia"+wk_last_element).style.background = "#ececec";
			document.getElementById("warenk_dia"+wk_last_element).style.borderTopColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderLeftColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderBottomColor = "#cfcfcf";
			document.getElementById("warenk_dia"+wk_last_element).style.borderRightColor = "#cfcfcf";
			
			document.getElementById("warenk_zeile"+wk_last_element).style.background = "#ececec";
			document.getElementById("warenk_zeile"+wk_last_element).style.borderTopColor = "#ffffff";
			document.getElementById("warenk_zeile"+wk_last_element).style.borderLeftColor = "#ffffff";
			document.getElementById("warenk_zeile"+wk_last_element).style.borderBottomColor = "#cfcfcf";
			document.getElementById("warenk_zeile"+wk_last_element).style.borderRightColor = "#cfcfcf";
			
			wk_last_element = element;
		}
		
		var req = new Ajax.Updater (
			'navigation_rechts_info',
			'/info.php',
			{
				method: 'get',
				parameters: { bildnummer: bildnummer, view: view, wkid: element},
				onComplete: function(){
					navigation_rechts_info_togg_ini ();
					//nachricht_OFF();
				}
			}
		);
	}
}

/* ENDE  */



function warenk_delElement(aktion,position,recID,element,bildnummer) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_wk_del_element_ask.php',
		{
			method: 'post',
			parameters: { aktion: aktion, position: position, recID: recID, element: element, bildnummer: bildnummer}
		}
	);
}

function warenk_delAll(aktion) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_wk_del_all_ask.php',
		{
			method: 'post',
			parameters: { aktion: aktion}
		}
	);
}


function leuchtt_over(element) {
	document.getElementById("warenk_dia_funktion"+element).style.visibility = "visible";
}

function leuchtt_out(element) {
	document.getElementById("warenk_dia_funktion"+element).style.visibility = "hidden";
}

function leuchtt_line_over(element) {
	document.getElementById("warenk_zeile"+element).style.background = "#e3e3e3";
}

function leuchtt_line_out(element) {
	document.getElementById("warenk_zeile"+element).style.background = "#ececec";
}

function leuchtt_delAll(aktion,leuchttName,leuchttID) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_leuchtt_del_all_ask.php',
		{
			method: 'post',
			parameters: { aktion: aktion, leuchttName: leuchttName, leuchttID: leuchttID }
		}
	);
}



function leuchtt_diaAuswahl(element, bildnummer,view){
	//nachricht_OFF();
	document.getElementById("navigation").style.backgroundImage = "url(/gfx/bg_all_durch.gif)";
	if (wk_last_element != element){
		if (wk_last_element == 0){
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		else {
			document.getElementById("warenk_dia"+wk_last_element).style.background = "#ececec";
			document.getElementById("warenk_dia"+wk_last_element).style.borderTopColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderLeftColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderBottomColor = "#cfcfcf";
			document.getElementById("warenk_dia"+wk_last_element).style.borderRightColor = "#cfcfcf";
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
							
			wk_last_element = element;
		}
		
		var req = new Ajax.Updater (
			'navigation_rechts_info',
			'/info.php',
			{
				method: 'get',
				parameters: { bildnummer: bildnummer, view: view },
				onComplete: function(){
					navigation_rechts_info_togg_ini ();
				}
			}
		);
	}
}

function leuchtt_delElement(aktion,position,recID,element,bildnummer,lid) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_leuchtt_del_element_ask.php',
		{
			method: 'post',
			parameters: { aktion: aktion, position: position, recID: recID, element: element, lid: lid, bildnummer: bildnummer }
		}
	);
}


function upload_delAll(aktion,uploadPosition,__uploadTimestampKey) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_upload_del_all_ask.php',
		{
			method: 'post',
			parameters: { aktion: aktion, uploadPosition: uploadPosition, __uploadTimestampKey: __uploadTimestampKey }
		}
	);
}

function upload_delElement(aktion,position,recID,element,bildnummer,uid,uploadcontent_user_uploadname_orig) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_upload_del_element_ask.php',
		{
			method: 'post',
			parameters: { aktion: aktion, position: position, recID: recID, element: element, uid: uid, bildnummer: bildnummer, fn: uploadcontent_user_uploadname_orig }
		}
	);
}

function upload_over(element) {
	document.getElementById("warenk_dia_funktion"+element).style.visibility = "visible";
}

function upload_out(element) {
	document.getElementById("warenk_dia_funktion"+element).style.visibility = "hidden";
}

function upload_diaAuswahl(element, bildnummer,view){
	//nachricht_OFF();
	document.getElementById("navigation").style.backgroundImage = "url(/gfx/bg_all_durch.gif)";
	if (wk_last_element != element){
		if (wk_last_element == 0){
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		else {
			document.getElementById("warenk_dia"+wk_last_element).style.background = "#ececec";
			document.getElementById("warenk_dia"+wk_last_element).style.borderTopColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderLeftColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderBottomColor = "#cfcfcf";
			document.getElementById("warenk_dia"+wk_last_element).style.borderRightColor = "#cfcfcf";
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		
		var req = new Ajax.Updater (
			'navigation_rechts_info',
			'/info_upload.php',
			{
				method: 'post',
				parameters: { bildnummer: bildnummer, view: view }
			}
		);
	}
}

function vorab_diaAuswahl(element, bildnummer,view){
	//nachricht_OFF();
	document.getElementById("navigation").style.backgroundImage = "url(/gfx/bg_all_durch.gif)";
	if (wk_last_element != element){
		if (wk_last_element == 0){
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		else {
			document.getElementById("warenk_dia"+wk_last_element).style.background = "#ececec";
			document.getElementById("warenk_dia"+wk_last_element).style.borderTopColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderLeftColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderBottomColor = "#cfcfcf";
			document.getElementById("warenk_dia"+wk_last_element).style.borderRightColor = "#cfcfcf";
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		
		var req = new Ajax.Updater (
			'navigation_rechts_info',
			'/info_vorab.php',
			{
				method: 'post',
				parameters: { bildnummer: bildnummer, view: view, vcrid: element},
				onComplete: function(){
					//navigation_rechts_info_togg_ini ();
					navigation_rechts_info_togg[6] = 0;
					navigation_rechts_info_togg[3] = 0;
					navigation_rechts_info_togg[9] = 0;
					navigation_rechts_info_togg[4] = 0;
					navigation_rechts_info_togg[2] = 0;
					navigation_rechts_info_togg[12] = 0;
					navigation_rechts_info_togg[7] = 0;
					navigation_rechts_info_togg[10] = 0;
					navigation_rechts_info_togg[11] = 0;
				}
			}
		);
	}
}

function eink_diaAuswahl(element, bildnummer,view,recnum){
	//nachricht_OFF();
	document.getElementById("navigation").style.backgroundImage = "url(/gfx/bg_all_durch.gif)";
	if (wk_last_element != element){
		if (wk_last_element == 0){
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		else {
			document.getElementById("warenk_dia"+wk_last_element).style.background = "#ececec";
			document.getElementById("warenk_dia"+wk_last_element).style.borderTopColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderLeftColor = "#ffffff";
			document.getElementById("warenk_dia"+wk_last_element).style.borderBottomColor = "#cfcfcf";
			document.getElementById("warenk_dia"+wk_last_element).style.borderRightColor = "#cfcfcf";
			document.getElementById("warenk_dia"+element).style.background = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("warenk_dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("warenk_dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		
		var req = new Ajax.Updater (
			'navigation_rechts_info',
			'/info_eink.php',
			{
				method: 'post',
				parameters: { bildnummer: bildnummer, view: view, ecrid: element, rp:recnum},
				onComplete: function(){
					//navigation_rechts_info_togg_ini ();
					navigation_rechts_info_togg[6] = 0;
					navigation_rechts_info_togg[3] = 0;
					navigation_rechts_info_togg[9] = 0;
					navigation_rechts_info_togg[4] = 0;
					navigation_rechts_info_togg[2] = 0;
					navigation_rechts_info_togg[12] = 0;
					navigation_rechts_info_togg[7] = 0;
					navigation_rechts_info_togg[10] = 0;
					navigation_rechts_info_togg[11] = 0;
				}
			}
		);
	}
}


function suche_diaAuswahl(element, bildnummer,view){
	//nachricht_OFF();	
	document.getElementById("navigation").style.backgroundImage = "url(/gfx/bg_all_durch.gif)";
	document.getElementById("navigation_rechts_kopf").innerHTML = '';
	document.getElementById("navigation_rechts_kopf").style.backgroundImage = "none";

	if (wk_last_element != element){
		if (wk_last_element == 0){
			document.getElementById("dia"+element).style.background = "#cacaca";
			document.getElementById("dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("dia"+element).style.borderRightColor = "#cacaca";
			wk_last_element = element;
		}
		else {
			document.getElementById("dia"+wk_last_element).style.background = "#ececec";
			document.getElementById("dia"+wk_last_element).style.borderTopColor = "#ffffff";
			document.getElementById("dia"+wk_last_element).style.borderLeftColor = "#ffffff";
			document.getElementById("dia"+wk_last_element).style.borderBottomColor = "#cfcfcf";
			document.getElementById("dia"+wk_last_element).style.borderRightColor = "#cfcfcf";
			document.getElementById("dia"+element).style.background = "#cacaca";
			document.getElementById("dia"+element).style.borderTopColor = "#9d9d9d";
			document.getElementById("dia"+element).style.borderLeftColor = "#9d9d9d";
			document.getElementById("dia"+element).style.borderBottomColor = "#cacaca";
			document.getElementById("dia"+element).style.borderRightColor = "#cacaca";
							
			wk_last_element = element;
		}
		
		var req = new Ajax.Updater (
			'navigation_rechts_info',
			'/info.php',
			{
				method: 'get',
				parameters: { bildnummer: bildnummer, view: view },
				onComplete: function(){
					navigation_rechts_info_togg_ini ();
				}
			}
		);
	}
}

function suche_ini(){
	document.suchformular.suchformular_imgskip.value=0;
	document.suchformular.suchformular_pageskip.value=0;
	document.suchformular.bildnummer.value=0;
	document.suchformular.suchformular_view.value='tableau';
	document.suchformular.suchformular_frameless.value=0;
}

function suche_page_zurueck(zurueck){
	document.suchformular.bildnummer.value=0;
	document.suchformular.suchformular_imgskip.value=0;
	document.suchformular.suchformular_pageskip.value=zurueck;
	document.suchformular.suchformular_view.value='tableau';
	document.suchformular.submit();
}

function suche_page_weiter(weiter){
	document.suchformular.bildnummer.value=0;
	document.suchformular.suchformular_imgskip.value=0;
	document.suchformular.suchformular_pageskip.value=weiter;
	document.suchformular.suchformular_view.value='tableau';
	document.suchformular.submit();
}

function suche_page_blaettern(seite){
	document.suchformular.bildnummer.value=0;
	document.suchformular.suchformular_pageskip.value=seite;
	document.suchformular.suchformular_imgskip.value=0;
	document.suchformular.submit();
}

function suche_img_zurueck(page_zurueck,img_zurueck){
	document.suchformular.suchformular_pageskip.value=page_zurueck;
	document.suchformular.suchformular_imgskip.value=img_zurueck;
	document.suchformular.suchformular_view.value='preview';
	document.suchformular.submit();
}

function suche_img_weiter(page_weiter,img_weiter){
	document.suchformular.suchformular_pageskip.value=page_weiter;
	document.suchformular.suchformular_imgskip.value=img_weiter;
	document.suchformular.suchformular_view.value='preview';
	document.suchformular.submit();
}

function suche_tableau(bildnummer,page,img){
	document.suchformular.bildnummer.value=bildnummer;
	document.suchformular.suchformular_pageskip.value=page;
	document.suchformular.suchformular_imgskip.value=img;
	document.suchformular.suchformular_view.value='tableau';
	document.suchformular.submit();
}



function portfolio_addElement(bildnummer) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_portfolio_add.php',
		{
			method: 'post',
			parameters: { bildnummer: bildnummer }
		}
	);
}

function portfolio_delElement(bildnummer) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_portfolio_del_element_ask.php',
		{
			method: 'post',
			parameters: { bildnummer: bildnummer }
		}
	);
}

function kontakt(kontakt_betreff,kontakt_nachricht,url) {
	var req = new Ajax.Updater (
		'aktion',
		'/aktion_kontakt_betreff_nachricht.php',
		{
			method: 'post',
			parameters: { kontakt_betreff: kontakt_betreff, kontakt_nachricht: kontakt_nachricht },
			onComplete: function(){
					location.href=url;
				}
		}
	);
}


function checkagb() {
	if(document.agbcheck.agbbox.checked == false){
		document.getElementById('agbchecker').style.backgroundColor = "#e0dac2";
		return false;
	} 
}