var $currLi;
var $currUl;
var $currUlMain;

// Toggle Fontsie
function toggle01(fontSelect) {
	document.getElementById(fontSelect).style.fontSize = '0.75em';
}

function toggle02(fontSelect) {
	document.getElementById(fontSelect).style.fontSize = '0.90em';
}

function toggle03(fontSelect) {
	document.getElementById(fontSelect).style.fontSize = '1.1em';
}

function navlogic() {
	var url = window.location.href;
	var parts = url.split("/");
	var sitepos = parts.length - 1;
	var site = parts[sitepos].split(".");
	$(".navMain li a").each(function (i) {
		if ($(this).attr("href") == parts[sitepos]) {
			$(this).addClass("act");
			$currLi = $(this).parent();
			$currUl = $currLi.parent();
			if (jQuery.trim($currUl.parent().html()).toUpperCase().indexOf("<SPAN") == 0) {
				$($currUl.parent()).children('span').removeClass('noLink');
				$($currUl.parent()).children('span').addClass('noLinkAct');
			}
		}
	});
}

function Init() {
	$("#formMessage").validate({
		rules: {
			name: {
				required: true
			}
		},
		messages: {
			name: {
				required: "Geben Sie Ihren Namen ein.",
			}
		}
	});
}

function newsdisplay() {
	$("#messageLayer").show("slow");
}

function newshide() {
	$("#messageLayer").hide("fast");
}


function SuccessShow() {
	window.setTimeout('$("#divSuccess").show("fast")', 500);
}

function SuccessHide() {
	$("#divSuccess").hide("fast");
	return false;
}

function RegisteredShow() {
	window.setTimeout('$("#divRegistered").show("fast")', 500);
}

function RegisteredHide() {
	$("#divRegistered").hide("fast");
	return false;
}