// JavaScript Document
function ope (a) {
	var theBody = document.getElementsByTagName('body')[0];
	var pageCoords = getPageCoords();
	document.getElementById('fon').style.height = (pageCoords[1] + 'px');
	document.getElementById('fon').style.display='block'
	document.getElementById('ppup').style.marginTop=pageCoords[2]+ 'px'
	document.getElementById('ppt').src='http://www.elegance-style.ru/content/'+a	
	}
	
function clozet () {
	parent.document.getElementById('fon').style.display='none'
	}	


function getPageCoords() {
	var coords = [0, 0, 0];
	if (window.innerHeight) {
		coords[0] = window.innerHeight;
		coords[2] = window.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.clientHeight != 0) {
		coords[0] = document.documentElement.clientHeight;
		coords[2] = document.documentElement.scrollTop;
	}
	else if (document.body) {
		coords[0] = document.body.clientHeight;
		coords[2] = document.body.scrollTop;
	}
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight;
	if (test1 > test2) {
		coords[1] = document.body.scrollHeight;
	} else {
		coords[1] = document.body.offsetHeight;
	}
	if (coords[1] < coords[0]) coords[1] = coords[0];
	return coords;
}
