﻿function GetDIV(obj, status){
    if (document.readyState!="complete") return ;
    var theWidth, theHeight;
    var theScrollLeft, theScrollTop;
    
    
    if (window.innerWidth) 
    { 
        theWidth = window.innerWidth ;
        theHeight = window.innerHeight ;
        theScrollLeft = window.scrollLeft;
        theScrollTop = window.scrollTop;
    } 
    else if (document.documentElement && document.documentElement.clientWidth) 
    { 
        theWidth = document.documentElement.clientWidth ;
        theHeight = document.documentElement.clientHeight ;
        theScrollLeft = document.documentElement.scrollLeft ;
        theScrollTop = document.documentElement.scrollTop ;
    } 
    else if (document.body) 
    { 
        theWidth = document.body.clientWidth ;
        theHeight = document.body.clientHeight ;
        theScrollLeft = document.body.scrollLeft ;
        theScrollTop = document.body.scrollTop ;
    }
    document.getElementById("div" + obj.id).style.display=status;
    document.getElementById("div" + obj.id).style.top=event.clientY+theScrollTop;
    document.getElementById("div" + obj.id).style.left=event.clientX+10+theScrollLeft;
}
function show(strtype){
	try{document.getElementById(strtype).style.display = "block";}catch(e){}
}
function hide(strtype){
	try{document.getElementById(strtype).style.display = "none";}catch(e){} 
}
function GetDIVById(id, status){
	if (document.readyState!="complete") return ;
    var theWidth, theHeight;
    var theScrollLeft, theScrollTop;
    
    
    if (window.innerWidth) 
    { 
        theWidth = window.innerWidth ;
        theHeight = window.innerHeight ;
        theScrollLeft = window.scrollLeft;
        theScrollTop = window.scrollTop;
    } 
    else if (document.documentElement && document.documentElement.clientWidth) 
    { 
        theWidth = document.documentElement.clientWidth ;
        theHeight = document.documentElement.clientHeight ;
        theScrollLeft = document.documentElement.scrollLeft ;
        theScrollTop = document.documentElement.scrollTop ;
    } 
    else if (document.body) 
    { 
        theWidth = document.body.clientWidth ;
        theHeight = document.body.clientHeight ;
        theScrollLeft = document.body.scrollLeft ;
        theScrollTop = document.body.scrollTop ;
    }
    document.getElementById(id).style.display=status;
    document.getElementById(id).style.top=event.clientY+theScrollTop-100;
    document.getElementById(id).style.left=event.clientX+theScrollLeft;
}
function changeClass(obj,cl) {
		document.getElementById(obj.id).className = cl;
}


