var weather_value = '';
function changeTab(obj,tab){
	var tabs=document.getElementById(tab).getElementsByTagName("li");
	for(i=0;i<tabs.length;i++){
		var id=i+1;
		if(tabs[i]==obj){
			tabs[i].className="cur";
			document.getElementById(tab+"_con"+id).className="dis";
		}else{
			tabs[i].className="nor";
			document.getElementById(tab+"_con"+id).className="undis";
		}
	}
}
function showLocale(objD)
{
	var str,colorhead,colorfoot;
	var yy = objD.getYear();
	if(yy<1900) yy = yy+1900;
	var MM = objD.getMonth()+1;
	if(MM<10) MM = '0' + MM;
	var dd = objD.getDate();
	if(dd<10) dd = '0' + dd;
	var hh = objD.getHours();
	if(hh<10) hh = '0' + hh;
	var mm = objD.getMinutes();
	if(mm<10) mm = '0' + mm;
	var ss = objD.getSeconds();
	if(ss<10) ss = '0' + ss;
	var ww = objD.getDay();
	if  ( ww==0 )  colorhead="<font color=\"#a1a0a0\">";
	if  ( ww > 0 && ww < 6 )  colorhead="<font color=\"#a1a0a0\">";
	if  ( ww==6 )  colorhead="<font color=\"#a1a0a0\">";
	if  (ww==0)  ww="星期日";
	if  (ww==1)  ww="星期一";
	if  (ww==2)  ww="星期二";
	if  (ww==3)  ww="星期三";
	if  (ww==4)  ww="星期四";
	if  (ww==5)  ww="星期五";
	if  (ww==6)  ww="星期六";
	colorfoot="</font>"
	//str = colorhead + yy + "年" + MM + "月" + dd + "日 " + hh + ":" + mm + ":" + ss + "  " + ww + colorfoot;
	str = colorhead + yy + "年" + MM + "月" + dd + "日 "  + ww + colorfoot;
	return(str);
}
function tick()
{
	//var today;
	//today = new Date();
	
	//document.getElementById("localtime").innerHTML = "今天是"+showLocale(today) +" "+weather_value;
}

function flvplayer(files,texts,swf_width,swf_height,autoplay){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
	document.write('<param name="movie" value="http://www.peopleart.tv/static/media/flvplayer.swf"><param name="quality" value="high">');
	document.write('<param name="menu" value="false"><param name="allowFullScreen" value="true" />');
	document.write('<param name="FlashVars" value="vcastr_file='+files+'&vcastr_title='+texts+'&LogoText=www.peopleart.tv&IsShowBar=1&IsAutoPlay='+autoplay+'">');
	document.write('<embed src="http://www.peopleart.tv/static/media/flvplayer.swf" allowFullScreen="true" FlashVars="vcastr_file='+files+'&vcastr_title='+texts+'" menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
}

var timer1;
function newsScroll(){
document.getElementById("news").style.pixelLeft=(document.getElementById("news").style.pixelLeft-1)%document.getElementById("nbo").offsetWidth;
}
function go(){ 
	//更改第二个参数可以改变速度，值越小，速度越快。
	timer1=setInterval('newsScroll()',30) 
}
function ck_search(){
	var obj = document.getElementById("keyword");
	if(obj.value == ''|| obj.value == "请输入关键字"){
		alert("请输入关键字！");
		obj.select();obj.focus();
		return false
	}
	return true;
}
function secPic(obj){
	var show_pic = document.getElementById('show_pic');
	show_pic.src = obj.src;
}


function chkcomform(){
	if(document.getElementById('content').value == ''){
		alert("请输入评论内容")
		document.getElementById('content').focus();
		return false;
	} 
	if(document.getElementById('name').value == ''){
		alert("请输入昵称")
		document.getElementById('name').focus();
		return false;
	}
	if(document.getElementById('checkcode').value == ''){
		alert("请输入验证码")
		document.getElementById('checkcode').focus();
		return false;
	}
	return true;
}

function cf(flashsrc,flashwidth,flashheight,flashlink,br){
	document.write("<table width="+flashwidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0><tr><td>");
	document.write("<div style=\"position:relative\">");
	document.write("<embed style=\"position:absolute;z-index:0\" src="+flashsrc+" quality=\"high\" width="+flashwidth+" height="+flashheight+" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" wmode=\"opaque\"></embed>");
	document.write("<div style=\"background:white;filter:alpha(opacity=0);opacity:0;position: relative;z-index:10;left:0pt;top:0pt;width:"+flashwidth+";height:"+flashheight+"px;\">");
	document.write("<a href="+flashlink+" target=\"_blank\" style=\"cursor:pointer;display:block;width:"+flashwidth+";height:"+flashheight+"px;\"></a>");
	document.write("</div>");
	document.write("</div>");
	document.write("</td></tr></table>");
	if (br=="1") {
	document.write("<br>");
	}
}
