
function setNavigationPath(html){
	$('navpath').innerHTML = html;
}

function setActivePath(html){
	$('activepath').innerHTML = html;
}

function addToShortCuts(menuID, name){
	if(!name)
		name = prompt('Please give a name for this shortcut', '');

	if(name){
		postData('index.php?functionID=18&action=saving/shortcut&shortcutmenuID='+menuID+'&name='+encodeURIComponent(name), '', function(){
			//loadDivURL('subBox'+menuID, 'index.php?functionID=18&action=views/shortcuts&shortcutmenuID='+menuID);
			location.href='?';
		}
		);
	}
}

function setLastURL(url){
	postData('index.php?functionID=18&action=saving/lasturl&url='+encodeURIComponent(url));
}

function showPage(url){
	updatePopularLinks(url);
	location.href = url;
}


function popUp(url, title){
	updatePopularLinks(url, title);
	window.open(url, '_blank');
}

function openWindow(ahref){
	window.open(ahref.href, '_blank');
	return;
}

function updatePopularLinks(url, title){
	postData('index.php?functionID=4&action=saving/updatelinks&url='+encodeURIComponent(url)+'&title='+encodeURIComponent(title));
}

function search(){
	var field = $('search');
	if(field.value == '') return;

	location.href = 'index.php?functionID=19&action=views/searchresult&searchtext='+encodeURIComponent(field.value);
}