var photoname = "<a  target='_blank' href='http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&pv=&z=0&word=%CE%F7%B2%D8%C7%BC%CC%C1%B1%A3%BB%A4%C7%F8&s=0' title='搜索更多 西藏羌塘保护区 图片   (c)本背景图片由国家地理杂志提供'>西藏羌塘保护区</a>";
var h = 130;
var minheight = 130;
var maxheight = 700;
var bp = -480;
var nbp = -480;
var tf = false;
function fn(){
	if (tf){
		if(nbp>bp){
			document.getElementById("headbimg").style.backgroundPosition = "0 " + nbp + "px";
			nbp -= 5;
		}
		if (h>=minheight){
			document.getElementById("headbimg").style.height = h + "px";
			document.getElementById("tmenu").style.marginTop = (h-minheight) + "px";
			setTimeout(function(){fn()},1);
			h -= 5;
		} else {
			document.getElementById("zors").innerHTML = "展开背景图";
			tf = !tf;
			h += 5;
		}
	} else {
		if(h>=(maxheight+bp) && nbp<0){
			nbp += 5;
			document.getElementById("headbimg").style.backgroundPosition = "0 " + nbp + "px";
		}
		if (h<=maxheight){
			document.getElementById("headbimg").style.height = h + "px";
			document.getElementById("tmenu").style.marginTop = (h-minheight) + "px";
			setTimeout(function(){fn()},1);
			h += 5;
		} else {
			document.getElementById("zors").innerHTML = "收起背景图";
			tf = !tf;
			h -= 5;
		}
	}
}