function floatwin(fw_conten){
	style = "display:none; position: absolute";
	fw_bg = '<div id="div_floatwin_bg" style="'+style+'; background-color:#000" onclick="floatwin_close()"></div>';
	fw_div = '<div id="div_floatwin" style="'+style+'" onclick="floatwin_close()"></div>';
	new Insertion.Bottom(document.body, fw_bg);
	new Insertion.Bottom(document.body, fw_div);
	new Insertion.Bottom('div_floatwin', fw_conten);
	$("div_floatwin_bg").setOpacity(0.6);
	floatwin_resize();
	$("div_floatwin_bg").show();
	$("div_floatwin").show();
	window.onscroll = function(){floatwin_on_scroll();};
	window.onresize = function(){floatwin_resize();};
}
function floatwin_resize(){
	$("div_floatwin_bg").style.height = document.viewport.getHeight()+"px";
	floatwin_on_scroll();
}
function floatwin_on_scroll(){
	fw_bg = $("div_floatwin_bg");
	wScroll = document.viewport.getScrollOffsets();
	fw_bg.style.left = wScroll.left+"px";
	fw_bg.style.top = wScroll.top+"px";
	fw_div = $("div_floatwin");
	fw_div.style.left = ( ( wScroll.left+( fw_bg.getWidth()-fw_div.getWidth() ) )/2)+"px";
	fw_div.style.top = (wScroll.top+30)+"px";
}
function floatwin_close(){
	elementos = ['div_floatwin_bg', 'div_floatwin'];
	elementos.each(
		function(e){
			$(e).remove();
		}
	);
	window.onscroll = '';
	window.onresize = '';
}

