//globale Variablen
	var arrAjaxQueue1 		= new Array();	//Priorität1
	var arrAjaxQueue2 		= new Array();  //Priorität2
	var arrAjaxQueue3 		= new Array();  //Priorität3
	
	var bFrmSerialize 	= false;
	var bFrmTransfer 	= false;
	
	var htmlIMGQueue = '';
	var htmlIMGLoad = '';
	
	var arrNicEditor = new Array();
	var arrCKEditor  = new Array();
	
	var scrptE = '';
	var scrptF = '';
	
	var strAjax = '';
	var jsCode = '';
	
//START - AJAX - Objekt initialisieren
	var ajax_http = false;
	if (window.XMLHttpRequest) { 
	// default
	    ajax_http = new XMLHttpRequest();
	    if (ajax_http.overrideMimeType) {
	        //ajax_http.overrideMimeType('text/html; charset=iso-8859-1');
	        ajax_http.overrideMimeType('text/html');
	    }
	} else if (window.ActiveXObject) { 
	// IE
	    try {
	        ajax_http = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch (e) {
	        try {
	            ajax_http = new ActiveXObject("Microsoft.XMLHTTP");
	        } catch (e) {}
	    }
	}
//ENDE - AJAX - Objekt initialisieren

/**
 * 		Verarbeiten von mehreren Ajax- Request 
 * 
 * 	@param		div_id		-> DIV-Bereich bei denen die Ausgae erscheinen soll
 *	@param		fileURL	-> http der zu verarbeitende Datei
 * 	@param 		queryString-> ONly vor POST-Var
 * 	@param		img_lade	-> evtl. ladebalken während der Verarbeitung
 * 	@param		img_lade	-> evtl. ladebalken während Request in der Warteschliefe leigt.
 *
 *	CSS: 		Info-msg		-> #msg_info
 *	    		Error-msg		-> #msg_err
 * 
 * 	
**/
function ajax_request(div_id, fileURL, queryString, img_lade, img_wait, img_div, frm_submit, setPos, location, prio) {
	if(ajax_http && document.getElementById(div_id)) {		
		if($('#'+div_id)){	
			$('#'+div_id).removeClass().addClass("msgLoad");
		}
		if(setPos == 'Full')  var bFullScreen = '1';
		
		if(ajax_http.readyState == 1 || ajax_http.readyState == 2 || ajax_http.readyState == 3) {			//Queue				
			if(prio == 1){
				arrAjaxQueue1Length = arrAjaxQueue1.length;
				arrAjaxQueue1[arrAjaxQueue1Length] = new Array();
				arrAjaxQueue1[arrAjaxQueue1Length][0] = div_id;
				arrAjaxQueue1[arrAjaxQueue1Length][1] = fileURL;
				arrAjaxQueue1[arrAjaxQueue1Length][2] = queryString;
				arrAjaxQueue1[arrAjaxQueue1Length][3] = img_lade;
				arrAjaxQueue1[arrAjaxQueue1Length][4] = img_wait;
				arrAjaxQueue1[arrAjaxQueue1Length][5] = img_div;
				arrAjaxQueue1[arrAjaxQueue1Length][6] = frm_submit;
				arrAjaxQueue1[arrAjaxQueue1Length][7] = setPos;
				arrAjaxQueue1[arrAjaxQueue1Length][8] = location;
				arrAjaxQueue1[arrAjaxQueue1Length][9] = prio;
			} else if(prio == 2){
				arrAjaxQueue2Length = arrAjaxQueue2.length;
				arrAjaxQueue2[arrAjaxQueue2Length] = new Array();
				arrAjaxQueue2[arrAjaxQueue2Length][0] = div_id;
				arrAjaxQueue2[arrAjaxQueue2Length][1] = fileURL;
				arrAjaxQueue2[arrAjaxQueue2Length][2] = queryString;
				arrAjaxQueue2[arrAjaxQueue2Length][3] = img_lade;
				arrAjaxQueue2[arrAjaxQueue2Length][4] = img_wait;
				arrAjaxQueue2[arrAjaxQueue2Length][5] = img_div;
				arrAjaxQueue2[arrAjaxQueue2Length][6] = frm_submit;
				arrAjaxQueue2[arrAjaxQueue2Length][7] = setPos;
				arrAjaxQueue2[arrAjaxQueue2Length][8] = location;
				arrAjaxQueue2[arrAjaxQueue2Length][9] = prio;
			}else{
				arrAjaxQueue3Length = arrAjaxQueue3.length;
				arrAjaxQueue3[arrAjaxQueue3Length] = new Array();
				arrAjaxQueue3[arrAjaxQueue3Length][0] = div_id;
				arrAjaxQueue3[arrAjaxQueue3Length][1] = fileURL;
				arrAjaxQueue3[arrAjaxQueue3Length][2] = queryString;
				arrAjaxQueue3[arrAjaxQueue3Length][3] = img_lade;
				arrAjaxQueue3[arrAjaxQueue3Length][4] = img_wait;
				arrAjaxQueue3[arrAjaxQueue3Length][5] = img_div;
				arrAjaxQueue3[arrAjaxQueue3Length][6] = frm_submit;
				arrAjaxQueue3[arrAjaxQueue3Length][7] = setPos;
				arrAjaxQueue3[arrAjaxQueue3Length][8] = location;
				arrAjaxQueue3[arrAjaxQueue3Length][9] = prio;
			}

			//START - aktuellen Div abdunkeln.... Queue
				StyleAX('Queue', div_id, setPos, img_wait);
			//ENDE - aktuellen Div abdunkeln.... Queue
		} else {						//Load
			//START - aktuellen Div abdunkeln.... Load
				StyleAX('Load', div_id, setPos, img_lade);
			//ENDE  - aktuellen Div abdunkeln.... Load

			if(location == '_self'){
				window.location.href = fileURL;
			}else if(location == '_blank'){
				window.open(fileURL);
			} else {
				if(queryString == "") queryString = "?";  //Bug - FF 404 
				if(queryString == "" && 0) {
					ajax_http.open('GET', fileURL, true);
				} else {
					ajax_http.open('POST', fileURL, true);
					ajax_http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
					//ajax_http.setRequestHeader('Content-Type', 'text/html; charset=iso-8859-1');
					//alert(queryString);
					ajax_http.send(queryString);
					
				}
				ajax_http.onreadystatechange = function () {
					if(ajax_http.readyState == 4) {
						if(ajax_http.status == 200) {
							if(img_div != null && img_div != "") {
						    	document.getElementById(img_div).style.display = "none";
						    }
							
						    if(document.getElementById(div_id)){
						    	do{
								    if(bFrmSerialize == false){
								    	//alert('helo'+div_id);
								    	bFrmTransfer = true;
								    	
								    	$('#'+div_id+'IMGLoad').remove();
								    
								    	//Deb4
								    		/*
								    		$('#HeaderActionAX').show();
								    		
								    		var strAjax = ajax_http.responseText;
								    		
								    		//var reScript = /<script\b[^>]*>(.*?)<\/script>/i;
								    		//var reScript = /<script\b[^>]*>(.*?)<\/script>/i;
								    		//var reScript = /((<[\s\/]*script\b[^>]*>)([^>]*)(<\/script>))/i;
								    		var reScript = /<script[^>]*>(.*)<\/script>/i;

									    	 var jsCode   = 	reScript.exec("123<script>456</script>789<script>101112</script>131415");
									    	 
										     $('#HeaderActionAX').append('<br>RegExp.length: '+RegExp.length);
										     $('#HeaderActionAX').append('<br>RegExp.$1: '+RegExp.$1);
										     $('#HeaderActionAX').append('<br>RegExp.$2: '+RegExp.$2);
										     $('#HeaderActionAX').append('<br>RegExp.$3: '+RegExp.$3);
										     $('#HeaderActionAX').append('<br>RegExp.$4: '+RegExp.$4);
								    		

									    	 
									    	 if(1){
										    	 $('#HeaderActionAX').append('<br>jsCode: '+jsCode);
										    	 //$('#HeaderActionAX').append('<br>jsCode.length: '+jsCode.length);
										    	 $('#HeaderActionAX').append('<br>jsCode[0]: '+jsCode[0]);
										    	 $('#HeaderActionAX').append('<br>jsCode[1]: '+jsCode[1]);
										    	 $('#HeaderActionAX').append('<br>jsCode[2]: '+jsCode[2]);
									    	 }*/
								    	
								    	var strAjax = ajax_http.responseText;
								    	 
							    		document.getElementById(div_id).innerHTML = ajax_http.responseText;		//Error Kontaktformular ZL hinzufügen
								    	//$('#'+div_id).html(strAjax);									//Script im Ajax wird ignoriert
									    
							    			
								    	$('#'+div_id).removeClass();
								    	
								    	//alert($('#'+div_id).html());
								    	
								    	if(div_id && setPos){
											StyleAXHide(div_id, setPos);
										}else if(div_id == 'action_ax') {
								    		ActionAXHide();
								    	}
								   	}
							   		bFrmTransfer = false;
						    	}while(bFrmSerialize == true);
						    }
						    
						    
						//START - ALTE Variante für Datenmanipulation via JS - NEU: JS Script-Tags im Ajax-Aufruf möglich
							if(div_id == 'Search' || div_id == 'SearchAX' || div_id == 'SearchChange' || div_id == 'SearchChangeAX' || div_id == 'menu_h2') {
								if(document.getElementById('datepicker_bis')) {
									$("#datepicker_bis").datepicker({ dateFormat: 'dd.mm.yy', monthNamesShort: ['Jan','Feb','März','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'], firstDay: 1, dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], changeYear: true, changeMonth: true, yearRange: '4' });
								}
								if(document.getElementById('datepicker_von')) {
									$("#datepicker_von").datepicker({ dateFormat: 'dd.mm.yy',  monthNamesShort: ['Jan','Feb','März','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'], firstDay: 1, dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], changeYear: true, changeMonth: true, yearRange: '4' });
								}
								
								if(document.getElementById('DatepickerBisChange')) {
									$("#DatepickerBisChange").datepicker({ dateFormat: 'dd.mm.yy', monthNamesShort: ['Jan','Feb','März','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'], firstDay: 1, dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], changeYear: true, changeMonth: true, yearRange: '4' });
								}
								if(document.getElementById('DatepickerVonChange')) {
									$("#DatepickerVonChange").datepicker({ dateFormat: 'dd.mm.yy',  monthNamesShort: ['Jan','Feb','März','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'], firstDay: 1, dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], changeYear: true, changeMonth: true, yearRange: '4' });
								}
							} else if(div_id == 'buchungen_suche_ax') {
								$("#txt_date_von").datepicker({ dateFormat: 'dd.mm.yy', changeYear: false, changeMonth: false, yearRange: '-10:+0' });
								$("#txt_date_bis").datepicker({ dateFormat: 'dd.mm.yy', changeYear: false, changeMonth: false, yearRange: '-10:+0' });
								ajax_refresh('buchungen_liste_ax');
							} else if(div_id == 'preis_liste_ax'){
								//alert("prices loaded, please check table_preis_liste_submit-"+document.getElementById('rad_kabine_id')+"-");
								if(!document.getElementById('rad_kabine_id') && document.getElementById('table_preis_liste_submit')){
									document.getElementById('table_preis_liste_submit').style.display = 'none';
								}else if(document.getElementById('rad_kabine_id') && document.getElementById('table_preis_liste_submit')){
									document.getElementById('table_preis_liste_submit').style.display = '';
								}
							} else if(div_id == 'menu_h2'){
								$('#'+div_id).removeClass().addClass(div_id);
							} else if(div_id == 'ContentActionAX'){
								  if(document.getElementById('txtThemeData')) {
									  arrNicEditor['txtThemeData'] = new nicEditor({fullPanel : true}).panelInstance('txtThemeData');
								  }
							}
						//END  - ALTE Variante für Datenmanipulation via JS - NEU: JS Script-Tags im Ajax-Aufruf möglich

						//INIT Default - WYSIWYG-Editor - NicEditor
							 $('#'+div_id+' .NicEdit').each(function(){
						         // alert($(this).attr('id'));
								 arrNicEditor[$(this).attr('id')] = new nicEditor({fullPanel : true}).panelInstance($(this).attr('id'));
							  });
							 

						//INIT Default - WYSIWYG-Editor - CKEditor
							 $('#'+div_id+' .CKEdit').each(function(){
						          if(document.getElementById($(this).attr('id'))) {
						        	  arrCKEditor[$(this).attr('id')] = CKEDITOR.editor.replace( 	$(this).attr('id') , { skin : 'office2003'});
						          }
							  });
							 

						//INIT Default - JQuery Datepicker
							 $('#'+div_id+' .Datepicker').each(function(){
						         $('#'+div_id+' #'+$(this).attr('id')).datepicker({ dateFormat: 'dd.mm.yy',  monthNamesShort: ['Jan','Feb','März','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'], firstDay: 1, dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], changeYear: true, changeMonth: true, yearRange: '+0:+5' });
							  });
								 
							 
						//INIT Default - JQuery Tabs1
							/*Bug
						     if($('#'+div_id+' #Tabs')){
								var TabsNav = $("#"+div_id+" #Tabs .Tabs-nav ul li").attr('id');
								$("#"+div_id+" #Tabs").simpleTabs({
									fadeSpeed: "medium", // @param : low, medium, fast
									//defautContent: 1, // @param : number ( Tabs-nav-number)
									defautContent: TabsNav.split("Tabs-nav-").join(""),
									autoNav: "false", // @param : true or false
									closeTabs : "true" // @param : true or false;
								});
							 }
						 */
					 
							if(div_id == 'BookingStatList'){
								//clear Queue
								arrAjaxQueue1 		= new Array();	//Priorität1
								arrAjaxQueue2 		= new Array();  //Priorität2
								arrAjaxQueue3 		= new Array();  //Priorität3
							}
							
						//INIT JS Scripts deb1		- Err IE  - display:none
						/*
							  $('#'+div_id+' ScriptAutoLoad').each(function(){
								 if($(this).attr('src')){
									  //Create a 'script' element	
									  scrptE = document.createElement("script");
										  scrptE.setAttribute("type", "text/javascript");
										  scrptE.setAttribute("language", "JavaScript");
										  scrptE.setAttribute("src", $(this).attr('src'));
									  // Now add this new element to the head tag
										  
									 document.getElementsByTagName("head")[0].appendChild(scrptE);
								 }else{
									 
									 if($(this).html() != ''){
										 
										 //IE BUG
										 if(document.all){
											// alert('IE');
											 var ss = document.createElement('script');
											 var scr = $(this).html().split("&amp;").join("&");
											 ss.text = scr;
											 var hh = document.getElementsByTagName('head')[0];
											 hh.appendChild(ss);
										 } else {
											 //alert('!IE');
											 var ss = document.createElement('script');
											 var scr = $(this).html().split("&amp;").join("&");
											 var tt = document.createTextNode(scr);
											 ss.appendChild(tt);
											 var hh = document.getElementsByTagName('head')[0];
											 hh.appendChild(ss);
										 }
									 }
								 }
							  });
						*/
						
				    	//define execute javascript
							  jsCode = GetJavaScriptCode(strAjax);
			    			
						//INIT JS deb2
				    		if(jsCode != ''){
								 if(document.all){
									// alert('IE');
									 var ss = document.createElement('script');
									 var scr = jsCode.split("&amp;").join("&");
									 ss.text = scr;
									 var hh = document.getElementsByTagName('head')[0];
									 hh.appendChild(ss);
								 } else {
									 //alert('!IE');
									 var ss = document.createElement('script');
									 var scr = jsCode.split("&amp;").join("&");
									 var tt = document.createTextNode(scr);
									 ss.appendChild(tt);
									 var hh = document.getElementsByTagName('head')[0];
									 hh.appendChild(ss);
								 }
				    		}
							  
						//Submit d. angegebenen Formulars verwenden
							if (frm_submit == '1') {
								if(js_check_submit_request()) eval('document.frm_'+div_id+'.submit();');
							}
							
						} else if(ajax_http.status == 404) {
							document.getElementById(div_id).innerHTML = '<div id="msg_err">Die Datei wurde nicht gefunden!</div>';
						}
						
						//START - Queue 
							arrAjaxQueue1Length = arrAjaxQueue1.length;
							if(arrAjaxQueue1Length != 0) {
								ajax_request(arrAjaxQueue1[0][0], arrAjaxQueue1[0][1], arrAjaxQueue1[0][2], arrAjaxQueue1[0][3], arrAjaxQueue1[0][4], arrAjaxQueue1[0][5], arrAjaxQueue1[0][6], arrAjaxQueue1[0][7], arrAjaxQueue1[0][8], arrAjaxQueue1[0][9]);
								arrAjaxQueue1.shift(); //Erstes Element entfernen, den Rest eine Position nach vorne rücken
							}else{
								arrAjaxQueue2Length = arrAjaxQueue2.length;
								if(arrAjaxQueue2Length != 0) {
									ajax_request(arrAjaxQueue2[0][0], arrAjaxQueue2[0][1], arrAjaxQueue2[0][2], arrAjaxQueue2[0][3], arrAjaxQueue2[0][4], arrAjaxQueue2[0][5], arrAjaxQueue2[0][6], arrAjaxQueue2[0][7], arrAjaxQueue2[0][8], arrAjaxQueue2[0][9]);
									arrAjaxQueue2.shift(); //Erstes Element entfernen, den Rest eine Position nach vorne rücken
								}else{
									arrAjaxQueue3Length = arrAjaxQueue3.length;
									if(arrAjaxQueue3Length != 0) {
										ajax_request(arrAjaxQueue3[0][0], arrAjaxQueue3[0][1], arrAjaxQueue3[0][2], arrAjaxQueue3[0][3], arrAjaxQueue3[0][4], arrAjaxQueue3[0][5], arrAjaxQueue3[0][6], arrAjaxQueue3[0][7], arrAjaxQueue3[0][8], arrAjaxQueue3[0][9]);
										arrAjaxQueue3.shift(); //Erstes Element entfernen, den Rest eine Position nach vorne rücken
									}else{
										
									}
								}
							}
						//ENDE - Queue 
					}
				};
				if(queryString == "") {
					ajax_http.send(null);
				}
			}
		}
	}
	return true;
}


//START ajax_transition 
	/*
	 * Ajax Aufruf einleiten
	 * 
	 * valid jsonVals
	 * 
	 * 	@param		Url			-> Url der aufzurufenden Datei
	 * 
	 * 		@param		DivID		-> DIV-Bereich bei denen die Ausgae erscheinen soll
	 *  ||	@param		Location	-> Set('_self', '_blank')
	 * 
	 * ######## Option Para ###############
	 * 
	 * 	@param 			Action		-> weiterführende Aktionen für den angegebenen DivLayer "clear", "close"
	 * 	@param 			bShow		-> DivLayer wird am Ende eingeblenden 	$('#DivID').show();
	 *  @param 			setPos		-> set('Full', 'BottomRight', 'TopCenter', 'TopLeft', 'TopRight', 'MiddleCenter', 'BottomLeft', 'BottomLeft', 'BottomCenter')
	 * 								-> NULL = Keine zusätzliche Positionierung od. Einblendung
	 * 								-> Full = DivLayer wird während der Bearb. über das ganze Fenster dargestellt
	 * 								-> BottomRight 	= DivLayer fixiert ganz unten rechts
	 * 								-> TopCenter 	= DivLayer fixiert zentriert ganz oben 
	 * 								-> weitere: TopLeft, TopRight, MiddleCenter, BottomLeft, BottomCenter
	 * 	OLD@param 		bFullScreen	-> DivLayer wird während der Bearb. über das ganze Fenster dargestellt
	 * 	@param 			GET			-> zu übertragene POST Parameter
	 * 
	 * 		@param		POST		-> zu übertragene GET  Parameter
	 * 	|| 	@param		frmID		-> zu übertragene Formulardaten der angegebenen FormularID _> method POST
	 * 		@param		bFrmSubmit	-> Action des angegebenen Formulares wird ausgeführt
	 * 
	 * 	@param			Prio		-> Set('1', '2', '3') Default 2; -> dieser kann geändert werden, um mehrere unwichtige Ajax-Aufruf im Hintergrund abzuwickeln 
	 * 
	 */
	function ajax_transition(jsonVals){
	//GetUrl
		var Url = jsonVals.Url;
		if(!Url) Url = jsonVals.link;							//OldValue

	//GetLocation
		var Location = jsonVals.Location;
		if(!Location) Location = jsonVals.location;			//OldValue
		
	//GetDivID
		var DivID = jsonVals.DivID;
		if(!DivID) DivID = jsonVals.div_id;					//OldValue
		
	//GetAction
		var Action = jsonVals.Action;
		if(!Action) Action = jsonVals.action;										//OldValue
			
		//alert(Url);
		
		if((DivID || Location == '_self' || Location == '_blank') && (Url || Action)){
			//GetParaGET
				var GET = jsonVals.GET;
				if(!GET) GET = jsonVals.para_get;									//OldValue
				
			//GetParaPost
				var POST = jsonVals.POST;
				if(!POST) POST = jsonVals.para_post;								//OldValue

			//GetPrio
				var Prio = jsonVals.Prio;
				if(Prio != 1 &&  Prio != 2 && Prio != 3) Prio = jsonVals.prio;		//OldValue
				if(Prio != 1 &&  Prio != 2 && Prio != 3) Prio = 2;					//Default Value

			//GetFrmID 
				var frmID = jsonVals.frmID;
				if(!frmID) frmID = jsonVals.frm_id;									//OldValue

			//GetFrmSubmit 
				var bFrmSubmit = jsonVals.bFrmSubmit;
				if(!bFrmSubmit) bFrmSubmit = jsonVals.frm_id;						//OldValue
				
			//GetImgDivID 
				var ImgDivID = jsonVals.ImgDivID;
				if(!ImgDivID) ImgDivID = jsonVals.frm_submit;						//OldValue
				
			//GetPosition
				var setPos		= jsonVals.setPos;
				
				var bFullScreen = jsonVals.bFullScreen;
				if(!bFullScreen) bFullScreen = jsonVals.FullScreen;					//OldValue
				if(bFullScreen == '1') setPos = 'Full';
				
			//GetImgUrlLoad
				var ImgUrlLoad = jsonVals.ImgUrlLoad;
				if(!ImgUrlLoad) ImgUrlLoad = jsonVals.img_load;						//OldValue
				
			//GetImgUrlLoad
				var ImgUrlQueue = jsonVals.ImgUrlQueue;
				if(!ImgUrlQueue) ImgUrlQueue = jsonVals.img_queue;					//OldValue
				
			if(GET){
				Url += "?"+GET+"&div_id="+DivID+"&DivID="+DivID;
			}else{
				Url += "?div_id="+DivID+"&DivID="+DivID;
			}
			if(Action){ 
				if (Action == 'clear' && frmID) {
					//coming soon
				}else if(Action == 'close'){
					if(DivID == 'OverlayAX'){
						$('#'+DivID).hide('slow');
						$('#'+DivID+'Background').hide('');
						/*
						$('#'+args.div_id).hide('slide');
						$('#'+args.div_id+'Overlay').hide('fold');
						*/
					}
					document.getElementById(DivID).innerHTML = '';
					return true;
				}else if(Action == 'submit'){
					bFrmSubmit = '1';
				}else{
					Url += "&action="+Action+"&Action="+Action;
				}
			}else Url += "&action=&Action=";

			if(Location == '_self' || Location == '_blank'){
				Url = jsonVals.Url;
				if(!Url) Url = jsonVals.link;							//OldValue
			}

			if(frmID){	
				do{	
					if(bFrmTransfer == false){
						bFrmSerialize = true;
						
						//this.submit.closureListener(this)
						$('.NicEdit').each(function(){
					         // alert($(this).attr('id'));
							arrNicEditor[$(this).attr('id')].instanceById($(this).attr('id')).saveContent();
						});
						

						$('.CKEdit').each(function(){
					         // alert($(this).attr('id'));
							//arrCEditor[$(this).attr('id')].instanceById($(this).attr('id')).saveContent();
							if(arrCKEditor[$(this).attr('id')]){
								//arrCKEditor['txtContentLangDesc2DE'] = arrCKEditor[$(this).attr('id')].getData();
								//alert(arrCKEditor[$(this).attr('id')].getData());
								$(this).text(arrCKEditor[$(this).attr('id')].getData());
							}
						});
						
						//Anzeige russischer Schriftzeichen vor der Umwandlung in Ascii
						var temp = new Array();
						/*
						
						if($('#'+frmID))
						{
							if(document.getElementById('temp1'))
							{
								document.getElementById('temp1').innerHTML += '\nLENGT' + $('#'+frmID).length;
							}	
							
							$('#'+frmID).each(function(){
							
								//alert(frmID);
								if(document.getElementById('temp1'))
								document.getElementById('temp1').innerHTML += '\n' + frmID;
								
								if(document.getElementsByTagName("form")) var frm_elements = document.getElementsByTagName("form")[frmID];
								else var frm_elements = document.getElementsByTagName("form")[frmID];
								//var frm_elements = $(this);
								if(frm_elements) {
									var elements = frm_elements;
									
									for (var i = 0; i < elements.length; i++) {
										temp[i] = elements[i].value;							
										js_Convert2ASCII(elements[i]);
									}
									//serialize with jquery
									POST = '&'+$(frm_elements).serialize();
									
									for(var i2 = 0; i2 < temp.length; i2++)
									{
										elements[i2].value = temp[i2];
									}
								}
							});
						}
						else
						{*/
							if(document.getElementsByTagName("form")) var frm_elements = document.getElementsByTagName("form")[frmID];
							else var frm_elements = document.getElementsByTagName("form")[frmID];
							
							if(frm_elements) {
								var elements = frm_elements;
								
								for (var i = 0; i < elements.length; i++) {
									temp[i] = elements[i].value;							
									js_Convert2ASCII(elements[i]);
								}
								
								//serialize with jquery
								POST = '&'+$(frm_elements).serialize();
								
								for(var i2 = 0; i2 < temp.length; i2++)
								{
									elements[i2].value = temp[i2];
								}
							}
						//}
					
					}
					bFrmSerialize = false;
					//alert(args.para_post);
				}while(bFrmTransfer == true);
			}
			//alert("ajax_request("+DivID+", "+Url+", "+POST+", "+ImgUrlLoad+", "+ImgUrlQueue+", "+ImgDivID+", "+bFrmSubmit+", "+bFullScreen+", "+Location+", "+Prio+");");
			ajax_request(DivID, Url, POST, ImgUrlLoad, ImgUrlQueue, ImgDivID, bFrmSubmit, setPos, Location, Prio);
			
			//$('#'+DivID).load(Url);
		}else {
			//err... no current div
			//alter("err("+DivID+", "+Url+", "+Location+")");
		}
		return true;
	}
//ENDE ajax_transition
	function GetFormData(id)
	{
		var temp = new Array();
		var data = '';
		
		
		//this.submit.closureListener(this)
		$('#'+id+' .NicEdit').each(function(){
	         // alert($(this).attr('id'));
			arrNicEditor[$(this).attr('id')].instanceById($(this).attr('id')).saveContent();
		});
		

		$('#'+id+' .CKEdit').each(function(){
	         // alert($(this).attr('id'));
			//arrCEditor[$(this).attr('id')].instanceById($(this).attr('id')).saveContent();
			if(arrCKEditor[$(this).attr('id')]){
				//arrCKEditor['txtContentLangDesc2DE'] = arrCKEditor[$(this).attr('id')].getData();
				//alert(arrCKEditor[$(this).attr('id')].getData());
				$(this).text(arrCKEditor[$(this).attr('id')].getData());
			}
		});
		
		/*
		$("#" + id + " input").each(function  () {
			// wenn input type nicht radio
			if ($(this).type === "radio") {
			// wenn radio-Button ausgewählt
			if ($(this).checked) {
			// Zusammensetzen des Datenstrings
			if (data != "") data += "&";
				data += $(this).name + "=" + $(this).value;
			}
			// wenn input-type nicht radio
			} else {
				if ($(this).type !== "submit") {
					// Zusammensetzen des Datenstrings
				if (data != "") data += "&";
					data += $(this).name + "=" + encodeURIComponent($(this).value);
				}
			}
		});
		
		// für alle select-Boxen und Textfelder
		$("#" + id + " select, #" + id + " textarea" ).each(function () {
			// Zusammensetzen des Datenstrings
			if (data != "") data += "&";
			data += $(this).name + "=" + $(this).value;
		});

		*/
		
		if(document.getElementsByTagName("form")) var frm_elements = document.getElementsByTagName("form")[id];
		else var frm_elements = document.getElementsByTagName("form")[id];
		
		if(frm_elements) {
			var elements = frm_elements;
			
			for (var i = 0; i < elements.length; i++) {
				temp[i] = elements[i].value;							
				js_Convert2ASCII(elements[i]);
			}
			
			//serialize with jquery
			data = '&'+$(frm_elements).serialize();
			
			for(var i2 = 0; i2 < temp.length; i2++)
			{
				elements[i2].value = temp[i2];
			}
		}

		return data;
	}
	
	
	
	function StyleAX(Type, DivID, setPos, bImg){
		if(setPos == 'Full')  var bFullScreen = '1';
		if(Type == 'Queue'){
		//START - aktuellen Div abdunkeln.... Queue
			$('#'+DivID).removeClass().addClass("msgQueue");
			if(DivID && setPos){
				StyleAXShow(DivID, setPos);

				if(setPos == 'Full') {
					$('#'+DivID).before('<div id="'+DivID+'IMGQueue" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:fixed;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div><img style="margin-top:10px;" src="img/Ajax/LoadBig.gif" border="0"></div>');
				} else if(setPos == 'BottomRight') {
					$('#'+DivID).html('<div id="'+DivID+'IMGQueue" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div></div>');
				}
			}else if(DivID == 'action_ax') {			//only Kreuzfahrten.de
				ActionAXShow(bFullScreen);
				if(bFullScreen == '1') {
					$('#'+DivID).before('<div id="'+DivID+'IMGQueue" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:fixed;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div><img style="margin-top:10px;" src="img/Ajax/LoadBig.gif" border="0"></div>');
				} else {
					$('#'+DivID).html('<div id="'+DivID+'IMGQueue" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div></div>');
				}
			}else if(DivID == 'preis_liste_ax') {
				$('#'+DivID).before('<div id="'+DivID+'IMGQueue" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:absolute;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Preise werden aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div><img style="margin-top:10px;" src="img/Ajax/LoadBig.gif" border="0"></div>');
			} else if(bImg != 'none'){
				$('#'+DivID).before('<div id="'+DivID+'IMGQueue" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:absolute;"><div id="msg_info"><img src="img/Ajax/Queue.gif" border="0" ></div>');
			}
		//ENDE  - aktuellen Div abdunkeln.... Queue
		}else if(Type == 'Load'){	
		//START - aktuellen Div abdunkeln.... Load
			$('#'+DivID).removeClass().addClass("msgLoad");
			$('#'+DivID+'IMGQueue').remove();
			if(DivID && setPos){
				StyleAXShow(DivID, setPos);
				if(setPos == 'Full') {
					$('#'+DivID).before('<div id="'+DivID+'IMGLoad" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:fixed;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div><img style="margin-top:10px;" src="img/Ajax/LoadBig.gif" border="0"></div>');
				} else if(setPos == 'BottomRight'){
					$('#'+DivID).html('<div id="'+DivID+'IMGLoad" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div></div>');
				}
			} else if(DivID == 'OverlayAX'){
				$('#'+DivID+'Background').show('');
				$('#'+DivID).show('slow');
				
				$('#'+DivID).html('<div id="'+DivID+'IMGLoad" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:absolute;"><div id="msg_info"><img src="img/Ajax/Load.gif" border="0" ></div></div>');
			} else if(DivID == 'action_ax') {			//old - only kreuzfahrten.de
				ActionAXShow(bFullScreen);
				if(bFullScreen == '1') {
					$('#'+DivID).before('<div id="'+DivID+'IMGLoad" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:fixed;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div><img style="margin-top:10px;" src="img/Ajax/LoadBig.gif" border="0"></div>');
				} else {
					$('#'+DivID).html('<div id="'+DivID+'IMGLoad" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Seite aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div></div>');
				}
			}else if(DivID == 'preis_liste_ax') {
				$('#'+DivID).before('<div id="'+DivID+'IMGLoad" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:absolute;"><div id="msg_info"><img id="preise_wait_img1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"> Preise werden aktualisiert. <img id="preise_wait_img1_1" src="img/Ajax/Load.gif" border="0" style="margin-top:2px;"></div><img style="margin-top:10px;" src="img/Ajax/LoadBig.gif" border="0"></div>');
			} else if(bImg != 'none') {
				$('#'+DivID).before('<div id="'+DivID+'IMGLoad" style="height:'+$('#'+DivID).height()+'px;width:'+$('#'+DivID).width()+'px;text-align: center;position:absolute;"><div id="msg_info"><img src="img/Ajax/Load.gif" border="0" ></div></div>');
			}
		//ENDE - aktuellen Div abdunkeln.... Load
		}else {		//Hide
			
		}
	}
    
    function StyleAXShow(DivID, setPos) {
    	if(setPos == 'Full') {
    		
			$("#"+DivID).height("100%");
			$("#"+DivID).width("100%");
			
			$("#"+DivID).css("top", "0px");
			$("#"+DivID).css("left", "0px");
			$("#"+DivID).css("margin-top", "0px");
			$("#"+DivID).css("margin-left", "0px");
			
			$("#"+DivID).css("filter", "alpha(opacity=30)");
			$("#"+DivID).css("-moz-opacity", "0.3");
			$("#"+DivID).css("opacity", "0.3");

			$("#"+DivID).animate({backgroundColor: "#eeeeee", color: "#007abb" }, "slow");
			
			/*
    		$("#"+DivID).animate({ 	height: "100%",
    								width: "100%",
    								top: "0px",
    								left: "0px", 
    								filter: "alpha(opacity=30)",
    								opacity: "0.3"  }, "slow");
    		$("#"+DivID).animate({backgroundColor: "#eeeeee", color: "#007abb" }, "slow");*/
			
    	} else if(setPos == 'BottomRight'){
			$("#"+DivID).height("23px");
			$("#"+DivID).width("400px");
			$("#"+DivID).css("margin-top", "-23px");
			$("#"+DivID).css("margin-left", "-400px");
			$("#"+DivID).css("top", "100%");
			$("#"+DivID).css("left", "100%");
			
			$("#"+DivID).css("filter", "alpha(opacity=70)");
			$("#"+DivID).css("-moz-opacity", "0.7");
			$("#"+DivID).css("opacity", "0.7");
    	}
    	return false;
    }
    
    function StyleAXHide(DivID, setPos) {
    	if($("#"+DivID) && setPos) {
			$("#"+DivID).height("1px");
			$("#"+DivID).width("1px");
			$("#"+DivID).css("top", "100%");
			$("#"+DivID).css("left", "100%");
			$("#"+DivID).css("margin-top", "0px");
			$("#"+DivID).css("margin-left", "0px");
    	}
    	return false;
    }
    
 

