/*
 * JSMsg Client Interface Code
 *
 * (C) Copyright 2003 Creativyst, Inc.
 *         creatvisyt.com
 *      ALL RIGHTS RESERVED
 *
 * Developers may use these functions
 * freely in their code, modified or
 * unmodified as long as this entire
 * comment is included and intact.
 *
*/




/*
 * EXAMPLE JSMsg client interface code
 *
 * The client code consists of four
 * functions:
 *
 *      jsmGetN(ns,MsgPart,number);
 *      jsmGet(ns,MsgPart,[offset]);
 *      jsmGetDay(ns,MsgPart);
 *      jsmMetaMsg(ns,MsgPart);
 *
 * These work the same as their JSMsg Counterparts
 * except they take an extra namespace parameter
 * as their first parameter.
 *
 * They will return the message part just as if
 * the function of the same name was called
 * with the namespace prefix.
 *
 *
*/

function jsmGetN(ns,MsgPart,number)
{
    var rv, c, er;

    c = "rv = " + ns + ".GetN('" + MsgPart + "'," + number + ");";
    er = eval(c);

    return(rv);
}


function jsmGet(ns,MsgPart,offset)
{
    var rv, c, er;

    c = "rv = " + ns + ".Get('" + MsgPart + "'," + offset + ");";
    er = eval(c);

    return(rv);
}


function jsmGetDay(ns,MsgPart)
{
    var rv, c, er;

    c = "rv = " + ns + ".GetDay('" + MsgPart + "');";
    er = eval(c);

    return(rv);
}


function jsmMetaMsg(ns,MsgPart)
{
    var rv, c, er;

    c = "rv = " + ns + ".MetaMsg('" + MsgPart + "');";
    er = eval(c);

    return(rv);
}

