﻿var hasIE_phone_home = 0;



function hasIE_hasIE() {
  var ua = navigator.userAgent.toLowerCase();
  return ((ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) && 
          (ua.indexOf('webtv') == -1) &&
          (location.href.indexOf('seenIEPage') == -1));
}

function hasIE_showOnlyLayer(whichLayer)
{
  if (document.getElementById)
    {
      var style2 = document.getElementById(whichLayer);
    }
  else if (document.all)
    {
      var style2 = document.all[whichLayer];
    }
  else if (document.layers)
    {
      var style2 = document.layers[whichLayer];
    }
  var body = document.getElementsByTagName('body');
  body[0].innerHTML = style2.innerHTML;
}

function hasIE_showLayer(whichLayer)
{
  if (document.getElementById)
    {
      var style2 = document.getElementById(whichLayer).style;
      style2.display = "block";
    }
  else if (document.all)
    {
      var style2 = document.all[whichLayer].style;
      style2.display = "block";
    }
  else if (document.layers)
    {
      var style2 = document.layers[whichLayer].style;
      style2.display = "block";
    }
}

function hasIE_moveAd(adid) {
  if (document.getElementById)
    {
      var ad = document.getElementById('hasIE_ad');
      var adloc = document.getElementById(adid);
    }
  else if (document.all)
    {
      var ad = document.all['hasIE_ad'];
      var adloc = document.all[adid];
    }
  else if (document.layers)
    {
      var ad = document.layers['hasIE_ad'];
      var adloc = document.layers[adid];
    }
  adloc.innerHTML = ad.innerHTML;
}

// Hides and shows sections of the page based on whether or not it's
// running in IE
function hasIE_hideAndShow() {
  if (hasIE_hasIE()) {
    hasIE_showLayer("hasIE_level2");
          if (hasIE_phone_home == 1)
            hasIE_phoneHome('getIE_pingimage1');
  } else {
    if (hasIE_phone_home == 1)
      hasIE_phoneHome('getIE_pingimage0');
  }
}

function hasIE_phoneHome(image) {
  if (document.getElementById)
    {
      var img = document.getElementById(image);
    }
  else if (document.all)
    {
      var img = document.all[image];
    }
  else if (document.layers)
    {
      var img = document.layers[image];
    }
  //img.setAttribute('src','http://www.wuhansen.com/ping.php?host='+location.host);

}

function hasIE_ContinueWithoutFF() {
    if (location.href.indexOf('?') != -1)
        location.href += '&seenIEPage=1';
    else
        location.href += '?seenIEPage=1';
}
function closediv(i) {
	//writeCookie("status2","showed242",240);
	document.getElementById(i).style.display='none'; 
}

document.write("<div id=\"hasIE_level2\" style=\"background:#FFFFBB;  padding:2px 0 3px; display:none; border-bottom:1px solid #ffd532;position:absolute; top:0; left:0; width:100%; z-index:103\"><div id=\"iewarning2\" style=\"width:19px; float:left;\"><img align=\"absmiddle\" src=\"pic/warning.gif\" border=\"0\" /></div><div id=\"closeimg\" style=\"width:19px; float:right;\"><a href=\"javascript:closediv('hasIE_level2');\" title=\"关闭提示\"><img src=\"pic/close1.gif\" align=\"absmiddle\" border=\"0\" /></a></div><div style=\" margin-top:4px;marign-left:4px;font-size:12px;color:#092E20\">系统提示: 最近无法上网暂停更新 1.26推迟发布<a href=\"http://xunlei.wuhansen.com\" title=\"Www.WuHansen.Com\" target=\"_blank\"><font color=\"#008000\">玩累了 下电影看看</font></a> <a href=\"http://user.qzone.qq.com/21764538/blog/1195009051\" title=\"Www.WuHansen.Com\" target=\"_blank\"><font color=\"#ee0000\">hke脚本的故事</font></a>欢迎灌水 <a href=\"index.htm#更新历史\" title=\"Www.WuHansen.Com\" target=\"_blank\"><font color=\"#ee0000\">hke1.25B</font></a>支持 <a href=\"index.htm#主机优势\" title=\"Www.WuHansen.Com\" target=\"_blank\"><font color=\"#ee0000\">主机优势</a></font> ！<a href=\"add.htm\" title=\"Www.WuHansen.Com\" target=\"_blank\"><font color=\"#ee0000\">改图工具教程</a></font></div></div><div style=\"clear:both\"></div>");  
hasIE_hideAndShow();
