﻿$(document).ready(function(){
		

	//Collapse sitemap
	$("#sitemap a.collapse").each(
		function(i) {
			//Hide the child uls
			var parent = $(this).parent();
			$("ul", parent).hide();
			
			$(this).click(
				function() {
					var parent = $(this).parent();
					if($("ul", parent).is(':hidden')) {
						$("ul", parent).show();	
						return false;
					}
				});
		});
		
});


function CreateBookmarkLink() { 

	title = "BSI Talking Business Continuity";   
	url = document.location.href;
	
	if (window.sidebar) { 
		// Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");	
	} else if ( window.external ) { 
		// IE Favorite
		window.external.AddFavorite( url, title); 
	} else if(window.opera && window.print) { 
		// Opera Hotlist
		return true; 
	}	
}

var popup;

function showPopUp(url, width, height, scrollbars)
{
	if (scrollbars == null) scrollbars = 'no';
	popup = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrollbars + ',resizable=no,width=' + width + ',height=' + height + ',top=100,left=100');
	popup.focus();
}

function showNewWindow(url)
{
	popup = window.open(url,'popup','');
	popup.focus();
}