function change_con(ww,num,hh)
{//zhzh.cq.cn
	var obj=ww
	for(var ii=1;ii<=num;ii++)
	{
		document.getElementById(obj+ii).className=obj+"off";
		document.getElementById(obj+ii+ii).style.display="none";
	}
	document.getElementById(obj+hh).className=obj+"on";
	document.getElementById(obj+hh+hh).style.display="";
}
function menuon(it,num,stat)
{
	var thism=it;
	var path;
	if(stat==1)
		path="/img/menuon_"+num+".gif";
	else
		path="/img/menuoff_"+num+".gif";	
	thism.src=path;
	//alert(path);
}
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 onloadimg(){
var img;
for(var i=2;i<=10;i++){
	if(i<10)
		img="0"+i;
	else
		img=i;
	MM_preloadImages("/img/menuon"+img+".gif")
	}
}

function rndbg(){
var t;
t=Math.floor(Math.random()*3)+1;
document.getElementById("topbg").className="cen topbg"+t;
//alert(t);
}

function selectsearch(a)
{
	if(a=="mj"){
		document.getElementById("asearch").style.display="";
		document.getElementById("bsearch").style.display="none";
		}
	else
	{
		document.getElementById("asearch").style.display="none";
		document.getElementById("bsearch").style.display="";
		}
	}
	//改变图片大小
function resizepic(o)
{ 
var maxwidth=570;   //定义最大宽度
var maxheight=600;  //定义最大高度
var a=new Image();
a.src=o.src
if(a.width > maxwidth)
{
  o.style.width=maxwidth;
}
if (a.height> maxheight)
{
  o.style.height=maxheight;
 }
}
//无级缩放图片大小
function bbimg(o)
{
  var zoom=parseInt(o.style.zoom, 10)||100;
  zoom+=event.wheelDelta/12;
  if (zoom>0) o.style.zoom=zoom+'%';
  return false;

}
