// JavaScript Document
function changeshow(i){
	document.getElementById("lefttd").style.backgroundColor=data[i].color;
	document.getElementById("downtd").style.backgroundColor=data[i].color;	
	document.getElementById("downlefttd").style.backgroundColor=data[i].color;
	var pic=document.getElementById("showpic");	
	if(document.all){	
	pic.filters[0].Apply();
	pic.filters[0].Play(duration=2);
	}
	pic.src=data[i].spic.src;
	pic.parentNode.href=data[i].bpic;
	document.getElementById("marquee").innerHTML='<marquee direction="left" width="420" height="20" scrollamount="2" onMouseOver="stop()" onMouseOut="start()" loop="-1">'+data[i].philosophy+'</marquee>';
	changeshow.counter=i;
}
changeshow.counter=0;
function marqueeshow(prop){
	var marquee=document.getElementById("marquee");
	if (data[changeshow.counter][prop]) {
		if(prop=="designer"){
			marquee.innerHTML='<marquee direction="left" width="420" height="20" scrollamount="2" onMouseOver="stop()" onMouseOut="start()" loop="-1">'+data[changeshow.counter][prop].link("javascript:void BBSXP_Modal.Open('searchdesinger.asp?artid="+data[changeshow.counter]["linkstr"]+"',900,400,false,50,200,false)")+'</marguee>';
			BBSXP_Modal.Open('searchdesinger.asp?artid='+data[changeshow.counter]["linkstr"],900,400,false,50,200,false);
		}else{
			marquee.innerHTML='<marquee direction="left" width="420" height="20" scrollamount="2" onMouseOver="stop()" onMouseOut="start()" loop="-1">'+data[changeshow.counter][prop]+'</marguee>';
		}
	}
}
function setdiv(){
	var limit,height,region;
	with(YAHOO.util.Dom){
		region= getRegion ("float");
		height=region.bottom-region.top;
		limit=getDocumentHeight( )-height;
	}
var myAnim = new YAHOO.util.Anim('float', { 
	    top: { to: (YAHOO.util.Dom.getDocumentScrollTop()+123)>limit?limit: YAHOO.util.Dom.getDocumentScrollTop()+125}  
	    }, 1, YAHOO.util.Easing.easeOut); 
		myAnim.animate(); 		
		}
 YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("float")) window.onscroll=setdiv});
function showlist(id){
	if(typeof HTTP!="object"){
		alert("缺乏组件");
		return;
	}
	var func1=function(txt){
	var div=document.getElementById("list");
	if(document.all){	
	div.filters[0].Apply();
	div.filters[0].Play(duration=2);
	}
	div.innerHTML=txt}
	var func2=function(txt){var div=document.getElementById("content");	if(document.all){	
	div.filters[0].Apply();
	div.filters[0].Play(duration=2);
	}
	div.innerHTML=txt}
	HTTP.getText("getcontent.asp?what=classlist&cid="+id,func1);
	if(window.location.href.indexOf("index.asp")!=-1||window.location.href.charAt(window.location.href.length-1)=="/"){
	for(var prop in pics)
		if(document.getElementById("titlepic"+prop).onmouseout==null&&showlist.handle)document.getElementById("titlepic"+prop).onmouseout=showlist.handle;
	for(var prop in pics){
		document.getElementById("titlepic"+prop).src=(prop==id.toString())?pics[prop].pic2:pics[prop].pic1;
		if(prop==id.toString()){
		showlist.handle=document.getElementById("titlepic"+prop).onmouseout;
		document.getElementById("titlepic"+prop).onmouseout=null;
		}
	}}	
	HTTP.getText("getcontent.asp?what=art&cid="+id,func2);
	
}
function showart(id){
	if(typeof HTTP!="object"){
		alert("缺乏组件");
		return;
	}
	var func1=function(txt){
	var div=document.getElementById("content");
	if(document.all){	
	div.filters[0].Apply();
	div.filters[0].Play(duration=2);	
	}
	div.innerHTML=txt;
	div.scrollTop=0;
	}
	HTTP.getText("getcontent.asp?what=art&artid="+id,func1);
}
function scroll(direct){
    var ele=document.getElementById("logoes");
    var by=direct=="left"?55:-55;
    var anmi=new YAHOO.util.Scroll(ele,{scroll:{by:[by,0]}});
    anmi.animate();
}
function showmenu(i){
if(i==0){document.getElementById('dongtaiimg').src='images/dongtai.jpg';
document.getElementById('submenu').style.display='block'}
if(i==1){document.getElementById('fbimg').src='images/dh_01_r1_c12_01.jpg';
document.getElementById('submenu1').style.display='block'}
}
function hidemenu(){
document.getElementById('dongtaiimg').src='images/dongtai1.jpg';
document.getElementById('submenu').style.display='none'
document.getElementById('fbimg').src='images_1201/dh_01_r1_c12.jpg';
document.getElementById('submenu1').style.display='none'
}
function switchrecomment(){	
    if(tablecount>1) window.setInterval(tem,5000);
	function tem(){
		tables=[];
		for(var i=0;i<tablecount;i++) tables.push(document.getElementById("table"+i));
		if(!switchrecomment.conter) switchrecomment.conter=0;
		var div=document.getElementById("rw");
		//alert(tables.length);
		if(document.all){	
			div.filters[0].Apply();
			div.filters[0].Play(duration=1);
		}
		tables[switchrecomment.conter].style.display="none"
		if(document.all){	
			div.filters[0].Apply();
			div.filters[0].Play(duration=1);
		}
		tables[(switchrecomment.conter+1)%tables.length].style.display="block";
		switchrecomment.conter=(switchrecomment.conter+1)%tables.length;
	}
}
