// JavaScript Document
var $errortext = "";
var $google_load = false;
var intranetnews = false;
var newsstart = -1;
function onDocumentLoad () {
	if ($('contentimage') != null) {
		new animBackground($('contentimage'));
	}
	if ($('contentimage_bottom') != null) {
		new animBackground($('contentimage_bottom'));
	}
	
	
	if ($('gallery_scrool') != null) {
		var productpane = new pslider({ posIndicator: 'gallery_indicator', 
										sliderContainer: 'gallery_scrool', 
										itemWidth: 520,
										triggerNext: 'gallery_right', 
										triggerPrev: 'gallery_left', 
										slideType: 'h'});
	}
	if ($('intranet_news') != null) {
		var intranetnews = new pslider({ posIndicator: 'news_indicator', 
										sliderContainer: 'intranet_news_scrool', 
										itemWidth: 680,
										triggerNext: 'news_indicator_right', 
										triggerPrev: 'news_indicator_left', 
										slideType: 'h',
										start: newsstart});
	}
	if ($('menu') != null) {
		new classSwitcher( [ $$('#menu LI UL LI'), $$('#menu li ul li ul li'), $$('#menu li') ] );
	}
	
	if ($('linklist') != null) {
		
		mylinklist = new linkClassSwitcher( [ $$('#content.europe #linklist LI ') ]);
		
		new listClassSwitcher( [ $$('#content.standard #linklist LI ') ]);
	}
	
	if ($('googlemap') != null) {
		google_load();
	}
	new Lightbox();
}
function onDocumentUnLoad () {
	if (($('map') != null) || ($('r_map') != null) || ($('googlemap') != null)) {
		GUnload();
	}
}
function handleError($message,$uri,$nr) {
	return true;
	$errortext = "E: " + $message + " | Nr: " + $nr + " | Uri: " + $uri;
	window.status = $errortext;
	return true;
}

window.onload = onDocumentLoad;
window.onunload = onDocumentUnLoad;
//window.onerror = handleError;