I am trying to write code that references the referrer.IndexOf value. The below code looks to see if "js.html" is in the referrer value and then shows an alert and redirects the user to another webpage. I would like the code below to do the opposite, if the referrer has js.html in the URL do nothing, if it DOES NOT show alert and redirect user. I can't seem to figure this out and I know it should be easy. Any suggestions?

<script type="text/javascript" charset="utf-8">
if (document.referrer.indexOf('js.html') != -1) {
 alert("Access Violation");