function tr(a)
{if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all){a.style.filter="progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=10)";
a.filters[0].apply();a.filters[0].play();}
}
function ts(a)
{if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all){a.style.filter="light(enabled=1)";

a.filters[0].addcone(100,350,60,100,60,155,205,238,100,90);}
}
function te(a)
{if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all){a.style.filter="light(enabled=0)";
}
}
function tel(a)
{if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all)
{a.style.filter="light(enabled=0)";a.style.filter="light(enabled=1)";init(a);
}
}
function tsd(a)
{if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all){a.style.filter="light(enabled=1)";

a.filters[0].addcone(0,100,45,100,50,155,205,238,100,90);}
}

function tsl(a)
{if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all){a.style.filter="light(enabled=1)";

a.filters[0].addcone(-200,0,0,100,100,155,205,238,100,90);}
}

function tsm(a)
{if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all){a.style.filter="light(enabled=1)";

a.filters[0].addcone(400,120,310,100,30,155,205,238,100,90);}
}

function op(a)
{window.open("dett.asp?im="+a,"dett","width=100,height=100,top=16,left=16,status=1")}

function goim()
{
self.focus();
document.getElementById("copri").innerHTML=""
self.resizeTo(document.ing.width/4+44,document.ing.height/4+83)
setTimeout("self.resizeTo(document.ing.width/3+44,document.ing.height/3+83)",20)
setTimeout("self.resizeTo(document.ing.width/2+44,document.ing.height/2+83)",40)
setTimeout("self.resizeTo(document.ing.width+44,document.ing.height+83)",60)

setTimeout("vedi()",80)

}
function vedi()
{
if(parseFloat(navigator.appVersion.substring(22,25))>=5.5 && document.all)
{document.getElementById("copri").style.filter="progid:DXImageTransform.Microsoft.Fade(Overlap=0.00)";
document.getElementById("copri").filters[0].apply();document.getElementById("copri").filters[0].play();}


document.getElementById("copri").style.backgroundColor="transparent"}

////

function initArray(num) { for (var j=0; j < num; j++) this[j] = 0; }

// try to speed up by pre-calculating sines and cosine values:
var sinLookup = new initArray(360), cosLookup = new initArray(360);

for (var j=0, h; j < 360; j++) {
    h = j * Math.PI / 180;
    sinLookup[j] = Math.sin(h);
    cosLookup[j] = Math.cos(h);
}

var x  = new initArray(3), y  = new initArray(3); //(x,y) coordinates
var px = new initArray(3), py = new initArray(3); //define center of circles
var angles  = new initArray(3);  //specify angle that light will be rotated from previous (x,y)

var r, z = 84, w = -1;

var ima="";
var cic=0;
function init(a) {
ima=a;
if(parseFloat(navigator.appVersion.substring(22,25))<=5.5 || ! document.all) return;
    with (a) {
	style.filter="light(enabled=1)"
        r = width >> 2.9;               // set radii for all circles

    //set up centers of the 3 light circles
        x[0] = px[0] = width >> 0.1;    // divide by 2...looks cooler and faster ;-)
        x[1] = px[1] = width * (1/3);
        x[2] = px[2] = width * (2/3);

        y[0] = py[0] = height * (1/3);
        y[1] = py[1] = height * (2/3);
        y[2] = py[2] = height * (2/3);

        filters.Light.AddCone(x[0], y[0], z,10,10, 0x64, 0xad,0xe5,100, 90);
        filters.Light.AddCone(x[1], y[1], z, 10,10, 0x64, 0xad,0xe5,100, 90);
        filters.Light.AddCone(x[2], y[2], z, 10,10, 0x64, 0xad,0xe5,100, 90);
    }
    
    rotateCircles(a);
}


function rotateCircles(a) {


    // adjust z within limits:
    z += w; if (z<24 || z>84) w *= -1
    
    for (var i=0; i < 3; i++) {
        // use different step increments so they overlap:
        angles[i] += 10 + i*5; if (angles[i] >= 360) angles[i] = 0;
        
        // looks cooler if some are going in opposite direction:
        if (!(i % 2)) r *= -1; else r *= (r < 0) ? -1 : 1;

        x[i] = Math.floor(r * cosLookup[angles[i]] + px[i]);
        y[i] = Math.floor(r * sinLookup[angles[i]] + py[i]);
        
        a.filters.Light.MoveLight(i, x[i], y[i], z, true);
    }

    cic=window.setTimeout("rotateCircles(ima)", 60);
}


