// JavaScript Document
function AllMessages()
{
	for(var x=0;x<document.SEARCH.elements.length;x++)
	{ 
		var y=document.SEARCH.elements[x];
		if(y.name!='ALLMSGS') y.checked=document.SEARCH.ALLMSGS.checked;
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}

function getHeight() {
	var layout09Height= document.getElementById('layout09').offsetHeight;  
		var layout17Height= document.getElementById('layout17').offsetHeight;  

		document.getElementById('layout10').style.height = layout09Height+125+"px";

}

function doNews(obj, currentObj) {
    if (currentObj) {
        $(currentObj).removeClass("active");    
    }
    currentObj = obj;
    $(obj).addClass("active");    
    
    newsPicturePath = $(obj).find("img").attr("src");
    newsHeadlineVar = $(obj).find("h3").html();
    newsTeaserTextVar = $(obj).find("h4").html();
    newsLinkVar = $(obj).find("a").attr("href");
    $("#newsPicture").attr({ src: newsPicturePath, alt: newsHeadlineVar, title: newsHeadlineVar });
    $("#newsHeadline").html(newsHeadlineVar);
    $("#newsTeaserText").html(newsTeaserTextVar);
    $("#newsLink").attr({ href: newsLinkVar });
    return currentObj;
}
$(document).ready(function(){
    $(".pane-list li").click(function(){
      window.location=$(this).find("a").attr("href"); return false;
    });
    $("ul.pane-list li.normal").attr("id", function (arr) {
      return "ausrichtung" + arr;
    });
	$("ul.pane-list div.umbruchVar").attr("class", function (arr) {
      return "umbruch" + arr;
    });
    $(".newsgross").click(function(){
      window.location=$(this).find("a").attr("href"); return false;
    });
});

$(document).ready(function(){
    var firstTime = false;
    var currentObj;
    currentObj = doNews(".pane-list li:first", currentObj);
    
    $(".pane-list li").hover(function(){
        currentObj = doNews(this,currentObj);                              
    });
    
    $("#loaderblock").fadeOut("slow", function() {
        $("#news").fadeIn("slow");
    });
});


function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
}

