function repositionElement(event,el) {
	if(el) {
		if(!event) {
			var event=window.event;
		}
		if(getClientWidth()-parseInt(el.offsetWidth)-10>parseInt(event.clientX)) {
			el.style.left=parseInt(event.clientX)+'px';
		}
		else {
			el.style.left=parseInt(event.clientX)-parseInt(el.offsetWidth)+'px';
		}
		if(getClientHeight()-parseInt(el.offsetHeight)-32>parseInt(event.clientY)) {
			el.style.top=parseInt(event.clientY)+22+'px';
		}
		else {
			el.style.top=parseInt(event.clientY)-parseInt(el.offsetHeight)-3+'px';
		}		
	}
}

function showFullPicture(pictLink,w,h) {
	var popupDivB=document.getElementById('divFSPopupBottom');
	var popupDivT=document.getElementById('divFSPopupTop');
	w=parseInt(w);
	h=parseInt(h);
	if(popupDivB && popupDivT) {
		popupDivB.style.width=getClientWidth()+'px';
		popupDivB.style.height=getClientHeight()+'px';
		popupDivT.style.width=w+'px';
		popupDivT.style.height=h+'px';
		popupDivT.innerHTML='<table id=\'tblFSPopup\' cellspacing=\'0\' cellpadding=\'0\'><tr><td id=\'tdFSPopupContainer\'><img id=\'imgFullPicture\' style=\'width: '+w+'px; height: '+h+'px;\' src=\''+pictLink+'\' onclick="javascript: hideTooltip(); hidePopupDiv();" onmouseover="javascript: showTooltip(event,\'Закрыть\',40);" onmousemove="javascript: moveTooltip(event);" onmouseout="javascript: hideTooltip();"/></td></tr></table>';
		if(getClientWidth()-w>40) popupDivT.style.left=(((getClientWidth()-w)/2)+getBodyScrollLeft())+'px'; else popupDivT.style.left=0+getBodyScrollLeft()+20+'px';
		if(getClientHeight()-h>40) popupDivT.style.top=(((getClientHeight()-h)/2)+getBodyScrollTop())+'px'; else popupDivT.style.top=0+getBodyScrollTop()+20+'px';
		popupDivB.style.display='block';
		popupDivT.style.display='block';
	}
}