Added if statement

Added an if statement to determine if the referring page was from
another site or from your own site.