//note
//boxmenu deve essere il nome di ID del menu;
//il valore di 83 px dal bordo superiore puņ essere variato
//setTimeout č il valore di aggiornamento in funzione del tempo della posizione del menu

function setVariables(){
if (navigator.appName == "Netscape") {
if (parseInt(navigator.appVersion) >= 5){v=".top=";h=".left=";dS="document.getElementById(\"";sD="\").style";
y="window.pageYOffset";x="window.pageXOffset";}
else {v=".top=";h=".left=";dS="document.";sD="";
y="window.pageYOffset";x="window.pageXOffset";}
}
else {h=".pixelLeft=";v=".pixelTop=";dS="";sD=".style";
y="document.body.scrollTop";x="document.body.scrollLeft";}checkLocationA()}
movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0

function checkLocation(){
object="boxmenu";yy=eval(y);xx=eval(x);ydiff=ystart-yy;xdiff=xstart-xx;
if ((ydiff<(-1))||(ydiff>(1))) movey=Math.round(ydiff/10),ystart-=movey

//questa condizione permette se attivata di effettuare lo spostamento orizzontale
//if ((xdiff<(-1))||(xdiff>(1))) movex=Math.round(xdiff/10),xstart-=movex
if (ystart>=0){eval(dS+object+sD+v+(ystart+10));
}

//else {eval(dS+object+sD+v+83);}


eval(dS+object+sD+h+xstart);
setTimeout("checkLocation()",10);
}

function checkLocationA(){ystart=eval(y);xstart=eval(x);}