﻿
function SetOpacity(object, value)
{
    if(object && value)
    {    
        object.style.filter = 'Alpha(opacity=' + value + ')';
        object.style.filter = '-moz-opacity:' + (value/100);
    }
}


function FocusCol(obj)
{
   if (document.getElementById || document.all)
   {
          obj.style.border="solid 1px black";
          obj.style.color="black";
   }
}


function BlurCol(obj)
{
   if (document.getElementById || document.all)
   {
          obj.style.border="solid 1px #7F9DB9";
          obj.style.color="";
   }
}

function PrintContent(targetControlID, header, firstLine)
{
    var prtContent = document.getElementById(targetControlID);
    var strOldOne=prtContent.innerHTML;
    var WinPrint = window.open('','','left=0,top=0,width=800,height=600,toolbar=0,scrollbars=1,status=0');
    WinPrint.document.write("<style>*{font-size:8pt;font-family:Arial}; h1{font-size:12pt; font-weight:bold} h2{font-size:10pt; font-weight:bold} .UnPrintable{display:hidden} .PrinterNoBorder, PrinterNoBorder tr, PrinterNoBorder td{border-style:none; border-collapse:collapse}</style>");    
    if(header!=null && header.length > 0)
        WinPrint.document.write("<h1>" + header + "</h1>");
        
    if(firstLine!=null && firstLine.length > 0)
        WinPrint.document.write("<h2>" + firstLine + "</h2>");
          
    WinPrint.document.write(prtContent.innerHTML);
    WinPrint.document.close();
    WinPrint.focus();
    WinPrint.print();
    //WinPrint.close();
    prtContent.innerHTML=strOldOne;
}
