// tpix.js: shared JavaScript for Tactile Pictures web site

// -----------------------------------------------------------------------------------
// BrowserCheck Object
// provides most commonly needed browser checking variables
// 19990326
// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/
function BrowserCheck() {
    var agt=navigator.userAgent.toLowerCase(); 
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
    this.mac = (agt.indexOf("mac")!=-1);
	this.win = (agt.indexOf("win")!=-1);
    this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	this.ie55 = (navigator.userAgent.indexOf('MSIE 5.5')>0)
	if (this.ie5) this.v = 5
	this.min = (this.ns||this.ie); // this.ie && this.win;
}

// automatically create the "is" object
var is = new BrowserCheck()
// end BrowserCheck Object;
// -----------------------------------------------------------------------------------

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function fwLoadMenus() {
  var home = document.links[0].href;
  var path = "location='" + (home ? home.substring(0, home.length - 10) : "");
  var font = "Verdana, Arial, Helvetica, sans-serif";
  var fs = (is.win && is.ns ? 10 : 9);
  if (window.fw_menu_0) return;
  window.fw_menu_0 = new Menu("root",160,16,font,fs);
  fw_menu_0.addMenuItem("Democracy Now!",path+"portfolio/cl_dnow.html'");
  fw_menu_0.addMenuItem("Earthsummit.biz",path+"portfolio/cl_earthsummit.html'");
  fw_menu_0.addMenuItem("ECA Watch",path+"portfolio/cl_eca1.html'");
  fw_menu_0.addMenuItem("Environmental Grantmakers Association",path+"portfolio/cl_ega.html'");
  fw_menu_0.addMenuItem("Enviros Against War",path+"portfolio/cl_ewar.html'");
  fw_menu_0.addMenuItem("FNTG",path+"portfolio/cl_fntg1.html'");
  fw_menu_0.addMenuItem("50 Years is Enough",path+"portfolio/cl_fyie1.html'");
  fw_menu_0.addMenuItem("Frequency Technology",path+"portfolio/cl_freq1.html'");
  fw_menu_0.addMenuItem("Friends of the Earth Int'l",path+"portfolio/cl_foei1.html'");
  fw_menu_0.addMenuItem("GLMA",path+"portfolio/cl_glma1.html'");
  fw_menu_0.addMenuItem("Greenbelt Alliance",path+"portfolio/cl_green.html'");
  // fw_menu_0.addMenuItem("Heather Ash",path+"portfolio/cl_ash1.html'");
  fw_menu_0.addMenuItem("HRFunders.org",path+"portfolio/cl_ihrfg.html'");
  fw_menu_0.addMenuItem("Jenifer Altman Foundation",path+"portfolio/cl_jaf1.html'");
  // fw_menu_0.addMenuItem("Level Playing Field Institute",path+"portfolio/cl_lpfi.html'");
  fw_menu_0.addMenuItem("Milenet",path+"portfolio/cl_mile2.html'");
  fw_menu_0.addMenuItem("NAATA",path+"portfolio/cl_naat1.html'");
  fw_menu_0.addMenuItem("NAMAC",path+"portfolio/cl_namac1.html'");
  fw_menu_0.addMenuItem("SF Education Fund",path+"portfolio/cl_sfef1.html'");
  fw_menu_0.addMenuItem("Silicon Valley Debug",path+"portfolio/cl_dbug1.html'");
  fw_menu_0.hideOnMouseOut=true;
  window.fw_menu_1 = new Menu("root",140,16,font,fs);
  fw_menu_1.addMenuItem("FNTG",path+"portfolio/cl_fntg1.html'");
  fw_menu_1.addMenuItem("Food Chain",path+"portfolio/cl_food1.html'");
  fw_menu_1.addMenuItem("JustAct",path+"portfolio/cl_just1.html'");
//  fw_menu_1.addMenuItem("Level Playing Field Institute",path+"portfolio/cl_lpfi.html'");
  fw_menu_1.addMenuItem("Milenet",path+"portfolio/cl_mile1.html'");
  fw_menu_1.addMenuItem("Timogen Systems",path+"portfolio/cl_timo1.html'");
  fw_menu_1.addMenuItem("Xochitl Films",path+"portfolio/cl_xoch2.html'");
   fw_menu_1.hideOnMouseOut=true;
  window.fw_menu_2 = new Menu("root",160,16,font,fs);
  fw_menu_2.addMenuItem("Command Audio",path+"portfolio/cl_caudio1.html'");
  fw_menu_2.addMenuItem("Apple Computer",path+"portfolio/cl_appl1.html'");
  fw_menu_2.addMenuItem("DirectSound Xtra",path+"portfolio/cl_dsx1.html'");
  fw_menu_2.addMenuItem("Imergy",path+"portfolio/cl_imgy1.html'");
  fw_menu_2.addMenuItem("Macromedia",path+"portfolio/cl_mmsw1.html'");
  fw_menu_2.addMenuItem("MOTO Development",path+"portfolio/cl_moto1.html'");
   fw_menu_2.hideOnMouseOut=true;
  window.fw_menu_3 = new Menu("root",140,16,font,fs);
  fw_menu_3.addMenuItem("Bridge Medical",path+"portfolio/cl_bmed1.html'");
  fw_menu_3.addMenuItem("Bridge Design",path+"portfolio/cl_brdg1.html'");
  fw_menu_3.addMenuItem("Command Audio",path+"portfolio/cl_caudio1.html'");
  fw_menu_3.addMenuItem("Milenet",path+"portfolio/cl_mile1.html'");
  fw_menu_3.addMenuItem("MJuice.com",path+"portfolio/cl_mjuice1.html'");
   fw_menu_3.hideOnMouseOut=true;
  window.fw_menu_4 = new Menu("root",140,16,font,fs);
  fw_menu_4.addMenuItem("Berkeley Systems",path+"portfolio/cl_bsi1.html'");
  fw_menu_4.addMenuItem("CybrCard",path+"portfolio/cl_cybr1.html'");
  fw_menu_4.addMenuItem("Dentsu-Tec",path+"portfolio/cl_dent1.html'");
  fw_menu_4.addMenuItem("IDEO",path+"portfolio/cl_ideo1.html'");
  fw_menu_4.addMenuItem("MTV.com",path+"portfolio/cl_mtv1.html'");
  fw_menu_4.addMenuItem("NetObjects",path+"portfolio/cl_nobj1.html'");
  fw_menu_4.addMenuItem("OM Records",path+"portfolio/cl_amax1.html'");
  fw_menu_4.addMenuItem("Tactile12000",path+"portfolio/cl_12000.html'");
   fw_menu_4.hideOnMouseOut=true;
  window.fw_menu_5 = new Menu("root",188,16,font,fs);
  fw_menu_5.addMenuItem("BRIDGES",path+"portfolio/cl_lafet.html'");
  fw_menu_5.addMenuItem("Center for Economic Justice",path+"portfolio/cl_wbbb.html'");
  fw_menu_5.addMenuItem("Commonweal",path+"portfolio/cl_che.html'");
  fw_menu_5.addMenuItem("Democracy Now!",path+"portfolio/cl_dnow.html'");
  fw_menu_5.addMenuItem("Earthsummit.biz",path+"portfolio/cl_earthsummit.html'");
  fw_menu_5.addMenuItem("Environmental Grantmakers Association",path+"portfolio/cl_ega.html'");
  fw_menu_5.addMenuItem("Environmentalists Against War",path+"portfolio/cl_envirosagainstwar.html'");
  fw_menu_5.addMenuItem("ECA Watch",path+"portfolio/cl_eca1.html'");
  fw_menu_5.addMenuItem("Family Service Agency",path+"portfolio/cl_fsa1.html'");
  fw_menu_5.addMenuItem("50 Years Is Enough",path+"portfolio/cl_50years.html'");
  fw_menu_5.addMenuItem("FoEI",path+"portfolio/cl_foei1.html'");
  fw_menu_5.addMenuItem("FNTG",path+"portfolio/cl_fntg1.html'");
  fw_menu_5.addMenuItem("GLMA",path+"portfolio/cl_glma1.html'");
  fw_menu_5.addMenuItem("Greenbelt Alliance",path+"portfolio/cl_green.html'");
  fw_menu_5.addMenuItem("HRFunders.org",path+"portfolio/cl_ihrfg.html'");
  fw_menu_5.addMenuItem("Jenifer Altman Foundation",path+"portfolio/cl_jaf1.html'");
  fw_menu_5.addMenuItem("JustAct",path+"portfolio/cl_just1.html'");
//  fw_menu_5.addMenuItem("Level Playing Field Institute",path+"portfolio/cl_lpfi.html'");
  fw_menu_5.addMenuItem("NAATA",path+"portfolio/cl_naat1.html'");
  fw_menu_5.addMenuItem("NAMAC",path+"portfolio/cl_namac1.html'");
  fw_menu_5.addMenuItem("SF Education Fund",path+"portfolio/cl_sfef1.html'");
  fw_menu_5.addMenuItem("Silicon Valley Debug",path+"portfolio/cl_dbug1.html'");
  fw_menu_5.addMenuItem("Snitow/Kaufman Productions",path+"portfolio/cl_skp1.html'");
  fw_menu_5.addMenuItem("Xochitl Films",path+"portfolio/cl_xoch1.html'");
   fw_menu_5.hideOnMouseOut=true;
   
  fw_menu_4.writeMenus();
} // fwLoadMenus()

