function SContent(Url) {
	window.setTimeout("$('#Slide2').slideUp('medium');", 300);
	GetAjaxContent(Url, 'Slide1');
	return false;
}
function RContent(Url) {
	GetAjaxContent(Url, 'Slide2');
	return false;
}

function SClose(DivID) {
	RefSlideObj = document.getElementById('RefSlide');
	$('#'+DivID).slideUp('medium');
}

$(document).ready(function() {
	$('a[href*=#]').bind("click", function(event) {
		event.preventDefault();
		var ziel = $(this).attr("href");
		$('html,body').animate({
			scrollTop: $(ziel).offset().top
		}, 1000 , function (){location.hash = ziel;});
	});
	return false;
});

	
// ------------------------------------------------------------------------------------
// Ajax-Gesummsel
if (window.XMLHttpRequest)     { http = new XMLHttpRequest(); } 
else if (window.ActiveXObject) { http = new ActiveXObject("Microsoft.XMLHTTP"); }

function GetAjaxContent(Url, DivID) {
	if (http==null) {
		// Browser doesn't support XMLHTTP!
		return;
	}
	
	$('#'+DivID).slideUp('medium');
	FillAjaxDiv = DivID;
	http.onreadystatechange=Ajax_FillDiv;
	http.open('GET','/contents/'+Url+'.php',true);
	http.send(null);
}

function Ajax_FillDiv() {
	if (http.readyState==4) {
		window.setTimeout("document.getElementById(FillAjaxDiv).innerHTML = http.responseText;", 400);
		window.setTimeout("$('#"+FillAjaxDiv+"').slideDown('medium');", 400);
	}
}



