URL Parent iframe
var url = (window.location != window.parent.location)
? document.referrer
: document.location.href;
Arrogant Ant
var url = (window.location != window.parent.location)
? document.referrer
: document.location.href;