// 下拉菜单
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function Switch(n)
{
	for(var i=1;i<=5;i++){ 
		var cur_l=document.getElementById("web1_l_"+i); 
		var cur_r=document.getElementById("web1_r_"+i); 
		if(n==i){ 
			cur_r.style.display="block"; 
			cur_l.style.background="url(images_website/web1_left_bg03.gif) no-repeat right bottom";
			cur_l.style.color="#517c9b";
			cur_l.style.fontWeight="bold";
		}else{ 
			cur_r.style.display="none";
			cur_l.style.background="url(images_website/web1_left_bg02.gif) no-repeat right bottom";
			cur_l.style.color="#517c9b"; 
			cur_l.style.fontWeight="normal";
		} 
	} 
}


function home_Switch(n)
{
	for(var i=1;i<=3;i++){ 
		var cur_l=document.getElementById("home_t"+i); 
		var cur_r=document.getElementById("home_b"+i); 
		if(n==i){ 
			cur_r.style.display="block"; 
			cur_l.className='site1'
		}else{ 
			cur_r.style.display="none";
			cur_l.className='site2'
		} 
	} 
}










//获取当前滚动条位置
function scrollImg(){
    var posX,posY;
    if (window.innerHeight) {
        posX = window.pageXOffset;
        posY = window.pageYOffset;
    }
    else if (document.documentElement && document.documentElement.scrollTop) {
        posX = document.documentElement.scrollLeft;
        posY = document.documentElement.scrollTop;
    }
    else if (document.body) {
        posX = document.body.scrollLeft;
        posY = document.body.scrollTop;
    }

    followDiv1.style.top=(posY+clover_top)+"px";  //图片在IE中的位置
	followDiv2.style.top=(posY+clover_top)+"px";  //图片在IE中的位置
	if (document.body.clientWidth<1024){followDiv1.style.display='none';followDiv2.style.display='none'}
	if (document.body.clientWidth>1024){followDiv1.style.display='block';followDiv2.style.display='block'}
    setTimeout("scrollImg()",100);

}

//生成对联
function theFloaters(id,x,y,content)
{
     document.write('<DIV align=center id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:'+clover_div+'px; height:1px;left:'+x+'px;top:'+y+'px;font-size:12px; ">- <a href="javascript:;" onclick='+id+'.style.visibility=\'hidden\'>关闭</a> -<br>'+content+'</DIV>');
}











////////////////////////////////




	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
} 

<!-------------图片等比例缩放二--------->

function resizeimg2(ImgD,iwidth,iheight) {
     var image=new Image();
     image.src=ImgD.src;
     if(image.width>0 && image.height>0){
        if(image.width/image.height>= iwidth/iheight){
           if(image.width>iwidth){
               ImgD.width=iwidth;
               ImgD.height=(image.height*iwidth)/image.width;
           }else{
                  ImgD.width=image.width;
                  ImgD.height=image.height;
                }
               ImgD.alt=image.width+"×"+image.height;
        }
        else{
                if(image.height>iheight){
                       ImgD.height=iheight;
                       ImgD.width=(image.width*iheight)/image.height;
                }else{
                        ImgD.width=image.width;
                        ImgD.height=image.height;
                     }
                ImgD.alt=image.width+"×"+image.height;
            }
　　　　　ImgD.style.cursor= "pointer"; //改变鼠标指针
　　　　　//ImgD.onclick = function() { window.open(this.src);} //点击打开大图片
　　　　if (navigator.userAgent.toLowerCase().indexOf("ie") > -1) { //判断浏览器，如果是IE
　　　　　　//ImgD.title = "请使用鼠标滚轮缩放图片，点击图片可在新窗口打开";
　　　　　//　ImgD.onmousewheel = function img_zoom() //滚轮缩放
　　　　　 {
　　　　　　　　　　//var zoom = parseInt(this.style.zoom, 10) || 100;
　　　　　　　　　　//zoom += event.wheelDelta / 12;
　　　　　　　　　　//if (zoom> 0)　this.style.zoom = zoom + "%";
　　　　　　　　　//　return false;
　　　　　 }
　　　  } else { //如果不是IE
　　　　　　　     ImgD.title = "点击图片可在新窗口打开";
　　　　　　   }
    }
}<!-------------图片等比例缩放--------->