// www.yegle.cn
// rong179
// update:2009-06-24
function Music()
{
	var newWin=window.open('','','width=250,height=337');
	var str='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>音乐-一阁 Yegle.cn</title><style type="text/css">*{margin:0;padding:0px;}body{background-color:#ccc;font-size:12px;line-height:18px;}a{color:#ccc;text-decoration:none;margin-right:10px;}a:hover{background-color:#9CF;color:#FFF;}#music{margin:0 auto;height:315px;overflow:hidden;width:250px;}#nav{width:232px;height:22px;margin:0 auto;background-color:#333;padding:0 9px;}</style></head><body><div id="music"></div><script type="text/javascript">function cablum(n,m){var s=\'collectPlayer.swf\';if(m)s=\'shufflePlayer.swf\';document.getElementById("music").innerHTML=\'<embed src="http://www.xiami.com/widget/156922_\'+n+\'_250_368_99ccff_333333/\'+s+\'" type="application/x-shockwave-flash" width="250" height="368" wmode="opaque"></embed>\';}cablum(156922,1);</script><div id="nav"><a href="javascript:void(0)" onclick="cablum(156922,1);">最近在听</a><a href="javascript:void(0)" onclick="cablum(178518);">09,May</a><a href="javascript:void(0)" onclick="cablum(191776);">2008</a></div></body></html>'
	newWin.document.write(str);
	newWin.document.close();
}
function add_fav(t){
	//2009-6-26 IE7+,FF3.0+,Opera 9.6+
	
var url=location.href,title=document.title;
if(window.opera||window.sidebar.addPanel){t.href=url;t.title=title;}
/*else if(window.sidebar.addPanel){window.sidebar.addPanel(title,url,'');}*/
else if(window.external){external.AddFavorite(url,title);}
else{alert("请手动添加本页到收藏夹")}
}

function copy_clip(copy){
if (window.clipboardData){
window.clipboardData.setData("Text", copy);}
else if (window.netscape){
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
if (!clip) return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans) return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext=copy;
str.data=copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid=Components.interfaces.nsIClipboard;
if (!clip) return false;
clip.setData(trans,null,clipid.kGlobalClipboard);}
alert("已复制将内容复制到您的剪切板")
return false;
}  

/**
* Styleswitch stylesheet switcher built on jQuery
* Under an Attribution, Share Alike License
* By Kelvin Luck ( http://www.kelvinluck.com/ )
**/


	var c = readCookie('style');
	if (c) switchStylestyle(c);
	function switchStylestyle(styleName)
	{
		$('link[@rel*=style][title]').each(function(i) 
		{
			this.disabled = true;
			if (this.getAttribute('title') == styleName) this.disabled = false;
		});
		createCookie('style', styleName, 365);
	}
// cookie functions http://www.quirksmode.org/js/cookies.html
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function eraseCookie(name)
{
	createCookie(name,"",-1);
}
// /cookie functions

function addStylesheet(src){$("head").append('<link rel="stylesheet" href="'+src+'" type="text/css" media="screen"/>');}