//首页飘动图片
	//图片地址
	var img_src = 'images/zj20091103.jpg';
	var img_src1= 'images/zj20100305.jpg';
	//连接的网址
	var img_url = 'http://211.138.126.114:8001/GovermentPortal/OpenInquiry/0000000074.aspx';
	var img_url1 = 'http://www.zjt.gov.cn/art/zhunze.html';
	//图片宽度
	//var img_w = '110';
	//图片高度
	//var img_h = '60';
	//鼠标移动到图片上显示的文字
	//var img_alt = '点击打开链接';

	//小尺寸 110×60
    //document.write('<div id="fff" style="Z-INDEX: 10;right:0px; POSITION: absolute; TOP:100px; width: 80px;" WIDTH: 100px; POSITION: absolute; HEIGHT: 60px"><img src="'+img_src+'"  width="110" height="60" border="0" usemap="#map3"><map name="map3" id="map"><area shape="rect" coords="100,1,110,15" href="javascript:closeAD();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/><area shape="rect" coords="1,3,110,60" href="javascript:linkzhinan();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/><area shape="rect" coords="1,76,139,94" href="javascript:linkzhinan();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/><area shape="rect" coords="126,17,139,75" href="javascript:linkzhinan();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/></map></div>');
	//大尺寸 170×100
	//document.write('<div id="fff" style="Z-INDEX: 10;right:0px; POSITION: absolute; TOP:100px; width: 80px;" WIDTH: 170px; POSITION: absolute; HEIGHT: 100px"><img src="'+img_src+'"  width="170" height="100" border="0" usemap="#map3"><map name="map3" id="map"><area shape="rect" coords="160,1,170,15" href="javascript:closeAD();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/><area shape="rect" coords="1,1,170,100" href="javascript:linkzhinan();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/></map></div>');
	//上下两张图片
	document.write('<div id="fff" style="Z-INDEX: 10;right:0px; POSITION: absolute; TOP:100px; width: 80px;" WIDTH: 100px; POSITION: absolute; HEIGHT: 60px"><img src="'+img_src+'"  width="110" height="60" border="0" usemap="#map3"><map name="map3" id="map"><area shape="rect" coords="100,1,110,15" href="javascript:closeAD();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/><area shape="rect" coords="1,3,110,60" href="javascript:linkzhinan();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/><area shape="rect" coords="1,76,139,94" href="javascript:linkzhinan();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/><area shape="rect" coords="126,17,139,75" href="javascript:linkzhinan();"  onmouseover="pause_resume();" onmouseout="pause_resume();"/></map><img src="'+img_src1+'" style="cursor:pointer;" onclick="javascript:linkzhinan1();"  onmouseover="pause_resume();" onmouseout="pause_resume();" /></div>');

	var xPos = 20; // 起始横向位置(从左算起，单位象素) 
	//var yPos = document.body.clientHeight; // 页面本身高度 
	var yPos=window.screen.availHeight -200 -(window.screen.height -window.screen.availHeight); // 页面本身高度 
	
	var step = 1; 
	var delay = 30; // 速度，值越大速度越慢 
	var height = 0; 
	var Hoffset = 0; 
	var Woffset = 0; 
	var yon = 0; 
	var xon = 0; 
	var pause = true; 
	var interval;
	document.getElementById("fff").style.top=yPos+"px";

	function changePos() { 
		//width = document.body.clientWidth; // 判断浏览器窗口的宽度 
		width = window.screen.availWidth -200;
		//height = document.body.clientHeight; // 判断浏览器窗口的高度
		height=window.screen.availHeight -200 -(window.screen.height -window.screen.availHeight) ;
		Hoffset = document.getElementById("fff").offsetHeight; 
		Woffset = document.getElementById("fff").offsetWidth; 
		document.getElementById("fff").style.left=xPos + document.body.scrollLeft +"px"; 
		document.getElementById("fff").style.top=yPos + document.body.scrollTop +"px"; 
		if (yon) { 
		yPos = yPos + step; 
		} 
		else { 
		yPos = yPos - step; 
		} 

		if (yPos < 0) { 
		yon = 1; 
		yPos = 0; 
		} 

		if (yPos >= (height - Hoffset)) { 
		yon = 0; 
		yPos = (height - Hoffset); 
		} 

		if (xon) { 
		xPos = xPos + step; 
		} 
		else { 
		xPos = xPos - step; 
		} 
		if (xPos < 0) { 
		xon = 1; 
		xPos = 0; 
		} 

		if (xPos >= (width - Woffset)) { 
			xon = 0; 
			xPos = (width - Woffset); 
		}
	}
	
	function linkzhinan() {
		if(true){
			window.open(img_url);
		}else{
			document.getElementById("fff").style.display="none";
		}
	}
	
	function linkzhinan1() {
		if(true){
			window.open(img_url1);
		}else{
			document.getElementById("fff").style.display="none";
		}
	}

	function closeAD(){
		document.getElementById("fff").style.display="none";
	}

	//启动移动
	function start_pp() { 
		document.getElementById("fff").visibility = "visible"; 
		interval = setInterval('changePos()', delay); 
		//this.changePos();
	} 

	function pause_resume() { 
		if(pause) {clearInterval(interval);pause = false;} 
	else {interval = setInterval('changePos()',delay);pause = true;} 
	} 
	start_pp();