
	function toggleDiv(div_id,disp_or_hide){
		var div_id_obj=document.getElementById(div_id);
		if(disp_or_hide){
			div_id_obj.style.display="";
		}else{
			div_id_obj.style.display="none";
		}
	}

function gotoProduct(){
	
	//var param_product_name = document.getElementById("product_name").value;
	//if(param_product_name != '-1'){
	//alert(param_product_name);
	//goto url
		//window.location.href='../../jsp/brand/biostime_pro.jsf?id='+param_product_name;
	//}
	
	var param_product_category = document.getElementById("product_category").value;
	
	if(param_product_category == '1'){
		window.location.href='../../jsp/brand/product1.jsf';
	}else if(param_product_category == '2'){
		window.location.href='../../jsp/brand/product2.jsf';
	}
	else if(param_product_category == '3'){
		window.location.href='../../jsp/brand/product3.jsf';
	}
	else if(param_product_category == '4'){
		window.location.href='../../jsp/brand/product4.jsf';
	}else{
		window.location.href='../../jsp/brand/product1.jsf';
	}

}


/*pic auto play*/

/**/

 function validate(){
	  // alert('validate');
	      var search_word2 = document.getElementById('aForm:search_word').value;
		    //alert('search_word = ' + search_word);
	      if(search_word2.isNullOrEmpty()) {
	          alert('请输入搜索内容!');
	          return false; 
	      }
	    
		 // alert('success');
		  return true;
		// return false; 
	   }

function setMenuSelect(theMenuid,theSeletcss){



		aryMenuDiv.each(
		function(aryVaue){
			$(aryVaue).className="banner_unselect_my";
		}
	)
	
	aryMenuDiv.each(
		function(aryVaue){
			if(theMenuid == (aryVaue)){
				$(aryVaue).className=theSeletcss;
			}
		}
	)

}

function   loadImgSite(theImgSrc,theTitle,theDeapartment,theSay){   
	var re = /\{0\}/g;    
	  
	//alert("loadImgSite");
  //var   objImg   =   document.createElement("img")     
  //objImg.src=theImgSrc;  
  //${imgswitch}.appendChild(objImg) 
  var imgtag = '<img  id="pic" src="{0}" class="staff_right_pic" border="0" style="visibility:hidden;filter:revealtrans(duration=1.0,transition=23)"/>';
  
 // alert("replace = " + imgtag.replace(re,theImgSrc));
  $("imgswitch").innerHTML   =   imgtag.replace(re,theImgSrc);  
  $("title_div").innerHTML = theTitle;
  $("department_div").innerHTML = theDeapartment;
  //alert($("say_div"));
  $("say_div").innerHTML = theSay;
  
  }
  
  function   loadImgSiteClear(theImgSrc,theTitle,theDeapartment,theSay){   
	var re = /\{0\}/g;    
	  
	//alert("ddd");
  //var   objImg   =   document.createElement("img")     
  //objImg.src=theImgSrc;  
  //${imgswitch}.appendChild(objImg) 
  var imgtag = '<img id="pic"   src="{0}" class="staff_right_pic" border="0" />';
  
 // alert("replace = " + imgtag.replace(re,theImgSrc));
  $("imgswitch").innerHTML   =   imgtag.replace(re,theImgSrc);  
  $("title_div").innerHTML = theTitle;
  $("department_div").innerHTML = theDeapartment;
  //alert($("say_div"));
  $("say_div").innerHTML = theSay;
  clearInterval(timeinterval);
  }
  
  
  /**/
  function   loadImgSite2(theImgSrc,theTitle,theDeapartment,theSay){   
	var re = /\{0\}/g;    
	  
	//alert("ddd");
  //var   objImg   =   document.createElement("img")     
  //objImg.src=theImgSrc;  
  //${imgswitch}.appendChild(objImg) 
  var imgtag = '<img  id="pic"   src="{0}" class="team_pic" border="0" style="visibility:hidden;filter:revealtrans(duration=1.0,transition=23)"/>';
  
 // alert("replace = " + imgtag.replace(re,theImgSrc));
  $("imgswitch").innerHTML   =   imgtag.replace(re,theImgSrc);  
  $("title_div").innerHTML = theTitle;
 // $("department_div").innerHTML = theDeapartment;
  //alert($("say_div"));
  //$("say_div").innerHTML = theSay;
  
  }
  
  
  
  function   loadImgSite3(theImgSrc,theTitle,theDeapartment,theSay){   
	var re = /\{0\}/g;    
	  
	//alert("ddd");
  //var   objImg   =   document.createElement("img")     
  //objImg.src=theImgSrc;  
  //${imgswitch}.appendChild(objImg) 
  var imgtag = '<img  id="pic"   src="{0}" class="team_pic" border="0" />';
  
 // alert("replace = " + imgtag.replace(re,theImgSrc));
  $("imgswitch").innerHTML   =   imgtag.replace(re,theImgSrc);  
  $("title_div").innerHTML = theTitle;
 // $("department_div").innerHTML = theDeapartment;
  //alert($("say_div"));
  //$("say_div").innerHTML = theSay;
  clearInterval(timeinterval);
  }
  
/**/
function splitString(theStr,begin,end){
	var theEnd = 0;
	var qwer = "";
	if(end == -1){
		qwer=theStr.substring(begin);
	}else{
		qwer=theStr.substring(begin,end);
	}
	
	
	return qwer;
	
}


/*pic effect*/

var highlighting;
var oldThumb;

function lightToDark(imgObj) {
    theobject = imgObj;
	highlighting = setInterval("highlightit(theobject)", 30);
}

function darkToLight(imgObj) {
	if (highlighting != null && highlighting != undefined) {
		clearInterval(highlighting)
	}
	imgObj.filters.alpha.opacity = 50;
}

function highlightit(cur) {
	if (cur.filters.alpha.opacity < 100)
		cur.filters.alpha.opacity += 2;
	else if (window.highlighting)
		clearInterval(highlighting);
}

function thumb_light(thisObj) {
	thisObj.filters.alpha.opacity = 50;
}

function thumb_dark(thisObj) {
	thisObj.filters.alpha.opacity = 100;
}

function thumb_click(index) {

	var img = document.getElementById("body_pic");
	img.style.display = "block";
	
	if (index == 1) {
		darkToLight(img);
		img.src = "pic\\4243.jpg";		
	} else if (index == 2) {
		darkToLight(img);
		img.src = "pic\\33423.jpg";
	}
	
	lightToDark(img);

} 

/**/