//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}


function blendimage(divid, imageid, imagefile, millisec) {
    var speed = Math.round(millisec / 100);
    var timer = 0;
    
    //set the current image as background
   // document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
    
    //make image transparent
    changeOpac(0, imageid);
    
    //make new image
    document.getElementById(imageid).src = imagefile;

    //fade in image
    for(i = 0; i <= 100; i++) {
        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
        timer++;
    }
    
    j = j + 1
    if (j > (p-1)) 
        j=0;
    t = setTimeout("blendimage('blenddiv', 'blendimage', '"+preLoad[j].src+"', "+(crossFadeDuration*100)+")", slideShowSpeed)
}


function runSlideShow(){
    if (document.all){
        document.images.SlideShow.style.filter="blendTrans(duration=3)";
        document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
        document.images.SlideShow.filters.blendTrans.Apply();

        document.images.SlideShow.src = preLoad[j].src;
        
        if (document.all){
          document.images.SlideShow.filters.blendTrans.Play();
        }
        j = j + 1;
        if (j > (p-1)) 
        	j=0;
        t = setTimeout('runSlideShow()', slideShowSpeed);

   }else{

        blendimage("blenddiv", "blendimage", preLoad[j].src, (crossFadeDuration*100));
   }
}


function changeRight(){
parent.board.location.href ="blank.htm";
}

//function click(evt) {
//if (navigator.appName.indexOf("Microsoft") != -1){
//if (event.button==2) {
//alert('Funktion ist gesperrt!');
//return false
//};
//};
//if (navigator.appName.indexOf("Netscape") != -1) {
//if ( evt.which == 3 ) {
//alert('Funktion ist gesperrt!');
//return false
//};
//};
//};
//if (navigator.appName.indexOf("Netscape") != -1) {
//document.captureEvents( Event.MOUSEDOWN )
//};
//document.onmousedown = click;

setTimeout('runSlideShow()', 1000)
