Javascript- Referring Page Rule Specifications