Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( top.location == self.location )
- self.location.replace( "index.html")
- function stripSpaces( s )
- {
- var i,c,ret=""
- for ( i=0;i<s.length;i++)
- {
- c=s.substring( i,i+1 )
- if ( c!=" ") ret += c
- }
- return ( ret )
- }
- function get_name( form )
- {
- var alphanum="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- var s = form.textfield.value
- var t = form.textfield2.value
- var address = "r"
- var len,i,n,p,code
- if ( s.length && t.length )
- {
- len = ( s.length>t.length ) ? s.length : t.length
- if ( len>24 ) len=24
- s = s.toLowerCase()
- s = stripSpaces( s )
- t = t.toLowerCase()
- t = stripSpaces( t )
- for ( i=0;i<len;i++ )
- {
- n=p=0
- if ( i<s.length ) n = alphanum.indexOf(s.substring( i,i+1 ))
- if ( i<t.length ) p = alphanum.indexOf(t.substring( i,i+1 ))
- if ( n<0 ) n=0
- if ( p<0 ) p=0
- code = ((2*n+p)^13) % (alphanum.length-1)
- if ( code>0 ) address += alphanum.substring( code,code+1 )
- }
- }
- return ( address )
- }
- function check_password( form )
- {
- var address = stripSpaces( form.classes.options[form.classes.selectedIndex].value ) + "/"
- var file = get_name(form)
- if ( file.length>1 )
- {
- invalid = false
- if ( document.images )
- document.images["security"].src = address + file + ".gif"
- else alert ( "You must be using Netscape Navigator 3+, Miscrosoft Internet Explorer4+, or another web browser with JavasScript 1.1 or higher." )
- }
- return false
- }
- function get_report( form )
- {
- var address = stripSpaces( form.classes.options[form.classes.selectedIndex].value ) + "/"
- var file = get_name(form)
- if ( file.length>1 && !invalid )
- parent.bottom.document.location = address + file + ".html"
- }
- function handle_error( form )
- {
- invalid = true
- document.images["security"].src = "security.gif"
- alert( "The Class, Last Name or Password may be invalid or the report may not be available." )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement