
function big(im,w,h,hd) {
	var frame = document.getElementById('pf');
	frame.style.position = "fixed";
	var cont = document.getElementById('cont');
	var th = retrieveWindowHeight();
	cont.style.maxHeight = parseInt(th-150)+"px";
	cont.style.overflowY = "auto";
	cont.style.overflowX = "hidden";
	frame.style.zIndex = "1000000";
	frame.style.left = parseInt((retrieveWindowWidth()/2)-((50+w)/2))+"px";
	frame.style.width = (50+w)+"px";
	var ha = parseInt((th-h)/2-30);
	frame.style.top = ha<50 ? "70px" : ha+"px";
	cont.innerHTML = '<img src="'+im+'" style="width:'+w+'px;height:"'+h+'px" alt=""/><h2>'+hd+'</h2>';
	frame.style.display = "block";
}

function retrieveWindowWidth() {
	var currentWidth = 0;
	if(typeof(window.innerWidth)=="number") {
		currentWidth = window.innerWidth;
	} else if( document.documentElement && document.documentElement.clientWidth ) {
		currentWidth = document.documentElement.clientWidth;
	} else if( document.body && document.body.clientWidth) {
		currentWidth = document.body.clientWidth;
	}
	if(typeof(currentWidth)=="string") parseInt(currentWidth);
	return currentWidth;
}

function retrieveWindowHeight() {
	var currentHeight = 0;
	if(typeof(window.innerHeight)=="number") {
		currentHeight = window.innerHeight;
	} else if(document.documentElement && document.documentElement.clientHeight) {
		currentHeight = document.documentElement.clientHeight;
	} else if(document.body && document.body.clientHeight) {
		currentHeight = document.body.clientHeight;
	}
	if(typeof(currentHeight)=="string") parseInt(currentHeight);
	return currentHeight;
}
