﻿// JScript 文件

function showTop(index) {
				switch (index) {
					case 'search':
						document.getElementById('top_list_track').style.display="none" ;
						document.getElementById('top_list_album').style.display="none" ;
						document.getElementById('top_list_search').style.display="block" ;
						document.getElementById('top_title_search').className="up" ;
						document.getElementById('top_title_track').className="" ;
						document.getElementById('top_title_album').className="" ;
						break;
					case 'track':
						document.getElementById('top_list_search').style.display="none" ;
						document.getElementById('top_list_album').style.display="none" ;
						document.getElementById('top_list_track').style.display="block" ;
						document.getElementById('top_title_track').className="up" ;
						document.getElementById('top_title_search').className="" ;
						document.getElementById('top_title_album').className="" ;
						break;
					case 'album':
						document.getElementById('top_list_search').style.display="none" ;
						document.getElementById('top_list_track').style.display="none" ;
						document.getElementById('top_list_album').style.display="block" ;
						document.getElementById('top_title_album').className="up" ;
						document.getElementById('top_title_search').className="" ;
						document.getElementById('top_title_track').className="" ;
						break;
				}
		}
		

function showTopUser(index) {
				switch (index) {
					case 'guwen':
						document.getElementById('top_list_zhubian').style.display="none" ;
						document.getElementById('top_list_sheji').style.display="none" ;
						document.getElementById('top_list_guwen').style.display="block" ;
						document.getElementById('top_title_guwen').className="up" ;
						document.getElementById('top_title_zhubian').className="" ;
						document.getElementById('top_title_sheji').className="" ;
						break;
					case 'zhubian':
						document.getElementById('top_list_guwen').style.display="none" ;
						document.getElementById('top_list_sheji').style.display="none" ;
						document.getElementById('top_list_zhubian').style.display="block" ;
						document.getElementById('top_title_zhubian').className="up" ;
						document.getElementById('top_title_guwen').className="" ;
						document.getElementById('top_title_sheji').className="" ;
						break;
					case 'sheji':
						document.getElementById('top_list_guwen').style.display="none" ;
						document.getElementById('top_list_zhubian').style.display="none" ;
						document.getElementById('top_list_sheji').style.display="block" ;
						document.getElementById('top_title_sheji').className="up" ;
						document.getElementById('top_title_guwen').className="" ;
						document.getElementById('top_title_zhubian').className="" ;
						break;
				}
		}
		function showTopMessage(index) {
				switch (index) {
					case 'guwen':
						document.getElementById('top_list_zhubian').style.display="none" ;
						document.getElementById('top_list_sheji').style.display="none" ;
						document.getElementById('top_list_guwen').style.display="block" ;
						document.getElementById('top_title_guwen').className="messageup" ;
						document.getElementById('top_title_zhubian').className="" ;
						document.getElementById('top_title_sheji').className="" ;
						break;
					case 'zhubian':
						document.getElementById('top_list_guwen').style.display="none" ;
						document.getElementById('top_list_sheji').style.display="none" ;
						document.getElementById('top_list_zhubian').style.display="block" ;
						document.getElementById('top_title_zhubian').className="messageup" ;
						document.getElementById('top_title_guwen').className="" ;
						document.getElementById('top_title_sheji').className="" ;
						break;
					case 'sheji':
						document.getElementById('top_list_guwen').style.display="none" ;
						document.getElementById('top_list_zhubian').style.display="none" ;
						document.getElementById('top_list_sheji').style.display="block" ;
						document.getElementById('top_title_sheji').className="messageup" ;
						document.getElementById('top_title_guwen').className="" ;
						document.getElementById('top_title_zhubian').className="" ;
						break;
				}
		}
		

 function Digg(num_id,typeStr)
{
  url = "/Message/Support.aspx?id="+num_id+"&post="+typeStr+"&m="+Math.random();
  new Ajax.Updater(num_id,url, {method: 'get', onSuccess:function return_Digg(ajax)
{
  str_error_num = ajax.responseText
  if(str_error_num=="y")
  {  
    alert('对不起，您没有登录，请登录！');
  }
  else
  {
  if(str_error_num=="r")
  {  
    //$("DiggTxt").innerHTML = "重复提交";
     alert('您已经支持过了，不能重复支持！');
  }
  else
  {
 
	$("DiggTxt"+num_id).innerHTML = "操作成功";
    $("s_ding"+num_id).innerHTML = str_error_num;
    alert('支持成功！');
	
  }
  }
}

});
}


 function Digg2(num_id,typeStr)
{
  url = "/Message/Support.aspx?id="+num_id+"&post="+typeStr+"&m="+Math.random();
  new Ajax.Updater(num_id,url, {method: 'get', onSuccess:function return_Digg(ajax)
{
  str_error_num = ajax.responseText
  if(str_error_num=="y")
  {  
    alert('对不起，您没有登录，请登录！');
  }
  else
  {
  if(str_error_num=="r")
  {  
    //$("DiggTxt").innerHTML = "重复提交";
     alert('您已经支持过了，不能重复支持！');
  }
  else
  {
 
	$("DiggTxtw"+num_id).innerHTML = "操作成功";
    $("s_dingw"+num_id).innerHTML = str_error_num;
    alert('支持成功！');
	
  }
  }
}

});
}

function Digg3(num_id,typeStr)
{
  url = "/Message/Support.aspx?id="+num_id+"&post="+typeStr+"&m="+Math.random();
  new Ajax.Updater(num_id,url, {method: 'get', onSuccess:function return_Digg(ajax)
{
  str_error_num = ajax.responseText
  if(str_error_num=="y")
  {  
    alert('对不起，您没有登录，请登录！');
  }
  else
  {
  if(str_error_num=="r")
  {  
    //$("DiggTxt").innerHTML = "重复提交";
     alert('您已经支持过了，不能重复支持！');
  }
  else
  {
 
	$("DiggTxtc"+num_id).innerHTML = "操作成功";
    $("s_dingc"+num_id).innerHTML = str_error_num;
    alert('支持成功！');
	
  }
  }
}

});
}

 function Coll(num_id,typeStr)
{

  url = "/House/AddCollection.aspx?id="+num_id+"&post="+typeStr+"&m="+Math.random();
  new Ajax.Updater(num_id,url, {method: 'get', onSuccess:function return_Digg(ajax)
{
  str_error_num = ajax.responseText
  if(str_error_num=="y")
  {  
    alert('对不起，您没有登录，请登录！');
  }
  else
  {
  if(str_error_num=="r")
  {  
    //$("DiggTxt").innerHTML = "重复提交";
     alert('您已经收藏过了，不能重复收藏！');
  }
  else
  {
 
//	$("DiggTxt"+num_id).innerHTML = "操作成功";
//    $("s_ding"+num_id).innerHTML = str_error_num;
    alert('收藏成功！');
	
  }
  }
}

});
}

 function HouseDigg(num_id,typeStr)
{
  url = "/House/AddHouseSupport.aspx?id="+num_id+"&post="+typeStr+"&m="+Math.random();
  new Ajax.Updater(num_id,url, {method: 'get', onSuccess:function return_Digg(ajax)
{
  str_error_num = ajax.responseText
  if(str_error_num=="y")
  {  
    alert('对不起，您没有登录，请登录！');
  }
  else
  {
  if(str_error_num=="r")
  {  
    //$("DiggTxt").innerHTML = "重复提交";
     alert('您已经推荐过了，不能重复推荐！');
  }
  else
  {
 
//	$("DiggTxt"+num_id).innerHTML = "操作成功";
//    $("s_ding"+num_id).innerHTML = str_error_num;
    alert('推荐成功！');
	
  }
  }
}

});
}
function OnLineView111(id)
				{
					if (id > 0)
					{
						
						window.open("/House/Swf.aspx?ID="+id,"","width=" + document.body.clientWidth + ",height="+ document.body.clientHeight + 0 +",top=0,left=0");
					}
				}

				function OnLineView(id)
				{
					if (id > 0)
					{
						
						window.open("/FlashImg/" + id + "/index.htm","","width=" + document.body.clientWidth + ",height="+ document.body.clientHeight + 0 +",top=0,left=0");
					}
				}
//function OnLineView(id,url)
//				{
//					if (id > 0 && url.length >= 2)
//					{
//						
//						window.open("/FlashImg/" + id + "/index.htm","","width=" + document.body.clientWidth + ",height="+ document.body.clientHeight + 0 +",top=0,left=0");
//					}
//				}
function getbyid(id) {
	if (document.getElementById) {
		return document.getElementById(id);
	} else if (document.all) {
		return document.all[id];
	} else if (document.layers) {
		return document.layers[id];
	} else {
		return null;
	}
}
function newsshow() {
	var tip = getbyid("newsdiv");
	if(tip.style.display=='none'){
		tip.style.display = '';
	}else{
		tip.style.display = 'none';
	}
}
function newshide() {
	var tip = getbyid("newsdiv");
	tip.style.display = 'none';
}