function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;

function slide(Id, interval, to)
{
    var obj = document.getElementById(Id);
    var W, step = 15;

    if (obj == null) return;
    if (to == undefined) { // user clicking
        if (obj._slideStart == true) return;
        if (obj._expand == true) {
            to = 0;
            obj.style.overflow = "hidden";
        } else {
            slide.addId(Id);
            for(var i=0; i < slide.objects.length; i++) {
                if (slide.objects[i].id != Id && slide.objects[i]._expand == true) {
                    slide(slide.objects[i].id);
                }
            }

            obj.style.width = "";
            obj.style.overflow = "";
            obj.style.display = "block";
            to = obj.offsetWidth;
            obj.style.overflow = "hidden";
            obj.style.width = "1px";
        }
        obj._slideStart = true;
    }
    
    step            = ((to > 0) ? 1:-1) * step;
    interval        = ((interval==undefined)?1:interval);
    obj.style.width = (W=((W=(isNaN(W=parseInt(obj.style.width))?0:W))+step<0)?0:W+step)+"px";
    
    if (W <= 0) {
        obj.style.display = "none";
        obj.style.overflow = "hidden";
        obj._expand = false;
        obj._slideStart = false;
    } else if (to > 0 && W >= to) {
        obj.style.display = "block";
        obj.style.overflow = "visible";
        obj.style.width = W + "px";
        obj._expand = true;
        obj._slideStart = false;
    } else {
        setTimeout("slide('"+Id+"' , "+interval+", "+to+");", interval);
    }
}
slide.objects = new Array();
slide.addId = function(Id)
{
    for (var i=0; i < slide.objects.length; i++) {
        if (slide.objects[i].id == Id) return true;
    }
    slide.objects[slide.objects.length] = document.getElementById(Id);
}

var soundfile="/sound/sound1.mp3" 

function playsound(soundfile){
 if (document.all && document.getElementById){
     document.getElementById("soundeffect").src=""
     document.getElementById("soundeffect").src=soundfile
 }
}

function bindsound(tag, soundfile, masterElement){
 if (!window.event) return
 var source=event.srcElement
 while (source!=masterElement && source.tagName!="HTML"){
 if (source.tagName==tag.toUpperCase()){
     playsound(soundfile)
 break
 }
 source=source.parentElement
 }
}
