home *** CD-ROM | disk | FTP | other *** search
/ Macmillan Math: Grade 1 …Pupil's Edition (Florida) / Math Grade 1 - Pupil's Edition (Florida).iso / pc / corsair / generic / javascript / sailfish.js < prev    next >
Encoding:
Text File  |  2003-10-21  |  2.8 KB  |  60 lines

  1. function BookController() {
  2.     var isbnList = document.forms['form1']['ISBN'];
  3.     var selected = isbnList.selectedIndex;
  4.     if ( selected < 0 ) {
  5.         alert('You must select a book first.');
  6.     } else {
  7.         var title = isbnList.options[selected].text;
  8.         if ( title.indexOf( 'Teacher' ) >= 0 ) {
  9.             alert( 'Teacher Editions cannot be viewed from this screen.' );
  10.         } else {
  11.             var isbn = isbnList.options[selected].value;
  12.             /* get selected user button
  13.             var userGroup = document.forms['form1']['USER'];
  14.             for ( i = 0; i < userGroup.length; i++ ) {
  15.                 if ( userGroup[i].checked ) break;
  16.             }
  17.             var username = userGroup[i].value;*/
  18.             /* get selected mode
  19.             if ( document.forms['form1']['SAMPLE'].checked ) {
  20.                 var sample = 'true';
  21.             } else {
  22.                 var sample = 'false';
  23.             }*/
  24.             /* get selected platform
  25.             if ( document.forms['form1']['SUNRAY'].checked ) {
  26.                 var useragent = 'X11;';
  27.             } else {
  28.                 var useragent = 'standard';
  29.             }*/
  30.             url = "/BookController?ACTION=0&ISBN=" + escape( isbn );
  31.             //ls_url = \"/BookController?ACTION=0&ISBN=\" + escape( isbn ) + \"&SAMPLE=\" + escape( sample ) + \"&USERAGENT=\" + escape( useragent ) + \"&USERNAME=\" + escape( username );
  32.             location.href = url;
  33.         }
  34.     }
  35. }
  36.  
  37.  
  38. function GlossaryTool() {
  39.     isbnList = document.forms['form1']['ISBN'];
  40.     selected = isbnList.selectedIndex;
  41.     if (selected < 0) {
  42.         alert('You must select a book first.');
  43.     } else {
  44.         isbn = isbnList.options[selected].value;
  45.         location.href = "/GlossaryTool?ISBN=" + escape( isbn );
  46.     }
  47. }
  48.  
  49.  
  50. function Thumbnails() {
  51.     var server = location.href;
  52.     if ( server.indexOf( "dev.mhlearning.com" ) >= 0 ) {
  53.         location.href = "/OSQLTool?db=tlnd&sql=select+xmlid%2C+paraid%2C+id%2C+mattitle%2C+mattype2%2C+mattype3%2C+mediatype+from+obdata+O%2C+asset2para+A+where+%28O.id+%3D+A.assetid%29+and+%28type+%3D+1%29+and+%28%28mattype2%3D%27Activities%27+and+mattype3%3D%27Interactive+Maps%27%29+or+%28mattype2%3D%27Images%27+and+mattype3%3D%27Slideshows%27%29%29+and+not+id+in+%28select+assetid+from+thumbnail%29";
  54.     } else if ( server.indexOf( "qa.mhlearning.com" ) >= 0 ) {
  55.         location.href = "/OSQLTool?db=tlnq&sql=select+xmlid%2C+paraid%2C+id%2C+mattitle%2C+mattype2%2C+mattype3%2C+mediatype+from+obdata+O%2C+asset2para+A+where+%28O.id+%3D+A.assetid%29+and+%28type+%3D+1%29+and+%28%28mattype2%3D%27Activities%27+and+mattype3%3D%27Interactive+Maps%27%29+or+%28mattype2%3D%27Images%27+and+mattype3%3D%27Slideshows%27%29%29+and+not+id+in+%28select+assetid+from+thumbnail%29";
  56.     } else {
  57.         alert( "Not available on Production server" );
  58.     }
  59. }
  60.