
/*********************************
 *  Index.html functions                *
**********************************/

//So we can popup a popup
var jhPopup = null;


function jhToPopOrNot()
{
	
	if (screen.availHeight < 800)
	{
		jhPopupwindow('site.html','0','0','fscreen','0','0','0','1','0','0','0','0');
		jhPopup.focus();
	}
	else
	{
		location.href='site.html';
	}
}

//Copy & Paste popupfunction + jhPopup
function jhPopupwindow(link,name, width, height, type, top, left, scrollbars, resizable, status, titlebar, toolbar, menubar) 
{
	//if popup already exists  ->  it has the closed property -> so if not closed -> show it!
	if ((jhPopup) && (!jhPopup.closed))
	{
		jhPopup.focus();
		return;
	}


	width = screen.availWidth; 
	height = screen.availHeight; 
	top = 0; 
	left = 0; 

	
	//open popup & remember  it for next call
	jhPopup = window.open(link, name, 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars='+scrollbars+', resizable='+resizable+', status='+status+', titlebar='+titlebar+', toolbar='+toolbar+', menubar='+menubar);
}

function jhIndexOver()
{
	document.getElementById("jhIndex").src = "global/index_logo_over.jpg";	
}

function jhIndexOut()
{
	document.getElementById("jhIndex").src = "global/index_logo_off.jpg";	
}

/*********************************
 *  Preload - Keep on loading           *
**********************************/

//Adds additional path to files
var jhSetBaseDir = "";

var jhImageList = new Array();
var jhMenuName = "";

var jhArrNav = new Array(8);

//'Adjusted' add funtions so we can grab the images
function jhAddMenuItem( strMenuName, strMenuImageOff, strMenuImageOver, strMenuImageOn)
{	
	jhImageList[jhImageList.length]= jhSetBaseDir + strMenuImageOff;
	jhImageList[jhImageList.length]= jhSetBaseDir + strMenuImageOver;
	jhImageList[jhImageList.length]= jhSetBaseDir + strMenuImageOn;
}

function jhAddContent( strContentMenuName, strContentName, strContentThumbOff)
{
	jhImageList[jhImageList.length]= jhSetBaseDir + strContentThumbOff;
	//only preload first image from thumb list
	if (jhMenuName != strMenuName)
	{
		jhImageList[jhImageList.length]= jhSetBaseDir + strContentName;
		jhMenuName = strMenuName;
	}
}



//preload function
function jhIndexInit()
{
	var nCnt;
	
	imgObj = new Image();
	imgObj.src = "global/index_logo_over.jpg";
	
}

		

	





