function newsms() {
        var wdh = 460; hgt = 300;

        var helpName = "sms.pl?func=newsms";

        helpWin = open('' + helpName + '', '', 'width=' + wdh + ',height=' + hgt+',left=50,top=40,scrollbars=no,sizeable=yes');
}

function opencompose(to,cc,bcc,target) {

        if(!to) {
        var to = ''
        }

        if(!cc) {
        var cc = ''
        }

        if(!bcc)        {
        var bcc = ''
        }

        if(!target)     {
        var target = ''
        }

        // Open the compose screen in the current window, or popup a new window
        if(target == 1)      {
        location.href='compose.pl?func=new&To=' + to + '&Cc=' + cc + '&Bcc=' + bcc;
        } else  {
        var wdh = 715; hgt = 535;
        open('compose.pl?func=new&To=' + to + '&Cc=' + cc + '&Bcc=' + bcc + '', '', 'width='
        + wdh + ',height=' + hgt + ',left=10,top=10,scrollbars=no,resizable=yes');
        }

}

function cleanup() {
  exec('logout', '', 'exit()')
}

function logout(unload) {

if (unload || confirm(['Are you sure you want to logoff?']))    {
<!-- if($atmail->{EmptyTrash}) { -->
parent.location.href='util.pl?func=logout';
//top.FramePage.location.href='util.pl?func=logout';
<!-- } -->

<!-- if(!$atmail->{EmptyTrash}) { -->
parent.location.href='index.pl?func=logout';
//top.FramePage.location.href='index.pl?func=logout';
<!-- } -->

												}
}

function exec(op, mboxname) {
  var s = msgHREF + 'cmd.msc?sid=' + sid + '&security=' + security +
    '&mbox=' + encode(mboxname) + '&cmd=' + op

  for (i = 2; i < exec.arguments.length - 1; i++)
    s += '&argv=' + encode(exec.arguments[i])
  s += get_charset()
  cmdOp = exec.arguments[i]
  load(cmdFrame, s)
}


function help(currFile, lang) {
var wdh = 800; hgt = 600;


helpWin = open('/?Action=Help', '', 'width=' + wdh + ',height=' + hgt + ',left=100,top=100,status=no,resizable=yes,scrollbars=yes');
}

function calander() {
top.FramePage.location.href='html/$atmail->{Language}/calander/index.html';
}

