
function openImage( windowAddress, windowName) {
mywin = window.open( windowAddress, '', 'scrollbars=yes,toolbar=no,location=no,menubar=no,status=no,resizable=yes'); }

function showImage( windowAddress, windowName, sizeX, sizeY) {
if (document.all) {
mywin = window.open( windowAddress, '', 'top=100,left=200,scrollbars=no,toolbar=no,location=no,menubar=no,status=no,resizable=no,width=' + sizeX + ',height=' + sizeY);
} else if (document.getElementById) {
var screenX = (window.screen.availWidth - sizeX) / 2;
var screenY = (window.screen.availHeight - sizeY) / 2;
mywin = window.open( windowAddress, '', 'scrollbars=no,toolbar=no,location=no,menubar=no,status=no,resizable=yes,screenX=' + screenX + ',screenY=' + screenY + ',width=' + sizeX + ',height=' + sizeY); } }

function trim( strText) {
while (strText.substring( 0, 1) == ' ')
strText = strText.substring( 1, strText.length);
while (strText.substring( strText.length - 1, strText.length) == ' ')
strText = strText.substring( 0, strText.length - 1);
return strText; }

function isAllowedInt( value) {
var allowed = '0123456789';
for (var i = 0; i < value.length; i++) {
if (allowed.indexOf( value.charAt( i)) == -1) return false; }
return true; }
