document.domain = "rayli.com.cn";

function getcookie(name) {
var cookie_start = document.cookie.indexOf(name);
var cookie_end = document.cookie.indexOf(";", cookie_start);
return cookie_start == -1 ? '' : unescape(document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length)));
}
var username = decodeURIComponent(getcookie('pass_username'));
if(username=='')
document.write("<div class='alltitledcy' style='float:left; font-size:12px; width:677px; padding-left:6px; line-height:19px; height:19px;'><a target='_blank' href='http://www.rayli.com.cn/'>瑞丽网</a> | <a target='_blank' href='http://fashion.rayli.com.cn/' style='color:#e53eb0;'>服饰</a> | <a target='_blank' href='http://beauty.rayli.com.cn/' style='color:#e66f69;'>美容</a> | <a target='_blank' href='http://deco.rayli.com.cn/' style='color:#48d4e5;'>家居</a> | <a target='_blank' href='http://fashion.rayli.com.cn/trends/C0002008.html'>奢品</a> |  <a target='_blank' href='http://bride.rayli.com.cn/'>新娘</a> | <a target='_blank' href='http://astro.rayli.com.cn/'>星座</a> | <a target='_blank' href='http://raylizone.rayli.com.cn/'>模特</a> | <a target='_blank' href='http://inleon.rayli.com.cn/'>男士</a> | <a target='_blank' href='http://emotion.rayli.com.cn/'>情感</a> | <a target='_blank' href='http://lifestyle.rayli.com.cn/'>生活</a> | <a target='_blank' href='http://pic.rayli.com.cn/'>图片</a> | <a target='_blank' href='http://raylizone.rayli.com.cn/region/CO007.html'>视频</a> | <a target='_blank' href='http://www.rayli.com.cn/zhuanti'>专题</a> | <a target='_blank' href='http://bbs.rayli.com.cn/'>论坛</a> | <a target='_blank' href='http://blog.rayli.com.cn/'>博客</a></div><div style='float:left; font-size:12px; width:104px;'><a target='_blank' href='http://pass.rayli.com.cn' target='_blank'><img src='http://www.rayli.com.cn/images/2010index/images/newraylidl06.gif' class='hand' width='37' height='19' align='absmiddle' title='登录' /></a> <a target='_blank' href='http://pass.rayli.com.cn/index.php?m=user&a=userreg&sid=' target='_blank'><img src='http://www.rayli.com.cn/images/2010index/images/newraylidl07.gif' width='37' height='19' align='absmiddle' title='注册' /></a> <img src='http://www.rayli.com.cn/images/2010index/images/newraylidl08.gif' onclick='tanchu()' title='使用新浪微博帐户登录瑞丽网' class='hand' width='16' height='16' align='absmiddle' /></div><div style='float:left; padding-right:3px; font-size:12px; width:150px; text-align:right;  line-height:19px; height:19px;'><a href=\"javascript:void(0)\" onclick=\"setHomepage()\" style='background:url(http://www.rayli.com.cn/eightimages/home.gif) left top no-repeat; padding-left:17px;'>设为首页</a> <a  href=\"javascript:void(0)\" onclick=\"addFav()\" style='background:url(http://www.rayli.com.cn/eightimages/Favorites.gif) left no-repeat; padding-left:14px;'>加入收藏夹</a></div>");
else
	{
		document.write("<div class='alltitledcy' style='float:left; font-size:12px; width:684px; padding-left:6px; line-height:19px; height:19px;'><a target='_blank' href='http://www.rayli.com.cn/'>瑞丽网</a> | <a target='_blank' href='http://fashion.rayli.com.cn/' style='color:#e53eb0;'>服饰</a> | <a target='_blank' href='http://beauty.rayli.com.cn/' style='color:#e66f69;'>美容</a> | <a target='_blank' href='http://deco.rayli.com.cn/' style='color:#48d4e5;'>家居</a> | <a target='_blank' href='http://fashion.rayli.com.cn/trends/C0002008.html'>奢品</a> |  <a target='_blank' href='http://bride.rayli.com.cn/'>新娘</a> | <a target='_blank' href='http://astro.rayli.com.cn/'>星座</a> | <a target='_blank' href='http://raylizone.rayli.com.cn/'>模特</a> | <a target='_blank' href='http://inleon.rayli.com.cn/'>男士</a> | <a target='_blank' href='http://emotion.rayli.com.cn/'>情感</a> | <a target='_blank' href='http://lifestyle.rayli.com.cn/'>生活</a> | <a target='_blank' href='http://pic.rayli.com.cn/'>图片</a> | <a target='_blank' href='http://raylizone.rayli.com.cn/region/CO007.html'>视频</a> | <a target='_blank' href='http://www.rayli.com.cn/zhuanti'>专题</a> | <a target='_blank' href='http://bbs.rayli.com.cn/'>论坛</a> | <a target='_blank' href='http://blog.rayli.com.cn/'>博客</a></div><div style='float:left; font-size:12px; width:100px;'><div style='width:55px; height:19px; overflow:hidden; float:left; text-align:center; line-height:20px;'><a target='_blank' href='http://space.rayli.com.cn/' target='_blank'>"+username+"</a></div> <div style='width:37px; height:19px; overflow:hidden; float:left; text-align:center; line-height:20px; margin-left:6px; display:inline;'><form id='loginform' name='loginform' target='targetiframe' method='post' action='http://adsite3.rayli.com.cn/harson/login.php' charset='utf-8'><input type='hidden' name='logout' value='1'/><a href='javascript:document.getElementById(\"loginform\").submit()' style='color:#fff;'><img src='http://www.rayli.com.cn/images/2010index/images/newraylidl06d.gif' width='37' height='19' align='absmiddle' title='退出'  /></a></form></div></div><div style='float:left; padding-right:10px; font-size:12px; width:150px; text-align:right;  line-height:19px; height:19px;'><a href=\"javascript:void(0)\" onclick=\"setHomepage()\" style='background:url(http://www.rayli.com.cn/eightimages/home.gif) left top no-repeat; padding-left:17px;'>设为首页</a> <a  href=\"javascript:void(0)\" onclick=\"addFav()\" style='background:url(http://www.rayli.com.cn/eightimages/Favorites.gif) left no-repeat; padding-left:14px;'>加入收藏夹</a></div>");
		document.write("<iframe id=\"targetiframe\" name=\"targetiframe\" width=\"0\" height=\"0\" style=\"display:none\"></iframe>");
	}
	
	
	




var iframeurl='<iframe id="raylidenglu" src="http://www.rayli.com.cn/images/2010dcyimg/images_qg/loginstpl.html" width="401" height="231" frameborder="0" scroll="no"></iframe>';
var tcdl='<div id="dengluxsdiv" style=" z-index:99999; position:absolute; display:none"></div>';	
document.write(tcdl);





var dom=document.getElementById;
dengluxsname=(dom)? document.getElementById("dengluxsdiv") : document.all.dengluxsdiv;

var isIe=(document.all)?true:false;
var iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
var scroll_top=(isIe)? iebody.scrollTop : window.pageYOffset;
var docwidthfox=(dom)? iebody.clientWidth : window.innerWidth
var docwidthtotal=(document.all)?docwidthfox : (docwidthfox-21);
var docheight=(isIe)? iebody.clientHeight: window.innerHeight

function tanchu(){
	top.location.href='http://t.rayli.com.cn/index.php?m=account.Sinalogin&cb=login&loginCallBack='+encodeURIComponent(top.location.href);
	/*
	scroll_top=(isIe)? iebody.scrollTop : window.pageYOffset;
	document.getElementById("dengluxsdiv").innerHTML=iframeurl;
	document.getElementById("dengluxsdiv").style.display="block";
	document.getElementById("dengluxsdiv").style.left=((docwidthtotal-298)/2)+"px";
	document.getElementById("dengluxsdiv").style.top=((docheight-213)/2+scroll_top)+"px";
	*/

	
}
function cliseop(){
	
	document.getElementById("dengluxsdiv").style.display="none";
	window.location.reload();
}

function cliseopzj(){
	
	document.getElementById("dengluxsdiv").style.display="none";
}



function addFav(){ // 加入收藏夹
if (document.all) {
window.external.addFavorite(window.location.href, document.title);
} else if (window.sidebar) {
window.sidebar.addPanel(document.title, "http://www.rayli.com.cn/", "");
} }


function setHomepage(){ // 设为首页
if (document.all)
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage(window.location.href);
}
else if (window.sidebar)
{
if(window.netscape)
{
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch (e)
{
alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true");
}
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
prefs.setCharPref('browser.startup.homepage',"http://www.rayli.com.cn/");
}
}




