if(self!=top){top.location=self.location;}
 var bookmarkname='彩票胆码网-免费彩票预测';
 var countimg=document.createElement('img');
function zhidaoData(data){
    for(var i=0;i<data.list.length-1;i++)
    document.write("<a href='"+data.list[i].url+"' target='_blank'>"+data.list[i].tit+"</a>&nbsp;&nbsp;");

}
function checkhomepage(){
   if(document.getElementById('logo').isHomePage("http://www.cmdh.net") || document.getElementById('logo').isHomePage("http://www.cmdh.net") ||
   document.getElementById('logo').isHomePage("http://www.cmdh.net") ||
   document.getElementById('logo').isHomePage("http://www.cmdh.net")
  )
   {
     return true;
   }else{
     return false;
   }

}
function clicklogo(){
    if(checkhomepage()){
	    window.location=('http://www.cmdh.net');
	}else{ 
		document.getElementById('logourl').style.behavior='url(#default#homepage)';
		document.getElementById('logourl').setHomePage('http://www.cmdh.net'); 
	}
}
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;
function selectTag(showContent,selfObj){
	var tag = document.getElementById("tags").getElementsByTagName("a");
	var taglength = tag.length;
	for(i=0; i<taglength; i++){
		tag[i].className = "";
	}
	selfObj.className = "focu";
	for(i=0; j=document.getElementById("baidu"+i); i++){
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";
}
function addBookmark(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;
    }
}
function setHomePage(url){
    if (window.sidebar)
    {
        try { 
           netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
        } 
        catch (e) 
        {  
           alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'"); 
        } 
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
            prefs.setCharPref('browser.startup.homepage',url);

    }
}



function SetCookie (name, value) { 
       var exp = new Date(); 
       exp.setTime (exp.getTime()+3600000000); 
       document.cookie = name + "=" + value + "; expires=" + exp.toGMTString()+"; path=/"; 
}

