// <!--

// each button labeled: buttonX; where X indicates its index
// each foyer image labeled: imageY; where Y indicates its index

var supported = 0;

if ( ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3)) ||
	 ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) > 3)) )
	 supported = 1;

var totButtons = 6;
var foyerImages = new Array(totButtons * 2);
var buttonImages = new Array(totButtons * 2);
var typeImages = new Array(totButtons * 2);
var questTypes = new Array(2);

function addImage(index, width, height, stat, strImage, arrayName)
{
	if (supported)
	{
		var on = stat * totButtons;
		foyerImages[index + on] = new Image(width, height);
		foyerImages[index + on].src = strImage;
	}
}

function addButton(index, width, height, stat, strImage)
{
	if (supported)
	{
		var on = stat * totButtons;
		buttonImages[index + on] = new Image(width, height);
		buttonImages[index + on].src = strImage;
	}
}

function addType(index, width, height, stat, strImage)
{
	if (supported)
	{
		var on = stat * totButtons;
		typeImages[index + on] = new Image(width, height);
		typeImages[index + on].src = strImage;
	}
}

addImage(0, 70,70,0,'html/images/transpix.gif');
addImage(1, 70,70,0,'html/images/foyer/off_aboutus.gif');
addImage(2, 70,70,0,'html/images/foyer/off_news.gif');
addImage(3, 70,70,0,'html/images/foyer/off_programs.gif');
addImage(4, 70,70,0,'html/images/foyer/off_links.gif');
addImage(5, 70,70,0,'html/images/foyer/off_partners.gif');
addImage(6, 70,70,0,'html/images/foyer/off_contacts.gif');
addImage(1, 70,70,1,'html/images/foyer/on_aboutus.gif');
addImage(2, 70,70,1,'html/images/foyer/on_news.gif');
addImage(3, 70,70,1,'html/images/foyer/on_programs.gif');
addImage(4, 70,70,1,'html/images/foyer/on_links.gif');
addImage(5, 70,70,1,'html/images/foyer/on_partners.gif');
addImage(6, 70,70,1,'html/images/foyer/on_contacts.gif');

addButton(1, 140,20,0,'html/images/buttons/off_aboutus.gif');
addButton(2, 140,20,0,'html/images/buttons/off_news.gif');
addButton(3, 140,20,0,'html/images/buttons/off_programs.gif');
addButton(4, 140,20,0,'html/images/buttons/off_links.gif');
addButton(5, 140,20,0,'html/images/buttons/off_partners.gif');
addButton(6, 140,20,0,'html/images/buttons/off_contacts.gif');
addButton(1, 140,20,1,'html/images/buttons/on_aboutus.gif');
addButton(2, 140,20,1,'html/images/buttons/on_news.gif');
addButton(3, 140,20,1,'html/images/buttons/on_programs.gif');
addButton(4, 140,20,1,'html/images/buttons/on_links.gif');
addButton(5, 140,20,1,'html/images/buttons/on_partners.gif');
addButton(6, 140,20,1,'html/images/buttons/on_contacts.gif');

addType(10, 236,70,0,'html/images/transpix.gif');
addType(20, 236,70,0,'html/images/transpix.gif');
addType(30, 236,70,0,'html/images/transpix.gif');
addType(1, 236,70,0,'html/images/pictures/aboutus_pic.gif');
addType(2, 236,70,0,'html/images/pictures/news_pic.gif');
addType(3, 236,70,0,'html/images/pictures/programs_pic.gif');
addType(4, 236,70,0,'html/images/pictures/links_pic.gif');
addType(5, 236,70,0,'html/images/pictures/partners_pic.gif');
addType(6, 236,70,0,'html/images/pictures/contacts_pic.gif');

if (supported)
{
	questTypes[0] = new Image(176,47);
	questTypes[0].src = "html/images/transpix.gif";
	questTypes[1] = new Image(176,47);
	questTypes[1].src = "html/images/pictures/quest_txt.gif";
}


function swap(index, action)
{
	if (supported)
	{
		var rowNum = parseInt(eval((index + 1) / 2));
		document.images["type" + rowNum].src = typeImages[(index * action) + ((rowNum * 10) * (1 - action))].src;
		document.images["image" + index].src = foyerImages[index + (totButtons * action)].src;
		document.images["button" + index].src = buttonImages[index + (totButtons * action)].src;
	}
}

function questSwap(action)
{
	if (supported)
	{
		document.images["quest"].src = questTypes[action].src;
	}
}

function dispStatus(text)
{
	if (supported)
	{
		window.status = text;
	}
}

// -->
