function doLocation(href_msg,confirm_msg) {

	if(confirm_msg){

		if(confirm(confirm_msg))

			document.location = href_msg;

	}		

	else

		document.location = href_msg;

}





function showSubmenu(submenu_id) {

	submenu = document.getElementById(submenu_id);

	if(submenu.style.display == 'inline')

		submenu.style.display = 'none';

	else

		submenu.style.display = 'inline';

}





function hideSubmenu() {

	document.getElementById('submenu_logs').style.display = 'none';

	document.getElementById('submenu_ban').style.display = 'none';

	document.getElementById('submenu_reports').style.display = 'none';

}





function setMenuColorHover(menu_id) {

	menu = document.getElementById(menu_id);

	menu.style.color = '#aa0000';

}





function setMenuColor(menu_id) {

	menu = document.getElementById(menu_id);

	menu.style.color = 'blue';

}



function banQuestion() {

	ip = document.getElementById('ip').value;

	if(confirm('Do you really want to ban the IP ' + ip + ' ?'))

		ban_form.submit();

}



function img(url,title,width,height) {

     newWin=open("", "img", "resize=tes,status=no,toolbar=no,menubar=no,scrollbars=yes,width="+width+",height="+height);

     newWin.document.open();

     newWin.document.location=url;

     newWin.document.close();

     newWin.focus();

     return false;

}

function addBookmark(url,desc){
    var bookmarkurl      = url;
    var bookmarktitle    = desc;
    var nonie            = 'Sorry, only Mozilla Firefox and Internet Explorer support this method to add a bookmark/favourite\n But please feel free to visit the site\'s home page to add a bookmark manually';

    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(bookmarktitle, bookmarkurl,"");
    } else if(document.all){ // IE Favourites
        window.external.AddFavorite(bookmarkurl,bookmarktitle);
    } else {
        alert(nonie);
    }
}