function addToBookmark()
{
	if (navigator.appName != 'Microsoft Internet Explorer')
		window.sidebar.addPanel(pageTitle, window.location.href, "");
	else
		window.external.AddFavorite(window.location.href, pageTitle);
}

function getLink(o)
{
	return (o instanceof  String || typeof o == "string") ? o : o.getAttribute('href');
}

function openWindow(o)
{
	var win = window.open(getLink(o));
	win.focus();
	return false;
}

function openPopup(url, w, h)
{
	var feats = '';
	var props = { width: w || screen.width, height: h || screen.height, resizable: 'no', location: 'no', status: 'no', menubar: 'no', toolbar: 'no'};
	for(prop in props) 
		feats = feats + prop + '=' + props[prop] + ',';
	prop_str = prop_str.substr(0, feats.length - 1);
	
	var link = getLink(o);
	var newWindow = window.open(link, '_blank', prop_str );
	if( newWindow )
	{
		if(newWindow.focus)
			newWindow.focus();
		return false;
	}
	return true;
}