/**
 * @author mgeers
 */
// Global Vars
var newWidht;


Event.observe(window, "load", function() {
	resetWidth(my_glider);
	
	if(window.location.hash.match('#'))
	{
		var urlParts = window.location.hash.split('#');
		my_glider.scrollTo(urlParts[1]);
	}
});

Event.observe(window, "resize", function() {
	resetWidth(my_glider);
});

function resetWidth(container)
{

	sections = document.getElementsByClassName("scroller");
	sections.each(function(e) {
		
		var newHeight;
		
		if(document.body.clientHeight<599)
			newHeight = 599;
		else 
			newHeight = document.body.clientHeight;
			
		e.style.height = newHeight - 164+"px";
	});	
	
	sections = document.getElementsByClassName("section");
	sections.each(function(e) {
		
		if(document.body.clientHeight<599)
			newHeight = 599;
		else 
			newHeight = document.body.clientHeight;			
		
		e.style.height = newHeight - 164+"px";
	});	
	
	sections = document.getElementsByClassName("section");
	sections.each(function(e) {
		
		//var newWidth;
		
		if(document.body.clientWidth<1015)
			newWidth = 1015;
		else 
			newWidth = document.body.clientWidth;
			
		e.style.width = newWidth;
	});
	
	container.reposition();
}

// Function CalcFixX for Propper Tooltip Placement on References Page
function CalcFixX() {
	var viewableWidth = newWidth - (320 + Math.round(newWidth*0.07) );
		if (navigator.appName=="Microsoft Internet Explorer") {
		}	else {		
			viewableWidth = viewableWidth + 20;
		}
	return viewableWidth;			
}

// Tracingcenter
tc = new Image(0,1);
tc.src ="http://www.trackingcenter.de/statistic.php?id=1142&screenwidth="+screen.width+"&screenheight="+screen.height+"&colordepth="+screen.colorDepth+"&referrer="+escape(document.referrer)+"&url="+escape(document.URL);
	