var heightDict=new Object();
function putHeight(id,h){
    eval("heightDict.pict"+id+"="+h);
}
function getHeight(id){
    var h=eval("heightDict.pict"+id);
    eval("heightDict.pict"+id+"=null");
    return h;
}
function hasKey(id){
    var v=null;
    try{
        v=eval("heightDict.pict"+id);
    }
    catch(e){
        return false;
    }
    return v!=null;
}
function zoom(pictId){
    var pictImg=document.getElementById("pict"+pictId);
    if(pictImg==null) return;
    if(hasKey(pictId)){
        pictImg.height=getHeight(pictId);
        pictImg.style.height="";
        pictImg.alt="点击看大图";
        pictImg.style.width="";
    }
    else {
        putHeight(pictId,pictImg.height);
        pictImg.style.width="auto";
        pictImg.style.height="auto";
        pictImg.alt="点击还原";    
    }
}

function showMaxim(){
		new Ajax.Updater("maxim", "/ajax_server/maxim/0?navibar=1", {asynchronous:true, evalScripts:true});
		var w = document.getElementById("maxim");
		var right=document.documentElement.clientWidth ?  document.documentElement.clientWidth : document.body.clientWidth
		w.style.left= right-310;
		w.style.display = "block";
		w.style.visibility ="visible";
}

function hideMaxim(){
		var w = document.getElementById("maxim");
		w.style.display = "none";
		w.style.visibility ="hidden";
}


