var m_ShowRow = null;

function ShowTableRowById(rowID) 
{
    ShowTableRow(document.getElementById(rowID));
}

function ShowTableRow(row)
{
    if (m_ShowRow == null) m_ShowRow = (navigator.appName.indexOf('Internet Explorer') != -1) ? 'block' : 'table-row';

    row.style.display = m_ShowRow;
}

function HideTableRowById(rowID) 
{
    HideTableRow(document.getElementById(rowID));
}

function HideTableRow(row)
{
    row.style.display = 'none';
}


function OpenWindow(url)
{
window.open(url, "" , "left=300, top=100, width=350, height=550, border=no, toolbar=no,directories=no,status=no,menubar=no, resizable=no, scrollbars=no,copyhistory=no" )
}

function OpenCustomerWindow(url)
{
window.open(url, "" , "left=300, top=225, width=350, height=450, border=no, toolbar=no,directories=no,status=no,menubar=no, resizable=no scrollbars=no,copyhistory=no" )
}

function OpenReports(url)
{
window.open(url, "" , "left=300, top=225, width=350, height=450, border=no, toolbar=no,directories=no,status=no,menubar=no, resizable=no scrollbars=no,copyhistory=no" )
}

function OpenConfirmReceived(url)
{
window.open(url, "" , "left=300, top=225, width=450, height=300, border=no, toolbar=no,directories=no,status=no,menubar=no, resizable=no scrollbars=no,copyhistory=no" )
}

function OpenSentToPrint(url)
{
window.open(url, "" , "left=300, top=225, width=450, height=220, border=no, toolbar=no,directories=no,status=no,menubar=no, resizable=no scrollbars=no,copyhistory=no" )
}

function OpenInvoice(url)
{
window.open(url, "" , "left=300, top=225, width=470, height=475, border=no, toolbar=no,directories=no,status=no,menubar=no, resizable=no scrollbars=no,copyhistory=no" )
}

function OpenSupplierInvoice(url)
{
    window.open(url, "", "left=300, top=225, width=470, height=375, border=no, toolbar=no,directories=no,status=no,menubar=no, resizable=no scrollbars=no,copyhistory=no")
}

function OpenPaymentProcess(url)
{
window.open(url, "" , "left=300, top=65, width=480, height=640, border=no, toolbar=no,directories=no,status=no, resizable=no ,menubar=no, scrollbars=no,copyhistory=no" )
}

function CustomerJobHistory(url)
{
window.open(url, "" , "left=100, top=100, width=850, height=600, border=no, toolbar=no,directories=no,status=no, resizable=no ,menubar=no, scrollbars=no,copyhistory=no" )
}

function clickButton(e, buttonid){ 
         var bt = document.getElementById(buttonid); 
         if (typeof bt == 'object'){ 
               if(navigator.appName.indexOf("Netscape")>(-1)){ 
                     if (e.keyCode == 13){ 
                           bt.click(); 
                           return false; 
                     } 
               } 
               if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                     if (event.keyCode == 13){ 
                           bt.click(); 
                           return false; 
                     } 
               } 
         }
    }


function showDetails(thisval) {
var dd=document.getElementById("cmbStock");
alert(thisval);
 if (thisval == 4) {
         dd.ToolTip="testing";      
      } 
dd.ToolTip=thisval;
} 

function showDiv(e) {
            var hours = document.getElementById("hours");
            var stock = document.getElementById("cmbStock").selectedvalue;
            hours.left=e.pageX+5
            hours.top=e.pageY+5
            hours.innerHTML = stock;
            hours.style.display = "";
           }
           
           function hideDiv() {
            var hours = document.getElementById("stockHelp");
            hours.style.display = "none";
           }


//function showDiv(thisval) {
//var stockHelp = document.getElementById("stockHelp");
////hours.left=e.pageX+5
////hours.top=e.pageY+5
////hours.style.display = "";
//stockHelp.innerHTML=thisval;
//if (stockHelp.style.display = "none") {
//         stockHelp.style.display = "";     
//      }
//if (stockHelp.style.display = "") {
//        stockHelp.style.display = "none";    
//      }  

//}

////function hideDiv() {
////var stockHelp = document.getElementById("stockHelp");
////stockHelp.style.display = "none";
////}

