// JavaScript Document
function a(name,id){
var objs=$("#"+name+" td");
var tables=$("#"+name+" ~ table");
objs.css("list_head_other");
if (id==0){
objs[0].className="list_head_title list_head_text";
objs[1].className="list_head_near list_head_text";
tables[0].style.display="";
tables[1].style.display="none";
}
if (id==1){
objs[0].className="list_head_other list_head_text";
objs[1].className="list_head_betw list_head_text";
tables[1].style.display="";
tables[0].style.display="none";
}
}

function collection(act,type,id,title){
$.get("/ajax",{act:act,type:type,id:id,title:title},function(data){
if (data=="0"){
alert("加入收藏夹成功！")
}
if(data==-1){
alert("请先登陆！");
document.location.href="/login.jsp";
}
});}

function newsFlash(pics,links,texts,objs,width,height){
var focus_width=350
if (width){
focus_width=width;
}
var focus_height=280
if (height){
focus_height=height;
}
var text_height=30
var swf_height = 0
objs.append('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0/#version=6,0,0,0/default.htm" width="'+ focus_width +'" height="'+ swf_height +'">');
objs.append('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/images/flash_news.swf"><param name="quality" value="high"><param name="bgcolor" value="#dfdfdf">');
objs.append('<param name="menu" value="false"><param name=wmode value="opaque">');
objs.append('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
objs.append('<embed src="/images/flash_news.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#dfdfdf" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="www.macromedia.com/go/getflashplayer" />');
objs.append('</object>');
}
