
var currentDivId = "home";

function gotoSelectExternal(elementId)
{
	var selectElement = document.getElementById(elementId);
	var selectedOptionIndex = selectElement.selectedIndex;
	var selectedOption = selectElement.options[selectedOptionIndex];
	var selectedValue = selectedOption.value;
	selectElement.selectedIndex = 0;
	
	if (selectedValue != "")
	{
		window.open(selectedValue);	
	}
}

function gotoSelect(elementId)
{
	var selectElement = document.getElementById(elementId);
	var selectedOptionIndex = selectElement.selectedIndex;
	var selectedOption = selectElement.options[selectedOptionIndex];
	var selectedValue = selectedOption.value;
	selectElement.selectedIndex = 0;
	
	if (selectedValue != "")
	{
		window.location = selectedValue;	
	}
}

function divVisible(divId)
{
	if (currentDivId != divId)
	{
		if (currentDivId == 'home')
			document.getElementById("flashcontent2").innerHTML = "";
		if (divId == 'home')
			document.getElementById("flashcontent2").innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="201" height="140" id="commercial01" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="commercial01.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="commercial01.swf" quality="high" bgcolor="#ffffff" width="201" height="140" name="commercial01" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';

		document.getElementById(currentDivId).innerHTML =
			document.getElementById(currentDivId + "Stuff").innerHTML;
		
		document.getElementById("pageContent").innerHTML = 
			"<div id='" + divId + "Stuff'>" +
			document.getElementById(divId).innerHTML +
			"</div>";
		
		currentDivId = divId;
		
		loadSwf();
	}
}


function loadSwf() 
{
	var so = new SWFObject("njoycard.swf", "njoycard", "500", "300", "7", "#ffffff");
	so.useExpressInstall('expressinstall.swf');
	so.write("flashcontent");
}
