// array handles populating menu bits on the page (section name, url, drop down x, drop down y)

var sectionList = new Array();
//	sublinks
	sectionList[sectionList.length] = new Array('corporate & incentive events','010.htm','289','63');
	sectionList[sectionList.length] = new Array('social events & weddings','040.htm','471','63');
//	toplinks
	sectionList[sectionList.length] = new Array('home','005.htm');
	sectionList[sectionList.length] = new Array('departments','070.htm','344','25');
	sectionList[sectionList.length] = new Array('photo galleries','125.htm','439','25');
	sectionList[sectionList.length] = new Array('about pacific events','155.htm','545','25');
	sectionList[sectionList.length] = new Array('contact us','180.htm');

	
	
//	dropdown submenus leave first element blank for none
//	corporate & incentive events drop menu (name, url)
var drop0 = new Array();
	drop0[drop0.length] = new Array('General Sessions','190.htm');
	drop0[drop0.length] = new Array('Services','030.htm');
	drop0[drop0.length] = new Array('Client List','035.htm');
	drop0[drop0.length] = new Array('Event Portfolio','015.htm');
	drop0[drop0.length] = new Array('Corporate & Incentive Events Gallery','corporate_gallery.htm');
	
	
//	social events & weddings (name, url)
var drop1 = new Array();
	drop1[drop1.length] = new Array('Services','060.htm');
	drop1[drop1.length] = new Array('Testimonials','065.htm');
	drop1[drop1.length] = new Array('Event Portfolio','045.htm');
	drop1[drop1.length] = new Array('Social Events & Weddings Gallery','social_gallery.htm');
	
	
//	home drop menu (name, url)
var drop2 = new Array();
	drop2[drop2.length] = new Array('','');
	
	
//	departments drop menu (name, url)
var drop3 = new Array();
	drop3[drop3.length] = new Array('Pacific Entertainment','075.htm');
	drop3[drop3.length] = new Array('Floral Department','080.htm');
	drop3[drop3.length] = new Array('Lighting Department','090.htm');
	drop3[drop3.length] = new Array('Table Treatments','100.htm');
	drop3[drop3.length] = new Array('Scenic Department','085.htm');
	drop3[drop3.length] = new Array('Props Department','105.htm');
	drop3[drop3.length] = new Array('Event Design','110.htm');
	drop3[drop3.length] = new Array('Equipment Rentals','120.htm');
	drop3[drop3.length] = new Array('Themes','115.htm');

	
//	photo galleries drop menu (name, url)
var drop4 = new Array();
	drop4[drop4.length] = new Array('Latest WOW Events','wow_Gallery.htm');
	drop4[drop4.length] = new Array('Corporate & Incentive Gallery','corporate_Gallery.htm');
	drop4[drop4.length] = new Array('Social Events & Weddings Gallery','social_Gallery.htm');
	drop4[drop4.length] = new Array('General Sessions Gallery','session_Gallery.htm');
	drop4[drop4.length] = new Array('Entertainment Gallery','entertainment_Gallery.htm');
	drop4[drop4.length] = new Array('Backdrops','http://www.digitalcarpenters.com/dw_blind/');
	drop4[drop4.length] = new Array('Floral Gallery','Floral_Gallery.htm');
	drop4[drop4.length] = new Array('Lighting Gallery','lighting_Gallery.htm');
	drop4[drop4.length] = new Array('Table Treatments Gallery','Table_Gallery.htm');
	drop4[drop4.length] = new Array('Scenic Gallery','Scenic_Gallery.htm');
    drop4[drop4.length] = new Array('Props Gallery','props_Gallery.htm');
	drop4[drop4.length] = new Array('Furniture Gallery','Furniture_Gallery.htm');

	
//	about pacific events drop menu (name, url)
var drop5 = new Array();
	drop5[drop5.length] = new Array('Meet the Staff','160.htm');
	drop5[drop5.length] = new Array('Associations & Awards','165.htm');
	drop5[drop5.length] = new Array('Employment','170.htm');
	
	
//	contact us drop menu (name, url)
var drop6 = new Array();
	drop6[drop6.length] = new Array('','');
	
function populateMenus(sectionNumber) {  //writes the html for the return link in the masthead orange bar
 	var html = "";
	
	//	Create return to main link
	if (sectionNumber > -1 && sectionNumber != 6) {
		html = '<div id="returnMainLink" style="position:absolute; top:146; left:45; z-index:49"><img src="images/000_mast_arrow.gif" alt="" border="0"> <a href="' + sectionList[sectionNumber][1] + '" class="navLink">' + sectionList[sectionNumber][0] + ' main</a></div>';
	}
	
	//	Create corporate and social links
	html += '<div id="subtopLinks" style="position:absolute; top:46; left:288; z-index:48"><span class="toplinkBrackets">';
	for (var i=0;i<2;i++) {
		if (i==sectionNumber) {
			//	Selected state
			html += '[ <span class="navlinkover">' + sectionList[i][0] + '</span> ]&nbsp;&nbsp;&nbsp;';
		}else{
			html += '[ <a href="' + sectionList[i][1] + '" class="navsubLink" id="droptop' + i + '"';
			if (eval('drop'+i)[0][0]!='') {
				html += ' onMouseOut="hidedrop(\'dropmenu' + i + '\')" onMouseOver="showdrop(\'dropmenu' + i + '\')"';
			}
			html += '>' + sectionList[i][0] + '</a> ]&nbsp;&nbsp;&nbsp;';
		}
	}
	html += '</span></div>';
	
	
	//	Create remaining top links
	html += '<div id="topLinks" style="position:absolute; top:8; left:288; z-index:47"><span class="toplinkBrackets">';
	for (var i=2;i<sectionList.length;i++) {
		if (i==section) {
			//	Selected state
			html += '[ <span class="navlinkover">' + sectionList[i][0] + '</span> ]&nbsp;&nbsp;&nbsp;';
		}else{
			html += '[ <a href="' + sectionList[i][1] + '" class="navLink" id="droptop' + i + '"'; 
			if (eval('drop'+i)[0][0]!='') {
				html += ' onMouseOut="hidedrop(\'dropmenu' + i + '\')" onMouseOver="showdrop(\'dropmenu' + i + '\')"';
			}
			html += '>' + sectionList[i][0] + '</a> ]&nbsp;&nbsp;&nbsp;';
		}
	}
	html += '</span></div>';
	
	//	Create Dropmenus
	for (var i=0;i<sectionList.length;i++) {
		if (eval('drop'+i)[0][0]!='') {
			html += '<div id="dropmenu' + i + '" style="position:absolute; top:' + sectionList[i][3] + '; left:' + sectionList[i][2] + '; z-index:' + 100+i +'; visibility:hidden;">';
				html += '<table border="0" cellspacing="1" cellpadding="0" bgcolor="#999999"><tr><td>';
					html += '<a onMouseOut="hidedrop(\'dropmenu' + i + '\')" onMouseOver="showdrop(\'dropmenu' + i + '\')">';
						html += '<table border="0" cellspacing="0" cellpadding="0" class="dropMenu">';
						for (var j=0;j<eval('drop'+i).length;j++) {
							html += '<tr>';
								html += '<td id="dropitem' + i + '_' + j + '">&nbsp;<a href="' + eval('drop'+i)[j][1] + '" class="navdroplink" onMouseover="dropRollover(\'dropitem' + i + '_' + j + '\')" onMouseout="dropRollout(\'dropitem' + i + '_' + j + '\');">' + eval('drop'+i)[j][0] + '</a>&nbsp;</td>';
							html += '</tr>';
						}
						html += '</table>';
					html += '</a>';
				html += '</td></tr></table>';
			html += '</div>';
		}
	}
	
	document.write(html);
}


function populateFooter () {
	var html = '<img src="images/000_contentEnd.gif" alt="" border="0"><br><br>';
	html +=		'<span class="footer2">San Diego </span><span class="footer1"> 6989 Corte Santa Fe • San Diego, California, 92121 • Phone 858.458.9908 • Fax: 858.458.1173</span><br>';
	html +=		'<span class="footer2">Phoenix </span><span class="footer1"> 23910 N. 19th Ave Bldg #3 Suite #52 • Phoenix, Arizona, 85085 • Phone 623.215.6151 • Fax: 623.780.8282</span><br>';
	html +=		'<span class="footer2">Las Vegas </span><span class="footer1"> 3245 Patrick Lane, Suite G • Las Vegas, Nevada, 89120 • Phone 702.434.6205 • Fax: 702.454.2047</span><br>';
	html +=		'<span class="footer2">Copyright © 2004 Pacific Event Productions/Pacific Entertainment Productions. All rights reserved.</span>';
	

	document.write(html);
}

function populateHeader (imgUrl) {
	var html = '<div id="topLinks" style="position:absolute; top:68; left:389; z-index:46"><img src="images/' + imgUrl + '" alt="" border="0"></div>';
	//alert(html)
	document.write(html);
}
//////////////////////////
// Graphical Dropdown Menu
// Written by Jay Baugh on 8/31/2001
// Platforms: IE 4.0+, Netscape 4, Netscape 6+
//				
 
/*** EXAMPLE OF USAGE ***

Place this code in the visible menu heading layer:
onMouseOut="hideDrop('drop0')" onMouseOver="showDrop('drop0')"

Do NOT place MouseOver or MouseOut on the dropdown layer, this will be done automatically

*** END OF EXAMPLE ***/


// Is this Netscape version 4 or earlier?
var v4	= (parseInt(navigator.appVersion) < 5) ? 1 : 0;
var ns	= (navigator.appName.match(/Netscape/) && v4) ? 1 : 0;
// Need to check for IE cause IE4 and IE4 only needs to have the width tag of a layer set
var ie = (navigator.appName.match(/Microsoft Internet Explorer/) && v4) ? 1 : 0;
var opera = (navigator.userAgent.indexOf("Opera") != -1 ? 1 : 0);

currentTimer = false;			// stores setTimer id code (for clearTimer)
window.previousWindow = false;	// store previously visible layer

////////////////////////////
// Shows Dropdown Layer
function showdrop(layerID)
{
	MM_findObj('droptop' + layerID.charAt(8)).className = 'navlinkover';

	// If the previous popup layer is the same (mouse moved from heading 
	// to actual popup, or vise versa) than clear hidedrop timer
	if(window.previousWindow == layerID)
	{
		clearTimeout(window.currentTimer);
		window.previousWindow = false;
	}

	// If there is a previous unhidden layer, hide it now
	if(window.previousWindow) hideMenu(window.previousWindow);
	
	// show the drop menu
	layerObj = MM_findObj(layerID);
	if(ns)	layerObj.visibility="show";
	else	layerObj.style.visibility="visible";
}
  
////////////////////////////
// Setup Timeout to Hide Drop Menu
// This gives the user time to move the mouse into the lower portion
// of the drop-down graphic. Otherwise it would hide immediately.
//
function hidedrop(layerID)
{	
	window.previousWindow = layerID;
	window.currentTimer = setTimeout("hideMenu('" + layerID + "')", 100);
}

//////////////////////////
// Hide the Drop Menu
//
function hideMenu(layerID)
{
//	reset droptop styles (orangeLinkCount is how many sublayers there are)
	var orangeLinkCount = 2;
	MM_findObj('droptop' + layerID.charAt(8)).className = (layerID.charAt(8) < orangeLinkCount) ? 'navsublink' : 'navlink';
	
	layerObj = MM_findObj(layerID);
	if(ns)	layerObj.visibility="hide";
	else	layerObj.style.visibility="hidden";												
	window.previousWindow = false;
}

function dropRollover(obj){
  MM_findObj(obj).style.backgroundColor = "#FF6600";
}

function dropRollout(obj){
  MM_findObj(obj).style.backgroundColor = "#99CC33";
}

<!--
	//***********************************************************************
	//	CROSS BROWSER SCROLLER
	//	IE, Netscape 4+ TESTED
	//
	//
	//***********************************************************************
	// VARIABLE DECLARATION
	//***********************************************************************
	//***********************************************************************
	// BROWSER DETECTION
	var NN4 = (document.layers ? true : false);
	var IE4 = (document.all && !document.getElementById ? true : false);
	var IE5 = (document.all && document.getElementById ? true : false);
	var NN6 = (!document.all && document.getElementById ? true : false);
	//***********************************************************************

	var intTimer;				//INTEGER 	- Used to repeatidly call the moveUp and moveDown function to scroll layer
	var intOffsetHeight;		//INTEGER 	- Lets us know how much to scroll the layer
	var intSpeed = 10;			//INTEGER 	- Speed to scroll at
	var intClipHeight = 355;	//INTEGER	- Height of the clippping layer
	var objCurrentLayer;		//OBJECT	- Refrences the current scroll layer

	//***********************************************************************
	// FUNCTIONS
	//***********************************************************************
	//***********************************************************************
	// PARAMETERS:	None
	// PARAM TYPES:	N/A
	//
	// PURPOSE:		Scrolls the layer to show more content. When the layer
	//				reaches the end, the interval is cleared to fee memory.
	//***********************************************************************
	function moveUp(){
		var intTop = getTop();							// Gets the layer's top location

		if (intTop < -intSpeed) {
			objCurrentLayer.top = intTop + intSpeed;	// Moves the layer to show more text
		} else {
			objCurrentLayer.top = 0;					// Sets the layer to show the start of the text
			endScroll();								// Call the endScroll function to stop further execution
		}
	}
	
	//***********************************************************************
	// PARAMETERS:	None
	// PARAM TYPES:	N/A
	//
	// PURPOSE:		Scrolls the layer to show more content. When the layer
	//				reaches the end, the interval is cleared to fee memory.
	//***********************************************************************
	function moveDown(){
		var intTop = getTop();							// Gets the layer's top location

		if (intTop > (-intOffsetHeight + intSpeed)) {
			objCurrentLayer.top = intTop - intSpeed;	// Moves the layer to show more text
		} else {
			objCurrentLayer.top = -intOffsetHeight;		// Sets the layer to show the end of the text
			endScroll();								// Call the endScroll function to stop further execution
		}
	}
	
	//***********************************************************************
	// PARAMETERS:	None
	// PARAM TYPES:	N/A
	//
	// PURPOSE:		Gets the layers top location and returns it to the caller.
	//***********************************************************************
	function getTop(){
		if (NN4) return objCurrentLayer.top;		
		// Strip off the "px" - pixelTop is not Netscape 6 compliant so we use top instead which is a string
		else return parseInt(objCurrentLayer.top.substring(0, objCurrentLayer.top.indexOf("p")));
	}
	
	//***********************************************************************
	// PARAMETERS:	None
	// PARAM TYPES:	N/A
	//
	// PURPOSE:		Clears the interval to stop further execution and free
	//				resources.
	//***********************************************************************
	function endScroll(){
		clearInterval(intTimer);	// Clear the timer so the up/down functions are no longer called
		window.status = "";			// Clear the status message
	}
	
	//***********************************************************************
	// PARAMETERS:	strDirection  	= String	- Direction to scroll
	//				objLayer		= Object	- Layer to scroll
	//
	// PURPOSE:		Detects if scrolling is needed and calls the appropriate
	//				function if it is needed.
	//***********************************************************************
	function scrollDir(strDirection, objLayer){
		// Gets a reference to the scrollable layer
		var objTmpLayer = (NN4? document.layers(objLayer) : NN6? document.getElementById(objLayer) : document.all[objLayer]);
		// Gets the offset height of the current layer
		intOffsetHeight = (NN4 ? objTmpLayer.clip.height : objTmpLayer.offsetHeight) - intClipHeight;		
		// Refrences the current layer to scroll
		objCurrentLayer = (NN4 ? objTmpLayer : objTmpLayer.style);
		// IE needs to set the top before referencing it since it doesn't exist until then
		if (objCurrentLayer.top == 0) objCurrentLayer.top = 0;
		// Gets the top of the current layer to see if scrolling is needed
		var top = (NN4 ? objCurrentLayer.top : parseInt(objCurrentLayer.top.substring(0, objCurrentLayer.top.indexOf("p"))));

		if (strDirection == "up") {
			if (top <= 0) intTimer = setInterval("moveUp()", 50);	// If scrolling is needed, scroll up
		} else {
			if (top >= -intOffsetHeight) intTimer = setInterval("moveDown()", 50);	// If scrolling is needed, scroll down
		}
		
		window.status = "Scrolling " + strDirection.toUpperCase();	// Changes the status message
	}
