// JavaScript Document
function show_my_popup(url) {
	document.getElementById('popup_bg').style.display = 'block';
	document.getElementById('popup_bg').innerHTML = '<div  ><a href="#" ><img id="image" border="0" /></a></div>'
	document.getElementById('image').src = 'tmp/'+url+'_big.gif';
	var XY = getXY(document.getElementById(url));
		
	document.getElementById('popup_bg').style.position = 'absolute';
	document.getElementById('popup_bg').style.top = (XY[1]-100)+'px';
	document.getElementById('popup_bg').style.left = (XY[0]-80)+'px';

}
function show_img() {
	document.getElementById('popup_bg').style.display = 'block';
}

function hide_img() {
	document.getElementById('popup_bg').style.display = 'none';
	document.getElementById('popup_bg').innerHTML = '';
}
/*   Get XY position of the Div    its named as "node"		Starts 	*/
function getXY(node) {
	var x = node.offsetLeft;	//	Finding X position of the Div
	var y = node.offsetTop;		//	Finding Y position of the Div
	var node = node.offsetParent;		//	Changing node to Parent	
 
	while (node) {		//	Finding	Parent nodes X and Calculating Dix X position
		x += node.offsetLeft;
		y += node.offsetTop;
		node = node.offsetParent;
	}
	return [x, y];		//	Storing X and Y position in to Array
}
/*   Get XY position of the Div    its named as "node"		Ends 	*/
