
function getHttprequest_anal(id, URL)
{
    var xmlhttp = null;

    try{
        xmlHttp=new XMLHttpRequest();
    }catch(e){
        try
        {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            try{
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }catch (e){
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }
    xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
        {
            document.getElementById(id).innerHTML = decodeURIComponent(xmlHttp.responseText);
        }
    }
    xmlHttp.open("GET", URL, true);
    xmlHttp.send(null);
}


function anal_info_preview(anal_id){
    var divId = "anal_prev";
    document.getElementById(divId).style.zIndex = "99";
    document.getElementById(divId).style.display = "block";
    
    var res = "";
    if(anal_id.length>0){
        getHttprequest_anal(divId, '/anal_home/preview_div.php?anal_id='+anal_id);
    }else{
        document.getElementById(divId).innerHTML = "";
    }
}

function anal_info_move(){
    var divId = "anal_prev";
    var leftmargins = 5;
    document.getElementById(divId).style.position = "absolute";
    document.getElementById(divId).style.top = 1 * event.clientY + fnIsIETrueBody().scrollTop+10+'px';
    document.getElementById(divId).style.left = 1 * event.clientX + fnIsIETrueBody().scrollLeft+1 * leftmargins + 'px';
}

function anal_info_hide(){
    var divId = "anal_prev";
	document.getElementById(divId).style.zIndex = "-1";
    document.getElementById(divId).style.display = "none";
	document.getElementById(divId).innerHTML = "";

}

function fnIsIETrueBody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

document.write("<div id='anal_prev' style='display:none; z-index:-1'></div>");