function swapHnav(stat,loc)
	{
	if (stat == "1")
		{
		$("#hnav").slideDown();
		$("#head-right").attr("src","./img/site/head-right-blank.jpg");
		}
		else if (stat == "0")
			{
			$("#lang").css("display","none");
			$("#preview").slideUp(50, function () {$("#content").hide(1000, function () {$("#hnav").css("float","left").animate({ width:"0px" }, function() {self.location.href = "?hnav="+loc})})});
			}
	}

function swapImg(img,stat)
	{
	if (document.images)
		{
		(stat == "on") ? (document.getElementById(img).src = eval(img + "_on.src")) : (document.getElementById(img).src = eval(img + "_off.src"));
		}
	}

function determineHead()
	{
	if ((document.images) && ($("#hnav").css("display") != "block"))
		{
		$("#head-right").attr("src","./img/site/head-right.jpg");
		}
	}

function preloadImages()
	{
	if (document.images)
		{
		for (var i = 0; i < preloadImages.arguments.length; i++)
			{
			(new Image()).src = preloadImages.arguments[i];
			}
		}
	}

function checkSubmit()
	{
	check = confirm("Are you sure you want to submit the information?");
	return check;
	}

function arrowNav(obj,dir) // requires jquery
	{
	var test = $("#content > div");
	var thumbs = $("#preview > img");
	var max = test.length-1;
	for (i=0; i<=max; i++)
		{
		if (test[i]['id'] == obj)
			{
			(i+dir>=0 && i+dir<=max) ? (n=i+dir) : ((i+dir<=0) ? (n=max) : (n=0));
			current = test[i]['id'];
			$(thumbs[i]).css("border","1px solid #fff");
			}
		}
	next = test[n]['id'];
	$("#"+current).fadeOut(300, function() {$("#"+next).fadeIn(300)});
	$(thumbs[n]).css("border","1px solid #2D4E59");
	}
	
function thumbNav(self,cur) // requires jquery
	{
	var test = $("#content > div:visible").fadeOut(300, function() {$("#"+cur).fadeIn(300)});
	var thumbs = $("#preview > img").css("border","1px solid #2D4E59");
	var active = $(self).css("border","1px solid #fff");
	}

