function checkBrowser()
{
	// check if the referrer was our own site; we don't want to repeat our message on every page the user sees while on the same site
	if(document.referrer.search(document.domain) >= 0) return;
	
	if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.platform != "MacPPC")    // this popup doesn't work in Mac IE, which is dying off anyway
   {
      // paragraph one
      
      var thisSite = document.createTextNode("This site does not explicitly support Microsoft Internet Explorer.  As a result, this page may be rendered incorrectly.  You are recommended to upgrade to a more modern browser."); 
         
      var pOne = document.createElement("p");
      pOne.appendChild(thisSite);
      
      // paragraph two
      
      var tryMozilla = document.createTextNode("Try Mozilla's ");
      
      var linkFirefox = document.createElement("a");
      linkFirefox.setAttribute("href", "http://www.mozilla.com/firefox/");
      linkFirefox.setAttribute("target", "_blank");
      linkFirefox.innerHTML = "FireFox";
      
      var textPeriod = document.createTextNode(".");
      
      var carriageReturn = document.createElement("br");
      
      var forInfo = document.createTextNode("For more information, click ");
      
      var linkInfo = document.createElement("a");
      linkInfo.setAttribute("href", "http://los.dtcurrie.net/code/msie/");
      linkInfo.setAttribute("target", "_blank");
      linkInfo.innerHTML = "here";
         
      var pTwo = document.createElement("p");
      pTwo.appendChild(tryMozilla);
      pTwo.appendChild(linkFirefox);
      pTwo.appendChild(textPeriod);
      pTwo.appendChild(carriageReturn);
      pTwo.appendChild(forInfo);
      pTwo.appendChild(linkInfo);
      
      // paragraph three
      
      var pThree = document.createElement("p");
      pThree.innerHTML = "<a href='javascript:;' onclick='closeWarning();'>close</a>";
      /*
      var linkClose = document.createElement("a");
      linkClose.setAttribute("href", "javascript:;");
      linkClose.setAttribute("onclick", "closeWarning();");
      linkClose.innerHTML = "close";      
      
      var pThree = document.createElement("p");
      pThree.appendChild(linkClose);
      */
      // msie content

      var msieContent = document.createElement("div");
      msieContent.style.fontSize = "12px";
      msieContent.style.fontFamily = "Verdana, sans-serif";
      msieContent.style.padding = "16px";
      msieContent.style.margin = "0px";
      msieContent.style.color = "#000";
      msieContent.style.backgroundColor = "#fff";
      msieContent.style.borderTop = "20px solid #35a";
      
      msieContent.appendChild(pOne);
      msieContent.appendChild(pTwo);
      msieContent.appendChild(pThree);
      
      // msie wrapper
         
      var msieWrapper = document.createElement("div");
      msieWrapper.setAttribute("id", "msieWrapper");
      msieWrapper.style.position = "absolute";
      msieWrapper.style.top = "32px";
		msieWrapper.style.left = "32px";
		msieWrapper.style.width = "512px";
		msieWrapper.style.backgroundColor = "#cbb";
		msieWrapper.style.padding = "3px";
		msieWrapper.style.borderRight = "1px solid #866";
		msieWrapper.style.borderBottom = "2px solid #866";
      
      msieWrapper.appendChild(msieContent);

      // append

      document.body.appendChild(msieWrapper);
	}
}

function closeWarning()
{
	document.body.removeChild(document.body.lastChild);
}
