function openIframe(url, width, height)	{
	
	var screenSize = getScreenSize();
	$.scrollTo({top:0, left:0}, {speed:1});
	
	$("body").append('\
	<div class="iframe-popup" onclick="closeIframe();">\
		<div class="iframe-popup-inner" style="width: ' + width + 'px; height: ' + height + 'px;">\
			<iframe id="frame-content" src ="' + url + '" style="width: ' + width + 'px;">\
			  <p>Your browser does not support iframes.</p>\
			</iframe>\
			\
			<a href="#" class="close-popup" onclick="closeIframe();">Inchide</a>\
		</div>\
	</div>');

	$(".iframe-popup").fadeIn(300);
	$("body").css("overflow", "hidden");

	return false;
}


function closeIframe() {
	$(".iframe-popup").remove();
	$("body").css("overflow", "auto");
	$.scrollTo({top:5000, left:0}, {speed:1});
}

function getScreenSize() {
	
	// thanks to Andy Langton
	// http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/

	// edited by Andrei Pfeiffer: created a function to return an array of values

	var viewportwidth;
	var viewportheight;
	var result = new Array();

	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerWidth;
		viewportheight = window.innerHeight;
	}

	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth !='undefined' && document.documentElement.clientWidth != 0) {
		viewportwidth = document.documentElement.clientWidth;
		viewportheight = document.documentElement.clientHeight;
	}

	// older versions of IE
	else {
		viewportwidth = document.getElementsByTagName('body')[0].clientWidth;
		viewportheight = document.getElementsByTagName('body')[0].clientHeight;
	}

	result['width'] = viewportwidth;
	result['height'] = viewportheight;

	return result;
}
	
