//函数名称：getObject(objectId)
//          参数objectId:控件的ID值
//函数功能：获得控件的ID值
//返 回 值：ture(获得ID值) false(获取ID失败)
//=======================================================
function getObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
}

//Ajax处理函数
function ajax_Web(divId,objstr)
{
	if(!getObject(divId))
	{
		alert("页面有误,找不到显示区域");
		return ;
	}
	getObject(divId).innerHTML= "<div style=\"text-align:center;\"><img src=../2011/images//"/images/download.gif/" alt=\"加载中...\"><\/div>";
	var xmlHttp;
	
	if(window.XMLHttpRequest) 
	{ //Mozilla 浏览器
		xmlHttp = new XMLHttpRequest();
		if (xmlHttp.overrideMimeType) 
		{//设置MiME类别
		xmlHttp.overrideMimeType('text/xml');
		}
	}else if(window.ActiveXObject) {
		try  
		{  
			xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");  
		}  
		catch(e)  
		{  
			try  
			{  
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");  
			}  
			catch(e2){}
		} 
	}
	
	if(xmlHttp)
	{
		xmlHttp.open('POST',"/include/ajax_Web.asp",true);
		//xmlHttp.setrequestheader("content-length",objstr.length); 
		xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		xmlHttp.send("SendStr="+escape(objstr));
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4)
			{
				if(xmlHttp.status==200)
				{
				getObject(divId).innerHTML= xmlHttp.responseText;
				//set_innerHTML(divId, xmlHttp.responseText);
				}
				else
				{
				getObject(divId).innerHTML= "出错："+xmlHttp.statusText;
				}
			}
			else
			{
			//eval("document.all."+divId).innerHTML= "正在下载数据...";
			}
	  	}
		
	 }
	 else
	 {
	 	alert('抱歉，您的浏览器不支持XMLHttpRequest，请使用IE6以上版本！');
	 }
}

function getObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
}

function hide_show()
{
	var bodywidth=window.screen.availWidth;
	var bodyheight=window.screen.availHeight -130;
	var bodys=document.body.scrollTop;
	getObject('Layer1').style.top= (bodyheight -150)/2 + bodys + 'px';
	getObject('Layer1').style.left=(bodywidth -300)/2 + 'px';
    getObject('Layer1').style.display="";
}
function hidelayer1(){
getObject('Layer1').style.display="none"
}

//页面加载需要调用的JS


