function jsInitial() {
	try { jsSearchEngine(); } catch(e) {}
	try { jsSearchResults(); } catch(e) {}
	
	try { jsStatistik(); } catch(e) {}
	try { jsKontakt(); } catch(e) {}
	try { jsEinloggen(); } catch(e) {}
	try { jsPasswort(); } catch(e) {}
	try { jsRegistrieren(); } catch(e) {}
	
	try { jsTravelSecure(); } catch(e) {}
	try { jsHolidayAutos(); } catch(e) {}
	
	try { jsKontoNewObject(); } catch(e) {}
	try { jsKontoEditObject(); } catch(e) {}
	try { jsKontoEditDaten(); } catch(e) {}
	try { jsKontoEditPasswort(); } catch(e) {}
	
	try { jsApartment(); } catch(e) {}
	try { jsAnfragen(); } catch(e) {}
	try { jsBooking(); } catch(e) {}
	
	try { jsBookmark(); } catch(e) {}
}

function setTarget(pThis) {
	pThis.target = pThis.href;
}

function setQTip(pID, pPosition, pTitle, pMessage, pExample) {}

function submitInit(pID) {
	$("#"+pID+" *").blur();
	$("#"+pID+" *").attr("disabled", true);
}
function submitLogic(pID, pData, pMessage, pURI) {
	if(pData === "successfull") trueReturn(pID, pMessage, pURI);
	else {
		$("#"+pID+" .input").attr("disabled", false);
		alert("Fehler bei der Eingabe\n\nSie werden im Folgenden zu dem Eingabefeld navigiert, welches den Fehler verursacht hat.");
		$("#"+pID+" .button").attr("disabled", false);
		focusInput(pID+"_"+pData);
	}
}
function focusInput(pID) {
	$.scrollTo("#"+pID, 500, {
		offset: {top: -100},
		onAfter: function() {$("#"+pID).focus();}
	});
}
var mTimeOutHREF = null;
function trueReturn(pID, pMessage, pURI) {
	$("#"+pID+"_submit").fadeOut("slow");
	$("#"+pID+"_reset").fadeOut("slow", function() {
		$("#"+pID+"_reset").css("color", "#449944");
		$("#"+pID+"_reset").css("font-weight", "bold");
		$("#"+pID+"_reset").val(pMessage);
		$("#"+pID+"_reset").fadeIn("slow");
		window.clearTimeout(mTimeOutHREF);
		if(pURI.length > 0) mTimeOutHREF = window.setTimeout("window.location.href = '/"+pURI+"';", 100);
	});
}
var mHilfeShowHide = [];
function hilfeShowHide(pID) {
	if(mHilfeShowHide[""+pID] == undefined || mHilfeShowHide[""+pID] == "hide") {
		$("#answer_"+pID).slideDown("slow");
		mHilfeShowHide[""+pID] = "show";
		hilfeCounterInc(pID);
	}
	else {
		$("#answer_"+pID).slideUp("slow");
		mHilfeShowHide[""+pID] = "hide";
	}
}
function hilfeCounterInc(pID) {
	$.get("sys/incCountFAQ.php", { faq: pID }, function(data) {});
}
function bindDatePicker(pID) {
	$("#"+pID).datepicker({
		clearText: 'l&#246;schen', clearStatus: 'aktuelles Datum l&#246;schen',
		closeText: 'schlie&#223;en', closeStatus: 'ohne&#32;&#196;nderungen schlie&#223;en',
		prevText: '&#x3c;zur&#252;ck', prevStatus: 'letzten Monat zeigen',
		prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
		nextText: 'Vor&#x3e;', nextStatus: 'n&#228;chsten Monat zeigen',
		nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
		currentText: 'heute', currentStatus: '',
		monthNames: ['Januar','Februar','M&#228;rz','April','Mai','Juni',
		'Juli','August','September','Oktober','November','Dezember'],
		monthNamesShort: ['Jan','Feb','M&#228;r','Apr','Mai','Jun',
		'Jul','Aug','Sep','Okt','Nov','Dez'],
		monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
		weekHeader: 'Wo', weekStatus: 'Woche des Monats',
		dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
		dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
		dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
		dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d',
		dateFormat: 'dd.mm.yy', firstDay: 1,
		initStatus: 'Wähle ein Datum', isRTL: false,
		showMonthAfterYear: false, 
		yearSuffix: '', 
		minDate: new Date(2010, 8, 9)
		} );
}
function toggleTelefonBild() {
	$.get( "/templates/desktop/system/toggleTelefonBild.php", {}, function( data ) {
		window.location.href = "Vermieten/Administration";
	} );
}