// JavaScript Document

function getStaffPage(storyid)
{
	tmpUrl = "/staff.asp?storyid=" + storyid;
	window.open(tmpUrl,"_blank", "height=620, width=620");
}

function showDisclaimer(index)
{
	var tmpText;
	switch(index)
	{
		case 1:
		tmpText = "Horizons Community Church presents these opportunities without any kind of endorsement or recommendation, either implicit or explicit. By clicking 'OK' you agree to hold Horizons Community Church harmless for the consequences of the results of any future involvement in them you decide to pursue."
		break;
		
		case 2:
		tmpText = "The information presented on this site is for Horizons Community Church shareholders, fund members and associates only, and is not to be used for the purposes of personal solicitation. By clicking 'OK' you agree that you will not misuse any information gathered from this site for any purpose other than that for which it is presented."
		
		break;
	}
	if(confirm(tmpText))
	{
	}
	else
	{
		window.location = document.referrer;
	}
}

var sessionTimer;
//setTimeout("showTimeout()", 60000);

function showTimeout()
{
	if(confirm("Your session is about to timeout. If you wish to continue, click OK below to refresh your session."))
	{
		tmpUrl = "/timeout.asp";
		window.showModalDialog(tmpUrl,"","dialogHeight:1px;dialogWidth:1px");
		setTimeout("showTimeout()", 60000);
	}
}

function getAttachment(file, index)
{
	showDisclaimer(index);
	window.open(file);
}


function showGallery(sid)
{
	window.open("/gallery.asp?sid=" + sid,"Gallery","height=600,width=450,scrollbars=yes,left=200,top=200");
	
}
