// Cascading Popup Menus v5.2 - Single Frame Menu


// 'horizontal Bar' style: menu items that use this ItemStyle are 40px wide, have 10px gaps

// between them, no popout indicator (the ">" in some menus) or popout indicator position,

// 0px padding of the text within items, #336699 background colour, a hover colour of #6699CC,

// 'highText' is the stylesheet class used for the menu text both normally and when highlighted,

// no border styles, 'null' means fully opaque items (set them to numbers between 0 and 100 to

// enable semitranslucency), and the 'hand'/'default' cursors are used for linked/submenu items.

var hBar = new ItemStyle(75, 0, '', -5, 0, '', '', 'highText', 'lowText', '', '',

 null, null, 'hand', 'default');


// The 'sub Menu' items: these have popout indicators of "Greater Than" signs ">" 15px from their

// right edge, and CSS borders. Text class also changes on mouseover.

var subM = new ItemStyle(22, 0, '>', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',

 'itemBorder', 'itemBorder', null, null, 'hand', 'default');


// 'subBlank' is similar, but has an 'off' border the same colour as its background so it

// appears borderless when dim, and 1px spacing between items to show the hover border.

var subBlank = new ItemStyle(22, 1, '>', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',

 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');


// The purplish 'button' style also has 1px spacing to show up the fancy border, and it has

// different colours/text and less padding. They also have translucency set -- these items

// are 80% opaque when dim and 95% when highlighted. It uses the 'crosshair' cursor for items.

var button = new ItemStyle(22, 1, '>', -8, 2, '10#006633', '10#99CC66', 'buttonText', 'buttonHover',

 'buttonBorder', 'buttonBorderOver', null, null, 'hand', 'default');

// styles for Roster
var vArtist = new ItemStyle(17, 1, '>', -8, 2, '10#006633', '10#99CC66', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', null, null, 'hand', 'default');

var vMail = new ItemStyle(17, 1, '•', -8, 2, '10#006633', '10#99CC66', 'buttonText', 'buttonHover',
'buttonBorder', 'buttonBorderOver', null, null, 'hand', 'default');
 
 var mail = new ItemStyle(17, 1, '>', -8, 2, '#99CC66', '#99CC6', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', null, null, 'hand', 'default');
 
 var none = new ItemStyle(17, 1, '>', -8, 2, '#006633', '#006633', 'buttonText', 'buttonText',
 'buttonBorder', 'buttonBorder', null, null, 'default', 'default');
 
 
 
 

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

startMenu('root', false, 450, 5, 20, hBar);
	addItem('Home', 'window.open("../index.html")', 'js:');
	addItem('Roster', 'window.open("../roster.html")', 'js:');
	addItem('Members Only',
'window.open("http://www.gemartists.org/private/index.php")', 'js:', '', 100);



	startMenu('mRoster', true, 5, 22, 110, button);
		addItem('Members List', 'window.open("../index.html")', 'js:');
		addItem('Artists', 'mArtists', 'sm:', button, 22, 0, '<', 3);
		addItem('Professionals', 'mPros', 'sm:', button, 22, 0, '<', 3);
		addItem('Associates', 'mAssocs', 'sm:', button, 22, 0, '<', 3);

			startMenu('mArtists', true, -155, 0, 150, button);
				addItem('Susan Allen', 'window.open("allen.html")','js:');
				addItem('Arthur L. Anderson', 'window.open("anderson.html")','js:');
				addItem('Elizabeth Beunaiche', 'window.open("beunaiche.html")','js:');
				addItem('Michael Christie', 'window.open("christie.html")','js:');
				addItem('Leon John Cole', 'window.open("cole.html")','js:');
				addItem('Peggy Croft', 'window.open("croft.html")','js:');
				addItem('Epaul Fischer', 'window.open("fischer.html")','js:');
				addItem('Howard Friedler', 'window.open("friedler.html")','js:');
				with(addItem('John N. Hatleberg', 'mMail', 'sm:', vMail)) onclick='parent.location="mailto:BigGems@earthlink.net?subject=I am contacting you from the GANA website"'; 
				addItem('Richard Homer, GG', 'window.open("homer.html")','js:');
				with(addItem('Derek Levin', 'mMail', 'sm:', vMail)) onclick='parent.location="mailto:stoneage@vermontel.net?subject=I am contacting you from the GANA website"'; 
				addItem('Susan Margolis', 'window.open("margolis.html")','js:');
				addItem('Helen Serras-Herman', 'window.open("serras.html")','js:');
				addItem('Sherris C. Shank', 'window.open("shank.html")','js:');
				addItem('Lee A. Speights', 'window.open("speights.html")','js:');
				addItem('Rick Stinson', 'window.open("stinson.html")','js:');
				with(addItem('Slava Tulupov', 'mMail', 'sm:', vMail)) onclick='parent.location="mailto:slava.t@att.net?subject=I am contacting you from the GANA website"'; 				
				with(addItem('Harold & Erica Van Pelt', 'mMail', 'sm:', vMail)) onclick='parent.location="mailto:evanpelt@earthlink.net?subject=I am contacting you from the GANA website"'; 				
				addItem('Deborah Wilson', 'window.open("wilson.html")','js:');
				addItem('Larry C. Winn', 'window.open("winn.html")','js:');
				addItem('Larry Woods', 'window.open("woods.html")','js:');

				
				
			startMenu('mPros', true, -225, 0, 220, button);
				addItem('Charles Ellias, GG, ISA, CAPP, North American Lapidary Laboratory', 'window.open("ellias.html")','js:', '', 30);
				with(addItem('James Elliot & Richard Freeman, E.F. Watermelon, Co.', 'mMail', 'sm:', vMail, 30)) onclick='parent.location="mailto:efwatermelon@aol.com?subject=I am contacting you from the GANA website"'; 
				with(addItem('Ky Karneki, Oregon Mineral Resource, LLC', 'mMail', 'sm:', vMail, 30)) onclick='parent.location="mailto:Sungemlapidary@aol.com?subject=I am contacting you from the GANA website"'; 
				addItem('Betty Sue King, Kings Ransom', 'window.open("http://pearlgoddess.com")','js:', '',  30);
				addItem('Philip E. Louer, Jr., North American Gem Carvers', 'window.open("http://www.northamericangemcarvers.com")','js:', '',  30);				
				with(addItem('Simon Watt, Mayer & Watt', 'mMail', 'sm:', vMail, 30)) onclick= 'parent.location="mailto:watagem@maysvilleky.net?subject=I am contacting you from the GANA website"';			
		



			startMenu('mAssocs', true, -155, 0, 150, button);
				addItem('J.C. Aguirre', 'window.open("http://www.jcajewelryart.com")','js:');
				with(addItem('Nancy Arthur-McGehee', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:artmcg@sbcglobal.net?subject=I am contacting you from the GANA website"';
				with(addItem('Keith Appleman', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:kiadesigns@comcast.net?subject=I am contacting you from the GANA website"';
				with(addItem('Scott Beckerman', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:consent@stanford.edu?subject=I am contacting you from the GANA website"';
				with(addItem('Stuart Beckerman', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:sbbsb@aol.com?subject=I am contacting you from the GANA website"';
				addItem('Charles Carmona', 'window.open("http://guildlabs.com")','js:');
				with(addItem('Chu Alice Chan', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:ajartland33@yahoo.com?subject=I am contacting you from the GANA website"';
				addItem('Paula Crevoshay', 'window.open("http://crevoshay.com")','js:');
				with(addItem('Burt Czapszys', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:rocz44@aol.com?subject=I am contacting you from the GANA website"';
				with(addItem('Maile Ellington', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:stones4joy@cs.com?subject=I am contacting you from the GANA website"';
				with(addItem('Si & Ann Frazier', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:siannfraz@aol.com?subject=I am contacting you from the GANA website"';
				with(addItem('Martin J. Guptill, GG, FGA', 'mMail','sm:', vMail)) onclick= 'parent.location="mailto:mguptill@sbcglobal.net?subject=I am contacting you from the GANA website"';
				addItem('R.A. “Art” Guyon', '','', none);
				with(addItem('Dalan Hargrave', 'mMail','sm:', vMail)) onclick= 'parent.location="mailto:Gemstarz@qvtc.com?subject=I am contacting you from the GANA website"';
				addItem('Thomas Hay', 'window.open("http://mtmist.org")','js:');
				addItem('Frank W. Heiser', '','', none);
				with(addItem('Andrew Herman, GG', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:gemartcenter@comcast.net?subject=I am contacting you from the GANA website"';
				addItem('John Lizzadro', 'window.open("http://lizzadromuseum.org")','js:');
				addItem('Reva R. Lizzadro', '','', none);
				with(addItem('Erik Martinez', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:enrico@salmoninternet.com?subject=I am contacting you from the GANA website"';
				addItem('Mona Lee Nesseth', '','', none);
				with(addItem('Rick Olmstead', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:ricko@homeinternet.net?subject=I am contacting you from the GANA website"';
				with(addItem('Dr. John Parrott', 'mMail', 'sm:', vMail)) onclick= 'parent.location="americutgems@bellsouth.net?subject=I am contacting you from the GANA website"';
				with(addItem('David Pearl', 'mMail','sm:', vMail)) onclick= 'parent.location="mailto:eagemtraders@wananchi.com?subject=I am contacting you from the GANA website"';
				with(addItem('Gary Roskin', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:groskin@cahners.com?subject=I am contacting you from the GANA website"';
				with(addItem('Memory Stather', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:memory@stather.net?subject=I am contacting you from the GANA website"';
				addItem('Steven Stegall', 'window.open("http://www.agatheringofspirits.com")','js:', vArtist);
				addItem('Eileen Wetherbee', '','', none);
				with(addItem('Ron Wilson', 'mMail', 'sm:', vMail)) onclick= 'parent.location="mailto:Tabula_Rasa_Press@yahoo.com?subject=I am contacting you from the GANA website"';
				with(addItem('Stacia Woods', 'mMail','sm:', vMail)) onclick= 'parent.location="mailto:stacia@moment.net?subject=I am contacting you from the GANA website"';


			startMenu('mMail', true, -75, 0, 75, none);
				addItem('Email Only', '','');


}


addDropShadow(pMenu, window.button,

 [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);

addDropShadow(pMenu, window.subBlank,

 [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);



if ((navigator.userAgent.indexOf('rv:0.')==-1) &&

    !(isOp&&!document.documentElement) && !(isIE4&&!window.external))

{

 pMenu.showMenu = new Function('mN','menuAnim(this, mN, 10)');

 pMenu.hideMenu = new Function('mN','menuAnim(this, mN, -15)');

}


page.elmPos=function(e,p)

{

 var x=0,y=0,w=p?p:this.win;

 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;

 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}

 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}

 return{x:x,y:y};

}



// Animation:

function menuAnim(menuObj, menuName, dir)

{

 // The array index of the named menu (e.g. 'mFile') in the menu object (e.g. 'pMenu').

 var mD = menuObj.menu[menuName][0];

 // Add timer and counter variables to the menu data structure, we'll need them.

 if (!mD.timer) mD.timer = 0;

 if (!mD.counter) mD.counter = 0;


 with (mD)

 {

  // Stop any existing animation.

  clearTimeout(timer);

  if (!lyr || !lyr.ref) return;

  if (dir>0) lyr.vis('visible');

  lyr.sty.zIndex = 1001 + dir;

  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) );

  counter += dir;

  if (counter>100) counter = 100;

  else if (counter<0) { counter = 0; lyr.vis('hidden') }

  else timer = setTimeout(menuObj.myName+'.'+(dir>0?'show':'hide')+'Menu("'+menuName+'")', 40);

 }

}


function menuFilterShow(menuObj, menuName, filterName)

{

 var mD = menuObj.menu[menuName][0];

 with (mD.lyr)

 {

  sty.filter = filterName;

  var f = ref.filters, doF = (f&&f.length&&f[0]);

  if (doF) f[0].Apply();

  vis('visible');

  if (doF) f[0].Play();

 }

}

// Borders and Dropshadows:

function addMenuBorder(mObj, iS, alpha, bordCol, bordW, backCol, backW)

{

 for (var mN in mObj.menu)

 {

  var mR=mObj.menu[mN], dS='<div style="position:absolute; background:';

  if (mR[0].itemSty != iS) continue;

  // Loop through the items in that menu, move them down and to the right a bit.

  for (var mI=1; mI<mR.length; mI++)

  {

   mR[mI].iX += bordW+backW;

   mR[mI].iY += bordW+backW;

  }

  mW = mR[0].menuW += 2*(bordW+backW);

  mH = mR[0].menuH += 2*(bordW+backW);

  if (isNS4) mR[0].extraHTML += '<layer bgcolor="'+bordCol+'" left="0" top="0" width="'+mW+

   '" height="'+mH+'" z-index="980"><layer bgcolor="'+backCol+'" left="'+bordW+'" top="'+

   bordW+'" width="'+(mW-2*bordW)+'" height="'+(mH-2*bordW)+'" z-index="990"></layer></layer>';

  else mR[0].extraHTML += dS+bordCol+'; left:0px; top:0px; width:'+mW+'px; height:'+mH+

   'px; z-index:980; '+(alpha!=null?'filter:alpha(opacity='+alpha+'); -moz-opacity:'+(alpha/100):'')+

   '">'+dS+backCol+'; left:'+bordW+'px; top:'+bordW+'px; width:'+(mW-2*bordW)+'px; height:'+

   (mH-2*bordW)+'px; z-index:990"></div></div>';

 }

}


function addDropShadow(mObj, iS)

{

 for (var mN in mObj.menu)

 {

  var a=arguments, mD=mObj.menu[mN][0], addW=addH=0;

  if (mD.itemSty != iS) continue;

  for (var shad=2; shad<a.length; shad++)

  {

   var s = a[shad];

   if (isNS4) mD.extraHTML += '<layer bgcolor="'+s[1]+'" left="'+s[2]+'" top="'+s[3]+'" width="'+

    (mD.menuW+s[4])+'" height="'+(mD.menuH+s[5])+'" z-index="'+(arguments.length-shad)+'"></layer>';

   else mD.extraHTML += '<div style="position:absolute; background:'+s[1]+'; left:'+s[2]+

    'px; top:'+s[3]+'px; width:'+(mD.menuW+s[4])+'px; height:'+(mD.menuH+s[5])+'px; z-index:'+

    (a.length-shad)+'; '+(s[0]!=null?'filter:alpha(opacity='+s[0]+'); -moz-opacity:'+(s[0]/100):'')+

    '"></div>';

   addW=Math.max(addW, s[2]+s[4]);

   addH=Math.max(addH, s[3]+s[5]);

  }

  mD.menuW+=addW; mD.menuH+=addH;

 }

}



