// JavaScript Document

function showDiv(a){//产品
	var i=document.getElementById("p_titles_1");//第一个
	var n=document.getElementById("p_titles_2");//第二个
	var d=document.getElementById("product_d");//精品产品
	var p=document.getElementById("product_p");//产品
	if(a=='p_titles_1'){
		i.className='a';
		n.className='b';
		d.className='show';
		p.className='hides';
	}else{
		i.className='b';
		n.className='a';
		d.className='hides';
		p.className='show';
	}
}

function showTie(id){//软件下载和公司动态
	var s=document.getElementById("s_ties");//软件下载
	var a=document.getElementById("a_ties");//公司动态
	var software = document.getElementById('software');//软件下载内容
	var article=document.getElementById("article");//动态内容
	if(id=='s_ties'){
		s.className='ties_b';
		a.className='';
		software.className='ties_show';
		article.className='hides';
	}else{
		s.className='';
		a.className='ties_b';
		software.className='hides';
		article.className='ties_show';
	}

}
	function initBannerLink() {
		 
		if (document.getElementById("poster_img").parentNode.tagName == "A") {
			document.getElementById("poster_img").parentNode.onclick = newLocation;
		}

	rotate(adImages);
	 //  newLocation(adURL);

	}


function rotate(){
		thisAd++;
		if (thisAd == adImages.length) {
			thisAd = 0;
		}
		 document.getElementById("poster_img").src = adImages[thisAd];
	   setTimeout("rotate()", 3 * 1000);

	}
	function newLocation() {
		//document.location.href = adURL[thisAd];
		window.open(adURL[thisAd]);
		return false;
	}

function checkReview(){
	var text = document.getElementById('review_content').value;
	if(text==''){
		alert("请填写评论内容后再提交！");
		return false;
	}
	if(text.length>300){
		alert("填写的信息过多");
		return false;
	}
}


