function handleHTTPerror(errorNumber, descriptionString) { var message = ''; switch(errorNumber) { case 400: message = message + 'HTTP ERROR 400: (' + descriptionString + ') '; message = message + 'The request could not be understood by the server due to malformed syntax. '; message = message + 'The client should not repeat the request without modifications.'; break; case 404: message = message + 'HTTP ERROR 404: (' + descriptionString + ') '; message = message + 'The server has not found anything matching the Request-URI. '; message = message + ''; break; case 500: message = message + 'HTTP ERROR 500: (' + descriptionString + ') '; message = message + 'The web server encountered an unexpected error '; message = message + 'that prevented it from fulfilling the request by the client. '; message = message + 'If you are calling the correct URL, this error can only be '; message = message + 'resolved by fixes to the web server '; message = message + 'software. It is not a client-side problem.'; alert(message); break default: alert('HTTP ERROR ' + errorNumber + ': (' + descriptionString + ') in XmlHttpObject.readyState=4: '); break; } } // end getXMLHTTPRequest