added document.domain for popup