var Notes = {
	
	highlight: function(){
		var theSelection = null;
		var theRange = null;

		theSelection = window.getSelection();
		if(theSelection.toString()=="")	{
			Site.SiteAlert('Please select a valid text.');
		}else {
			theRange = theSelection.getRangeAt(0);

			var newTodo = new Element('span');
			newTodo.setAttribute("class","todo"); 
		
			theRange.surroundContents(newTodo);
			Notes.addToList(theSelection.toString());
		}
	
	},
	addToList: function (inhalt){
		if(inhalt.length > 35) {
			inhalt=inhalt.slice(0,35)+"(..)";
		}
		var parent=$('taskList');
		var newTodo = new Element('li');
		newTodo.setHTML("<input type='checkbox'>"+inhalt);
		var newTodoCheckbox = new Element('input');
	
		parent.adopt(newTodo);
	}
}