var wp = window.parent;
var wpfm = wp.frames["main"];
var btns = document.getElementsByTagName("TD");
var isIE = navigator.appName.search(/microsoft/i) != -1;

function btnClick(n)
	{
	if(this.id == 10)//Newsletter
		{
		n = winXY();
		window.open("http://www.pfp.org/Newsletter/Newsletter-PFP.pdf", "", "height=450,width=650,top="+n.y+",left="+n.x+",menubar=no,resizable=yes,titlebar=no,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no");
		return;
		}
	if(this.id == 12)//Staff Only (email)
		{
		n = winXY();
		window.open("http://mail.pfp.org/exchange", "", "height=450,width=650,top="+n.y+",left="+n.x+",menubar=no,resizable=yes,titlebar=no,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no");
		return;
		}
	n = "http://www.pfp.org/";
	switch(parseInt(this.id))
		{
		case 2: n += "links.htm"; break;
		case 3: n += "whatsnew.htm"; break;
		case 4: n += "employment.htm"; break;
		case 5: n += "ISB/isb01.htm"; break;
		case 6: n += "transport.htm"; break;
		case 7: n += "211/211Main.html"; break;
		case 8: n += "WebSetup/software.htm"; break;
		case 9: n += "jobs/employment.html"; break;
		case 11: n += "contact.htm"; break;
		default: n += "home.htm";
		}
	if(wpfm)
		{
		wpfm.location = n;
		}
	else
		{
		window.location = n;
		}
	}

function winXY(n)
	{
	n = {x:0,y:0};
	try
		{
		n.x = isIE ? wp.screenLeft + 25 : wp.screenX + 25;
		n.y = isIE ? wp.screenTop - 50 : wp.screenY + 25;
		}
	catch(e)
		{
		n.x = 15;
		n.y = 25;
		}
	return n;		
	}

function init()
	{
	for(var i=0;i<btns.length;i++)
		{
		btns[i].onclick = btnClick;
		btns[i].onmousedown = function(){this.className = "mDown";}
		btns[i].onmouseout = function(){this.className = "mOut";status = "People For People";}
		btns[i].onmouseover = btns[i].onmouseup = function(){this.className = "mOver";status = this.innerText;}
		}
	status = "People For People";
	}

init();