/* Used to confirm registration */
function ConfirmationRegistration(MyLoggedInText, MyNonLoggedInText, LoggedInDest, NonLoggedInDest) {
	var answer; 
        if ( loggedin == 1 ) /* They are logged in */
           {
           answer = confirm(MyLoggedInText);
           if (answer)
              {
	      window.location = LoggedInDest; /* Go tot he registration page for the clinic */
	      }
           }
        else /* They are not logged in */
           { 
           answer = confirm(MyNonLoggedInText);
           if (answer)
              {
	      window.location = NonLoggedInDest; /* Go to the login page for the site. */
	      }
           }
}
/* Used to restrict access */
function RestrictAccess(MyNonLoggedInText, LoggedInDest, NonLoggedInDest) {
	var answer; 
        if ( loggedin == 1 ) /* They are logged in */
	   window.location = LoggedInDest; /* Go tot he registration page for the clinic */
        else /* They are not logged in */
           { 
           answer = confirm(MyNonLoggedInText);
           if (answer)
              {
	      window.location = NonLoggedInDest; /* Go to the login page for the site. */
	      }
           }
}

