<!--

function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&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&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function openWindow(theURL, winName, features, winWidth, winHeight) {
  var winTop = ((screen.height - winHeight) / 2);
  var winLeft = ((screen.width - winWidth) / 2);

  if(features != '') {
    features += ',';
  }
  features += 'width=' + winWidth + ',' + 'height=' + winHeight + ',' + 'top=' + winTop + ',' + 'left=' + winLeft;

  return window.open(theURL, winName, features);
}

function float_only(val) {
  return (val.value.indexOf('.')>-1 ? /\d/g : /[\d\.]/g).test(String.fromCharCode(event.keyCode));
}

function int_only(val) {
  return /\d/g.test(String.fromCharCode(event.keyCode));
}

function percent_only(val) {
  return (val.value.indexOf('.')>-1 ? /[\d\%]/g : /[\d\.\%]/g).test(String.fromCharCode(event.keyCode));
}

function ipagez_viewer(url) {
  viewerWin = window.open(url, "ipagez", "top=0,left=0,width=" + screen.width + ", height=" + screen.height + ", status=0");
}

//-->