window.onerror=null;
parent.Mainframe.location.href = "Homepage.htm";

/***                                            Work around for Microsofts latest bit of twatishness                                                  ***/
function RunFlash()
{
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
document.write('ID="Buttons" WIDTH="152" HEIGHT="262" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="../Flash/Buttons.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="../Flash/Buttons.swf" quality=high bgcolor=#000000  WIDTH="152" HEIGHT="262" swLiveConnect=true ID="Buttons" NAME="Buttons" ALIGN=""');
document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT>');
}

/*** 						Counters & position markers					***/

currentpage				= 0;

/*** 						Messages												***/

window.defaultStatus	='Pinguey.com';
statusm 					= new Array(7);
statusm[0]				= "Visit the Pinguey Home Page";
statusm[1]				= "Peruse the Pinguey Portfolio";
statusm[2]				= "Find out more about Pinguey";
statusm[3]				= "Check out my Lifestyle Options";
statusm[4]				= "The Miscellaneous Page";
pages 					= new Array(7);
pages[0]					= "Homepage.htm";
pages[1]					= "Portfol.htm";
pages[2]					= "About.htm";
pages[3]					= "Lifstyle.htm";
pages[4]					= "Misc.htm";
subpage					= new Array(6);
	for (i=1; i < 7; i++) 
	{
   subpage[i] = new Array(5)
   }
subpage[1][1]			= "#top";
subpage[1][2]			= "#weblog";
subpage[1][3]			= "#geneal";
subpage[2][1]			= "#top";
subpage[2][2]			= "#webdes";
subpage[2][3]			= "#anigam";
subpage[2][4]			= "#grapht";
subpage[3][1]			= "#top";
subpage[3][2]			= "#thearly";
subpage[3][3]			= "#thmiddle";
subpage[3][4]			= "#threcent";
subpage[4][1]			= "#top";
subpage[4][2]			= "#art";
subpage[4][3]			= "#food";
subpage[4][4]			= "#travel";
subpage[5][1]			= "#top";
subpage[5][2]			= "#marginal";
subpage[5][3]			= "#obscure";
subpage[5][4]			= "#bizarre";

/***                       Flash Bits                          ***/

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function Buttons_DoFSCommand(command, args) {
  	var ButtonsObj = InternetExplorer ? Buttons : document.Buttons;
//agree=confirm("fscommand "+command+","+args);
	if (command=="over")
		{
		p=args-1;
		parent.frames.Botdisp.message(p+6);
		window.status=statusm[p];
		}
	else if (command=="out")
		{
		window.status=window.defaultStatus;
		parent.frames.Botdisp.message(currentpage+1);
		}
	else if (args==0)
		{
		p=command-1;
		Swapscreen(p);
		}
	else
		{
		//agree=confirm("sub opt "+command+","+args+" "+pages[currentpage]+subpage[command,args]);
		top.frames[2].location=pages[currentpage]+subpage[command][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 Buttons_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call Buttons_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}

/***								Functions									***/

function Mout(p)
  {
	if (p!=currentpage)
		{
  		document.images["button0"+p].src = buttonsout.src;
  		document.images["displa0"+p].src = displayout.src;
		
		}
  }

function Swapscreen(p)
	{
//agree=confirm("swapscreen "+pages[p]);
	currentpage = p;
	top.frames[2].location=pages[p];
	parent.frames.Botdisp.message(p+1);
	window.status=window.defaultStatus;
	}
