
    var ContArr = new Array();
    var LastID  = -1;
    var LastCat = -1;
    
    function BindDivUp(id)
    {
        if( id != -1 ) {
            ContArr[id] = 0;
			setContentVis(id, 0);
            id = new Effect.BlindUp(id);
        }
    }
    
    function BindDivDown(id)
    {
        if( id != -1 ) {
            ContArr[id] = 1;
			var visTimeout = window.setTimeout("setContentVis(\""+id+"\", 1);", 1000);
            id = new Effect.BlindDown(id);
			
        }
    }
    
    function SetCat(cat)
    {
        if(ContArr[cat]==undefined) {
            ContArr[cat] = 0;
        }
        if( cat!=LastCat ) {
            if( LastCat != -1 ) {
                ContArr[LastCat] = 0;
                BindDivUp(LastID);
                BindDivUp(LastCat);
            }            
            LastCat = cat; 
            ContArr[cat] = 1;
            BindDivDown(cat);
        }else {
            LastCat = -1; 
            ContArr[cat] = 0;
            BindDivUp(cat);            
        }
    }
	//inhalt ausblenden für ie
	// id: id des Div
	// visMode: ein oder ausblenden: 0:ausblenden, 1:einblenden
	function setContentVis(id, visMode){
		if(document.all){ //IE ONLY
			var elStyle = document.getElementById(id).style;
			if(visMode == 0){
				elStyle.filter = 'opacity=0'
				elStyle.visibility = "hidden";
			}
			else {
				elStyle.filter = 'opacity=100'
				elStyle.visibility = "visible";
			}
		}
	}
    // id: id des Div
    // stat: initialstatus 0:geschlossen, 1:offen
    // accordion-mode: true|false
    //
    function ShowHide(id, stat, mode){
        if( mode == undefined ){
            mode = true;
        }
        if( ContArr[id] == undefined ) {
            if( stat == undefined ){
                ContArr[id] = 0;
            }else{
                ContArr[id] = stat;
            }
        }
        
        // Sub schliessen
        if(ContArr[id]==1) {
            LastID = -1;
            ContArr[id] = 0;
            BindDivUp(id);
        // Sub öffnen
        }else if(ContArr[id]==0) {
            if((LastID!=-1)&&(mode==true)) {
                BindDivUp(LastID);
            }
            ContArr[id] = 1;
            LastID = id;
            BindDivDown(id);
        }
    }
	//showHide for countries in Hotel Directory (string-limit!)
function shC(el, id, stat, mode) {
	ShowHide(id, stat, mode);
	elStyle = el.parentNode.style;
	//alert(bgImg);
	//alert($(id).style.display);
	if($(id).style.display == "none"){
		//alert(el.parentNode.innerHTML);
		elStyle.listStyleImage = "fileadmin/templates/images/btn_small_max.gif";
	}else {
		elStyle.listStyleImage = "fileadmin/templates/images/btn_small_min.gif";
	}
	
}
function checkActivebubble(el, container){
	cAB(el, container);
}

//Grau machen und so...
function cAB(el, container){
	var head = el.getElementsByTagName('h2')[0];
	head.className = $(container).style.display == 'none' ? "color_bg" : "bg";
}
function setAllBubblesInactive() {
	sABI();
}

function sABI() {
	var bubbleheads=document.getElementsByClassName('bubbleHead');
	
	for(var i = 0; i < bubbleheads.length;i++) {
		var head = bubbleheads[i].getElementsByTagName('h2')[0];
		head.className = "bg";
	}
}

