var dtStart=new Date();
var nLogout=0;
var hpTimer=0;
var hpLogoutTimer=0;
var g_oSelected=null;
window.onbeforeunload=Window_onBeforeUnload;
window.onunload=Window_onUnload;
var oWindows=new ActiveXObject("Scripting.Dictionary");;
//window.Option
function body_onClick()
{
if(g_oSelected)
{
//g_oSelected.status=2;
//g_oSelected=null;
};
}
function onMove(me)
{
if(!me || !me.status)return false;
if(me.status==1)
{
me.status=2;
g_oSelected=null;
me.style.zIndex-=1;
}else{
//alert(me.status);
//me.setAttribute("status", 1);
//alert(me.status);
me.style.zIndex+=1;
me.status=1;
//alert(me.status);
g_oSelected=me;
/*
window.status="h:"+g_oSelected.style.height+"w:"+g_oSelected.style.width;
window.status+="pos=l:"+g_oSelected.style.posLeft+"t:"+g_oSelected.style.posTop;
window.status+="----l:"+g_oSelected.style.left+"t:"+g_oSelected.style.top;
window.status+="window.event=wex:"+window.event.x+"wey:"+ window.event.y;
g_oSelected=null;
*/
}
}
function body_onMouseMove()
{
if(g_oSelected!=null)
{
var x=window.event.x, y= window.event.y, w=0, h=0, l=0, t=0;
g_oSelected.style.position="absolute";
g_oSelected.style.visibility="visible";
if(x<5)x=10;
if(y<5)y=10;
x=x-10;
y=y-10;
l=x;//-g_oSelected.style.posLeft;
t=y;//-g_oSelected.style.posTop;
if(l<0)l=0;
if(t<0)t=0;
window.status="l="+l +" t="+t;
g_oSelected.style.posLeft=l;
g_oSelected.style.posTop=t;
}
}
function Body_onLoad()
{
}
function Body_onBeforeUnload()
{
}
function Body_onUnload()
{
}
function Window_onBeforeUnload()
{
closeWindows();
}
function Window_onUnload()
{
closeWindows();
}
function LogoutTime(o)
{
if(nLogout<0)return;
var d=new Date();
var s=new String("");
nLogout-=1;
s+="Logout Fra "+ nLogout +" secondi";
if(nLogout==0)goToPage("logout.asp");
//o.value=s;
}
function closeWindows()
{
if(!oWindows)return 0;
//alert("pippo");
var i, w=null;
var a = (new VBArray(oWindows.Items())).toArray();
for(i in a)
{
w=a[i];
if(w)w.close();
//alert(w);
};
if(oWindows)oWindows.RemoveAll();
return i;
}
function box_maximize(me, container, index)
{
if(!me)return;
//alert(me.tagName);
var tblBox=me;
var rect=tblBox.getBoundingClientRect();
var l=rect.left ;
var t=rect.top ;
var r=rect.right ;
var b=rect.bottom ;
var w=r-l;
var h=b-t;
tblBox.style.position="absolute";
tblBox.height=150;
if(tblBox.rows)
{
//var i=0, c=tblBox.rows.length;
var i=0, c=tblBox.tBodies.length;
for(i=0; iindex) && (o=container.all.item(index)))
{
alert(o.tagName);
o.innerHTML=tblBox.toString();
box_minimize(me, container, index);
tblBox.style.position="relative";
tblBox.offsetParent=o;
}
}
function box_minimize(me, container, index)
{
if(!me)return;
var tblBox=me;
tblBox.style.position="absolute";
var i=0, c=tblBox.tBodies.length;
for(i=0; i