
var myTitle=null;
function L(ID)
{
        var lo=window.location;
        var hash=lo.hash;
        if(ID==0)//页面被刷新
        {
           ID=hash.replace("#","");
        }
        else
        {
           window.location="#"+ID;
        }
        //-----------------------------------  
        if(ID!="")//需要查找ID
        {
        	var request = new Request.JSON({
			url:"ajax.aspx?do=Room_Lesson&ID="+ID,
			onComplete: function(jsonObj) {
				$("Lamp").innerHTML=jsonObj.Lamp;
				$("Window").innerHTML=jsonObj.Window;
				$("Door").innerHTML=jsonObj.Door;
				myTitle=jsonObj.Top;
				document.title=myTitle;
				setInterval("showTitle()",500);
			}
		    }).send();
        }
}
function showTitle()
{
	document.title=myTitle;
}