function deleteComment(id,ct,cid) {
    var d=Ext.get("comments");
    if (d!=null) d.load("/reloadcomments.php?ct="+ct+"&id="+cid+"&delete="+id);
}

function loadComments(ct,cid) {
    var d=Ext.get("comments");
    if (d!=null) d.load("/reloadcomments.php?ct="+ct+"&id="+cid); 
}

function loadFans(ct,cid) {
    var d=Ext.get("dfans");
    if (d!=null) d.load("/reloadfans.php?ct="+ct+"&id="+cid); 
    
}

function reloadevents(ct,cid) {
    var d=Ext.get("ediv");
    if (d!=null) d.load("/reloadevents.php?ct="+ct+"&id="+cid); 
    
}

function reloadshows(ct,cid,what) {
    var d=Ext.get("played_"+what+"_div");
    if (d!=null) d.load("/reloadshows.php?ct="+ct+"&id="+cid+'&what='+what);

}


function domember(ct,id) {
    Ext.get("memb").load("/memberadd2.html?ct="+ct+"&id="+id);
}

function openWin(url,width,height) {
 if (typeof(popWin)!='undefined') popWin.close();
 var left = screen.width/2 - width/2;
 var top = screen.height/2 - height/2;
 var chrome = 'status=0,width='+width+',height='+height+',left='+left+',top='+top;
 popWin = open(url,'popWin',chrome);
 if (popWin && !popWin.closed) popWin.focus();
}

function picwin(url,width,height,title) {
   if (typeof(pWin)!='undefined') pWin.close();
   if (!arguments.length) return;
   HTML = '';
   HTML += '<html><head><title>'+title+'</title></head>';
   HTML += '<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0"';
   //HTML += ' onblur="setTimeout(&apos;self.focus()&apos;,1000)"'; //sticky
   HTML += '><img border="0" src="' + url + '"></body></html>';
   var left = screen.width/2 - width/2;
   var top = screen.height/2 - height/2;
   var chrome = 'status=0,width='+width+',height='+height+',left='+left+',top='+top;
   pWin = open('javascript:opener.HTML','pWin',chrome);
   if (pWin && !pWin.closed) pWin.focus();
}

function switchTab(cont,idx,cname,urchin) {
    for(var t=1;t<=10;t++) {

        var tb=document.getElementById(""+cont+"_"+t);
        var bd=document.getElementById(""+cont+"_"+t+"_body");

        if (tb!=null) {
            if (t==idx) {

                tb.className=tb.className.replace(/inactive/,"active");
                try {
                bd.className="tabbody"+(cname?cname:"");
                    if (typeof(urchin)!="undefined") {
                        //urchinTracker(urchin);
                    }
                } catch(e) {}
            }
            else {
                if (tb.className.substr(0,6)=="active") tb.className=tb.className.replace(/active/,"inactive");
                try {
                bd.className="tabbody"+(cname?cname:"")+"_i";
                } catch(e) {}
            }
        }
    }
    CSBfleXcroll('scroller'+cont+idx);
}
function switchTTab(cont,idx,cname) {
    for(var t=1;t<=10;t++) {

        var tb=document.getElementById("t_"+cont+"_"+t);
        var bd=document.getElementById(""+cont+"_"+t+"_body");

        if (tb!=null) {
            if (t==idx) {
                tb.className="active";
            }
            else {
                tb.className="inactive";
            }
        }

        if (bd!=null) {
            if (t==idx) {
                bd.className="tabbody"+(cname?cname:"");
            }
            else {
              bd.className="tabbody"+(cname?cname:"")+"_i";
            }
        }
    }
    CSBfleXcroll('scroller'+cont+idx);
}
function switchRss(id,url) {
        document.getElementById("rss_"+id).href='/channels/'+url+'.rss';
}
function initScrollers() {

if (typeof(CSBfleXcroll)!='undefined') {
    CSBfleXcroll('scroller11');
    CSBfleXcroll('scroller21');
    CSBfleXcroll('scroller31');
    CSBfleXcroll('scroller41');
    CSBfleXcroll('scroller51');
    CSBfleXcroll('scroller61');
    CSBfleXcroll('scroller71');
    CSBfleXcroll('scroller81');
    CSBfleXcroll('scroller91');
    CSBfleXcroll('scroller101'); 
    CSBfleXcroll('scroller111');  
    CSBfleXcroll('scroller121');  
}


}



if (typeof(ToolMan)!='undefined') {
    var dragsort = ToolMan.dragsort() ;
    var junkdrawer = ToolMan.junkdrawer();

    /*
    window.onload = function() {

    	dragsort.makeListSortable(document.getElementById("images_list"),
    			saveOrder)

    }
    */

    function verticalOnly(item) {
    	item.toolManDragGroup.verticalOnly()
    }

    function speak(id, what) {
    	var element = document.getElementById(id);
    	element.innerHTML = 'Clicked ' + what;
    }

    function saveOrder(item) {
    	return
    }
}
if (window.location.href.indexOf('#comments')>0) var accesscomments=true;
else var accesscomments=false;
if (window.location.href.indexOf('#anfahrt')>0) var anfahrt=true;
else var anfahrt=false;
if (window.location.href.indexOf('#bs')>0) var accessbs=true;
else var accessbs=false;


