function glocal(state) {
	if (state=='local') {
		$('global-fl').hide();
		$('global-f').hide();
		$('local-fl').show();
		$('local-f').show();
		$('addlocal').className ='additional istab';
		$('addglobal').className ='additional istab dis';
	} else {
		$('global-fl').show();
		$('global-f').show();
		$('local-fl').hide();
		$('local-f').hide();
		$('addglobal').className ='additional istab';
		$('addlocal').className ='additional istab dis';
	}
}

function showEffects(wtf){
    if (wtf == 'close') {
        if ((css_file == 'IE7') || (css_file == 'IE')) {
            $('quick_help').hide();
            $('help_button').show();
            if ($('ifr')) {
                $('ifr').remove();
            }
            if (css_file == 'IE') {
                $('wrap').getElementsBySelector('select').each(function(SelToShow){
                    SelToShow.show();
                });
            }
        }
        else {
            Effect.Fade('quick_help');
            $('help_button').show();
        }

    }
    else {
        if ((css_file == 'IE7') || (css_file == 'IE')) {
            $('help_button').hide();
            $('quick_help').show();
            if (css_file == 'IE') {
                $('quick_help').setStyle({
                    height: Math.round(document.viewport.getHeight() * 0.7)
                });
                var ifr = new Element('iframe', {
                    'id': 'ifr',
                    'frameborder': '0'
                });
                ifr.setStyle({
                    height: $('quick_help').getHeight() + 'px',
                    width: $('quick_help').getWidth() + 'px'
                });
                $('quick_help').appendChild(ifr);
                document.observe('mousewheel', function(){
                    $('quick_help').appendChild(ifr);
                });
                $('wrap').getElementsBySelector('select').each(function(SelToHide){
                    SelToHide.hide();
                });
                Event.observe(document.onresize ? document : window, "resize", function(){
                    $('quick_help').setStyle({
                        height: Math.round(document.viewport.getHeight() * 0.7)
                    });
                    ifr.setStyle({
                        height: $('quick_help').getHeight() + 'px',
                        width: $('quick_help').getWidth() + 'px'
                    });
                });
            }
        }
        else {
            $('quick_help').setStyle({
                height: Math.round(document.viewport.getHeight() * 0.7) + 'px'
            });
            $('help_button').hide();
            Effect.Appear('quick_help');
        }
    }
}

function isMain() {
	if ($$('div.welcommen') != '') {
		if (css_file != 'IE') {
			$('wrap').setStyle({
				width: 1000 + 'px'
			});
		}
		if (css_file == 'IE') {
			$('main_content_around_light').setStyle({
				width: 720 + 'px'
			});
		}
	}
}

document.observe("dom:loaded", function(){
    isMain();
});