inc=0;

function flashreport(id){
         leftflash=(screen.width-1000)/2;
         if(document.getElementById("flashpic")==null){
             flashpic=document.createElement('div');
             flashpic.id="flashpic";
             flashpic.style.position="absolute";
             flashpic.style.left=leftflash+"px";
             flashpic.style.width=600+"px";
             flashpic.style.height=600+"px";
             flashpic.style.top="260px";
             flashpic.style.zIndex="5";
             flashpic.style.align="left";
             document.getElementById('reporttd').appendChild(flashpic);
         }
         document.getElementById("reporttb").style.zIndex = "2";

         if(document.all){
             if ( window.opera ){
                document.getElementById("reporttb").style.opacity = 0;
             }else{
                 document.getElementById("reporttb").style.filter="alpha(opacity=0)";
                 leftflash-=5;
                 flashpic.style.left=leftflash+"px";
                 flashpic.style.top="265px";
             }
         }else{
             document.getElementById("reporttb").style.setProperty("-moz-opacity", 0, "");
         }
         flashhtml="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" id=\"flashobj\" width=\"100%\" height=\"100%\" ALIGN=\"\">\n";
         flashhtml+="<param name=\"movie\" value=\"flashpic.php?id="+id+"\" />\n";
         flashhtml+="<EMBED src=\"flashpic.php?id="+id+"\" quality=\"high\" bgcolor=\"#000000\" TYPE=\"application/x-shockwave-flash\" id=\"flashobj2\" width=\"100%\" height=\"100%\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED>\n";
         flashhtml+="</object>";

         document.getElementById('flashpic').innerHTML=flashhtml;

         setTimeout("fadeflash()",5000);
}

function fadeflash(){
        if(document.getElementById("flashpic")==null) return 0;

        w=parseInt(600*(100-inc)/100);

        document.getElementById("flashpic").style.width=w+"px";
        document.getElementById("flashpic").style.height=parseInt(600*(100-inc)/100)+"px";

        if(document.all){

            if ( window.opera ){
               document.getElementById("reporttb").style.opacity = inc*0.01;
            }else{
                document.getElementById("reporttb").style.filter="alpha(opacity="+inc+")";
                //document.getElementById("reporttb").filters.alpha.opacity=inc;
            }
            inc+=5;
            if ( inc<= 100 ){
               timer=setTimeout("fadeflash()", 100);
               return 0;
            }
        }else{
            document.getElementById("flashpic").style.left=leftflash+parseInt((600-w)/2)+"px";
            document.getElementById("flashpic").style.top=parseInt(260+(600-w)/2)+"px";
            document.getElementById("reporttb").style.setProperty("-moz-opacity", inc*0.01, "");
            inc+=5;
            if ( inc<= 100 ){
               timer=setTimeout("fadeflash()", 100);
               return 0;
            }
        }

        showreport();
}


function showreport(){
         document.getElementById('reporttb').style.visibility='visible';
         document.getElementById("reporttb").style.filter=null;
         if(document.getElementById("flashpic")!=null) document.getElementById('flashpic').style.visibility='hidden';
}
