<!--http://www.kenz.cn -->


//产品左边菜单
function changeTb(tbName, tbCount, tbNum) {

	var a;
	for(i=1;i<=tbCount;i++){

		a = eval("document.all."+tbName+i);

		if(i != tbNum) {
			a.style.display = 'none';
		}
		else {
			a.style.display = 'block';
		}
	}
}
//end

//产品详细页图片点击
function ImgSrc(ImgSrc,i) {
	document.Ima1.src="images/cpxxy_19.jpg";
	document.Ima2.src="images/cpxxy_21.jpg";
	document.Ima3.src="images/cpxxy_23.jpg";
	document.Ima4.src="images/cpxxy_25.jpg";
	document.Ima5.src="images/cpxxy_27.jpg";
	document.Ima6.src="images/cpxxy_29.jpg";
	document.Ima7.src="images/cpxxy_31.jpg";
	
	eval("document."+ImgSrc+".src='images/2cpxxy_"+i+".jpg';");

//	eval("document."+ImgSrc+".src='images/2/"+i+"b.gif';");
}
//end




//下拉菜单
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//end






//弹出窗口
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//结束


//窗口滚动
function movestar(a,time){
movex=setInterval("move("+a+")",time)
}
function moveover(){
clearInterval(movex)
}
function move(a){
scrollx=links.document.body.scrollLeft
scrolly=links.document.body.scrollTop
scrolly=scrolly+a
links.window.scroll(scrollx,scrolly)
}
function wback(){
if(links.history.length==0){window.history.back()}
else{links.history.back()}
}
//结束


//预先载入图片
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//结束

//闪光效果
function high(which2){
theobject=which2;theobject.filters.alpha.opacity=0
highlighting=setInterval("highlightit(theobject)",50)}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=100}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=15
else if(window.highting)
clearInterval(highlighting)}
//闪光效果结束


//显隐层+变换图像
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//end


//打印
function page_print()
{
	dypopLayer.style.display = "none";
	window.print();
	dypopLayer.style.display = "block";
}


//展开
function hideAll() {
for(i=0;i<odiv.length;i++) {
odiv[i].style.display="none";
}
} 
function showObj(num) {

if (odiv[num].style.display=="none") {
hideAll();
odiv[num].style.display="inline";
}
else {
odiv[num].style.display="none";
}

}
//end 


//新闻搜索
function soimg(ImgSrc,i) {
	document.Ima1.src="images/so1.jpg";
	document.Ima2.src="images/so1.jpg";
	document.Ima3.src="images/so1.jpg";
	eval("document."+ImgSrc+".src='images/so"+i+"_2.jpg';");
}

function so1(){
divProvidor.innerHTML="<INPUT name='key' type='hidden' id='key' value='1'>";
return soimg('Ima1',1);

}

function so2(){
divProvidor.innerHTML="<INPUT name='key' type='hidden' id='key' value='2'>";
return soimg('Ima2',1);
}

function so3(){
divProvidor.innerHTML="<INPUT name='key' type='hidden' id='key' value='3'>";
return soimg('Ima3',1);
}
//end

//收藏
url=window.location.href
tit=document.title
//end
//文本框提示,点击消失
function checkUsr(form,n) {
var UserName = document.login.UserName
if (n==0) {
if (UserName.value == '') {
UserName.value = '用户名'}
}
if (n==1) {
if (UserName.value == '用户名'){
UserName.value=''
}
}
}
//end


//-->