// JavaScript Document
function findPosition( oLink ) //function to get the position of the link to open the window[contact name ]
	{
		if( oLink.offsetParent ) 
		{
			for( var posX = 0, posY = 0; oLink; oLink = oLink.offsetParent ) {
			posX += oLink.offsetLeft;
			posY += oLink.offsetTop;
		}
		return posX+','+posY ;
		} else {
		return  oLink.x+','+oLink.y;
		}
	}	
	
	function closeWindow(id)
	{
	 	var d = document.getElementById('bodyId');
		var olddiv = document.getElementById('nomInfoPlace'+id);
  		d.removeChild(olddiv);

	}
	function closeWin(id)
	{
	 	var d = document.getElementById('bodyId');
		var olddiv = document.getElementById('floor');
  		d.removeChild(olddiv);

	}
	
	function showFloor(img){
		//NewWindow('/upload/eventsImgs/'+img,'space',700,550,'yes');
		NewWindow('/upload/eventsImgs/'+img+'?rand='+Math.random()+'','space',700,550,'yes');
	}
	
	var win = null;
	function NewWindow(mypage,myname,w,h,scroll)
	{
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		settings =
		'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
		win = window.open(mypage,myname,settings)
	}
