/* ------------------------------------------------------------------------ */
/* This is scripts done by CDS and form part of the main functionality of
   any CDS Application */
/* ------------------------------------------------------------------------ */

SelectListArray = new Array();

function IsNumeric(strString)
   //  check for valid numeric strings
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

   function Preview(TheImage){
       window.open('image_viewer.php?Image=' + TheImage ,'APPWindow',
                   'width=720,height=520,left=10,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no')
   }
/* ------------------------------------------------------------------------ */

/* ------------------------------------------------------------------------ */
/* When there is an associated entry in formfield_help for a respective formfield,
   the user can click the label of the field to open a javascript popup
   to view thehelp on that object */
/* ------------------------------------------------------------------------ */
function explain(name, output, msg) {

newwin = window.open('','','top=100,left=100,width=425,height=300');

if (!newwin.opener) newwin.opener = self;

with (newwin.document)

{

open();

write('<html>');

write('<head>');
 write('<title>');
  write('Field Help');
 write('</title>');
 write('<LINK REL=StyleSheet HREF="application/css/application_styles.css" TYPE="text/css" MEDIA=screen>');
write('</head>');


write('<body bgcolor=#EAEBE9 onLoad="document.form.box.focus()"><form name=form>');

write('<p class=PAGEnameSMALL>' + name + '</p>');

write('<p class=PAGEcontent>' + msg + '</p>');

write('<p class=PAGEcontent>You may enter your ' + name + ' here to copy it into the respective field.</p>');

write('<p class=PAGEcontent>' + name + ':  <input type=text name=box size=10 onKeyUp=' + output + '=this.value></p>');

write('<p align=center><input type=button value="Click to close when finished" onClick=' + "'" + 'javascript: window.close();' + "'" + '></p>');

write('</form></body></html>');

close();

   }

}
/* ------------------------------------------------------------------------ */

