/*-----------------------------------------------------------------------------
common.js

Functions used by all Virtually Hitched pages
-----------------------------------------------------------------------------*/

// confirm logout
function doLogout()
{
	return (confirm("Are you sure you wish to log out?"));
}

// display confirmation pop-up
// default message is "Are you sure?" but will accept optional parameter for custom message
function doConfirm()
{
	if (doConfirm.arguments.length == 1)
	{
		return (confirm(doConfirm.arguments[0]));
	}
	else 
	{
		return (confirm("Are you sure?"));
	}
}


// handle clicks on the page header
function headerOnClick()
{
	window.location= "home.vh";
}

// register clicks on the page header
function _registerHeaderOnClick()
{
	if (document.getElementById)
	{
		e= document.getElementById("vhHeader");

		if (e)
		{
			e.onclick= headerOnClick;
			e.style.cursor= "hand";
			e.title= "Go to the VirtuallyHitched.com homepage";
		}
	}
}

if (window.zapLoader)
{
	window.zapLoader.add(_registerHeaderOnClick);
}
