function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function Torna()
 {
  history.back();
 }
 
function findData2(nn)
{
 i=document.getElementsByTagName('TR')
 for(a=2;a<i.length;a++)
  {
  if(i[a].childNodes[0].innerText==nn)
   { i(a).style.background='yellow' }
  else
   { i(a).style.background='white'; }
  }
}

function findData3(nn)
{
 i=document.getElementsByTagName('TR')
 for(a=3;a<i.length;a++)
  {
  if(i[a].childNodes[0].innerText==nn)
   { i(a).style.background='yellow' }
  else
   { i(a).style.background='white'; }
  }
}

function findData4(nn)
{
 i=document.getElementsByTagName('TR')
 for(a=4;a<i.length;a++)
  {
  if(i[a].childNodes[0].innerText==nn)
   { i(a).style.background='yellow' }
  else
   { i(a).style.background='white'; }
  }
}

function findData5(nn)
{
 i=document.getElementsByTagName('TR')
 for(a=5;a<i.length;a++)
  {
  if(i[a].childNodes[0].innerText==nn)
   { i(a).style.background='yellow' }
  else
   { i(a).style.background='white'; }
  }
}

function findData6(nn)
{
 i=document.getElementsByTagName('TR')
 for(a=6;a<i.length;a++)
  {
  if(i[a].childNodes[0].innerText==nn)
   { i(a).style.background='yellow' }
  else
   { i(a).style.background='white'; }
  }
}

function findData7(nn)
{
 i=document.getElementsByTagName('TR')
 for(a=7;a<i.length;a++)
  {
  if(i[a].childNodes[0].innerText==nn)
   { i(a).style.background='yellow' }
  else
   { i(a).style.background='white'; }
  }
}

function findData9(nn)
{
 i=document.getElementsByTagName('TR')
 for(a=9;a<i.length;a++)
  {
  if(i[a].childNodes[0].innerText==nn)
   { i(a).style.background='yellow' }
  else
   { i(a).style.background='white'; }
  }
}

function toExcel()
{
 sHTML = G1.outerHTML;
 alert(sHTML)
 oXL = new ActiveXObject("Excel.Application");
 oBook = oXL.Workbooks.Add;
 oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML;
// oBook.HTMLProject.RefreshDocument = true;
  oXL.UserControl = true;
// oXL.ActiveWindow.DisplayGridlines = true;
 oXL.Visible = true;
}

function toHelp(kk){
 var VV=''
 p = 'center:yes; unadorned:yes; help:no; resizable:no; status:no; scroll:no; dialogHeight:540px; dialogWidth:600px'; 
 r = window.showModalDialog('../../MskHelp.asp?key=' + kk,VV,p);
}

function SetData(){
 var src = event.srcElement.sourceIndex; 
 p = 'center:yes; unadorned:yes; help:no; resizable:no; status:no; scroll:no; dialogHeight:335px; dialogWidth:385px'; 
 v = document.all[src-1].value;
 r = window.showModalDialog('../Calendar.html', v,p);
 document.all[src-1].value = r;
}
 
function isEmailAddr(email)
 {
 var result = false
 var theStr = new String(email)
 var index = theStr.indexOf("@");
 if (index > 0)
 {
  var pindex = theStr.indexOf(".",index);
  if ((pindex > index+1) && (theStr.length > pindex+1))
 result = true;
 }
 return result;
 }