
	function invitationPopup(object) {

		var newWindow = window.open(object,'htmlname','width=1,height=1','resizable=no');
		
		newWindow.document.write("<body topmargin='0' leftmargin='0' rightmargin='0' bottommargin='0'>");
		newWindow.document.write("<title>Invitation<\/title>");
		newWindow.document.write("<img src='" + object + "' id='imgId' \/>");
		
		var getImg = newWindow.document.getElementById('imgId');
		var iw = getImg.width;
		var ih = getImg.height;
		
		newWindow.resizeTo(iw,ih);
		
		var heightDiff = ih - newWindow.document.body.clientHeight;
		var actualHeight = ih + heightDiff;
		newWindow.resizeTo(iw,actualHeight);
		
		// Use below to determine the inner/client height in different browsers (not working currently.
		/*var theHeight;
		if (newWindow.window.innerHeight) {
		theHeight=newWindow.window.innerHeight;
		}
		else if (newWindow.document.documentElement && newWindow.document.documentElement.clientHeight) {
		theHeight=newWindow.document.documentElement.clientHeight;
		
		}
		else if (newWindow.document.body == true) {
		theHeight=newWindow.document.body.clientHeight;
		}*/
		
		newWindow.document.write("<\/body>");
		newWindow.document.close();
		return false;
		
	}