// Cascading Popup Menus v5.2 - Single Frame Menu example script.

var hBar = new ItemStyle(10, 8, '', 0, 0, '', '', 'lowText', 'highText', '', '',
 null, null, 'hand', 'default');
var hBa2 = new ItemStyle(26, 8, '', 0, 0, '', '', 'lowText', 'highText', '', '',
 null, null, 'hand', 'default');
var hWca = new ItemStyle(44, 10, '', 0, 0, '../images/2009logo200.gif', '../images/2009logo200.gif', 'highText', 'highText', '', '',
 null, null, 'hand', 'default');
var hCtl = new ItemStyle(40, 6, '', 0, 0, '../images/CT_link5.gif', '../images/CT_link5.gif', 'highText', 'highText', '', '',
 null, null, 'hand', 'default');
var hNcr = new ItemStyle(56, 8, '', 0, 0, '../images/not_a_crime.gif', '../images/not_a_crime.gif', 'highText', 'highText', '', '',
 null, null, 'hand', 'default');


var subM = new ItemStyle(24, 0, '', -15, 3, '#0058A1', '#008FFF', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var subN = new ItemStyle(40, 0, '', -15, 3, '#0058A1', '#008FFF', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var subP = new ItemStyle(56, 0, '', -15, 3, '#0058A1', '#008FFF', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');

var button = new ItemStyle(22, 1, '&gt;', -15, 2, '#006633', '#CC6600', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root', true, 'window.page.elmPos("home").x', 'window.page.elmPos("home").y + 39', 200, subM, '', true);
addItem('&nbsp;', '../introduction/home.htm', 'parent', hWca);
addItem('<CENTER><B>About Canoe Wales</B></CENTER>', 'mServ', 'sm:');
addItem('<CENTER><B>Membership & Benefits</B></CENTER>', 'mMemb', 'sm:');
addItem('<CENTER><B>Affiliated Clubs</B></CENTER>', '../hot_files/clubs.htm', 'parent');
addItem('<CENTER><B>Policies</B></CENTER>', 'mPolicy', 'sm:');
addItem('<CENTER><B>Enews</B></CENTER>', 'mEnews', 'sm:');
addItem('<CENTER><B>Common Questions</B></CENTER>', 'mFAQs', 'sm:');
addItem('<CENTER><B>Access</B></CENTER>', 'mAcce', 'sm:');
addItem('<CENTER><B>Recreation</B></CENTER>', '../introduction/recreation.htm', 'parent');
addItem('<CENTER><B>Coaching</B></CENTER>', 'mCoac', 'sm:');
addItem('<CENTER><B>Competition</B></CENTER>', 'mComp', 'sm:');
addItem('<CENTER><B>Canoeing & Youth</B></CENTER>', 'mYouth', 'sm:');
addItem('<CENTER>Tell Us About Your Event</CENTER>', '../introduction/event_report.htm', 'parent');
addItem('<CENTER>Contact Us</CENTER>', '../introduction/contact.htm', 'parent');
addItem('<CENTER>Links</CENTER>', '../introduction/links.htm', 'parent');
addItem('&nbsp;', 'window.open("http://www.ukwhitewater.co.uk/","","width=900,height=600,left=5,top=5,scrollbars,resizable")', 'js:', hCtl);
// addItem('&nbsp;', 'window.open("http://www.kayakingisnotacrime.org.uk/Access.pdf","","width=900,height=600,left=5,top=5,scrollbars,resizable")', 'js:', hNcr);

startMenu('mPolicy', true, 20, 20, 160, subM);
addItem('Equality Policy', '../introduction/equality.htm', 'parent');
addItem('Renewable Energy', 'window.open("../introduction/energy_policy_eng.pdf","","width=900,height=600,left=5,top=5,scrollbars,resizable")', 'js:');
addItem('Ynni Adnewyddadwy', 'window.open("../introduction/energy_policy_cym.pdf","","width=900,height=600,left=5,top=5,scrollbars,resizable")', 'js:');

startMenu('mTalent', true, 10, 30, 140, subM);
addItem('About Sprint Racing', '../sprintid/about_sprint.htm', 'parent');
addItem('The Programme', '../sprintid/index.htm', 'parent');
addItem('Profile Form', 'window.open("../sprintid/athlete_profile.pdf","","width=900,height=600,left=5,top=5,scrollbars,resizable")', 'js:');
addItem('Medical Form', 'window.open("../sprintid/medical_questionnaire.pdf","","width=900,height=600,left=5,top=5,scrollbars,resizable")', 'js:');

startMenu('mFAQs', true, 30, 20, 140, subM);
addItem('Membership', '../hot_files/FAQs_membership.htm', 'parent');
addItem('Star Tests', '../hot_files/FAQs_star_tests.htm', 'parent');
addItem('Canoe Safety', '../hot_files/FAQs_safety_test.htm', 'parent');
addItem('Coach Update', '../hot_files/FAQs_coach_update.htm', 'parent');

startMenu('mEnews', true, 30, 20, 140, subM);
addItem('Noticeboard', '../enews/noticeboard.htm', 'parent');
addItem('eNewyddion CC', 'window.open("../enews/eNewyddion.pdf","","width=900,height=700,left=5,top=5,scrollbars,resizable")', 'js:');
addItem('Tanysgrifio', '../enews/eNews_tanysgrifio.htm', 'parent');
addItem('CW eNews', 'window.open("../enews/eNews.pdf","","width=900,height=700,left=5,top=5,scrollbars,resizable")', 'js:');
addItem('Subscribe', '../enews/eNews_subscribe.htm', 'parent');

startMenu('mServ', true, 30, 20, 140, subM);
addItem('Introduction', '../introduction/introduction.htm', 'parent');
// addItem('Who&#039;s Who', '../introduction/staff_and_officers.htm', 'parent');
addItem('Contact Us', '../introduction/contact.htm', 'parent');

startMenu('mMemb', true, 30, 20, 140, subM);
addItem('Join or Renew Membership', '../membership/membership.htm', 'parent', subN);
addItem('Access Supporters', '../access/access_not_process.htm', 'parent');
addItem('Welsh Sport’ers Club', 'window.open("../membership/Sporters_flyer.pdf","","width=900,height=600,top=0,left=0,scrollbars,resizable")', 'js:');
addItem('Preferred Suppliers', '../membership/preferred_suppliers.htm', 'parent');

startMenu('mAcce', true, 15, 20, 172, subM);
addItem('Position Statement', '../access/position.htm', 'parent');
addItem('About Access', '../access/about_access.htm', 'parent');
addItem('Paddle Report', 'window.open("http://www.canoewales.com/feedback/paddle_report.htm","","width=900,height=600,top=0,left=0,scrollbars,resizable")', 'js:');
addItem('Environment', '../access/environment_and_legislation.htm', 'parent');
addItem('Water Quality', '../access/water_quality.htm', 'parent');
addItem('Safety', '../access/safety.htm', 'parent');
addItem('Incident Report form', '../access/incident_report.htm', 'parent');
addItem('About Car Clamping', 'window.open("../access/clamping.pdf","","width=900,height=600,top=0,left=0,scrollbars,resizable")', 'js:');

startMenu('mCoac', true, 10, 20, 180, subM);
addItem('Development', '../coaching/coaching_intro.htm', 'parent');
addItem('UKCC Transfer Pathways', 'window.open("../coaching/UKCC_transfer_pathways.pdf","","width=900,height=750,top=5,left=5,scrollbars,resizable")', 'js:');
addItem('Course Dates', 'window.open("../coaching/course_dates.pdf","","width=900,height=750,top=5,left=5,scrollbars,resizable")', 'js:');
addItem('Organisers', '../coaching/coaching_organisers.htm', 'parent');
addItem('Qualifying to Coach', 'window.open("http://www.bcu.org.uk/tests-and-awards/coaching-qualifications-courses/coaching-award-summary/","","width=900,height=600,top=5,left=5,scrollbars,resizable")', 'js:');
addItem('Injury Prevention', '../coaching/injury_prevention.htm', 'parent');
addItem('Coaching Centres', '../coaching/coaching_centres.htm', 'parent');
addItem('Coaching Wales', 'window.open("http://www.coachingwales.com","","width=900,height=750,top=0,left=0,scrollbars,resizable")', 'js:');

startMenu('mComp', true, 10, 20, 164, subM);
addItem('Introduction', '../competition/comp_intro.htm', 'parent');
addItem('Freestyle', '../competition/freestyle.htm', 'parent');
addItem('Slalom', '../competition/slalom.htm', 'parent');
addItem('Marathon Racing', '../competition/marathon.htm', 'parent');
addItem('Sprint Racing', '../competition/sprint.htm', 'parent');
addItem('Sprint Racing Talent Identification Programme', 'mTalent', 'sm:', subN);
addItem('Sprint & Marathon Development', '../competition/racing_devt.htm', 'parent', subN);
addItem('Wild Water Racing', '../competition/WWracing.htm', 'parent');
addItem('Surf Kayaking', '../competition/surf.htm', 'parent');
addItem('Canoe Polo', '../competition/polo.htm', 'parent');
addItem('Anti Doping Advice and Policy', 'window.open("../competition/071009anti_doping_policy.htm","","width=900,height=600,top=0,left=0,scrollbars,resizable")', 'js:', subN);

startMenu('mYouth', true, 10, 20, 172, subM);
addItem('Child Protection Policy', '../youth/childprotection.htm', 'parent');
addItem('What Child Protection training do I need?', 'window.open("../youth/CP_training_required.pdf","","width=900,height=750,top=5,left=5,scrollbars,resizable")', 'js:', subN);
addItem('Who needs CRB or enhanced disclosure?', 'window.open("../youth/disclosure_policy.pdf","","width=900,height=750,top=5,left=5,scrollbars,resizable")', 'js:', subN);
addItem('Paddlesport & Education', '../youth/paddlesport.htm', 'parent');
addItem('Paddlepower Scheme', '../youth/paddlepower.htm', 'parent');
addItem('WCA Pool Blades Award', '../youth/pool_blades.htm', 'parent');
addItem('Cadet Leader', '../youth/cadetleaders.htm', 'parent');
addItem('Paddlesport Officers', '../youth/pdos.htm', 'parent');
addItem('Regional Activity', '../youth/regionalactivity.htm', 'parent');
addItem('Sources of Funding', '../youth/funding.htm', 'parent');

}

// CREATE ANOTHER MENU OBJECT here if you want multiple menus on a page, or you can just
// duplicate this entire file and rename 'pMenu' to something else.
// Every menu object MUST have a menu named 'root' in it, as that's always visible.

//var anotherMenu = new PopupMenu('anotherMenu');
//with (anotherMenu)
//{
// startMenu('root', .....);
// ... make menus here ...
//}

// ******************** FUNCTIONS CALLED BY THE EFFECTS SECTION ********************

// This is the "positioning from page anchors" code used by the advanced positioning expressions.
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}}
 if (e && this.MS && navigator.platform.indexOf('Mac')>-1 && e.tagName=='A')
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' +
   'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
};




