if (top.location!=self.location)
self.location.href="http://www.wanye68.com/err.html"
//-------------------------------------------图片的等比例缩放
function pimsize(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;
            }
　　　　
    }
} 

//-------------------------------------------图片的等比例缩放,多功能
function resizeimg(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;
            }
　　　　
    }
}
 

function hddiv(o){
o.style.display="none";
if(o.id="bqdiv1")xwly();
}

//-----------------------------------------------------------------------------给我留言验证
function isNumber(String) 
{   
var Letters = "1234567890-"; //可以自己增加可输入值 
var i; 
var c; 
if(String.charAt( 0 )=='-') 
return false; 
if( String.charAt( String.length - 1 ) == '-' ) 
return false; 
for( i = 0; i < String.length; i ++ ) 
{   
c = String.charAt( i ); 
if (Letters.indexOf( c ) < 0) 
return false; 
} 
return true; 
} 
function check(){
	if(document.form.user.value==""){
		alert("您的姓名不能为空！");
		document.form.user.focus();
		return false;
	}
	if(!isNumber(document.form.tel.value)) {   
        alert("您的电话号码不合法！"); 
         document.form.tel.focus(); 
          return false; 
      } 
	if(document.form.tel.value==""){
		alert("您的电话不能为空！");
		document.form.tel.focus();
		return false;
	}
	if(document.form.zhuti.value==""){
		alert("您的主题不能为空！");
		document.form.zhuti.focus();
		return false;
	}
	if(document.form.content.value==""){
		alert("您询问的内容不能为空！");
		document.form.content.focus();
		return false;
	}
	
		
		document.form.submit();
		hddiv(bqdiv1);
}

function msover(o){
	o.style.cursor="hand";
	o.style.position="relative";
	o.style.top=+0.5;
	o.style.left=+0.5;	
	
}
function msout(o){
	o.style.position="relative";
	o.style.top=-0.5;
	o.style.left=-0.5;	
	
}

var currentMoveObj = null;    //当前拖动对象
var relLeft;    //鼠标按下位置相对对象位置
var relTop;
function f_mdown(obj)
{
    currentMoveObj = obj;        //当对象被按下时，记录该对象
    currentMoveObj.style.position = "absolute";
    relLeft = event.x - currentMoveObj.style.pixelLeft;
    relTop = event.y - currentMoveObj.style.pixelTop;
}
window.document.onmouseup = function()
{
    currentMoveObj = null;    //当鼠标释放时同时释放拖动对象
}
function f_move(obj)
{
    if(currentMoveObj != null)
    {
        currentMoveObj.style.pixelLeft=event.x-relLeft;
        currentMoveObj.style.pixelTop=event.y-relTop;
    }
}
function nomove()
{currentMoveObj = null;
}
function moveovercplbt(o){
	o.style.backgroundColor="#FFFFD7";
}
function moveoutcplbt(o){
	o.style.backgroundColor="";
}
var cnzz_ed=new Date();
var cnzz_now=parseInt(cnzz_ed.getTime());
var cnzz_ref=document.referrer;
var cnzz_data='&r='+escape(cnzz_ref.substr(0,512))+'&lg='+escape(navigator.systemLanguage)+'&ntime=0.74142900 1281054188';
var cnzz_a=gc_cnzz("cnzz_a2352536");
if(cnzz_a!=-1) cnzz_a=parseInt(cnzz_a)+1;
else cnzz_a=0;
var rt=parseInt(gc_cnzz("rtime"));
var lt=parseInt(gc_cnzz("ltime"));
var cnzz_st = parseInt((cnzz_now-lt)/1000);
var cnzz_sin = gc_cnzz("sin2352536");
if(cnzz_sin==-1) cnzz_sin='none';
if( cnzz_ref.split('/')[2]!=document.domain ) cnzz_sin=cnzz_ref;
var cnzz_eid=gc_cnzz("cnzz_eid");
if(cnzz_eid==-1) cnzz_eid=Math.floor(Math.random()*100000000)+"-"+1281054188+"-"+cnzz_ref.substr(0,64);
if(lt<1000000){rt=0;lt=0;}
if(rt<1) rt=0;
if(((cnzz_now-lt)>500*86400)&&(lt>0)) rt++;
cnzz_data=cnzz_data+'&repeatip='+cnzz_a+'&rtime='+rt+'&cnzz_eid='+escape(cnzz_eid)+'&showp='+escape(screen.width+'x'+screen.height)+'&st='+cnzz_st+'&sin='+escape(cnzz_sin.substr(0,512))+'&res=0';
document.write('<img src="http://zs16.cnzz.com/stat.htm?id=2352536'+cnzz_data+'" border=0 width=0 height=0 />');
var cnzz_et=(86400-cnzz_ed.getHours()*3600-cnzz_ed.getMinutes()*60-cnzz_ed.getSeconds());
cnzz_ed.setTime(cnzz_now+1000*(cnzz_et-cnzz_ed.getTimezoneOffset()*60));
document.cookie="cnzz_a2352536="+cnzz_a+";expires="+cnzz_ed.toGMTString()+ "; path=/";
document.cookie="sin2352536="+escape(cnzz_sin)+ ";expires="+cnzz_ed.toGMTString()+";path=/";
cnzz_ed.setTime(cnzz_now+1000*86400*182);
document.cookie="rtime="+rt+";expires="+cnzz_ed.toGMTString()+ ";path=/";
document.cookie="ltime="+cnzz_now+";expires=" + cnzz_ed.toGMTString()+ ";path=/";
document.cookie="cnzz_eid="+escape(cnzz_eid)+ ";expires="+cnzz_ed.toGMTString()+";path=/";