I have a very minimal understanding of Javascript. What I would like to do with this error message is redirect the user back to where they came from when the click ok. Here's the error:

Code:
 error('Your are not authorized to access this page '. '\\nIf you have recieved this message in error, '. '\\ncontact email@emailsomplace.com.');
sorry if this is a simple question.