
function cs_setInnerHtml(id, html)
{
    var e = document.getElementById(id);
    if (e)
        e.innerHTML = html;
}

function cs_openAndWriteToWindow(windowName, width, height, html)
{
    var w = window.open("", windowName, "height=" + height + ",width=" + width + ",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,zoominherit=no");
    w.document.open("text/html");
    w.document.write("<html style=\"margin: 0; padding: 0;\"><body style=\"margin: 0; padding: 0;\">");
    w.document.write(html);
    w.document.write("</body></html>");
    w.document.close();
    
    try
    {
        w.focus();
    }
    catch (e)
    {
    }
};