var tempHTML

// test stuff 07/21/2002
var blankgraph = "../graphics/website/blank"
// end test stuff 07/21/2002

function showGraphics(listInput)
{
form1 = document.forms["evg2000"]
graphpath = form1.path.value
if (listInput != "" && listInput != null) {
 loc = next = start = count = 0;
 done = false;
 var firstImage = tempString=""
 first=true
 while (!done){
  count++
  next= listInput.indexOf(";",start)
  if (next < 0 ){
   if (first){
    first = false
    firstImage = listInput.substring(start)
    tempstring = '"' + graphpath + listInput.substring(start) + '.jpg"'
   }
   else{
    tempstring  = tempstring + ',"' + graphpath + listInput.substring(start) + '.jpg"'
   } 
   done=true
  }
  else{
   if (first){
    first = false
    firstImage = listInput.substring(start,next)
    tempstring = '"' + graphpath + listInput.substring(start,next) + '.jpg"'
   }
   else{
    tempstring  = tempstring + ',"' + graphpath + listInput.substring(start,next) + '.jpg"'
   } 
   loc++
   start=next+1;
  }
 }

 arrayString = 'var cycleImages = new Array('
 arrayString += tempstring
 arrayString += ');';
 maxImageString = "var maxImage = cycleImages.length"

 tempHTML = ''
 tempHTML += '<HTML>\n'
 tempHTML += '<HEAD>\n'
 tempHTML += '<TITLE></TITLE>\n'
 tempHTML += '<SCRIPT LANGUAGE="Javascript">'
 tempHTML += '\n';
 tempHTML += arrayString +'\n';
 tempHTML += maxImageString;
 tempHTML += '\nvar thisImage = 0;'
 tempHTML += '\nvar xgraphpath = "'
 tempHTML += graphpath
 tempHTML += '";\n'
 tempHTML += '\nvar xfirstImage = "'
 tempHTML += firstImage
 tempHTML += '";\n'
 
 tempHTML += '\nfunction init() {'
// tempHTML += '\nalert("testing")'
 tempHTML += '\ndocument.images[0].src=xgraphpath + xfirstImage + ".jpg";'
 tempHTML += '\n}'

 
 
 
 
 tempHTML += '\nfunction nextImage() {'
 tempHTML += '\n thisImage=(thisImage+1)%maxImage'
 tempHTML += '\n document.images[0].src=cycleImages[thisImage];' 
 tempHTML += '\n}'
 
 
 tempHTML += '\nfunction prevImage() {'
 tempHTML += '\n thisImage=(thisImage+maxImage-1)%maxImage'
 tempHTML += '\n document.images[0].src=cycleImages[thisImage];'
 tempHTML += '\n}'
 tempHTML += '\n</SCRIPT>'
 tempHTML += '\n</HEAD>'
 tempHTML += '\n<body BGCOLOR="#8F8FBD" onload="init()">'
 tempHTML += '\n<form METHOD="POST"  name="picform">'
// tempHTML += '\n<CENTER>'
 tempHTML += '<TABLE><TR><TD><IMG SRC='
 tempHTML += blankgraph
 tempHTML += '.jpg NAME="sample"></TD>'
 //tempHTML += '</CENTER>'
 tempHTML += '<TD>'
 if ( count > 1 )
 {
//  tempHTML += '\n<CENTER>'
  tempHTML += '\n <INPUT TYPE="Button" VALUE="Prev" onclick="prevImage()">'
  tempHTML += '\n <INPUT TYPE="Button" VALUE="Next" onclick="nextImage()">'
//  tempHTML += '\n</CENTER>'
 }
//  tempHTML += '\n<CENTER>'
tempHTML += '\n <INPUT TYPE="Button" VALUE="Go Back" onClick="javascript:window.location.replace( unescape(window.location.pathname) )">'
//  tempHTML += '\n</CENTER>'
 tempHTML += '</TD></TR>'
 tempHTML += '\n</form>'
 tempHTML += '\n</BODY>'
 tempHTML += '\n</HTML>'
 //alert(tempHTML)

 document.write(tempHTML);
 document.close();
 } //end if

} //end showGraphics



