﻿function backButton(){
    history.back();
} 

function mouseCoords(e){

var posx = 0;
var posy = 0;
	
	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}
	return {
		x:posx + 20,
		y:posy
	};
}

//task: 144 start
function show_popup_inv(e,v, title, content){

    document.getElementById("ct").style.display ="block";
    document.getElementById("ct").style.top = mouseCoords(e).y + "px";
    document.getElementById("ct").style.left = mouseCoords(e).x + "px";
    document.getElementById("ct_title").firstChild.nodeValue=title;
    
if(document.all)
    document.getElementById("ct_content").innerText = content;
    else
     document.getElementById("ct_content").textContent = content;
}
function hide_popup_inv(v){
    document.getElementById("ct").style.display ="none";
}
//task: 144 end
function show_loading(e,loading,content)
{
    document.getElementById(loading).style.display ="block";
    document.getElementById(loading).style.top = mouseCoords(e).y + "px";
    document.getElementById(loading).style.left = mouseCoords(e).x + "px";
    //loading.firstChild.nodeValue=content;
    //alert("PPP"+mouseCoords(e).y );
}