﻿function display(id){
document.getElementById("Entry"+id).style.display="block"; 
  }
function disappear(id){
document.getElementById("Entry"+id).style.display="none"; 
  }
function setTab(b,c,e){for(i=1;i<=e;i++){var d=document.getElementById(b+i);var a=document.getElementById("m_"+b+i);d.className=i==c?"hover":"";a.style.display=i==c?"block":"none"}};
//会员区滚动
function Marquee(){this.ID=document.getElementById(arguments[0]);if(!this.ID){alert('您要设置的"'+arguments[0]+'"初始化错误\r\n请检查标签ID设置是否正确!');this.ID=-1;return}this.Direction=this.Width=this.Height=this.DelayTime=this.WaitTime=this.CTL=this.StartID=this.Stop=this.MouseOver=0;this.Step=1;this.Timer=30;this.DirectionArray={top:0,up:0,bottom:1,down:1,left:2,right:3};if(typeof arguments[1]=="number"||typeof arguments[1]=="string"){this.Direction=arguments[1]}if(typeof arguments[2]=="number"){this.Step=arguments[2]}if(typeof arguments[3]=="number"){this.Width=arguments[3]}if(typeof arguments[4]=="number"){this.Height=arguments[4]}if(typeof arguments[5]=="number"){this.Timer=arguments[5]}if(typeof arguments[6]=="number"){this.DelayTime=arguments[6]}if(typeof arguments[7]=="number"){this.WaitTime=arguments[7]}if(typeof arguments[8]=="number"){this.ScrollStep=arguments[8]}this.ID.style.overflow=this.ID.style.overflowX=this.ID.style.overflowY="hidden";this.ID.noWrap=true;this.IsNotOpera=(navigator.userAgent.toLowerCase().indexOf("opera")==-1);if(arguments.length>=7){this.Start()}}Marquee.prototype.Start=function(){if(this.ID==-1){return}if(this.WaitTime<800){this.WaitTime=800}if(this.Timer<20){this.Timer=20}if(this.Width==0){this.Width=parseInt(this.ID.style.width)}if(this.Height==0){this.Height=parseInt(this.ID.style.height)}if(typeof this.Direction=="string"){this.Direction=this.DirectionArray[this.Direction.toString().toLowerCase()]}this.HalfWidth=Math.round(this.Width/2);this.HalfHeight=Math.round(this.Height/2);this.BakStep=this.Step;this.ID.style.width=this.Width+"px";this.ID.style.height=this.Height+"px";if(typeof this.ScrollStep!="number"){this.ScrollStep=this.Direction>1?this.Width:this.Height}var d="<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;display:inline;'><tr><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td></tr></table>";var b="<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;'><tr><td>MSCLASS_TEMP_HTML</td></tr><tr><td>MSCLASS_TEMP_HTML</td></tr></table>";var e=this;e.tempHTML=e.ID.innerHTML;if(e.Direction<=1){e.ID.innerHTML=b.replace(/MSCLASS_TEMP_HTML/g,e.ID.innerHTML)}else{if(e.ScrollStep==0&&e.DelayTime==0){e.ID.innerHTML+=e.ID.innerHTML}else{e.ID.innerHTML=d.replace(/MSCLASS_TEMP_HTML/g,e.ID.innerHTML)}}var f=this.Timer;var a=this.DelayTime;var c=this.WaitTime;e.StartID=function(){e.Scroll()};e.Continue=function(){if(e.MouseOver==1){setTimeout(e.Continue,a)}else{clearInterval(e.TimerID);e.CTL=e.Stop=0;e.TimerID=setInterval(e.StartID,f)}};e.Pause=function(){e.Stop=1;clearInterval(e.TimerID);setTimeout(e.Continue,a)};e.Begin=function(){e.ClientScroll=e.Direction>1?e.ID.scrollWidth/2:e.ID.scrollHeight/2;if((e.Direction<=1&&e.ClientScroll<=e.Height+e.Step)||(e.Direction>1&&e.ClientScroll<=e.Width+e.Step)){e.ID.innerHTML=e.tempHTML;delete (e.tempHTML);return}delete (e.tempHTML);e.TimerID=setInterval(e.StartID,f);if(e.ScrollStep<0){return}e.ID.onmousemove=function(g){if(e.ScrollStep==0&&e.Direction>1){var g=g||window.event;if(window.event){if(e.IsNotOpera){e.EventLeft=g.srcElement.id==e.ID.id?g.offsetX-e.ID.scrollLeft:g.srcElement.offsetLeft-e.ID.scrollLeft+g.offsetX}else{e.ScrollStep=null;return}}else{e.EventLeft=g.layerX-e.ID.scrollLeft}e.Direction=e.EventLeft>e.HalfWidth?3:2;e.AbsCenter=Math.abs(e.HalfWidth-e.EventLeft);e.Step=Math.round(e.AbsCenter*(e.BakStep*2)/e.HalfWidth)}};e.ID.onmouseover=function(){if(e.ScrollStep==0){return}e.MouseOver=1;clearInterval(e.TimerID)};e.ID.onmouseout=function(){if(e.ScrollStep==0){if(e.Step==0){e.Step=1}return}e.MouseOver=0;if(e.Stop==0){clearInterval(e.TimerID);e.TimerID=setInterval(e.StartID,f)}}};setTimeout(e.Begin,c)};Marquee.prototype.Scroll=function(){switch(this.Direction){case 0:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollTop+=this.ScrollStep+this.Step-this.CTL;this.Pause();return}else{if(this.ID.scrollTop>=this.ClientScroll){this.ID.scrollTop-=this.ClientScroll}this.ID.scrollTop+=this.Step}break;case 1:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollTop-=this.ScrollStep+this.Step-this.CTL;this.Pause();return}else{if(this.ID.scrollTop<=0){this.ID.scrollTop+=this.ClientScroll}this.ID.scrollTop-=this.Step}break;case 2:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollLeft+=this.ScrollStep+this.Step-this.CTL;this.Pause();return}else{if(this.ID.scrollLeft>=this.ClientScroll){this.ID.scrollLeft-=this.ClientScroll}this.ID.scrollLeft+=this.Step}break;case 3:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollLeft-=this.ScrollStep+this.Step-this.CTL;this.Pause();return}else{if(this.ID.scrollLeft<=0){this.ID.scrollLeft+=this.ClientScroll}this.ID.scrollLeft-=this.Step}break}};
//热门项目
function RectChange(id,cur,len,canshu) {
  for(i=1;i<=len;++i)
  {
	  document.getElementById(id + "A" +i).style.display='none';
	   document.getElementById(id + "B" +i).className='';
  }
  document.getElementById(id + "A" +cur).style.display='';
  //rxA1;
   document.getElementById(id + "B" +cur).className=canshu;
} 
//loopflash.js
if(typeof(sina)!="object"){var sina={}}
sina.$=function(objId){if(!objId){throw new Error("sina.$(String objId)参数必须")}
if(document.getElementById){return eval('document.getElementById("'+objId+'")')}else if(document.layers){return eval("document.layers['"+objId+"']")}else{return eval('document.all.'+objId)}}
sinaFlash=function(C,v,x,V,c,X,i,O,I,l,o){var z=this;if(!document.createElement||!document.getElementById){return}
z.id=v?v:"";z.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";z.codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+(c?c:"7")+",0,0,0";z.width=x;z.height=V;z.movie=C;z.bgcolor=X?X:null;z.quality=O?O:"high";z.src=z.movie;z.pluginspage="http://www.macromedia.com/go/getflashplayer";z.type="application/x-shockwave-flash";z.useExpressInstall=i?i:null;z.xir=(I)?I:window.location;z.redirectUrl=l?l:null;z.detectKey=o?o:null;z.escapeIs=false;z.objAttrs={};z.params={};z.flashVars=[];z.flashVarsStr="";z.embedAttrs={};z.forSetAttribute("id",z.id);z.objAttrs["classid"]=z.classid;z.forSetAttribute("codebase",z.codebase);z.forSetAttribute("width",z.width);z.forSetAttribute("height",z.height);z.forSetAttribute("movie",z.movie);z.forSetAttribute("quality",z.quality);z.forSetAttribute("pluginspage",z.pluginspage);z.forSetAttribute("type",z.type);z.forSetAttribute("bgcolor",z.bgcolor)}
sinaFlash.prototype={getFlashHtml:function(){var I=this,i='<object ';for(var l in I.objAttrs){i+=l+'="'+I.objAttrs[l]+'" '}
i+='>';for(var l in I.params){i+='<param name="'+l+'" value="'+I.params[l]+'" /> '}
if(I.flashVarsStr!=""){i+='<param name="FlashVars" value="'+I.flashVarsStr+'" /> '}
i+='<embed ';for(var l in I.embedAttrs){i+=l+'="'+I.embedAttrs[l]+'" '}
i+=' ></embed></object>';return i},forSetAttribute:function(I,i){var l=this;I=I.toLowerCase();switch(I){case "classid":break;case "pluginspage":l.embedAttrs["pluginspage"]=i;break;case "src":l.embedAttrs["src"]=i;l.params["movie"]=i;break;case "movie":l.params["movie"]=i;l.embedAttrs["src"]=i;break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":l.embedAttrs["type"]=i;break;case "codebase":l.objAttrs["codebase"]=i;break;case "width":l.objAttrs["width"]=i;l.embedAttrs["width"]=i;break;case "height":l.objAttrs["height"]=i;l.embedAttrs["height"]=i;break;case "align":l.objAttrs["align"]=i;l.embedAttrs["align"]=i;break;case "vspace":l.objAttrs["vspace"]=i;l.embedAttrs["vspace"]=i;break;case "hspace":l.objAttrs["hspace"]=i;l.embedAttrs["hspace"]=i;break;case "class":l.objAttrs["class"]=i;l.embedAttrs["class"]=i;break;case "title":l.objAttrs["title"]=i;break;case "accesskey":l.objAttrs["accesskey"]=i;break;case "name":l.objAttrs["name"]=i;l.embedAttrs["name"]=i;break;case "id":l.objAttrs["id"]=i;l.embedAttrs["name"]=i;break;case "tabindex":l.objAttrs["tabindex"]=i;break;default:l.params[I]=l.embedAttrs[I]=i}},forGetAttribute:function(i){var I=this;i=i.toLowerCase();if(I.objAttrs[i]!=undefined){return I.objAttrs[i]}else if(I.embedAttrs[i]!=undefined){return I.embedAttrs[i]}else if(I.embedAttrs!=undefined){return I.embedAttrs[i]}else{return null}},setAttribute:function(I,i){this.forSetAttribute(I,i)},getAttribute:function(i){return this.forGetAttribute(i)},addVariable:function(I,i){var l=this;if(l.escapeIs){I=escape(I);i=escape(i)}
if(l.flashVarsStr==""){l.flashVarsStr=I+"="+i}else{l.flashVarsStr+="&"+I+"="+i}
l.embedAttrs["FlashVars"]=l.flashVarsStr},getVariable:function(I){var o=this,i=o.flashVarsStr;if(o.escapeIs){I=escape(I)}
var l=new RegExp(I+"=([^\\&]*)(\\&?)","i").exec(i);if(o.escapeIs){return unescape(RegExp.$1)}
return RegExp.$1},addParam:function(I,i){this.forSetAttribute(I,i)},getParam:function(){return this.forGetAttribute(name)},write:function(i){var I=this;if(typeof i=="string"){sina.$(i).innerHTML=I.getFlashHtml()}else if(typeof i=="object"){i.innerHTML=I.getFlashHtml()}}}

//十大热门整形项目
function set_item_class(id)
{
    for(i=1;i<=10;i++)
    {
        if(id==i)
        {
            document.getElementById("pro_"+i+"_2").style.display="";
            document.getElementById("pro_"+i+"_2").style.background="url(/2011/images/item_h"+i+"_on.gif) no-repeat 0px bottom";
            document.getElementById("pro_"+i+"_1").style.display="none";
        }
        else
        {
            document.getElementById("pro_"+i+"_2").style.display="none";
            document.getElementById("pro_"+i+"_1").style.display="";
            document.getElementById("pro_"+i+"_1").style.background="url(/2011/images/item_h"+i+".gif) no-repeat 5px bottom";
        }
    }
}
