// Initialize WebDDM
function initWebDDM ()
{
	// Preload all the images we will be using...
	WebDDM_preloadImages('menus/mainmenu/arrowdown.gif',
		'menus/mainmenu/arrowleft.gif');
	
	// Set arrow HTML
	var arrowDown = '<span style="position:relative;top:0;left:5;">'+
		'<img src="menus/mainmenu/arrowdown.gif" style="border-style: none;" />' +
		'</span>';
	var arrowLeft = '<span style="position:relative;top:0;left:5;">'+
		'<img src="menus/mainmenu/arrowleft.gif" style="border-style: none;" />' +
		'</span>';
			
	// Begin base menu
	var menu = {
		'position':'relative',
		'top':0,
		'left':0,
		'width':650,
		'height':30,
		'expand_menu':'auto',

		// Begin array of Masters Top Bar, level 0
		'items':{
			'top':0,
			'left':0,
			
			'background-item':{
				'width': 550, 'height': 26,
				'top':0, 'left':0,
				'class': 'container'
			},
			
			1:{
				'content':'Masters' + arrowDown,
				'content_menuopen':'<a href="index.html"><u>M</u>asters' + arrowLeft + '</a>',
				'cursor':'hand',
				'width':130, 'height':18, 'offsetLeft':100,'offsetTop':3,
				'class':'mainmenu_off',
				'class_menuopen':'mainmenu_rollover',
				'tooltip':{
					'content':'Master Items',
					'classPrefix':'domTTClassic',
					'trail':true
				},

				// Begin array of Masters
				'items':{
					'top':20,
					'left':0,

					'background-item':{
						'width':136, 'height':136, 'left':0, 'top':2,
						'class':'container'
					},
					
					1:{
						'content':'Materials' + arrowDown,
						'content_menuopen':'<u>M</u>aterials' + arrowLeft,
						'width':130, 'height':20, 'offsetTop':22,
						'class':'mainmenu_off',
						'class_menuopen':'mainmenu_rollover',

						// Begin array of Materials
						'items':{
							'top':0,
							'left':130,
							
							// Background item
							'background-item':{
								'width':132, 'height':200, 'left':2, 'top':0,
								'class':'container'
							},

							1:{
								'content':'Material',
								'content_rollover':'<a href="/wilson/prgmas/purchase/material/index.html"><u>M</u>aterials</a>',
								'cursor':'hand',
								'width':130, 'height':20, 'offsetLeft':1, 'offsetTop':3,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							2:{
								'content':'Material Category',
								'content_rollover':'<a href="/wilson/prgmas/purchase/prodcat/index.html">Material Caategory </a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							3:{
								'content':'Material Type',
								'content_rollover':'<a href="/wilson/prgmas/purchase/type/index.html">Material Type </a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							4:{
								'content':'Material Size',
								'content_rollover':'<a href="/wilson/prgmas/purchase/size/index.html">Material Size </a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},														
							5:{
								'content':'Material Width',
								'content_rollover':'<a href="/wilson/prgmas/purchase/width/index.html">Material Width</a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							6:{
								'content':'Material Thickness',
								'content_rollover':'<a href="/wilson/prgmas/purchase/thick/index.html">Material Thickness</a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							7:{
								'content':'Material Grade',
								'content_rollover':'<a href="/wilson/prgmas/purchase/grade/index.html">Material Grade</a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							8:{
								'content':'Material Finish',
								'content_rollover':'<a href="/wilson/prgmas/purchase/finish/index.html">Material Finish</a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},							
							9:{
								'content':'Material Suppliers',
								'content_rollover':'<a href="/wilson/prgmas/purchase/buyer/index.html">Material Suppliers</a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							}														
							
														
						}
						// End array of Materials					
					},
					
					2:{
						'content':'MIN Masters' + arrowDown,
						'content_menuopen':'MIN Masters' + arrowLeft,
						'width':130, 'height':20, 'offsetTop':22,
						'class':'mainmenu_off',
						'class_menuopen':'mainmenu_rollover',

						// Begin array of Materials
						'items':{
							'top':0,
							'left':130,
							
							// Background item
							'background-item':{
								'width':132, 'height':200, 'left':2, 'top':0,
								'class':'container'
							},

							1:{
								'content':'Characteristics',
								'content_rollover':'<a href="/wilson/prgent/inward_material/character/index.html"><u>Characteristics</a>',
								'cursor':'hand',
								'width':130, 'height':20, 'offsetLeft':1, 'offsetTop':3,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							2:{
								'content':'Material Category',
								'content_rollover':'<a href="/wilson/prgmas/purchase/prodcat/index.html">Material Caategory </a>',
								'cursor': 'hand',
								'width':130, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							}
														
							
														
						}
						// End array of Materials					
					}					
					
					
					
					
					
					
				}
				// End array of Masters, item 4
			},
			// End of Down Array 
			2:{
				'content':'Transactions' + arrowDown,
				'content_menuopen':'<a href="index.html"><u>T</u>ransactions' + arrowLeft + '</a>',
				'cursor':'hand',
				'width':130, 'height':20, 'offsetLeft':132,
				'class':'mainmenu_off',
				'class_menuopen':'mainmenu_rollover',
				'tooltip':{
					'content':'Daily Transactions',
					'classPrefix':'domTTClassic',
					'trail':true
				},

				// Begin array of Transactions
				'items':{
					'top':20,
					'left':0,

					'background-item':{
						'width':136, 'height':180, 'left':0, 'top':2,
						'class':'container'
					},
//**********************************************************************					
					1:{
						'content':'Material Requisition' + arrowDown,
						'content_menuopen':'Material_Requisition' + arrowLeft,
						'width':130, 'height':30, 'offsetTop':25,
						'class':'mainmenu_off',
						'class_menuopen':'mainmenu_rollover',

						// Begin array of Customers
						'items':{
							'top':0,
							'left':130,
							
							// Background item
							'background-item':{
								'width':150, 'height':275, 'left':2, 'top':0,
								'class':'container'
							},

							1:{
								'content':'Requirement Entry',
								'content_rollover':'<a href="/wilson/prgent/requirement/index.html">Requirement Entry</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetLeft':3, 'offsetTop':3,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							2:{
								'content':'Approval',
								'content_rollover':'<a href="/wilson/prgent/requirement/app_select.php">Approval</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							3:{
								'content':'Prepare P O',
								'content_rollover':'<a href="/wilson/prgent/po/index.html">Prepare P O</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},							
							4:{
								'content':'Prepare MIN ',
								'content_rollover':'<a href="/wilson/prgent/matin/matin.php">Prepare MIN</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							5:{
								'content':'View / Edit MIN ',
								'content_rollover':'<a href="/wilson/prgent/matin/mat_select.php">View / Edit MIN</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							6:{
								'content':'Edit Purchase Register',
								'content_rollover':'<a href="/wilson/prgent/matin/mat_select1.php">Edit Purchase Register</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							7:{
								'content':'Edit Stock Register',
								'content_rollover':'<a href="/wilson/prgent/stockedit/view_sele.php">Edit Stock Register</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},																												
							8:{
								'content':'Consumables Entry',
								'content_rollover':'<a href="/wilson/prgent/matin/con_select.php">Consumables Entry</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},	
							9:{
								'content':'Consumables Edit',
								'content_rollover':'<a href="/wilson/prgent/matin/con_edit.php">Consumables Edit</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},
							10:{
								'content':'Opening Stock Entry',
								'content_rollover':'<a href="/wilson/prgent/matin/open_entry.php">Opening Stock Entry</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':22,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},							
							11:{
								'content':'Issue Rawmaterials & Consumables',
								'content_rollover':'<a href="/wilson/prgent/matin/issue_mat.php">Issue Rawmaterials & Consumables</a>',
								'cursor':'hand',
								'width':132, 'height':20, 'offsetTop':35,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							}																											
							
							
						}
						// End array of Customers
					}


					
				}
				// End array of Masters, item 4
			},
			3:{
				'content':'Reports' + arrowDown,
				'content_menuopen':'<a href="index.html">Reports' + arrowLeft + '</a>',
				'cursor':'hand',
				'width':130, 'height':20, 'offsetLeft':132,
				'class':'mainmenu_off',
				'class_menuopen':'mainmenu_rollover',
				'tooltip':{
					'content':'Reports',
					'classPrefix':'domTTClassic',
					'trail':true
				},

				'items':{
					'top':20,
					'left':0,

					'background-item':{
						'width':175, 'height':180, 'left':0, 'top':2,
						'class':'container'
					},

					
					1:{
						'content':'Raw Materials and Consumables' + arrowDown,
						'content_menuopen':'Raw Materials & Consumables' + arrowLeft,
						'width':170, 'height':20, 'offsetLeft':3, 'offsetTop':22,
						'class':'mainmenu_off',
						'class_menuopen':'mainmenu_rollover',

						'items':{
							'top':0,
							'left':150,

							'background-item':{
								'width':190, 'height':100, 'left':2, 'top':0,
								'class':'container'
							},
							1:{
								'content':'Closing Stock',
								'content_rollover':'<a href="/wilson/prgent/reports/clstk_slct.php">Closing Stock</a>',
								'cursor':'hand',
								'width':130, 'height':20, 'offsetLeft':5, 'offsetTop':2,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							},							

							2:{
								'content':'Stock Register',
								'content_rollover':'<a href="/wilson/prgent/reports/stk_slct.php">Stock Register</a>',
								'cursor':'hand',
								'width':130, 'height':20, 'offsetTop':35,
								'class':'mainmenu_off',
								'class_rollover':'mainmenu_rollover'
							}

							
						}
						// End array of Raw materials & Consumables
						
					}
				}
				// End array of Masters, item 4
			}						
			
			
	//  HORIZONTAL MENUS DEFENITIONS MUST BE INSIDE THIS LOOP		
			
		}
		// End array of Masters Top Bar Menu
	};
	// End base menu

	// Activate and build menu
	var WebDDM_mainmenu = new WebDDM('mainmenu', menu);
}  // End of function Bracket
