  var exit=true;
  var showPopupOnExit = true;
  var tmpDomainName = "www.flashmeat.com";
  function doNotShowPopupOnExit() { showPopupOnExit = false; }
  
  function popupOnExit() {
   var showpopup = true;
   if (document.all) {
    var tmp, tmpSiteName, tmpSiteLen;
    tmpSiteName = "http://"+tmpDomainName;
    tmpSiteLen = tmpSiteName.length;
    if (document.activeElement) {
     if (document.activeElement.href)  {
      tmp = document.activeElement.href;
	  if (tmp.substr(0,tmpSiteLen)==tmpSiteName) showpopup = false;
     } else if (document.activeElement.type=="submit") showpopup = false;
    }
   }
   if (showpopup) funcOnExit();
 }
  
  function funcOnExit() {
   if (showPopupOnExit) { 
     window.open("http://www.woopami.com/","woopami");
     if (exit) open('exit.htm','','toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,height=300,width=173');
   }
  }

function updatelinks() {
  var all_links = document.links; 
  for (i=0; i<=(document.links.length-1); i++)
    if (document.links[i].hostname.indexOf(tmpDomainName)==0 || (document.links[i].target!="" && document.links[i].target!="_self")) (document.links[i]).addEventListener("click", doNotShowPopupOnExit, false);
  var all_forms = document.forms;
  for (i=0; i<=(document.forms.length-1); i++)
    (document.forms[i]).addEventListener("submit", doNotShowPopupOnExit, false);
}

 // if (!document.all) window.onload = updatelinks;
 // window.onunload = popupOnExit;


