//Java Script Page for the Leroy's Website
//Displays a jpeg picture of the car with it's description in title bar
//and a close window button set in focus
function DispPics(picname, carname)
{
   if(picname == '' || carname == '')
   {//if no picture display message and bolt
     window.alert('No Picture Available Yet, Please Be Patient');
     return 1;
   }// end if 
   
   rWin = window.open('', 'win02', 'height=575,width=700');
   rWin.document.open();
// insert code to begin writing HTML document here
   rWin.document.writeln('<html><head><title>' + carname + '</title></head><body>');
   rWin.document.writeln('<form id="myform" name="myform"><div align="center"><img src ="carpics/' + picname +'.jpg" height="480" width="640" alt="'+carname+'" title="'+carname+'"></div>');  
   rWin.document.writeln('<p align="center" style="font-family:arial;"><b>'+ carname +'</b><br>');
   rWin.document.writeln('<b>Delaware Service and Tire</b><br>'); 
   rWin.document.writeln('<font size = 1>(Press Enter or Spacebar to Close Window too)</font><br>'); 
   rWin.document.writeln('<input type="button" name="offswitch"  id="offswitch" onclick="window.close();" value="Close Window" style=""/></p>');
   rWin.document.writeln('</form></body></html>');
   rWin.document.myform.offswitch.focus();//sets focus to close window button
   rWin.document.close();
   return 0;
}