function OpenWindowPriceList(url)
{
    var w = (window.screen.width/2) - 300;
    var onFocusObj = window.open(url, "_blank", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=610,height=470,left='+w+', top=100,screenX='+w+'px,screenY=100px');
    onFocusObj.focus();
}
function OpenWindow(url)
{
    window.open(url, "_blank", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=600');
    return false;
}

function Messages(msg, url)
{
    alert(msg);
    document.location.href = url;
}
function Printer(url)
{
    window.open(url, "_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=650,height=600,left=60, top=60,screenX=60px,screenY=60px");
    return false;
}
function SendMail(url)
{
    window.open(url, "_blank","toolbar=no,location=no,directories=no,addressbar=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=530,height=220,left=230, top=120,screenX=230px,screenY=120px");
    return false;
}
function ActivePrinter(PrinterTopBar, PrinterBottomBar)
{
    document.getElementById(PrinterTopBar).style.visibility='hidden';
    document.getElementById(PrinterBottomBar).style.visibility='hidden';
    window.print();
    ClosePopup();
    return false;
}
function getNextSibling(startBrother){
  endBrother=startBrother.nextSibling;
  while(endBrother && endBrother.nodeType!=1){
    endBrother = endBrother.nextSibling;
  }
  return endBrother;
}

function getFirstChild(startParent){
  endNode=startParent.firstChild;
  while(endNode && endNode.nodeType!=1){
    endNode = endNode.firstChild;
  }
  return endNode;
}
function ShowPopup(e, Width, Height, LinkPath, Title, Caption, Author){
    var desc = '';
    try {
        var el = getNextSibling(e.parentNode.parentNode);
        el = el.offsetParent;
        if (el.rows.length > 1) {
            el = el.rows[1].cells[0];
            desc = el.innerHTML;
        }
    } catch (err) {
        desc = '';
    }
    myLightWindow.activateWindow({
        loadingAnimation: false,
        href: LinkPath,
        caption: Caption,
        title: Title,
        width: Width,
        height: Height,
        Author: Author
    });
}
function ClosePopup(){
    window.parent.myLightWindow.deactivate();
}