function swapHnav(stat,loc)
	{
	if (stat == "1")
		{
		$("#hnav").slideDown();
		}
		else if (stat == "0")
			{
			$("#footer").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 preloadImages()
	{
	if (document.images)
		{
		for (var i = 0; i < preloadImages.arguments.length; i++)
			{
			(new Image()).src = preloadImages.arguments[i];
			}
		}
	}

function showImprint()
	{
	imprint = window.open("./imprint.htm","imprint","'toolbars=0,location=0,scrollbars=1,statusbars=0,menubars=0,resizable=0,width=500,height=350,left=50,top=50");
	}

function checkSubmit()
	{
	check = confirm("Are you sure you want to submit the information?");
	return check;
	}
	
function arrowNav(dir) // requires jquery
	{
	curr = $("#content > div:visible");
	objid = $(curr).attr('id');
	allthumbs = $("#preview > img");
	next = $("#thumb-"+objid+" + img").attr('id');
	oObj = $("#preview > img").index($("#thumb-"+objid));
	if ((oObj>0) && (dir=="left")) $(allthumbs[oObj-1]).trigger('click');
	if (next && dir=="right") $("#"+next).trigger('click');
	}

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 #677372");
			}
		}
	next = test[n]['id'];
	$("#"+current).fadeOut(300, function() {$("#"+next).fadeIn(300)});
	$(thumbs[n]).css("border","1px solid #FF6B00");
	}
	
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 #677372");
	var active = $(self).css("border","1px solid #FF6B00");
	}

