$(document).ready(function(){
	//for the add_module() function
	addTextClicked=0;
 });
function irritating_alert(times)
{
i = times;
while(i>0)
{
	alert('I warned you! Now you gotta press OK '+i+' times!');
	i--;
}
window.location='/';
}

function add_module(title, text)
{

container = document.getElementById('text-main');
the_text ='<div class="text-header" id="added-text-header">' + title + '</div><div id="added-text">' + text + '</div>';
if(addTextClicked==0 || addTextClicked==undefined)
{
container.innerHTML = container.innerHTML + the_text;
addTextClicked=1
}else if(addTextClicked==1)
{
$("#added-text-header").remove();
$("#added-text").remove();
addTextClicked=0;
}
}

function get_source_and_print(url)
{
	//code_holder=document.getElementById('code_holder');
	alert(url);
	$('#code_holder').load(url);
}


