
function showMap()
{
window.open('large-map.htm','map','width=780,height=620,toolbar=no,menubar=no');
window.map.focus();
}

panels = new Array('home','about','services','radio','strongroom','contact')

function getRef(link)
{
if (document.all && (!document.getElementById) )
	{
		return document.all[link]
	}
else if(document.getElementById)
	{
		return document.getElementById(link)
	}
}



function hideAll()
{
for (i=0; i<panels.length; i++)
	{
	if (document.all && (!document.getElementById) ) // ie4,5
		{
		document.all[panels[i] + "-sidebar"].style.display = "none";
		document.all[panels[i] + "-content"].style.display = "none";
		}
	if(document.getElementById) // ie 5.5+
		{
		document.getElementById(panels[i] + "-sidebar").style.display = "none";
		document.getElementById(panels[i] + "-content").style.display = "none";
		}
	}
}

function show(link)
{
sidebar = getRef(link + "-sidebar");
sidebar.style.display = "block";
content = getRef(link + "-content");
content.style.display = "block";
}

function go(link)
{
  		hideAll();
		show(link)
		//location.hash=args
}
		
function largeText(link)
{
if (document.getElementById)
	{
	if(link=="true")
		{
			document.getElementById("largeText").disabled=false;
		}
	if(link=="false")
		{
			document.getElementById("largeText").disabled=true;
		}
	}
}

function MapTextSize()
{
	document.getElementById("largeText").disabled=!(document.getElementById("largeText").disabled);
}


document.getElementById("largeText").disabled=true;//fix ie bug that defaults all styles to false



//:::::::::::::::go::::::::::::::::

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function header_DoFSCommand(command, args)
{
  var headerObj = InternetExplorer ? header : document.header;
  //
  // Place your code here...
  //
   	if (command == "go")
	{
		go(args)
	}
	if (command == "FSCommand:go")
	{
		go(args)
	}
	
	if (command == "makeTextLarge")
	{
		largeText(args)
	}
	if (command == "FSCommand:makeTextLarge")
	{
		largeText(args)
	}

		
}
// Hook for Internet Explorer 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub header_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call header_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
//-->


//:::::::::::: detect items
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&  navigator.userAgent.indexOf("Windows") != -1)
	{
	ieWin = true
	}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&  navigator.userAgent.indexOf("Mac") != -1)
	{
	ieMac = true
	}
	

// detect Flash
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}


function writeEmail(to, subject, text)
{
if (!subject)
	{
	subject =""
	}
if (!text)
	{
	text =  to + '@macmi' + 'llanestate.com' 
	}
line = '<a href="mailto:' + to + '@macmil' + 'lanestate.com?subject=' + subject + '">' + text + '</a>'
document.write(line)
}




function thankyouStrongroom()
{
window.open('thankyou-strongroom.htm','info_window','menubar=0,resizable=1,width=680,height=520,toolbar=no,scrollbars=yes');
return false;
}
	


function infoPopup(link)

{

window.open(link.href,'info_window','menubar=0,resizable=1,width=700,height=520,toolbar=no,scrollbars=yes');

return false;

}