var ctrlcode=0;
var IE5=((navigator.appVersion.indexOf("MSIE")!=-1)&&(navigator.appVersion.substr(22,1)>=5))?1:0;
var NS=(navigator.appName == 'Netscape')?1:0;


function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
 
function MM_openBrWindow(theURL,winName,features) { //v2.0 
  window.open(theURL,winName,features); 
} 
 
function fp(){ 
this.hp.style.behavior='url(#default#homepage)'; 
this.hp.setHomePage('http://www.jxagriec.gov.cn/'); 
} 
function printIt(){ 
	 
	if ((IE5) || (NS)) 
	{	 
 
		window.print(); 
	} 
	else 
	{	 
		alert("  您用的不是IE5.0以上版本，不支持直接打印。请用\n\nCtrl+p或单击鼠标右键,选菜单中的[打印]！"); 
		//WebBrowser1.ExecWB(6,2); 
	} 
} 
 
function shutwin(){ 
window.close(); 
return; 
} 
 
 
function openwin(zjname) 
     { 
	window.open(zjname,"","top=10,left=10,height=450,width=660,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); 
	} 
	 
	 
function openlm(zjname) 
     { 
	window.open(zjname,"","top=0,left=0,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes"); 
	} 
	 
	 
function openmin(zjname) 
     { 
	window.open(zjname,"","top=0,left=0,height=450,width=400,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); 
	} 
	 
 
function isBlank(s){ 
 var len=s.length; 
 var i; 
for (i=0;i<len;++i) 
{ 
 if(s.charAt(i)!=" ") return false; 
} 
 return true; 
 
} 
 
 
function checkKey(ob) 
{ 
  if((IE5) || (NS)){ 
	if (window.event.ctrlKey)  // checks whether the ctrl key  // is pressed 
	   	JM_cc(ob); 
  }	 
} 
 
function JM_cc(ob){ 
  if ((IE5) || (NS)) 
{ 
    
	  ob.select(); 
	  js=ob.createTextRange(); 
	  js.execCommand("Copy"); 
 
   /* 
	  ob.readOnly=false; 
	  ob.focus(); 
	  ob.readOnly=true; 
	  ob.blur(); 
  */ 
  } 
 
else{ 
   if ((event.button == 2)||(event.button==3)){ 
     alert("欢迎您访问家秀网(http://www.ihomeshow.com)"); 
     return false; 
       }									 
    } 
} 
 
function unselect() 
{ 
   document.selection.empty(); 
    
} 
 
 
function opencontent(id){ 
	window.open("count.asp?id="+id,"","top=0,left=0,height=450,width=710,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); 
	} 
 
 
// floating image Dreamweaver Extension ,by jet(dezone@sina.com) 
  var brOK=false;    
   var mie=false;   
  var aver=parseInt(navigator.appVersion.substring(0,1));    
  var aname=navigator.appName;    
  //check browser    
  function checkbrOK()    
  	{if(aname.indexOf("Internet Explorer")!=-1)    
   	{if(aver>=4) brOK=navigator.javaEnabled();   
  	mie=true;    
   	}   
  	if(aname.indexOf("Netscape")!=-1)      
   	{if(aver>=4) brOK=navigator.javaEnabled();}   
   }   
   var vmin=5;   
   var vmax=2;   
   var vr=2;   
   var timer1;   
   function Chip(chipname,width,height)   
   	{this.named=chipname;   
   	this.vx=vmin+vmax*Math.random();   
   	this.vy=vmin+vmax*Math.random();   
   	this.w=width;   
   	this.h=height;   
   	this.xx=0;   
   	this.yy=0;   
   	this.timer1=null;   
  }   
   
   function movechip(chipname) {   
   	if(brOK)   
   	{eval("chip="+chipname);   
   	if(!mie)   
   	{pageX=window.pageXOffset;   
   	pageW=window.innerWidth;   
   	pageY=window.pageYOffset;   
   	pageH=window.innerHeight;   
   	}   
   	else   
   	{pageX=window.document.body.scrollLeft;   
   	pageW=window.document.body.offsetWidth-8;   
   	pageY=window.document.body.scrollTop;   
   	pageH=window.document.body.offsetHeight;   
   	}    
   	chip.xx=chip.xx+chip.vx;   
   	chip.yy=chip.yy+chip.vy;   
   	chip.vx+=vr*(Math.random()-0.5);   
   	chip.vy+=vr*(Math.random()-0.5);   
   	if(chip.vx>(vmax+vmin))  chip.vx=(vmax+vmin)*2-chip.vx;   
   	if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx;   
   	if(chip.vy>(vmax+vmin))  chip.vy=(vmax+vmin)*2-chip.vy;   
   	if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy;   
   	if(chip.xx<=pageX)   
   	{chip.xx=pageX;   
   	chip.vx=vmin+vmax*Math.random();   
   	}   
   	if(chip.xx>=pageX+pageW-chip.w)   
   	{chip.xx=pageX+pageW-chip.w;   
   	chip.vx=-vmin-vmax*Math.random();   
   	}   
   	if(chip.yy<=pageY)   
   	{chip.yy=pageY;   
   	chip.vy=vmin+vmax*Math.random();   
   	}   
   	if(chip.yy>=pageY+pageH-chip.h)   
   	{chip.yy=pageY+pageH-chip.h;   
   	chip.vy=-vmin-vmax*Math.random();   
   	}   
   	if(!mie)   
  	{eval('document.'+chip.named+'.top ='+chip.yy);    
  	eval('document.'+chip.named+'.left='+chip.xx);    
  	}     
  	else    
  	{eval('document.all.'+chip.named+'.style.pixelLeft='+chip.xx);    
   	eval('document.all.'+chip.named+'.style.pixelTop ='+chip.yy);    
  	}    
  	chip.timer1=setTimeout("movechip('"+chip.named+"')",100);    
  	}    
  }    
   
   
   function stopme(chipname)   
   	{if(brOK)   
   	{//alert(chipname)   
   	eval("chip="+chipname);   
   	if(chip.timer1!=null)     
 	{clearTimeout(chip.timer1)}   
  	}} 
  	 
  	    
   	var floater;   
  function floater()    
  	{checkbrOK();     
   	floater=new Chip("floater",0,0);   
   	if(brOK)    
   	{ movechip("floater");   
   	}}