/**
 * 标签上鼠标移动事件的处理函数
 * @return
 */
function mouseover(str)
{
	if(str == 'details_act')	
	{
		document.getElementById("tabbar-1").className = "on";
		document.getElementById("table-1").className = "table_display";
	}
	else
	{
		document.getElementById("tabbar-1").className = "";
		document.getElementById("table-1").className = "table_none";
	}
	if(str == 'properties_act')
	{
		document.getElementById("tabbar-2").className = "on";
		document.getElementById("table-2").className = "table_display";
	}
	else
	{
		document.getElementById("tabbar-2").className = "";
		document.getElementById("table-2").className = "table_none";
	}

	if(str == 'comments_act')
	{
		document.getElementById("tabbar-3").className = "on";
		document.getElementById("table-3").className = "table_display";
	}
	else
	{
		document.getElementById("tabbar-3").className = "";
		document.getElementById("table-3").className = "table_none";
	}
	if(str == 'xp_act')
	{
		document.getElementById("tabbar-4").className = "on";
		document.getElementById("table-4").className = "table_display";
	}
	else
	{
		document.getElementById("tabbar-4").className = "";
		document.getElementById("table-4").className = "table_none";
	}
}

function mouseovers(sn, gid, tag, sid)
{
	for(var i = 1; i <= style_num; i++)
	{
		var aid = "tabbars-" + i;
		$(aid).className = "none";
	}
    $("tabbars-"+sn).className = "on";

	goods_style(1, sn, gid, tag, sid);
}

function goods_style(page, sn, gid, type, sid)
{
	var styleInfo = new Object();

	styleInfo.page = page;
	styleInfo.sn   = sn;
	styleInfo.gid  = gid;
	styleInfo.type = type;
	styleInfo.sid  = sid;

	Ajax.call('goods.php?act=style', 'sinfo=' + styleInfo.toJSONString(), goodsStyleResponse, 'GET', 'JSON');
}

function goodsStyleResponse(result)
{
  if (result.err_msg)
  {
	return false;
  }
  try
  {
      document.getElementById("style").innerHTML = (typeof result == "object") ? result.content : result;
  }
  catch (ex) { }
}

/*
document.getElementById("tabbar-div").onmouseover = function(e)
{
  var obj = Utils.srcElement(e);

  if (obj.className == "tab-back")
  {
    obj.className = "tab-hover";
  }
}

document.getElementById("tabbar-div").onmouseout = function(e)
{
  var obj = Utils.srcElement(e);

  if (obj.className == "tab-hover")
  {
    obj.className = "tab-back";
  }
}

/**
 * 处理点击标签的事件的函数
 * @param : e  FireFox 事件句柄
 *
 * @return

document.getElementById("tabbar-div").onclick = function(e)
{
  var obj = Utils.srcElement(e);

  if (obj.className == "tab-front" || obj.className == '' || obj.tagName.toLowerCase() != 'span')
  {
    return;
  }
  else
  {
    objTable = obj.id.substring(0, obj.id.lastIndexOf("-")) + "-table";

    var tables = document.getElementsByTagName("table");
    var spans  = document.getElementsByTagName("span");

    for (i = 0; i < tables.length; i ++ )
    {
      if (tables[i].id == objTable)
      {
        tables[i].style.display = (Browser.isIE) ? "block" : "table";
      }
      else
      {
        var tblId = tables[i].id.match(/-table$/);

        if (tblId == "-table")
        {
          tables[i].style.display = "none";
        }
      }
    }

    for (i = 0; spans.length; i ++ )
    {
      if (spans[i].className == "tab-front")
      {
        spans[i].className = "tab-back";
        obj.className = "tab-front";
        break;
      }
    }
  }
}
 */

