function initFrame() {
   origURL = parent.document.URL ;
   if ( origURL.search("\\?") > 0 ) { 
        contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length) ;
        document.getElementById('mainIframe').src=contentURL;
   }
}

function framer() { 
    passpage = self.location.pathname;
    search = self.location.search;
    if (search.length > 0)
      passpage  = passpage + search;
    if (top.location == self.location) 
       top.location.href= "http://" + self.location.host + "/index.html?" + passpage;
}