﻿/*A.kostyuk: [ShowBOEditor]  function will work only in edit mode
needs to show custom editors, managers
*/
function ShowBOEditor(commandname, editor, id) {
    commandname = commandname == "" ? "vvvirischeque:webedit" : commandname;
    var ctl = document.getElementById("scWebEditRibbon");
    if (ctl != null) {
        ctl.contentWindow.scForm.invoke(commandname + "(editor=" + editor + ",id=" + id + ")");
    } else {
        alert("Can't find Edit Ribbon, Is It Edit Mode?");
    }
}

function OpenPrint(val) {
    var reg = /.*\?.*/;
    var maches = document.location.href.toString().match(reg);
    var newlocation = document.location.href;
    newlocation += ((maches == null) ? '?' : '&') + val;
    window.open(newlocation);
}