﻿function h(obj,url){obj.style.behavior='url(#default#homepage)';obj.setHomePage(url);}
if (top.location != self.location) {top.location=self.location;}
function ga(o,e){if (document.getElementById){a=o.id.substring(1); p = "";r = "";g = e.target;if (g) { t = g.id;f0 = g.parentNode;if (f0) {p = f0.id;h = f0.parentNode;if (h) r = h.id;}} else{h = e.srcElement;f0 = h.parentNode;if (f0) p = f0.id;t = h.id;}if (t==a || p==a || r==a) return true;window.open(document.getElementById(a).href,'_blank')}}
function ss(w){window.status=w;return true;}
function cs(){window.status='';}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function JM_cc(ob){
var obj=MM_findObj(ob); if (obj) { 
obj.select();
alert("复制代码成功");
js=obj.createTextRange();js.execCommand("Copy");}
return false;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

/*js实现sleep功能 单位：毫秒*/
function sleep(numberMillis) {
    var now = new Date();
    var exitTime = now.getTime() + numberMillis;
    while (true) {
        now = new Date();
        if (now.getTime() > exitTime)
            return;
    }
}
//
function addFav(title,url) {    
    if (window.sidebar) {     
        window.sidebar.addPanel(title, url,"");     
    } else if( document.all ) {    
        window.external.AddFavorite( url, title);    
    } else if( window.opera && window.print ) {    
        return true;    
    }    
}   