var currentnumber = 0
var isInit = true;
//var openNav = false;
var MenuTween;

function initnavitems()
{
	
		var initpath = document.getElementById("navhome");
		initpath.style.left="0px"
		initpath.style.top="0px"
		MenuTween = new JSTween("MenuTween","navhome",10);
		MenuTween.Move(30,0);

		var contentpath = document.getElementById("navhome");
		contentpath.style.display="block";

}

function initGallery()
{
	//only display tween if the div is not displayed
	
	if (is_dom_open==0){
		//div is at -395 so move it to 0,0 or 395
		var initpath = document.getElementById("globalWrapper");
		initpath.style.left="0px"
		initpath.style.top="0px"
		MenuTween = new JSTween("MenuTween","globalWrapper",10);
		MenuTween.Move(395,0);

		var contentpath = document.getElementById("globalWrapper");
		contentpath.style.display="block";

		
		location.href='#toppageanchor';
		is_dom_open=1;
		//alert("hit")
	}else{
		//mopve to the start of the div at 0,0
		var initpath = document.getElementById("globalWrapper");
		MenuTween = new JSTween("MenuTween","globalWrapper",10);
		MenuTween.Move(0,0);

		var contentpath = document.getElementById("globalWrapper");
		contentpath.style.display="block";

		
		//location.href='#toppageanchor';
		is_dom_open=0;
	location.href='#toppageanchor';
	}
}
var is_dom_open = 0;
function initCloseGallery()
{

	var initpath = document.getElementById("globalWrapper");
	initpath.style.left="-16px"
	initpath.style.top="0px"
	MenuTween = new JSTween("MenuTween","globalWrapper",10);
	MenuTween.Move(-537,-16);

	var contentpath = document.getElementById("globalWrapper");
	contentpath.style.display="block";

	is_dom_open = 0
}


function initContact()
{
	
	var initpath = document.getElementById("tweencontact");
	initpath.style.left="-16px"
	initpath.style.top="-537px"
	MenuTween = new JSTween("MenuTween","tweencontact",10);
	MenuTween.Move(0,-16);

	var contentpath = document.getElementById("tweencontact");
	contentpath.style.display="block";

}

function initCloseContact()
{

	var initpath = document.getElementById("tweencontact");
	initpath.style.left="-16px"
	initpath.style.top="0px"
	MenuTween = new JSTween("MenuTween","tweencontact",10);
	MenuTween.Move(-537,-16);

	var contentpath = document.getElementById("tweencontact");
	contentpath.style.display="block";

}