/*
Filename: pulldown_menus.js
Desc:     Pulldown menu definitions for Dancing Pelican
Author:   Relevant Arts Enterprise, Inc. <http://www.relevantarts.com/>
          John A. Lock <jlock@relevantarts.com>
Created:  2002-Oct-25
Modified: 
*/

menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}

// effect = "Alpha(style=0,opacity=85)" // Special effect string for IE5.5 or above please visit http://www.milonic.co.uk/menu/filters_sample.php for more filters
effect = "";

timegap=500						// The time delay for menus to remain visible
followspeed=5					// Follow Scrolling speed
followrate=40					// Follow Scrolling Rate
suboffset_top=10;			// Sub menu offset Top position 
suboffset_left=10;		// Sub menu offset Left position

MenuStyle1=[					// Menu Text Properties Array
"ffffff",							// Off Font Color
"5a828e",							// Off Back Color
"ffffff",							// On Font Color
"fb7907",							// On Back Color
"000000",							// Border Color
12,										// Font Size
"normal",							// Font Style
"bold",								// Font Weight
"verdana,arial,helvetica,sans-serif",	// Font Face
2,										// Padding
"img/arrow.gif",			// Sub Menu Image
,											// 3D Border & Separator
,											// 3D High Color
,											// 3D Low Color
];

/*
addmenu(menu=[				// This is the array that contains your menu properties and details
"samplemenu",					// Menu items Name
76,										// Top X position
307,									// Left Y postion
160,									// Width
1,										// Border Width
,											// Screen Position - here you can use "center;left;right;middle;top;bottom"
MenuStyle1,						// Properties Array - this is set higher up, as above
,											// Always Visible - allows the menu item to be visible at all time
,											// Alignment - sets the menu elements alignment, HTML values are valid here for example: left, right or center
effect,								// Filter - Text variable for setting transitional effects on menu activation
,											// Follow Scrolling - Tells the menu item to follow the user down the screen
, 										// Horizontal Menu - Tells the menu to be horizontal instead of top to bottom style
,											// Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page
,											// Position of sub image left:center:right:middle:top:bottom
,											// Show an image on top menu bars indicating a sub menu exists below
,											// Reserved for future use
,											// Reserved for future use
,											// Reserved for future use
,											// Reserved for future use
,											// Reserved for future use
,											// Reserved for future use
// "Description Text", "URL", "Alternate URL", "Status", "Separator Bar",
"Menu Item 1","firstitem.html",,,1,
"Menu Item 2","seconditem.html",,,1,
"Menu Item 3","thirditem.html",,,1,
"Menu Item 4","fourthitem.html",,,1
]);
*/

// Set some default values
var RealWidth = 0;
var aboutX = 441;
var workX = 501;
var stockX = 579;
var storeX = 635;
var projectsX = 625;
var commonY = 107;

// Get the actual window width depending on browser
// (navigator.appName.indexOf("Netscape") != -1) ? RealWidth = window.innerWidth + 6 : RealWidth = document.body.scrollWidth;
if (self.innerHeight) {
	RealWidth = self.innerWidth - 20;
} else if (document.documentElement && document.documentElement.clientHeight) {
	RealWidth = document.documentElement.clientWidth;
} else if (document.body) {
	RealWidth = document.body.clientWidth;
}

// Recalculate the menu X positions corrected for window width
aboutX = RealWidth - 334;
if (aboutX < 431) { aboutX = 441 }
workX = aboutX + 60;
stockX = workX + 78;
storeX = stockX + 56;
projectsX = RealWidth - 150;

// If it's the admin pages, set Y to correct position
if (location.pathname.indexOf("/admin") != -1) {
	commonY = 107;
}
// If it's the home page, set Y to correct position
else {
	if ((location.pathname.indexOf("index") != -1) || (location.pathname.length < 8)) {
		commonY = 128;
	}
	// Otherwise, set Y for the rest of the pages
	else {
		commonY = 107;
	}
}

addmenu(menu=["about",commonY,aboutX,170,1,,MenuStyle1,,,effect,,,,,,,,,,,,
,"&nbsp;&nbsp;The Website","about.html",,,1
,"&nbsp;&nbsp;The Photographers","profiles.html",,,1
,"&nbsp;&nbsp;Awards & Recognition","awards.html",,,1
,"&nbsp;&nbsp;Contact Us","contact.html",,,1
,"&nbsp;&nbsp;Home","index.html",,,1
]);

addmenu(menu=["work",commonY,workX,120,1,,MenuStyle1,,,effect,,,,,,,,,,,,
,"&nbsp;&nbsp;What We Do","work.html",,,1
,"&nbsp;&nbsp;Workshops","workshops.html",,,1
,"&nbsp;&nbsp;Events","events.html",,,1
,"&nbsp;&nbsp;Our Blog","blog/",,,1
,"&nbsp;&nbsp;Online Store","store/",,,1
]);

addmenu(menu=["stock",commonY,stockX,120,1,,MenuStyle1,,,effect,,,,,,,,,,,,
,"&nbsp;&nbsp;Photo Library","stock.html",,,1
,"&nbsp;&nbsp;Search","search.php",,,1
,"&nbsp;&nbsp;Stock List","stock_list.html",,,1
,"&nbsp;&nbsp;Client Login","https://www.dancingpelican.com/login.php",,,1
,"&nbsp;&nbsp;Create Account","register.php",,,1
]);

addmenu(menu=["store",commonY,storeX,120,1,,MenuStyle1,,,effect,,,,,,,,,,,,
,"&nbsp;&nbsp;Entrance","store/",,,1
,"&nbsp;&nbsp;Books","books.html",,,1
,"&nbsp;&nbsp;Prints","prints.html",,,1
,"&nbsp;&nbsp;Digital Puzzles","puzzles.html",,,1
]);

addmenu(menu=["projects",commonY,projectsX,150,1,,MenuStyle1,,,effect,,,,,,,,,,,,
,"&nbsp;&nbsp;Project Portfolio","portfolio.html",,,1
,"&nbsp;&nbsp;Piņon Canyon",'javascript:PortWin("canyon_main.html")',,,1
,"&nbsp;&nbsp;The Red Desert",'javascript:PortWin("desert_main.html")',,,1
,"&nbsp;&nbsp;Valley of the Dunes",'javascript:PortWin("valley_main.html")',,,1
,"&nbsp;&nbsp;Gathering of Horses",'javascript:PortWin("horses_main.html")',,,1
,"&nbsp;&nbsp;Tropical Rainforest",'javascript:PortWin("tropical_main.html")',,,1
,"&nbsp;&nbsp;Prairie Vision",'javascript:PortWin("prairie_main.html")',,,1
]);

dumpmenus();
