function mpGalOnMouseMove(evt) {
	var coords={left:0, top:0};
	evt=(evt)?evt:((window.event)?event:null);
	if (evt.pageX) {
		coords.left = evt.pageX;
		coords.top = evt.pageY;
	} else if (evt.clientX) {
		coords.left = evt.clientX+document.body.scrollLeft-document.body.clientLeft;
		coords.top = evt.clientY+document.body.scrollTop-document.body.clientTop;
	}
	if (evt) {
		mpById('popup').style.top=coords.top+5;
		mpById('popup').style.left=coords.left+5;
	}
}
function mpGalOnMouseOn(evt,file) {
	evt=(evt)?evt:((window.event)?event:null);
        if (evt.shiftKey) {
        mpById('popup').innerHTML='<img id="popup_img" src="" /><div id="popup_desc"></div>';
	if (mpById('popup').style.display!='block') {
		mpById('popup_img').src=file;
		mpById('popup').style.display='block';
	}
	mpGalOnMouseMove(evt);
        }
}

function mpGalOnMouseOut(evt) {
	evt=(evt)?evt:((window.event)?event:null);
	mpById('popup').style.display='none';
}

function mpGalOpenPhoto(link,width,height) {
	msgWindow=window.open(link,"_blank","width="+width+",height="+height+",status=no,toolbar=no,menubar=no,scrollbars=yes", "location=0");
}

