/******************************************************************************
  Common Modules for iHuzu CMS(20110125 Tang Yanjun)
  Copyright  iHuzu Inc. (http://www.kuximi.com)
*******************************************************************************/
var _Path='/admin/'; //后台路径

function $(id) { return document.getElementById(id);}

function getReturn(Url)  //提交为aspx,aspx页面路径, 返回页面的值
{
	var xmlhttp;
	
    if(typeof XMLHttpRequest != "undefined")
    {
        xmlhttp = new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
        var versions = ["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp"];
        for(var i = 0 ; i < versions.length; i++)
        {
            try
            {
                xmlhttp = new ActiveXObject(versions[i]);
                break;
            }
            catch(E)
            {
            }
        }
    }
        
    try 
    {
        xmlhttp.open('GET',Url,false); 
        xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded')
        xmlhttp.send(null);  
		
        if(xmlhttp.status==404){alert("对不起，获取数据页面不存在！");window.parent.location.href="/";}
		
        if((xmlhttp.readyState == 4)&&(xmlhttp.status == 200))
        {
            return xmlhttp.responseText;
        }
        else
        {
           return null;
        }
    }
    catch (e) 
    {  
         alert("你的浏览器不支持XMLHttpRequest对象, 请升级");window.location.href="/"; 
    }

    return null;
}


function tGoto(){getReturn(_Path+'SecurityUpdate.aspx?id='+Math.random()*55555555);}



//--------------------------------------------Loading效果-------------------------------------------------------------
if (window.attachEvent) {   
	window.attachEvent("onload", remove);   
} else if (window.addEventListener) {   
	window.addEventListener("load", remove, false);    
}   
function remove() {   
	var div = document.getElementById("target");   
	document.body.removeChild(div);   
}

document.writeln("<div id=\"target\" style=\"position:absolute; top:200px;left:50%;z-index:3000;\"><div style=\"position:absolute; margin-left:-110px;\"><div style=\"background:#FBFFD1;position:absolute; font-size:12px; color: #333333;width:220px; border:1px solid #8bad76; text-align:center; padding:7px 0;z-index:2555;\"><img src=\""+_Path+"/skin/load.gif\" align=\"absmiddle\" />&nbsp;数据加载中，请稍侯……</div></div></div>");


