
function intro(src, img_width, img_height)
{
	var element;
	var img_width;
	var img_height;
	
	
	build();
	
	function get_img_size()
	{
		img = new Image();
		img.src = src;
		img_height = img.height;
		img_width = img.width;
		
	}
	
	function build()
	{
		//div = createElement('div');
		//div.setAtribute('id', 'intro');
		
		click_function = "onclick='this.close_window'";
		
		$('body').append("<div id='intro_bg' onclick='close_window()'></div>");
		$('body').append("<div id='intro' onclick='close_window()'><img src='"+ src +"' alt='' /></div>");
		
		
		
		//element.append("<input type='button' value");
		element = $('#intro');
		center();
		
	}
	
	function center()
	{
		//get_img_size();
	
		var center_x = $(window).width() / 2 - img_width / 2;
		var center_y = $(window).height() / 2 - img_height / 2 + $(window).scrollTop(); 
		element.css({
			left: center_x + 'px',
			top: center_y + 'px'
			
		});

	}
	
	close_window = function()
	{
		$('#intro').remove();
		$('#intro_bg').remove();
	
	}
	
}


