



var d = document;
var dmi = 0;

var tr_timer      = null;
var tr_timer_call = 1000;
var tr_i          = 0;








function writeScreenResolution()
{
 var out = '';
 
 out = '';
}








function getEl(i)
{ 
 var ob = d.all?d.all[i]:d.layers?d.layers[i]:d.getElementById(i); 
 return ob; 
} 



function getifrEl(ifr, i)
{ 
 var ob = ifr.all?ifr.all[i]:ifr.layers?ifr.layers[i]:ifr.getElementById(i); 
 return ob; 
} 





function switchMonitorIPDesc()
{
 if (dmi==0)
   {
    getEl('helpmonitorip').style.display = 'block';
    dmi = 1;
   }
 else
   {
    getEl('helpmonitorip').style.display = 'none';
    dmi = 0;
   }
}








function trackingSet(tr)
{
 if (tr.checked)
   {
    tr_status = 'on';
    tr_i=60;
   }
 else
   {
    tr_status = 'off';
    
    frames['tr_ifr'].location.href = 'track.php?turn_off=true';
    tr_i=0;
   }
}








function trackMe()
{
 tr_i++;
 
 if (tr_status=='on' && tr_i>=60) 
   {
    frames['tr_ifr'].location.href = 'track.php';
    
    tr_i = 0;
   }
 
 
 if (document.forms.mf.reload.value=='yes')
   {
    GUnload();
    
    changeDIVcontent('page_cnt', '', '');
    
    window.location = document.location.href;
   }
 
 clearTimeout(tr_timer);
 timer = setTimeout("trackMe()", tr_timer_call);
}







function getUID()
{ 
 var czas  = new Date();
 rok   = czas.getYear();
 mies  = ( ( czas.getMonth() < 10 ) ? "0": "" ) + ( czas.getMonth() + 1 );
 dzien = ( ( czas.getDate()  < 10 ) ? "0": "" ) + ( czas.getDate() );
 godz  = ( ( czas.getHours() < 10 ) ? "0": "" ) + ( czas.getHours() );
 min   = ( ( czas.getMinutes() < 10 ) ? "0": "" ) + ( czas.getMinutes() );
 sek   = ( ( czas.getSeconds() < 10 ) ? "0": "" ) + ( czas.getSeconds() );
 
 
 return dzien+"_"+mies+"_"+rok+"_"+godz+"_"+min+"_"+sek;
}








function changeDIVcontent(div_id, content, doc)
{ 
 if (doc=='') doc=document;
 
 if(doc.layers)
 with(doc.layers[div_id+""].document)
  {
   write(content);
   close();
  }
 else
  {
   if(doc.getElementById)
    doc.getElementById(div_id+"").innerHTML=content;
   
   else
    if(doc.all)
     doc.all[div_id+""].innerHTML=content;
  }
}


