function setSize(sz) {
	var css = Ext.getDom('fscss');
	css.href = '/__/styles/fontsize' + sz + '.css';
	setCookie('fs', sz, '', '/');
};
var embedflash = function(src, w, h, v) {
	var id = getUniqueID();
	document.write('<span id="flash' + id + '"></span>');
	runOnLoad(function() {
		var swf = new SWFObject(src, "flash" + id + "obj", w, h, v || "8");
		swf.addParam('wmode', 'transparent');
		swf.useExpressInstall(basepath + '_/flash/expressinstall.swf');
		swf.write("flash" + id);
	});
	return ('flash' + id);
};
runOnLoad(function() {
	Ext.ux.Lightbox.register('a.lightbox', true);
	var time = 4000;
	var slides = Ext.select('div[id^=slide]');
	slides.each(function(sl) {
		var pics = sl.select('img[id^=bild]');
		var count = pics.getCount();
		if (count > 1) {
			var num = 1;
			var s = sl.dom.id.replace(/slide/, '');
			window.setTimeout('fadenow(' + num + ', ' + count + ', ' + s + ', ' + time + ')', time);
		};
		if (time == 4000) {
			time = 2000;
		}
	});
	Ext.get('langmenutop').on('click', function(e, el) {
		var drp = Ext.get(el);
		if (drp.getHeight() > 68) {
			drp.setHeight(68);
			if (el.tagName.toLowerCase() == 'div') {
				drp.dom.style.backgroundImage = 'url(/__/images/lngdown.gif)';
			}
		} else {
			var h = 0;
			drp.select('a').each(function(a) {
				h += a.getHeight();
			});
			drp.setHeight(h + 5);
			if (el.tagName.toLowerCase() == 'div') {
				drp.dom.style.backgroundImage = 'url(/__/images/lngup.gif)';
			}
		}
	});
});
function fadenow(num, count, s, time) {
	var bildout = Ext.get('bild' + s + num);
	bildout.fadeOut({
		endOpacity : 0,
		duration : 2.5,
		remove : false,
		useDisplay : true,
		callback : function(f) {
			bildout.dom.style.display = "none";
		}
	});
	num++;
	if (num > count) {
		num = 1;
	}
	bildin = Ext.get('bild' + s + num);
	bildin.fadeIn({
		duration : 2.5,
		remove : false,
		useDisplay : true,
		callback : function() {
			bildin.dom.style.display = "block";
			window.setTimeout('fadenow(' + num + ', ' + count + ', ' + s + ', ' + time + ')', time);
		}
	});
};
var dh = document.location.href;
if (dh.match(/\/ar\//) || dh.match(/\/cn\//) || dh.match(/\/jp\//) || dh.match(/\/ru\//) || dh.match(/\/fr\//) || dh.match(/\/es\//)) {
	document.write('<style type="text/css">#search{display:none;}</style>');
}