// ---- disable right-click
//document.oncontextmenu = disableRightClick;
var submitForm = "yes";
function checkIfSubmitted()
{
if (submitForm=="yes")
{
submitForm="no";
return true;
}
else {
return false;
}
}
function resetSubmittedForm() {
submitForm="yes";
return true;
}
function disableRightClick()
{
return false;
//return true;
}
// ---- end of disable right-click
function dispMonth(mon)
{
switch (mon)
{
case 1: return "Jan";
case 2: return "Feb";
case 3: return "Mar";
case 4: return "Apr";
case 5: return "May";
case 6: return "Jun";
case 7: return "Jul";
case 8: return "Aug";
case 9: return "Sep";
case 10: return "Oct";
case 11: return "Nov";
case 12: return "Dec";
}
}
function fmtCurrency(amount)
{
a = fmtDecimal(amount);
if (a.substr(a.indexOf('.')).length = 3 && a.substr(a.indexOf('.')) == '.00'){
amountResult = a.substr(0, a.indexOf('.'));
}
else
amountResult = a;
return amountResult;
}
function fmtDecimal(amount)
{
return fmtNumber(amount/100);
}
function fmtNumber(amount)
{
var textFormat = "";
s = new String(amount);
decimalPt = s.indexOf('.');
if ( decimalPt>0 && decimalPt==(s.length - 2)) { s += '0'; }
//if ( decimalPt<0 ) s += ".00";
if ( decimalPt < 0 ) {
beforeDecimal = s;
//afterDecimal = ""; // by William 20040521
afterDecimal = ".00";
}
else {
beforeDecimal = s.substr(0,s.indexOf('.'));
afterDecimal = "." + s.substr(s.indexOf('.')+1);
}
//if ( afterDecimal.indexOf(".00") >= 0 ) // by William 20040521
// afterDecimal = ""; // by William 20040521
for (var t=0,k=beforeDecimal.length-1; k>=0; k--) {
t++;
if (t % 3 == 0)
textFormat = "," + beforeDecimal.substr(k,1) + textFormat;
else
textFormat = beforeDecimal.substr(k,1) + textFormat;
//document.write("
" + textFormat);
}
if (textFormat.substr(0,1) == ",")
return textFormat.substr(1,textFormat.length-1) + afterDecimal;
return textFormat + afterDecimal;
}
function leadingZero(nr)
{
if (nr < 10) nr = "0" + nr;
return nr;
}
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images) {
for (var i=0; i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&iHelp Window");
win.document.write("");
win.document.write("");
win.document.write("
"+msg+"
");
win.document.write("close");
win.document.write("