function formatTitle(title, currentArray, currentIndex, currentOpts) {
	/*return '<div id="history-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/data/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';*/
	return '<div id="history-title">' + (title && title.length ? '<b>' + title + '</b><br/>' : '' ) + (currentIndex + 1) + ' / ' + currentArray.length + '</div>';
}

$.fn.preload = function() {
    this.each(function(){
        $('<img/>')[0].src = this;
    });
}

function chkFormular () {
	if (ContactForm_userFirstName.value == "" || ContactForm_userFirstName.value == null) {
		alert("Bitte Ihren Vornamen eingeben!");
	    ContactForm_userFirstName.focus();
	    return false;
	}
	if (ContactForm_userLastName.value == "" || ContactForm_userLastName.value == null) {
		alert("Bitte Ihren Namen eingeben!");
	    ContactForm_userLastName.focus();
	    return false;
	}
	if (ContactForm_userEmail.value == "" || ContactForm_userEmail.value == null) {
		alert("Bitte Ihre E-Mail-Adresse eingeben!");
	    ContactForm_userEmail.focus();
	    return false;
	}
	var email = ContactForm_userEmail;
	if (!email.value.match(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i)){
	    alert("Keine E-Mail-Adresse!");
	    ContactForm_userEmail.focus();
	    return false;
	}
	if (ContactForm_userCompany.value == "" || ContactForm_userCompany.value == null) {
		alert("Bitte Ihre Firma eingeben!");
	    ContactForm_userCompany.focus();
	    return false;
	}
}

function show(showpic) {
	$('#map-img').attr('src', showpic);
}

function unshow() {
	$('#map-img').attr('src', "img/tracks/old_rlcw_infrastrukturplan_111024.jpg");
}
