// JavaScript Document
function GetE(t1) {
return document.getElementById(t1);
}
function GetN(t1) {
return document.getElementsByName(t1);
}
function OutStr(t1,t2) {
if (GetE(t1))
{
setInnerHTML(GetE(t1),t2);
}
}
function SetMenu(value,type)
{
if(type==1){
GetE('mzid').value=value;
}
if(type==2){
GetE('mcid').value=value;
}
}
var oDiv="center"
var historyNo=0;
var xmlHttp = false;
function createXmlHttpRequest()
{
xmlHttp = false;
//始始XMLHttpRequest
if(window.XMLHttpRequest)
{ //Mozilla
xmlHttp = new XMLHttpRequest();
if (xmlHttp.overrideMimeType)
{//MiME
xmlHttp.overrideMimeType('text/html');
}
}
else if (window.ActiveXObject)
{ // IE
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {}
}
}
//return xmlHttp;
if (!xmlHttp)
{ // 斐J凳?
window.alert("创建XMLHttpRequest对象失败!");
return false;
}
}
function createQueryString(type,page,obj)
{
var strQuery="";
if (type==1){
strQuery="mzid="+GetE('mzid').value;
}
if(type==2||type==0){
strQuery="mzid="+GetE('mzid').value+"&mcid="+GetE('mcid').value+"&dotype="+type;
}
if(type==3){
strQuery="mzid="+GetE('mzid').value+"&mcid="+GetE('mcid').value+"&page="+page+"&strSearch="+GetE('strSearch').value+"&dotype="+type;
}
if(type==4){
strQuery="mzid="+GetE('mzid').value+"&mcid="+GetE('mcid').value+"&page="+page+"&dotype=2";//+type
for(var i=0;i
正在装载数据,请等待..." );
xmlHttp.open("POST",url,true);
xmlHttp.onreadystatechange=handleStateChange;
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send(strQuery);
}
function addHistoryItem(Div,strQuery)
{
historyNo+=1;
var historyItem=new Object();
historyItem.divID=Div;
historyItem.strQuery=strQuery;
dhtmlHistory.add("bookmark:"+historyNo,historyItem);
//historyStorage.put("bookmark:"+historyNo,historyItem);
//alert(dhtmlHistory.getCurrentLocation()+historyStorage.hasKey(dhtmlHistory.getCurrentLocation())+historyStorage.get(dhtmlHistory.getCurrentLocation())+historyStorage.get("bookmark:"+historyNo)+historyStorage.get("bookmark:1"));
}
function handleStateChange()
{
if (xmlHttp.readyState==4){
if(xmlHttp.status==200){
OutStr(oDiv,xmlHttp.responseText);
}
else
{
//alert(xmlHttp.responseText);
OutStr(oDiv,"抱歉!装载失败.原因:" +xmlHttp.statusText);
}
}
}
function fgpage(mzid,mcid,type){
document.body.scrollTop=0;
if (type==1){
doRequest(mzid,1,1,"center");
}
if (type==0){
SetMenu(mzid,1);
SetMenu(mcid,2);
doRequest(0,0,1,"center");
}
}
////////////////////////////////////////////////////////
/*
* 描述:跨浏览器的设置 innerHTML 方法
* 允许插入的 HTML 代码中包含 script 和 style
* 作者:kenxu
* 日期:2006-09-01
* 参数:
* el: 合法的 DOM 树中的节点
* htmlCode: 合法的 HTML 代码
* 经测试的浏览器:ie5+, firefox1.5+, opera8.5+
*/
var setInnerHTML = function (el, htmlCode) {
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('msie') >= 0 && ua.indexOf('opera') < 0) {
htmlCode = 'for IE
' + htmlCode;
htmlCode = htmlCode.replace(/