function GetGotoPageUrlString (nPageNumber,sUrlText)
{
return "" + sUrlText
+ "";
}
function WritePagination(mypage,maxpages)
{
if (maxpages > 1 && mypage <= maxpages)
{
document.write("
");
document.write("| ");
var counterstart = mypage - 9;
if (mypage%10) counterstart = mypage - (mypage%10) + 1;
var counterend = counterstart + 9;
if (counterend > maxpages) counterend = maxpages;
if (counterstart != 1) document.write(GetGotoPageUrlString(1,TEXT_FIRST)+" : "+GetGotoPageUrlString(counterstart - 1,TEXT_PREVIOUS)+" ");
document.write("[");
var pad="";
var counter = counterstart;
for(;counter<=counterend;counter++)
{
if (counter != mypage) document.write(" " + GetGotoPageUrlString(counter,pad + counter));
else document.write(" " + pad + counter + "");
}
document.write(" ]");
if (counterend != maxpages) document.write(" " + GetGotoPageUrlString (counterend + 1,TEXT_NEXT) + " : " + GetGotoPageUrlString(maxpages,TEXT_LAST))
document.write(" |
");
}
}
function WritePaginationHeader(mypage,maxpages,recordCount)
{
document.write("| ");
document.write("Add new");
document.write(" | ");
document.write(TEXT_DETAILS_FOUND+": " + recordCount + " "+TEXT_PAGE1+" " + mypage + " "+TEXT_PAGE2+" " + maxpages);
document.write(" |
");
}
var rowWithMouse = null;
function gGetElementById(s) {
var o = (document.getElementById ? document.getElementById(s) : document.all[s]);
return o == null ? false : o;
}
function rowUpdateBg(row, myId)
{
row.className = (row == rowWithMouse) ? 'rowselected' : ( (myId&1) ? '' : 'shade' );
}
function rowRollover(myId, isInRow) {
// myId is our own integer id, not the DOM id
// isInRow is 1 for onmouseover, 0 for onmouseout
var row = document.getElementById('tr_' + myId);
rowWithMouse = (isInRow) ? row : null;
rowUpdateBg(row, myId);
}
function DisplayHeader()
{
document.write("");
}
function BuildSecondDropDown(arr, SecondField, FirstValue)
{
document.forms.editform.elements[SecondField].selectedIndex=0;
var i=0;
for(ctr=0;ctr9)
return ''+value;
return '0'+value;
}
if(value>9)
{
if(value>99)
return ''+value;
return '0'+value;
}
return '00'+value;
}
function getTimestamp()
{
var ts = "";
var now = new Date();
ts += now.getFullYear();
ts+=padDateValue(now.getMonth()+1,false);
ts+=padDateValue(now.getDay(),false)+'-';
ts+=padDateValue(now.getHours(),false);
ts+=padDateValue(now.getMinutes(),false);
ts+=padDateValue(now.getSeconds(),false);
return ts;
}
function addTimestamp(filename)
{
var wpos=filename.lastIndexOf('.');
if(wpos<0)
return filename+'-'+getTimestamp();
return filename.substring(0,wpos)+'-'+getTimestamp()+filename.substring(wpos);
}