jQuery.noConflict();
var menustart = 'start';
var timeout=null;
var $j=jQuery;

function showandhide(myid){
	if(document.getElementById("sub_start").style.display =="none"){
		if(myid=="sub_start"){
		document.getElementById("sub_start").style.display = "block";
		} 
	}else{
		if(myid!="sub_start"){
		document.getElementById("sub_start").style.display = "none";
		} 
	}
				
	if(document.getElementById("sub_tour").style.display =="none"){
		if(myid=="sub_tour"){
		document.getElementById("sub_tour").style.display = "block";
		} 
	}else{
		if(myid!="sub_tour"){
		document.getElementById("sub_tour").style.display = "none";
		} 
	}

	if(document.getElementById("sub_band").style.display =="none"){
		if(myid=="sub_band"){
		document.getElementById("sub_band").style.display = "block";
		} 
	}else{
		if(myid!="sub_band"){
		document.getElementById("sub_band").style.display = "none";
		} 
	}
	
	if(document.getElementById("sub_fanpage").style.display =="none"){
		if(myid=="sub_fanpage"){
		document.getElementById("sub_fanpage").style.display = "block";
		} 
	}else{
		if(myid!="sub_fanpage"){
		document.getElementById("sub_fanpage").style.display = "none";
		} 
	}
}


	function einblenden(div,ein,aus) 
	{
		document.getElementById(div).style.display="block";
		var divinfo = div + 'info';
		document.getElementById(divinfo).firstChild.nodeValue="("+aus+")";
		document.getElementById(divinfo).setAttribute("href","javascript:ausblenden('"+div+"','"+ein+"','"+aus+"');");
	}

	function ausblenden(div,ein,aus) 
	{

			document.getElementById(div).style.display="none";
			var divinfo = div + 'info';
			document.getElementById(divinfo).firstChild.nodeValue="("+ein+")";
			document.getElementById(divinfo).setAttribute("href","javascript:einblenden('"+div+"','"+ein+"','"+aus+"');");

	}



function checkFaceBookAuth() {
    $j.ajax({
        url: 'http://www.22times-fanpage.de/facebookapps/post/',
        method: 'POST',
        async: false,
				dataType: 'json',
        success: function (data) 
				{
            if (data.user === false) 
						{
                fenster = window.open("https://graph.facebook.com/oauth/authorize?client_id=128977853875222&redirect_uri=http://www.22times-fanpage.de.de/facebookapps/post/facebook_auth.php&scope=publish_stream,offline_access", "Facebook", "width=1000,height=768,scrollbars=yes,resizable=yes");
                fenster.focus();
            }
        },
        error: function (data) {
            alert('Ein Fehler ist aufgetreten, bitte lade die Seite erneut');
        }
    });
    return false;
}



