
/* Copyright (c) 1999-2010 silvr.net */

// rev3.00
var cssClassName = {
	reg: function(s) { return new RegExp('(^|\\s)'+ s +'(\\s|$)'); },
	add: function(el,s) { el.className += (el.className ? ' ' : '') + s; },
	del: function(el,s) { if (this.has(el,s)) el.className = el.className.replace(this.reg(s), (RegExp.$1&&RegExp.$2)?' ':''); },
	has: function(el,s) { return this.reg(s).test(el.className); },
	incl: function(el,s) { if (!this.has(el,s)) this.add(el,s); },
	excl: function(el,s) { while (this.has(el,s)) this.del(el,s); },
	shift: function(el,s,el2) { if (el) this.del(el,s); if (el2) this.add(el2,s); },
	toggle: function(el,s) { this[ this.has(el,s) ? 'del' : 'add' ](el,s); }
};
// rev1.10
onLoad = (function(){
	var load_events = [], done, old_onload,
		init = function() {
			if (done) return; done = true;
			for (var i=0; i < load_events.length; i++) { load_events[i](); }
		};
	return function(func) {
		if (done) return func();
		if (!load_events[0]) {
			if (document.addEventListener) { document.addEventListener('DOMContentLoaded', init, false); }
			(function() {
				/*@cc_on
				if (document.body) { try { document.createElement('div').doScroll('left'); return init(); } catch(e) {} }
				/*@if (false) @*/
				if (/loaded|complete/.test(document.readyState)) return init();
				/*@end @*/
				if (!done) setTimeout(arguments.callee, 50);
			})();
			old_onload = window.onload;
			window.onload = function() { init(); if (old_onload) old_onload(); };
		}
		load_events[load_events.length] = func;
	}
})();
// rev1.00
var getViewport = {
	W: function() { return (window.innerWidth)?window.innerWidth:(document.documentElement && document.documentElement.clientWidth)?document.documentElement.clientWidth:(document.body && document.body.clientWidth)?document.body.clientWidth:0; },
	H: function() {	return (window.innerHeight)?window.innerHeight:(document.documentElement && document.documentElement.clientHeight)?document.documentElement.clientHeight:(document.body && document.body.clientHeight)?document.body.clientHeight:0; }
};
var getScroll = {
	X: function() { return (window.pageXOffset)?window.pageXOffset:(document.documentElement && document.documentElement.scrollLeft)?document.documentElement.scrollLeft:(document.body && document.body.scrollLeft)?document.body.scrollLeft:0; },
	Y: function() { return (window.pageYOffset)?window.pageYOffset:(document.documentElement && document.documentElement.scrollTop)?document.documentElement.scrollTop:(document.body && document.body.scrollTop)?document.body.scrollTop:0; }
};

if (document.getElementsByTagName && document.getElementsByTagName('html')[0] && document.getElementsByTagName('html')[0].className!='undefined') {
	var jscss = 1;
}


// old... Filialen (Karte)
var shiftClass = {
	mem: [],
	compatible: true,
	obj: function(id, cssClass, group) {
		if (this.compatible && id!=this.mem[group]) {
			cssClassName.shift(document.getElementById(this.mem[group]), cssClass, document.getElementById(id));
			this.mem[group] = id;
		}
	}
};
function chngActive(id1) {
	shiftClass.obj(id1, 'active', 'standorte');
}
