function linkStylesheet() {
  var nav = navigator.userAgent;
  var msie = nav.indexOf("MSIE") != -1;
  var gecko = nav.indexOf("Gecko") != -1;
  var opera = nav.indexOf("Opera") != -1;
  var mac = nav.indexOf("Mac") != -1;

  if (msie && mac) {
    document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"filestore/mac-ie.css\">");
  }
}

function unframe() {
  var quirksMode = (top == self || (document.location.href.indexOf("framed") != -1));
  if (!quirksMode) {
    top.location.href = this.location.href;
  }
}

unframe();
linkStylesheet();