Advertisement
captmicro

lul wat

May 3rd, 2010
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ( top.location == self.location )
  2.     self.location.replace( "index.html")
  3. function stripSpaces( s )  
  4. {
  5.     var i,c,ret=""
  6.     for ( i=0;i<s.length;i++)  
  7.     {
  8.         c=s.substring( i,i+1 )
  9.         if ( c!=" ") ret += c
  10.     }
  11.     return ( ret )
  12. }
  13. function get_name( form )
  14. {
  15.     var alphanum="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  16.     var s = form.textfield.value
  17.     var t = form.textfield2.value
  18.     var address = "r"
  19.     var len,i,n,p,code
  20.     if ( s.length && t.length )
  21.     {
  22.         len = ( s.length>t.length ) ? s.length : t.length
  23.         if ( len>24 ) len=24
  24.         s = s.toLowerCase()
  25.         s = stripSpaces( s )
  26.         t = t.toLowerCase()
  27.         t = stripSpaces( t )
  28.         for ( i=0;i<len;i++ )
  29.         {
  30.             n=p=0
  31.             if ( i<s.length ) n = alphanum.indexOf(s.substring( i,i+1 ))
  32.             if ( i<t.length ) p = alphanum.indexOf(t.substring( i,i+1 ))
  33.             if ( n<0 ) n=0
  34.             if ( p<0 ) p=0
  35.             code = ((2*n+p)^13) % (alphanum.length-1)
  36.             if ( code>0 ) address += alphanum.substring( code,code+1 )
  37.         }  
  38.     }
  39.     return ( address )
  40. }
  41. function check_password( form )
  42. {
  43.     var address = stripSpaces( form.classes.options[form.classes.selectedIndex].value ) + "/"
  44.     var file = get_name(form)
  45.     if ( file.length>1 )
  46.     {
  47.         invalid = false
  48.         if ( document.images )
  49.             document.images["security"].src = address + file + ".gif"
  50.         else alert ( "You must be using Netscape Navigator 3+, Miscrosoft Internet Explorer4+, or another web browser with JavasScript 1.1 or higher." )
  51.     }
  52.     return false
  53. }
  54. function get_report( form )
  55. {
  56.     var address = stripSpaces( form.classes.options[form.classes.selectedIndex].value ) + "/"
  57.     var file = get_name(form)
  58.     if ( file.length>1 && !invalid )
  59.         parent.bottom.document.location = address + file + ".html"
  60. }
  61. function handle_error( form )
  62. {
  63.     invalid = true
  64.     document.images["security"].src = "security.gif"
  65.     alert( "The Class, Last Name or Password may be invalid or the report may not be available." )
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement