// JavaScript Document
function setPointer(theRow, thePointerColor)
{
    for (var c = 0; c < theRow.cells.length; c++) {
        theRow.cells[c].bgColor = thePointerColor;
    }
    return true;
}

function setLocation(url)
{
	window.location = url;
}

function setColor(theRow, theRow2, col)
{
    for (var c = 0; c < theRow.cells.length; c++) {
        theRow.cells[c].bgColor = col;
    }
    for (c = 0; c < theRow2.cells.length; c++) {
        theRow2.cells[c].bgColor = col;
    }

    return true;
}

function setTableColor(mytable, col)
{
		for (var c = 0; c < mytable.rows.length; c++) {
	    	for (var td = 0; td < mytable.rows[c].cells.length; td++) {
						mytable.rows[c].cells[td].bgColor = col;
						mytable.rows[c].cells[td].borderColor = col;
		    }
    }
    return true;
}


function showtip(current,e,text)
{
   if (document.all)
   {
      thetitle=text.split('<br>')
      if (thetitle.length > 1)
      {
        thetitles=""
        for (i=0; i<thetitle.length; i++)
           thetitles += thetitle[i] + "\r\n"
        current.title = thetitles
      }
      else current.title = text
   }

   else if (document.layers)
   {
       document.tooltip.document.write( 
           '<layer bgColor="#FFFFE7" style="border:1px ' + 'solid black; font-size:12px;color:#000000;">' + text + '</layer>')
       document.tooltip.document.close()
       document.tooltip.left=e.pageX+5
       document.tooltip.top=e.pageY+5
       document.tooltip.visibility="show"
   }
}

function hidetip()
{
    if (document.layers)
        document.tooltip.visibility="hidden"
}

function openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function apriFinestra(url){
			  var hWnd=window.open(url,"","toolbar=no,width=780,left=1,top=1,height=520,directories=no,location=no,status=no,statusbar=no,resizable=no,menubar=no,scrollbars=yes");
			  if(!hWnd.opener) hWnd.opener=self;
			  if(hWnd.focus!=null) hWnd.focus();
			}

