// Drop-down menu coordinates

//alert(getStatusNum())
var yPos = 87;
var x1 = 154;
var x2 = 338;
var x3 = 522;
var x4 = 706;
var xw = 180;
var yh = 20;

new ypSlideOutMenu("menuPublic", "down", x1, yPos, xw, 6*yh+2)
menuPublicLevel = new Array("menuPublic");
menuPublicItems = new Array("News","About the Guild","How to Join","Company Affiliates","New Members","Industry Links");
menuPublicHyper = new Array("FMPro?-DB=PGNews.fp5&-Format=news.asp&-sortField=Rank&-sort0rder=Ascend&-sortField=StoryDate&-sort0rder=Descend&Publish=Show&-Op=lte&-max=All&-Find","menuAbout","menuJoin","menuAffiliates","FMPro?-DB=PGnewmembers.fp5&-Format=newmembers.asp&-sortField=DateAdded&-sort0rder=Ascend&Publish=Show&-max=All&-Find","menuIndustry")
writeMenu("menuPublic");

	new ypSlideOutMenu("menuAbout", "right", x2, yPos+(yh), xw, 6*yh+2)
	menuAboutLevel = new Array("menuPublic","menuAbout");
	menuAboutItems = new Array("Overview","Constitution","Code of Conduct","Board","Staff","Meeting Rooms");
	menuAboutHyper = new Array("overview.html","constitution.html","conduct.html","board.html","staff.html","meetingrooms.html");
	writeMenu("menuAbout");

	new ypSlideOutMenu("menuJoin", "right", x2, yPos+(2*yh), xw, 5*yh+2)
	menuJoinLevel = new Array("menuPublic","menuJoin");
	menuJoinItems = new Array("Membership Grades","Membership Benefits","Applying for Membership","Membership Sub-Committee","Meeting Dates");
	menuJoinHyper = new Array("grades.html","benefits.html","applying.html","msc.html","board.html#MSC");
	writeMenu("menuJoin");

	new ypSlideOutMenu("menuAffiliates", "right", x2, yPos+(3*yh), xw, 3*yh+2)
	menuAffiliatesLevel = new Array("menuPublic","menuAffiliates");
	menuAffiliatesItems = new Array("Affiliate Members","Affiliate Benefits","Becoming an Affiliate");
	menuAffiliatesHyper = new Array("FMPro?-db=PGDatabase.fp5&-format=affiliatebrowse.asp&contact%20type=ActiveAffiliate&Publish=Yes&-sortfield=company&-sortorder=ascend&-max=all&-find","af_benefits.html","becoming_af.html");
	writeMenu("menuAffiliates");

	new ypSlideOutMenu("menuIndustry", "right", x2, yPos+(5*yh), xw, 3*yh+2)
	menuIndustryLevel = new Array("menuPublic","menuIndustry");
	menuIndustryItems = new Array("Film Industry","Broadcasters","Film Festivals");
	menuIndustryHyper = new Array("menuFilm","menuBroadcast","menuFestival");
	writeMenu("menuIndustry");

		new ypSlideOutMenu("menuFilm", "right", x3, yPos+(5*yh), xw, 3*yh+2)
		menuFilmLevel = new Array("menuPublic","menuIndustry","menuFilm");
		menuFilmItems = new Array("Organisations","Funding","Government");
		menuFilmHyper = new Array("FMPro?-db=PG_industry_links.fp5&-format=organisations.asp&org_category=industry_organisations&-max=all&-find","FMPro?-db=PG_industry_links.fp5&-format=funding.asp&org_category=funding&-max=all&-find","FMPro?-db=PG_industry_links.fp5&-format=uk_gov.asp&org_category=government&-max=all&-find");
		writeMenu("menuFilm");
	
		new ypSlideOutMenu("menuBroadcast", "right", x3, yPos+(6*yh), xw, 3*yh+2)
		menuBroadcastLevel = new Array("menuPublic","menuIndustry","menuBroadcast");
		menuBroadcastItems = new Array("Production Related","General","Cable, Digital, Satellite");
		menuBroadcastHyper = new Array("FMPro?-db=PG_industry_links.fp5&-format=bcastprod.asp&org_category=broadcast_production&-max=all&-find","FMPro?-db=PG_industry_links.fp5&-format=bcastgen.asp&org_category=broadcast_general&-max=all&-find","FMPro?-db=PG_industry_links.fp5&-format=bcastcable.asp&org_category=broadcast_digital&-max=all&-find");
		writeMenu("menuBroadcast");

		new ypSlideOutMenu("menuFestival", "right", x3, yPos+(7*yh), xw, 3*yh+2)
		menuFestivalLevel = new Array("menuPublic","menuIndustry","menuFestival");
		menuFestivalItems = new Array("United Kingdom","International");
		menuFestivalHyper = new Array("FMPro?-db=PG_industry_links.fp5&-format=ukfilmfest.asp&org_category=uk_film_festivals&-max=all&-find","FMPro?-db=PG_industry_links.fp5&-format=international.asp&org_category=international&-max=all&-find");
		writeMenu("menuFestival");

new ypSlideOutMenu("menuUsers", "down", x2, yPos, xw, 4*yh+2)
menuUsersLevel = new Array("menuUsers");
menuUsersItems = new Array("How to Register","Availability Service","Individual Member Search","News Archive");
menuUsersHyper = new Array("reguser.html","availability_select.html","membersearch.html","FMPro?-DB=PGNews.fp5&-Format=newsarchive.asp&-sortField=StoryDate&-sortOrder=descend&Publish=Archive&-max=20&-Find");
writeMenu("menuUsers");

//	new ypSlideOutMenu("menuRegister", "right", x3, yPos, xw, 2*yh+2)
//	menuRegisterLevel = new Array("menuUsers","menuRegister");
//	menuRegisterItems = new Array("Benefits","Registration Form");
//	menuRegisterHyper = new Array("tba.html","tba.html");
//	writeMenu("menuRegister");

new ypSlideOutMenu("menuMembers", "down", x3, yPos, xw, 6*yh+2)
menuMembersLevel = new Array("menuMembers");
menuMembersItems = new Array("Meeting Rooms","Supplementary Members","< Production Update","< Events","Message Board","< Knowledge Bank");//,"Update Your Details","Constitution","Code of Practice");
menuMembersHyper = new Array("meetingrooms2.html","FMPro?-db=PGDatabase.fp5&-lay=Data Entry Credits&-format=supplementary.asp&-sortfield=available_from&-sortorder=Descend&publish=yes&contact type=ActiveMember&Job Title=Supplementary&-max=20&-find","menuPU","menuEvents","FMPro?-db=PGthreads.fp5&-lay=BB1&-format=threads.asp&-sortfield=messages%202::Date&-sortorder=descend&-sortfield=messages%202::Time&-sortorder=descend&-max=25&-findall","menuKnowledge");//,"menuMemberUD","constitution.html","code.html"
writeMenu("menuMembers");  

	new ypSlideOutMenu("menuPU", "left", x2, yPos+(2*yh), xw, 6*yh+2)
	menuPULevel = new Array("menuMembers","menuPU");
	menuPUItems = new Array("New This Week","Active Development","In Development","Pre-Production","In Production","Post Production");
	menuPUHyper = new Array("FMPro?-db=PGproductionupdate.fp5&-format=productionupdate.asp&Status=New this week&-Token=New this week&-max=20&-find","FMPro?-db=PGproductionupdate.fp5&-format=productionupdate.asp&Status=Active Development&-Token=Active Development&-max=20&-find","FMPro?-db=PGproductionupdate.fp5&-format=productionupdate.asp&Status=In Development&-Token=In Development&-max=20&-find","FMPro?-db=PGproductionupdate.fp5&-format=productionupdate.asp&Status=Pre-production&-Token=Pre-production&-max=20&-find","FMPro?-db=PGproductionupdate.fp5&-format=productionupdate.asp&Status=In production&-Token=In production&-max=20&-find","FMPro?-db=PGproductionupdate.fp5&-format=productionupdate.asp&Status=Post production&-Token=Post production&-max=20&-find");
	writeMenu("menuPU");

	new ypSlideOutMenu("menuEvents", "left", x2, yPos+(3*yh), xw, 3*yh+2)
	menuEventsLevel = new Array("menuMembers","menuEvents");
	menuEventsItems = new Array("Events","Seminars","Screenings");
	menuEventsHyper = new Array("FMPro?-db=PGEvents.fp5&-format=events.asp&EventType=Event&-Token=Events&-SortField=EventDate&Publish=Show&-max=All&-find","FMPro?-db=PGEvents.fp5&-format=events.asp&EventType=Seminar&-Token=Seminars&Publish=Show&-max=All&-find","FMPro?-db=PGEvents.fp5&-format=events.asp&EventType=Screening&-Token=Screenings&Publish=Show&-max=All&-find");
	writeMenu("menuEvents");

	new ypSlideOutMenu("menuKnowledge", "left", x2, yPos+(5*yh), xw, 3*yh+2)
	menuKnowledgeLevel = new Array("menuMembers","menuKnowledge");
	menuKnowledgeItems = new Array("Industry Agreements","OFCOM","International Tax Breaks");
	menuKnowledgeHyper = new Array("FMPro?-db=PGagreements.fp5&-format=knowledge.asp&-sortfield=Category&-sortorder=ascend&SuperCategory=Industry Agreements&Publish=Show&-max=all&-find","FMPro?-db=PGagreements.fp5&-format=knowledge2.asp&-sortfield=Category&-sortorder=ascend&SuperCategory=OFCOM&Publish=Show&-max=all&-find","FMPro?-db=PGagreements.fp5&-format=knowledge2.asp&-sortfield=Category&-sortorder=ascend&SuperCategory=New - International Tax Breaks&Publish=Show&-max=all&-find");
	writeMenu("menuKnowledge"); 
	
//	new ypSlideOutMenu("menuMemberUD", "right", x4, yPos+(4*yh), xw, 2*yh+2)
//	menuMemberUDLevel = new Array("menuMembers","menuMemberUD");
//	menuMemberUDItems = new Array("Availability","Member Information");
//	menuMemberUDHyper = new Array("tba.html","tba.html");
//	writeMenu("menuMemberUD");

function writeMenu(menuName) {
if (menuName=="menuMembers") { glyph="" }
else { glyph=">" }
document.write("<DIV ID='"+menuName+"Container'>")
document.write("<DIV ID='"+menuName+"Content'>")
document.write("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 class=\"menutable\"><TBODY>")

	for (i=0; i<eval(menuName+"Items").length; i++) {
		document.write("<TR CLASS=\"rollmenu\" ONMOUSEOVER=\"className='rollovermenu';")
		for (n=0; n<eval(menuName+"Level").length; n++) {
			document.write("ypSlideOutMenu.showMenu('"+eval(menuName+"Level")[n]+"');")
		}	
		if ( (eval(menuName+"Hyper")[i].substring(0,4))=="menu") {
				document.write("ypSlideOutMenu.showMenu('"+eval(menuName+"Hyper")[i]+"');")
		}
		document.write("\" ONMOUSEOUT=\"className='rollmenu';")
		for (n=0; n<eval(menuName+"Level").length; n++) {
			document.write("ypSlideOutMenu.hideMenu('"+eval(menuName+"Level")[n]+"');")
		}
		if ( (eval(menuName+"Hyper")[i].substring(0,4))=="menu") {
			document.write("ypSlideOutMenu.hideMenu('"+eval(menuName+"Hyper")[i]+"');")
 		}
			else {
				document.write("\" onClick=\"document.location = ('"+eval(menuName+"Hyper")[i]+"');")		
		}
		document.write("\"><TD CLASS=\"menucell\">")
		document.write(eval(menuName+"Items")[i])
		document.write("</TD><TD CLASS=\"chevron\">")
		if ( (eval(menuName+"Hyper")[i].substring(0,4))=="menu") { document.write(glyph) }
		document.write("</TD></TR>")
	}
	document.write("</TBODY></TABLE></DIV></DIV>")
} 		