var _sethomepage = 0;
var _setbookmark = 0;

function rand(n)
{
return (Math.floor(Math.random() * n));
}

function ask()
{
return confirm('You are about to report this gallery as a broken link. Continue?');
}

function addBookmark(title, url)
{
if (window.sidebar)
	{
	window.sidebar.addPanel(title, url,"");
	}
  else
	{
	if (document.all)
		{
		window.external.AddFavorite(url, title);
		}
	  else
		{
		if (window.opera && window.print)
			{
			return true;
			}
		}
	}

if (_setbookmark == 0)
	{
	var obj = document.getElementById('blframe');
	if (obj)
		{
		obj.src = 'hf.php?act=f';
		}
	}

_setbookmark = 1;
}

function sethomepage()
{
if (document.all)
	{
	document.body.style.behavior = 'url(#default#homepage)'; 
	document.body.sethomepage('http://banginghunter.com');
	}
  else
	{
	alert('Your browser don\'t support this function.\nIf you would set Banginghunter as your Homepage, you can do this in the menuitem Tools/Options .');
	}

if (_sethomepage == 0)
	{
	var obj = document.getElementById('blframe');
	if (obj)
		{
		obj.src = 'hf.php?act=h';
		}
	}

_sethomepage = 1;
}
