
//get suitable background pic
background=null;
var startPage = false;

function Background(area,isDay,isStartpage) {
	//this.pics=new Array();
	this.isDay=isDay;

	
	startPage=isStartpage;

	if (!isStartpage) Background.adjustContent();	

	
}






Background.adjustContent= function() {

	/* HOEHENANPASSUNG / AUSRICHTUNG HAUPTMENU STARTSEITE */

	var wh = $(window).height();
	
	if (startPage) {
		$(document).ready(function() {
				$('#sthird').css( { 'height' : (wh - 210) + "px" });
//		var headerHeight;
//		var headerLLHeight;
//		var headerNavi;
//		var naviHeight;
//		var contentHeight = (undefined===window.pageTickerActive?0:75);
//		var mainmenuHeight;
//		var marginTopMainmenu = 0;
//		var footerHeight;
//		
//		footerHeight =  $('#footer').height();
//		headerLLHeight = $('#headerLL').height();
//		headerNavi = $('#headernavigation').height();
//		mainmenuHeight = $('#mainmenuHome').height();
//		naviHeight = wh /*- contentHeight*/ - headerLLHeight - footerHeight - headerNavi;
//		if (naviHeight < mainmenuHeight) {
//			naviHeight = mainmenuHeight;
//		}
//		headerHeight = naviHeight + headerLLHeight;
//		
//		
//		marginTopMainmenu = Math.round((wh - mainmenuHeight)/2) - headerLLHeight - 50;
//	
//		if ((marginTopMainmenu) < 0 || (marginTopMainmenu + mainmenuHeight + headerLLHeight) > headerHeight) {
//			marginTopMainmenu = 0;
//		}
//		
//		naviHeight = naviHeight - marginTopMainmenu;
//		
//	
//		
//		
//		$('#header').css( { 'height' : (headerHeight) + "px" });
//
//		
//		$('#mainmenuHome').css( { 'marginTop' : (marginTopMainmenu) + "px" });
		});
		
		
	} else {
		var minContentHeight = wh - $('#header').height() - $('#footer').height();
		if (minContentHeight <= 75) {
			minContentHeight = 75;
		}
		
		var minContentCenterHeight = minContentHeight - $('#content_top').height();
		
		$('#content').css( {
			'min-height' : (minContentHeight) + "px"
		});
		$('#content_center').css( {
			'min-height' : (minContentCenterHeight) + "px"
		});
		
		$('#content_center_left').css( {
			'min-height' : (minContentCenterHeight) + "px"
		});
	}
	
	

}


Background.doResize= function() {
//	Background.adjustContent();
}



$(window).resize(function() {
//	Background.doResize();
	Background.adjustContent();
});





$(document).ready(function() { 

//showDots();

});


function showDots(){
	id=document.location+"";
	if (id.indexOf("id=")<0){
		id=1;
	}else{
		id=id.substring(id.indexOf("id=")+3);
		if (id.indexOf("&")>0){
			id=id.substring(0,id.indexOf("&"));
		}
		if (id.indexOf("#")>0){
			id=id.substring(0,id.indexOf("#"));
		}

	}
	
	//gleiche seiten!
	switch(id){
		case "6":id="2";break;
	
	}
	
	var orange_comments= new Array();
	
	
	orangedots=",35,219,232,66,117,124,160,161,118,119,120,121,259,122,123,279,280,281,286,61,266,267,156,64,269,262,175,";
	greendots=",";
	
	
	
	
	
	/*orange_comments["1"]="-social icons sauber setzen<br>" +
			"-ticker front only<br>"+ 
			"-RL: SWF<br>";
	
	orange_comments["2"]="-Terminalplan unfertig<br>" +
			"-neues flipbooklayout<br>"+
	"-formularlayer schalten<br>"+
	"-icons feintuning<br>"
	orange_comments["113"]="-aufzählung<br>";
	*/
	
	
	
	if (orangedots.indexOf(","+id+",")>-1){
		var content="<div  style=\"position:absolute;top:10px;right:50px;width:150px;float:right;border:0px dotted grey;\" >";
		content+="<img style=\"width:50px\" src=\"/fileadmin/templates/images/orange_dot.png\"><br>";
		if (orange_comments[id]){
			content+=orange_comments[id];	
		}
		content+="</div>";
		$("#header").append(content);
	}
	if (greendots.indexOf(","+id+",")>-1){
		$("#header").append("<img style=\"width:50px;float:right\" src=\"/fileadmin/templates/images/green_dot.png\">");
	}
	
	
}



