function closewindow()
        {
        	$("TB_overlay").onclick = null;
            document.onkeyup = null;
            document.onkeydown = null;
            
        	$( "#wrapper" ).remove();
        	return false;
        }

        var infoText = $.cookie('info_text');
        var infoTextWas = $.cookie('info_text_was');
        var d = new Date();

        d.setDate(d.getDate()+1);

        if (!infoText)
        {
        	$.cookie('info_text', '1', { expires: d });
        }	
        if (!infoTextWas)
        {
        	$.cookie('info_text_was', '1', { expires: d });
        
        	$(document).ready(function() {
        	    $.post("../usage/info_texts.php", { func: "getNameAndTime" },
        	  	function(data){		
        	             				
        	            jQuery("<div />")
        	             .attr( "id", "TB_window")
        	             .html( "<div id='TB_Content'><img src='../images/texts/" + data.image + "' alt='' /></div>")
        	             .css({ left: (($(window).width() - data.width) / 2) + "px",
        	             		right: (($(window).width() - data.width) / 2)-8 + "px",
        	             		top: (($(window).height() - data.height) / 2) + "px"})
        	             .appendTo( jQuery( "#wrapper" ) );     		     	
        	  	}, "json"); 
        	    
        		         jQuery("<div>")
        	             .attr( "id", "TB_overlay")
        	             .css({ opacity: "0.6",
        	             		width: $(window).width() + "px",
        	             		height: document.body.scrollHeight + "px" }) 		
        	             .appendTo( jQuery( "#wrapper" ) );
        	     
        		 $("#wrapper").click( function() { closewindow() } );
        	});
        }

