function ablak_print(nev)
{
   tmpablak = window.open(nev, 'ablak', 'toolbar=no,scrollbars=yes,width=800,height=420,left=20,top=40');
}

function enlarge(picname,w,h) 
{
   popup = window.open('','','toolbar=no,location=no,directories=no,menubar=no,resizable=no,status=no,scrollbars=auto,width='+w+',height='+h); 
   popup.document.write('<HTML><title>Picture</title><BODY style="margin-top: 0px; margin-left: 0px; margin-bottom: 0px; margin-right: 0px;"><div style="position: absolute; left: 0px; top: 0px; right:0px; bottom:0px;"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0><TR VALIGN=MIDDLE><TD ALIGN=CENTER>'); 
   popup.document.write('<IMG SRC="'+picname+'" WIDTH="'+w+'" HEIGHT="'+h+'" BORDER=0 OnClick=self.close()></TR></TD></TABLE></div></BODY></HTML>'); 
   popup.document.close(); 
}
 
 var marked_row = new Array;
 
 function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
 {
     var theCells = null;
 
     if ((thePointerColor == '' && theMarkColor == '')
         || typeof(theRow.style) == 'undefined') {
         return false;
     }
 
     if (typeof(document.getElementsByTagName) != 'undefined') {
         theCells = theRow.getElementsByTagName('td');
     }
     else if (typeof(theRow.cells) != 'undefined') {
         theCells = theRow.cells;
     }
     else {
         return false;
     }
 
     var rowCellsCnt  = theCells.length;
     var domDetect    = null;
     var currentColor = null;
     var newColor     = null;
 
     currentColor = theCells[0].style.backgroundColor;
     domDetect    = false;
 
     if (currentColor.indexOf("rgb") >= 0)
     {
         var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1,
                                      currentColor.indexOf(')'));
         var rgbValues = rgbStr.split(",");
         currentColor = "#";
         var hexChars = "0123456789ABCDEF";
         for (var i = 0; i < 3; i++)
         {
             var v = rgbValues[i].valueOf();
             currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16);
         }
     }
 
     if (currentColor == ''
         || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
         if (theAction == 'over' && thePointerColor != '') {
             newColor              = thePointerColor;
         }
         else if (theAction == 'click' && theMarkColor != '') {
             newColor              = theMarkColor;
             marked_row[theRowNum] = true;
         }
     }
     else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
              && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
         if (theAction == 'out') {
             newColor              = theDefaultColor;
         }
         else if (theAction == 'click' && theMarkColor != '') {
             newColor              = theMarkColor;
             marked_row[theRowNum] = true;
         }
     }
     else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
         if (theAction == 'click') {
             newColor              = (thePointerColor != '')
                                   ? thePointerColor
                                   : theDefaultColor;
             marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
                                   ? true
                                   : null;
         }
     }
 
     if (newColor) {
         var c = null;
         if (domDetect) {
             for (c = 0; c < rowCellsCnt; c++) {
                 theCells[c].setAttribute('bgcolor', newColor, 0);
             }
         }
         else {
             for (c = 0; c < rowCellsCnt; c++) {
                 theCells[c].style.backgroundColor = newColor;
             }
         }
     }
 
     return true;
 }

