// Checks if the browsers is IE or another.
// document.all will return true or false depending if its IE
// If its not IE then it adds the mouse event
if (!document.all)
document.captureEvents(Event.MOUSEDOWN)

// On the move of the mouse, it will call the function getPosition
document.onmousedown = getPosition;

// These varibles will be used to store the position of the mouse
  	var posx = 0;
	var posy = 0;

// This is the function that will set the position in the above varibles 
function getPosition(e) 
{

	if (!e) var e = window.event;
	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;
	}
	// posx and posy contain the mouse position relative to the document

}
function backgroundFilter()
{
	var div;
    
    if(document.getElementById)
    // Standard way to get element
    div = document.getElementById('backgroundFilter'); 
    else if(document.all) 
    // Get the element in old IE's 
    div = document.all['backgroundFilter']; 
    
    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0&&div.offsetHeight!=0)?'block':'none'; 
    }
    
    // If the background is hidden ('none') then it will display it ('block').
    // If the background is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
}

function ResourceLeftPopup(id)
{
		//alert("Inside Java Script"+id);
    var div;
    if(document.getElementById)
    // Standard way to get element
    div = document.getElementById(id); 
    else if(document.all) 
    // Get the element in old IE's 
    div = document.all[id]; 
    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; 
    }
    
    // If the ResourceLeftPopup is hidden ('none') then it will display it ('block').
    // If the ResourceLeftPopup is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
    
    // Sets the position of the DIV
    div.style.left = posx+(-50)+'px';
    div.style.top = posy+(-180)+'px';
}


