    $('pre code').each(function() {
        eval($(this).text());
    });

    /**
     *These arrays are used to keep informations about the divs
     **/

    //used to swap the content of the divs with the one in each status
    div_old_content0=new Array();
    div_old_width0=new Array();
    div_old_height0=new Array();
    container_old_width0=new Array();
    container_old_height0=new Array();
    div_old_content1=new Array();
    div_old_width1=new Array();
    div_old_height1=new Array();
    div_status=new Array(); //used to know the status of the div
    movie_address=new Array();

    /* fx settings for the divs*/
    div_cycle_fx=new Array();
    div_cycle_display=new Array();
    div_cycle_timeout= new Array();
    
    rollover_queue=new Array();
//    for(j=0;j<100; j++) rollover_queue[j]=0;
    var j=0;
    var  rollover_index=0;

    function rollOver(id)
        {
        
        if ((div_status[id]!=1)&&(div_status[id]!=2)){
            document.getElementById('item'+id + '_over').style.visibility='visible';
	    rollover_queue[id]=1;
	    }
        /*var i=0;
        for(i=0; i<100; i++) {
		if(i!=id){
			rollOut(i);
			rollover_queue[i]=0;
			
			}*/
	
            //alert('rollover');
        }

    function rollOut( id )
        {
        	//alert('rollout');
        if ((div_status[id]!=1)&&(div_status[id]!=2))
            document.getElementById('item' +id + '_over').style.visibility='hidden';
        }

  /**
    *This method plays a movie in a Div, and if needed it restores it
    */
    function play(id)
    {

    if(div_status[id]!=2){
        div_old_content1[id]=document.getElementById('item' +id).innerHTML;
        div_old_width1[id]=document.getElementById('item' +id).style.width;
        div_old_height1[id]=document.getElementById('item' +id).style.height;
        document.getElementById('slide' +id).innerHTML="<iframe frameborder=\"no\" src=\"AOL_scroll_video.php?video="+movie_address[id]+"\" width=\"630\" height=\"354\" scrolling=\"no\"/>";
        //document.getElementById('slide' +id).innerHTML+="<p><a href=\"#\" class=\"link\" id=\"item"+id+"_text_line1\" onClick=\"javascript:play("+id+")\">&gt;Stop</a></p>";
        document.getElementById('slide' +id).style.height="380px";
        document.getElementById('slide' +id).style.width="630px";
        div_status[id]=2;
        }
    else{


        }
    }


    function changeSize(type,id,big_filesrc,big_width,big_height){
        //initializes the div_status value avoiding to ovverride the old values
        if ((div_status[id]!=1)&&(div_status[id]!=2)) div_status[id]=0;
        if(div_status[id]==0){
            //saves the old values of the element
            div_old_content0[id]=document.getElementById('item' +id).innerHTML;
            div_old_width0[id]=document.getElementById('item' +id).style.width;
            div_old_height0[id]=document.getElementById('item' +id).style.height;
            container_old_width0[id]=document.getElementById('AOL_container' +id).style.width;
            container_old_height0[id]=document.getElementById('AOL_container' +id).style.height;
            if(type=='movie'){
                //if it's a movie there isn't any image so creates it

                movie_address[id]='aolScroll/'+big_filesrc;
                document.getElementById('item' +id).style.width=630+'px';
                document.getElementById('item' +id).style.height=380+'px';
                document.getElementById('AOL_container' +id).style.width=630+'px';
                document.getElementById('AOL_container' +id).style.height=380+'px';
                 document.getElementById('slide' +id).style.width=630+'px';
                  document.getElementById('slide' +id).style.height=380+'px';
                  play(id);
            }
            //if it's an image it swaps them
            else {
                document.getElementById('item_image_'+id).src='aolScroll/'+big_filesrc;
                document.getElementById('item' +id).style.width=(big_width)+'px';
                document.getElementById('item' +id).style.height=(big_height+10)+'px';
                document.getElementById('AOL_container' +id).style.width=(big_width)+'px';
                document.getElementById('AOL_container' +id).style.height=(big_height+10)+'px';
                }
            if (type=='movie'){
                document.getElementById('item'+id).innerHTML+="<table class=\"control_table\" bgcolor=\"#d2d3d5\" width=\"100%\" border=\"0\"><tr>"+
                                                "<td align=\"left\"><a href=\"#\" onclick=\"div_status["+id+"]=1; play("+id+"); return false\" >Replay</a><//td>"+
                                                //"&nbsp;|&nbsp;<a target=\"_blank\" href=\""+movie_address[id]+".mov\">Download QuickTime </a>"+
                                                "<td align=\"right\"><a href=\"#\" onclick=\"javascript:restore("+id+",'"+type+"'); return false\" >Close<//td><//tr><//table>";
                }
            else
            {
                document.getElementById('item'+id).innerHTML+="<table style=\"padding-top:0px; margin-top:0px;\" bgcolor=\"#d2d3d5\" width=\"100%\" border=\"0\"><tr>"+
                                                "<td align=\"left\"><a target=\"_blank\" href=\""+document.getElementById('item_image_'+id).src +"\" >Download</a><//td>"+
                                                "<td align=\"right\"><a href=\"#\" onclick=\"javascript:restore("+id+",'"+type+"'); return false\">Close<//td><//tr><//table>";

            }
            document.getElementById('item' +id + '_over').style.visibility='hidden';
            div_status[id]=1;
            }
         else{
            restoreTo0(id,type) ;
            }
         }


    function restore(id,type){
    	
    if((div_status[id]==1)||(div_status[id]==2)){
    	
            document.getElementById('item' +id).innerHTML=div_old_content0[id];
            document.getElementById('item' +id).style.width=div_old_width0[id];
            document.getElementById('item' +id).style.height=div_old_height0[id];
            document.getElementById('AOL_container' +id).style.width=container_old_width0[id];
            document.getElementById('AOL_container' +id).style.height=container_old_height0[id];
            }
            div_status[id]=0;
            //rollOut(id);
            document.getElementById('item' +id + '_over').style.visibility='hidden';
            if(type=='movie'){
                /*$('#slide'+id).cycle('stop').cycle({
                	
                fx:      div_cycle_fx[id],
                speed:    div_cycle_display[id],
                timeout:  div_cycle_timeout[id]});*/
            }
    }
