function ll_processlayer(ci_root) {	
	ll_processdata(ci_root);
}

function ll_processpopup(ci_root,data,width,height) {
	var panelcontents = '';
	$(".shadow").css("height", $(document).height());
	var line_height = height-35;
	var scroll_able_width = width - 20;
	var scroll_able_height = height - 10;
	panelcontents += '<div class="layer" style="width: '+width+'px; height: '+height+'px; padding-top: 10px;" align="center">';
	panelcontents += '<div class="close"><img src="'+ci_root+'images/library_close.png" width="22" /></div>';	
	panelcontents += '<div class="scrollable" style="width: '+scroll_able_width+'px; height: '+scroll_able_height+'px; background-color: #eeeeee;">';
	panelcontents += '<ul>';
	panelcontents += '<li class="logo"><img width="135" src="'+ci_root+'images/humbugtelecom.png" />';
	panelcontents += '<div class="hb_info" style="margin-top:100px;text-align:center;"> <a href="http://secure.humbuglabs.org" class="register">Test out the new <br/>Humbug Analytics Beta <br/>version 3.0 Silver Hawk!</a></div>';
	panelcontents += '</li>';
	panelcontents += '<li class="sep" style="height: '+line_height+'px; width: 2px;"></li>';
	panelcontents += '<li class="layercontent">'+data+'</li>';
	panelcontents += '</ul>';
	panelcontents += '</div>';
	panelcontents += '</div>';
	$(".panel").hide();
	$(".panel").html(panelcontents);
	$(".panel").fadeIn("slow");
	
	$("#finish_setup").click(function(e){
		window.location.reload();
	});
	$(".close").click(function(e){
		$(".panel").html('');
		$(".shadow").hide();
	});
}

function ll_processdata(ci_root) {
	$.post(ci_root+'index.php/setup',
			{
			},
			function(e){
				ll_processpopup(ci_root,e);
			});
}
