
function helpWindow(url) {

    // the ref parameter is used for metrics
    var ref = window.location.href;
    var param = null;

    // adding an extra parameter to the url passed in
    // we expect the URI /ordercenter/control/FrontController.jsp?command=HelpDisplay
    if (url.indexOf("?") > -1) {
        param = "&";
    } else {
        param = "?";
    }

    // truncate the href if it's excessively long; helps
    // avoid a buffer overflow with IE
    if (ref.length >= 1500) {
        ref = ref.substring(0, 1500);
    }

    // escape() encodes the value to avoid any parameter collisions
    url += param + "ref=" + escape(ref);

    var props = 'dependent=yes,toolbar=no,location=no,directories=no,status=no';
    props +=',menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,innerWidth=540,innerHeight=550,width=540,height=550';

    var help = window.open(url, 'mmmHelpWindow', props);
    help.focus();
}

function openWindow(url) {

    var props = 'dependent=yes,toolbar=no,location=no,directories=no,status=no'
    props += ',menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,innerWidth=590,innerHeight=600,width=600,height=600';

    var mmmContactUsWindow = window.open(url, 'mmmContactUsWindow', props);
    mmmContactUsWindow.focus();
}