/**
 * Comment
 */
function closetips()
{
    document.body.style.overflow='auto';
    document.getElementById('dhtipsiframe').style.display='none';
    document.getElementById('dhtipsdiv').style.display='none';
    document.getElementById('dhtipscontent').style.display='none';
}
function showtips(tipStr,url,item){
    //dhTipsLayer:author:dh20156;
    //alert("showtips");
    //alert(tipStr+","+url+","+item);
    var urlScript_msgbox="";
    if(item) urlScript_msgbox="XPost('"+url+"','"+ item+"','','','')";
    else if(url) urlScript_msgbox="self.location='"+url+"'";
    //alert(urlScript_msgbox);
    if(document.getElementById("dhtipsiframe")==null){
        var iframe = document.createElement("IFRAME");
        iframe.id = "dhtipsiframe";
        iframe.style.position = "absolute";
        iframe.style.left = 0;
        iframe.style.top = 0;//document.body.scrollTop;
        iframe.style.width = (document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth;
        iframe.style.height = (document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight+20:document.body.offsetHeight;

        var div = document.createElement("DIV");
        div.id = "dhtipsdiv";
        div.style.position = "absolute";
        div.style.left = 0;
        div.style.top =0;//document.body.scrollTop;
        div.style.width = (document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth;
        div.style.height = (document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight+20:document.body.offsetHeight;
        //div.oncontextmenu = function(){return false}
        //div.onselectstart = function(){return false}

        var div2 = document.createElement("DIV");
        div2.id = "dhtipscontent";
        div2.style.position = "absolute";
        div2.style.left = document.body.offsetWidth/2-150+document.body.scrollLeft;
        div2.style.top = document.body.scrollTop+((document.body.offsetHeight<500)?document.body.offsetHeight/2-50:300);//document.body.offsetHeight/2-50+document.body.scrollTop;
       	
        div2.innerHTML = "<div class=\"tipsdiv\">"+tipStr+"</div><div class=\"closediv\"><input type=\"button\" class=\"closebtn\" value=\"关闭\" onclick=\"document.body.style.overflow='auto';document.getElementById('dhtipsiframe').style.display='none';document.getElementById('dhtipsdiv').style.display='none';document.getElementById('dhtipscontent').style.display='none';"+urlScript_msgbox+";\" /></div>";
        div2.oncontextmenu = function(){return false}

        document.body.appendChild(iframe);
        document.body.appendChild(div);
        document.body.appendChild(div2);
    }else{
        document.getElementById("dhtipsiframe").style.display = "block";
        document.getElementById("dhtipsdiv").style.display = "block";
        document.getElementById("dhtipscontent").style.display = "block";
        document.getElementById("dhtipscontent").innerHTML = "<div class=\"tipsdiv\">"+tipStr+"</div><div class=\"closediv\"><input type=\"button\" class=\"closebtn\" value=\"关闭\" onclick=\"document.body.style.overflow='auto';document.getElementById('dhtipsiframe').style.display='none';document.getElementById('dhtipsdiv').style.display='none';document.getElementById('dhtipscontent').style.display='none';"+urlScript_msgbox+";\" /></div>";
        document.getElementById("dhtipscontent").style.left = document.body.offsetWidth/2-150+document.body.scrollLeft;
        document.getElementById("dhtipscontent").style.top = document.body.scrollTop+((document.body.offsetHeight<500)?document.body.offsetHeight/2-50:300);//document.body.offsetHeight/2-50+document.body.scrollTop;
    }
    var l = document.body.scrollLeft;
    var t = document.body.scrollTop;
    document.body.style.overflow = "hidden";
    document.body.scrollLeft = l;
    document.body.scrollTop = t;
}


