function getJSck(name){
var CookieName = document.cookie.indexOf(name+"=");
if(CookieName!=-1){
  var strCookie=document.cookie;
  var arrCookie=strCookie.split("; "); 
  for(var i=0;i<arrCookie.length;i++){ 
    var arr=arrCookie[i].split("="); 
    if(arr[0]==name)
    return arr[1];  
  }
  return '';
}
else
{
 return '';
}
}

var thisurl=getJSck('thisurl');
var thislogo=getJSck('thislogo');

if(thisurl==''||thisurl==null){var thisurl='index.html';}
if(thislogo==''||thislogo==null){var thislogo='qq_logo.gif';}

document.getElementById("qq_logo").innerHTML='<a href=../'+ thisurl + '><img src=../tp_logo_1/'+thislogo+'></a>';

function top_user(){
var tophy=unescape(getJSck('qqtophy'));
if(tophy.length>3&&document.getElementById("top_user")!=null){document.getElementById("top_user").innerHTML=tophy;}}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//获取域名
//topurl = window.location.host;
//topurl = document.domain; 
//获取页面完整地址
//var topurl = window.location.href;
 
function setHomepage(){
	var topurl = window.location.href; 
	if(document.all) {
    document.body.style.behavior = 'url(#default#homepage)';
    document.body.setHomePage(topurl);
   }else if (window.sidebar)
   {if (window.netscape) {
    try {netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    }catch (e) { alert("该操作被浏览器拒绝，请直接在浏览器上操作。");
    }} var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage',topurl);
}
}

function addCookie(){   　 // 加入收藏夹
var topurl = window.location.href; 
if(window.sidebar){    
window.sidebar.addPanel("亲亲鲜花网",topurl,"");    
} else if( document.all ){   
window.external.AddFavorite(topurl,"亲亲鲜花网");   
} else if( window.opera && window.print ) {   
return true;   
}   
}

