menunum=0;
menus=new Array();
_d=document;
midscreenX=0;
midscreenY=0;
vertmenuX=0;

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)
}

	
// Determine screen size //

function windowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  midscreenX = (myWidth/2);
  midscreenY = (myHeight/2);

  
/* window.alert( 'Width = ' + myWidth + ' and Height = ' + myHeight + ' and vertmenuX = ' + vertmenuX ); */
  
}

// End Determine screen size //


////////////////////////////////////
// Editable properties START here //
////////////////////////////////////

// Special effect string for IE5.5 or above please visit http://www.milonic.co.uk/menu/filters_sample.php for more filters
if(navigator.appVersion.indexOf("MSIE 6.0")>0)
{
	effect = "Fade(duration=0.2);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
}
else
{
	effect = "Shadow(color='#777777', Direction=135, Strength=5)" // Stop IE5.5 bug when using more than one filter
}


timegap=1000			// The time delay for menus to remain visible
followspeed=5		// Follow Scrolling speed
followrate=40		// Follow Scrolling Rate
suboffset_top=8;	// Sub menu offset Top position 
suboffset_left=2;	// Sub menu offset Left position

style1=[			// style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
"F9E8AD",			// Mouse Off Font Color
"3F3628",			// Mouse Off Background Color
"F4F1ED",			// Mouse On Font Color
"917C5C",			// Mouse On Background Color (also tried "2E2E2E")
"BDBDBD",			// Menu Border Color 
14,					// Font Size in pixels (original was 12, but looked smaller on iphone)
"normal",			// Font Style (italic or normal) (original was bold, but removed when went to 14 point)
"normal",			// Font Weight (bold or normal)
"Tahoma",			// Font Name
0,					// Menu Item Padding (original was 1, but removed when went to 14 point)
"/i/tri.gif width='9' height='9'",	// Sub Menu Image (Leave this blank if not needed)
,					// 3D Border & Separator bar
"66ffff",			// 3D High Color
"000099",			// 3D Low Color
,					// Current Page Item Font Color (leave this blank to disable)
,					// Current Page Item Background Color (leave this blank to disable)
,					// Top Bar image (Leave this blank to disable)
,					// Menu Header Font Color (Leave blank if headers are not needed)
,					// Menu Header Background Color (Leave blank if headers are not needed)
"bdbdbd",			// Menu Item Separator Color
]


style2=[			// style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
"F9E8AD",			// Mouse Off Font Color
"3F3628",			// Mouse Off Background Color
"F4F1ED",			// Mouse On Font Color
"917C5C",			// Mouse On Background Color (also tried "2E2E2E")
"CBC3B6",			// Menu Border Color 
12,					// Font Size in pixels
"normal",			// Font Style (italic or normal)
"bold",			// Font Weight (bold or normal)
"Tahoma",			// Font Name
3,					// Menu Item Padding
"/i/tri.gif width='9' height='9'",	// Sub Menu Image (Leave this blank if not needed)
,					// 3D Border & Separator bar
"66ffff",			// 3D High Color
"000099",			// 3D Low Color
,					// Current Page Item Font Color (leave this blank to disable)
,					// Current Page Item Background Color (leave this blank to disable)
,					// Top Bar image (Leave this blank to disable)
,					// Menu Header Font Color (Leave blank if headers are not needed)
,					// Menu Header Background Color (Leave blank if headers are not needed)
"CBC3B6",			// Menu Item Separator Color
]



/*
addmenu(menu=[		// This is the array that contains your menu properties and details
"aboutMenu",		// Menu Name - This is needed in order for the menu to be called
190,				// Menu Top - The Top position of the menu in pixels
197,				// Menu Left - The Left position of the menu in pixels
150,				// Menu Width - Menus width in pixels
1,					// Menu Border Width 
,					// Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style1,				// Properties Array - this is set higher up, as above
0,					// Always Visible - allows the menu item to be visible at all time (1=on/0=off)
"left",				// Alignment - sets the menu elements text alignment, values valid here are: left, right or center
,				  // Filter - Text variable for setting transitional effects on menu activation - see above for more info
,					// Follow Scrolling - Tells the menu item to follow the user down the screen (visible at all times) (1=on/0=off)
, 				// Horizontal Menu - Tells the menu to become horizontal instead of top to bottom style (1=on/0=off)
,					// Keep Alive - Keeps the menu visible until the user moves over another menu or click elsewhere on the page (1=on/0=off)
,					// Position of TOP sub image left:center:right
,					// Set the Overall Width of Horizontal Menu to 100% and height to the specified amount (Leave blank to disable)
,					// Right To Left - Used in Hebrew for example. (1=on/0=off)
,					// Open the Menus OnClick - leave blank for OnMouseover (1=on/0=off)
,					// ID of the div you want to hide on MouseOver (useful for hiding form elements)
,					// Background image for menu when BGColor set to transparent.
,					// Scrollable Menu
,					// Reserved for future use
,"Home","http://www.dynamicdrive.com",,"Back to the home page",1 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"News&nbsp;sites&nbsp;&nbsp;","show-menu=news",,"",1
,"Webmaster&nbsp;&nbsp;","show-menu=webmaster",,"",1
,"Downloads&nbsp;&nbsp;","show-menu=downloads",,"",1
,"Search&nbsp;&nbsp;","show-menu=search",,"",1
,"Other&nbsp;&nbsp;","show-menu=other",,"",1
])*/

/* Note: all lines with menu items should have a comma at the end.
The last line in the list of menu items should not end with a comma */

addmenu(menu=["products",
65,0,100,0,"center",style1,0,"center",,,1,,,,,,,,,,,
"MicPort Pro","/products/mp/",,"24bit/96kHz USB Microphone Preamp",1,
"AxePort Pro","/products/ap/",,"24bit/96kHz USB Direct Box for Guitar or Bass",1,
"DACport","/products/dacport/",,"24bit/96kHz Reference USB Headphone Amp",1,
"DACmini","/products/dacmini/",,"192kHz DAC with Headphone Amp",1

])

/* addmenu(menu=["artists",
65,0,100,0,"center",style1,0,"center",,,1,,,,,,,,,,,
"MicPort Pro","/artists/mp/",,"MicPort Pro Artists",1,
"AxePort Pro","/artists/ap/",,"AxePort Pro Artists",1
])
*/

addmenu(menu=["reviews",
65,0,100,0,"center",style1,0,"center",,,1,,,,,,,,,,,
"MicPort Pro","/reviews/mp/",,"MicPort Pro Reviews",1,
"AxePort Pro","/reviews/ap/",,"AxePort Pro Reviews",1,
"DACport","/reviews/dacport/",,"DACport Reviews",1
])

addmenu(menu=["buy",
65,0,100,0,"center",style1,0,"center",,,1,,,,,,,,,,,
"Online Store","/store/",,"Online Store",1,
/*"Rebates","/buy/rebates.shtml",,"Available Rebates",1,*/
"Dealer List","show-menu=dealers_menu",,"Dealers and Distributors",1,
"New Dealers","/dealers/dealer_request.shtml",,"Want to Be a Dealer?",1
])

addmenu(menu=["support",
65,0,100,0,"center",style1,0,"center",,,1,,,,,,,,,,,
"Downloads","/downloads/",,"Free Downloads",1,
"Registration","/products/registration.php?product=0",,"Product Registration",1,
"User Forum","/forum/",,"CEntrance User Forum",1
])

/* 
addmenu(menu=["licensing",
65,0,100,0,"center",style1,0,"center",,,1,,,,,,,,,,,
"USB Audio","/licensing/usb/",,"USB Audio Solutions",1,
"FireWire Audio","/licensing/firewire/",,"FireWire Audio Solutions",1,
"Drivers","/licensing/drivers/",,"OEM Driver Solutions",1,
"NPD Process","/licensing/process/",,"Our Development Process",1,
"Recent Clients","/licensing/clients.shtml",,"Recent Clients",1
])
*/

addmenu(menu=["about",
65,0,100,0,"center",style1,0,"center",,,1,,,,,,,,,,,
"Press Releases","/about/pr/",,"Press Releases",1,
"Press Photos","/about/photos/",,"Hi-Res Product Photos",1,
"White Papers","/about/tr/",,"Technical Resources",1,
"Our Partners","/about/partners/",,"Industry Partnerships",1,
"Contact Us","/about/contact/",,"Contact Us",1
/* "Employment","/about/employment.shtml",,"About us / Employment",1,*/
/* "Newsletter","/about/as/",,"About us / Newsletter",1,*/
/* "Our Blog","/blog",,"CEntrance Blog",1 */
])

/* Second Level menu */

addmenu(menu=["dealers_menu",
90,0,100,1,"center",style1,0,"center",,,1,,,,,,,,,,,
"MicPort Pro","/dealers/mp_dealers.shtml",,"Where to Buy MicPort Pro",1,
"AxePort Pro","/dealers/ap_dealers.shtml",,"Where to Buy AxePort Pro",1
])

windowSize()

/* Vertical Menu x coordinate */
if (midscreenX > 583) {vertmenuX = midscreenX-583;}
else {vertmenuX=10;}


addmenu(menu=["ap_vert_menu",
103,vertmenuX,100,1,"",style2,0,"",,1,0,1,,,,,,,,,,
"Where to Buy","/dealers/ap_dealers.shtml",,"Where to Buy",1,
"Reviews","/reviews/ap/",,"Press reviews",1,
"Artists","/artists/ap/",,"Artists and Users",1,
/* "Audio / Video","/clips/ap",,"Audio Samples",1, 
"How to Use","/products/ap/ap_applications.shtml",,"How to use",1,*/
"FAQ","/forum/viewtopic.php?f=21&t=196",,"FAQ on the User Forum",1,
"Datasheet","AxePort_Pro_Datasheet.pdf",,"AxePort Pro Datasheet",1,
"Downloads","/downloads/",,"Software downloads",1,
"Photos","/about/photos",,"Hi-Resolution Photos",1
])


addmenu(menu=["mp_vert_menu",
103,vertmenuX,100,1,"",style2,0,"",,1,0,1,,,,,,,,,,
"Where to Buy","/dealers/mp_dealers.shtml",,"Where to Buy",1,
"Reviews","/reviews/mp/",,"Press reviews",1,
"Artists","/artists/mp/",,"Artists and Users",1,
"Audio / Video","/clips/mp",,"Audio Samples",1,
"How to Use","/products/mp/mp_applications.shtml",,"How to use",1,
"FAQ","/forum/viewtopic.php?f=15&t=163",,"FAQ on the User Forum",1,
"Datasheet","MicPortPro_Data_Sheet.pdf",,"MicPort Pro Datasheet",1,
"Downloads","/downloads/",,"Software downloads",1,
"Photos","/about/photos",,"Hi-Resolution Photos",1
])


dumpmenus()

