var menu_items = Array();


menu_items['company'] = Array();
menu_items['company'][0] = Array();
menu_items['company'][0]['title'] = 'Welcome Message';
menu_items['company'][0]['link'] = 'http://www.vicon-cctv.com/company.html';
menu_items['company'][1] = Array();
menu_items['company'][1]['title'] = 'Corporate Profile';
menu_items['company'][1]['link'] = 'http://www.vicon-cctv.com/corporate_overview/corp_overview_sheet.pdf';
menu_items['company'][2] = Array();
menu_items['company'][2]['title'] = 'Investor Relations';
menu_items['company'][2]['link'] = 'http://www.vicon-cctv.com/company_investor.html';
menu_items['company'][3] = Array();
menu_items['company'][3]['title'] = 'Press Releases';
menu_items['company'][3]['link'] = 'http://www.vicon-cctv.com/company_media.html';
menu_items['company'][4] = Array();
menu_items['company'][4]['title'] = 'Tradeshows';
menu_items['company'][4]['link'] = 'company_tradeshows.html';
menu_items['company'][5] = Array();
menu_items['company'][5]['title'] = 'Human Resources';
menu_items['company'][5]['link'] = 'http://www.vicon-cctv.com/company_hr.html';
menu_items['company'][6] = Array();
menu_items['company'][6]['title'] = 'Job Postings';
menu_items['company'][6]['link'] = 'http://www.vicon-cctv.com/company_careers.html';
menu_items['company'][7] = Array();
menu_items['company'][7]['title'] = 'Partnerships';
menu_items['company'][7]['link'] = 'http://www.vicon-cctv.com/company_partners.html';
menu_items['company'][8] = Array();
menu_items['company'][8]['title'] = 'Contact Us';
menu_items['company'][8]['link'] = 'http://www.vicon-cctv.com/company_contact.html';


menu_items['products'] = Array();
menu_items['products'][0] = Array();
menu_items['products'][0]['title'] = 'ViconNet Software and Components';
menu_items['products'][0]['link'] = '';
menu_items['products'][1] = Array();
menu_items['products'][1]['title'] = 'Software, NVRs and DVRs';
menu_items['products'][1]['link'] = 'itemlist.htm?category=Software%2C%20NVRs%20and%20DVRs';
menu_items['products'][1]['submenu'] = true;
menu_items['products'][2] = Array();
menu_items['products'][2]['title'] = 'Encoders and Decoders';
menu_items['products'][2]['link'] = 'itemlist.htm?category=Encoders%20and%20Decoders';
menu_items['products'][2]['submenu'] = true;
menu_items['products'][3] = Array();
menu_items['products'][3]['title'] = 'Miscellaneous';
menu_items['products'][3]['link'] = 'itemlist.htm?category=Miscellaneous';
menu_items['products'][3]['submenu'] = true;
menu_items['products'][4] = Array();
menu_items['products'][4]['title'] = 'Non-ViconNet DVR Systems';
menu_items['products'][4]['link'] = 'itemlist.htm?category=Non-ViconNet%20DVR%20Systems';
menu_items['products'][5] = Array();
menu_items['products'][5]['title'] = 'SMS Access Control';
menu_items['products'][5]['link'] = 'itemlist.htm?category=SMS Access Control';
menu_items['products'][6] = Array();
menu_items['products'][6]['title'] = 'Matrix Switching Systems';
menu_items['products'][6]['link'] = '';
menu_items['products'][7] = Array();
menu_items['products'][7]['title'] = 'Pilot Matrix Switching Systems';
menu_items['products'][7]['link'] = 'itemlist.htm?category=Pilot%20Matrix%20Switching%20Systems';
menu_items['products'][7]['submenu'] = true;
menu_items['products'][8] = Array();
menu_items['products'][8]['title'] = 'NOVA V1500 Series';
menu_items['products'][8]['link'] = 'itemlist.htm?category=NOVA%20V1500%20Series';
menu_items['products'][8]['submenu'] = true;
menu_items['products'][9] = Array();
menu_items['products'][9]['title'] = 'NOVA V1300 Series';
menu_items['products'][9]['link'] = 'itemlist.htm?category=NOVA%20V1300%20Series';
menu_items['products'][9]['submenu'] = true;
menu_items['products'][10] = Array();
menu_items['products'][10]['title'] = 'Keypads';
menu_items['products'][10]['link'] = 'itemlist.htm?category=Keypads';
menu_items['products'][10]['submenu'] = true;
menu_items['products'][11] = Array();
menu_items['products'][11]['title'] = 'Peripherals';
menu_items['products'][11]['link'] = 'itemlist.htm?category=Peripherals';
menu_items['products'][11]['submenu'] = true;
menu_items['products'][12] = Array();
menu_items['products'][12]['title'] = 'Cameras and Camera Dome Systems';
menu_items['products'][12]['link'] = '';
menu_items['products'][13] = Array();
menu_items['products'][13]['title'] = 'Megapixel Cameras';
menu_items['products'][13]['link'] = 'itemlist.htm?category=Megapixel%20Cameras';
menu_items['products'][13]['submenu'] = true;
menu_items['products'][14] = Array();
menu_items['products'][14]['title'] = 'PTZ Domes';
menu_items['products'][14]['link'] = 'itemlist.htm?category=PTZ%20Domes';
menu_items['products'][14]['submenu'] = true;
menu_items['products'][15] = Array();
menu_items['products'][15]['title'] = 'Fixed Domes';
menu_items['products'][15]['link'] = 'itemlist.htm?category=Fixed%20Domes';
menu_items['products'][15]['submenu'] = true;
menu_items['products'][16] = Array();
menu_items['products'][16]['title'] = 'Box Cameras';
menu_items['products'][16]['link'] = 'itemlist.htm?category=Box%20Cameras';
menu_items['products'][16]['submenu'] = true;
menu_items['products'][17] = Array();
menu_items['products'][17]['title'] = 'Specialty Cameras';
menu_items['products'][17]['link'] = 'itemlist.htm?category=Specialty%20Cameras';
menu_items['products'][17]['submenu'] = true;
menu_items['products'][18] = Array();
menu_items['products'][18]['title'] = 'Camera Accessories';
menu_items['products'][18]['link'] = '';
menu_items['products'][19] = Array();
menu_items['products'][19]['title'] = 'Mounting Options';
menu_items['products'][19]['link'] = 'itemlist.htm?category=Mounting%20Options';
menu_items['products'][19]['submenu'] = true;
menu_items['products'][20] = Array();
menu_items['products'][20]['title'] = 'Lenses';
menu_items['products'][20]['link'] = 'itemlist.htm?category=Lenses';
menu_items['products'][20]['submenu'] = true;
menu_items['products'][21] = Array();
menu_items['products'][21]['title'] = 'Housing';
menu_items['products'][21]['link'] = 'itemlist.htm?category=Housing';
menu_items['products'][21]['submenu'] = true;
menu_items['products'][22] = Array();
menu_items['products'][22]['title'] = 'PTZ Devices';
menu_items['products'][22]['link'] = 'itemlist.htm?category=PTZ%20Devices';
menu_items['products'][22]['submenu'] = true;
menu_items['products'][23] = Array();
menu_items['products'][23]['title'] = 'Power Supplies';
menu_items['products'][23]['link'] = 'itemlist.htm?category=Power%20Supplies';
menu_items['products'][23]['submenu'] = true;
menu_items['products'][24] = Array();
menu_items['products'][24]['title'] = 'Monitors';
menu_items['products'][24]['link'] = 'itemlist.htm?category=Monitors';
menu_items['products'][25] = Array();
menu_items['products'][25]['title'] = 'Video Signal and Fiber Optic Transmission';
menu_items['products'][25]['link'] = 'itemlist.htm?category=Video%20Signal%20and%20Fiber%20Optic%20Transmission';

menu_items['sales'] = Array();
menu_items['sales'][0] = Array();
menu_items['sales'][0]['title'] = 'US';
menu_items['sales'][0]['link'] = 'http://www.vicon-cctv.com/sales_us.html';
menu_items['sales'][1] = Array();
menu_items['sales'][1]['title'] = 'Europe/Middle East';
menu_items['sales'][1]['link'] = 'http://www.vicon-cctv.com/sales_europe.html';
menu_items['sales'][2] = Array();
menu_items['sales'][2]['title'] = 'Other International';
menu_items['sales'][2]['link'] = 'http://www.vicon-cctv.com/sales_intl.html';
menu_items['sales'][3] = Array();
menu_items['sales'][3]['title'] = 'A&E';
menu_items['sales'][3]['link'] = 'http://www.vicon-cctv.com/ae.html';
menu_items['sales'][4] = Array();
menu_items['sales'][4]['title'] = 'USPS';
menu_items['sales'][4]['link'] = 'sales_usps.html';
menu_items['sales'][5] = Array();
menu_items['sales'][5]['title'] = 'Sales Portal';
menu_items['sales'][5]['link'] = 'http://www.vicon-cctv.com/Sales%20portal/';

menu_items['support'] = Array();
menu_items['support'][0] = Array();
menu_items['support'][0]['title'] = 'Order Tracking';
menu_items['support'][0]['link'] = 'https://eportal.vicon-cctv.com/';
menu_items['support'][1] = Array();
menu_items['support'][1]['title'] = 'Tech Support';
menu_items['support'][1]['link'] = 'http://www.vicon-cctv.com/support.html';
menu_items['support'][2] = Array();
menu_items['support'][2]['title'] = 'Manuals';
menu_items['support'][2]['link'] = 'ftp://ftp.vicon-cctv.com/manuals';
menu_items['support'][3] = Array();
menu_items['support'][3]['title'] = 'Service & Parts';
menu_items['support'][3]['link'] = 'http://www.vicon-cctv.com/support_parts.html';
menu_items['support'][4] = Array();
menu_items['support'][4]['title'] = 'A&E Services';
menu_items['support'][4]['link'] = 'http://www.vicon-cctv.com/ae.html';
menu_items['support'][5] = Array();
menu_items['support'][5]['title'] = 'Software Registration';
menu_items['support'][5]['link'] = 'http://ftp.vicon-cctv.com/regkeyoutside';
menu_items['support'][6] = Array();
menu_items['support'][6]['title'] = 'Warranty';
menu_items['support'][6]['link'] = 'http://www.vicon-cctv.com/support_warranty.html';
menu_items['support'][7] = Array();
menu_items['support'][7]['title'] = 'Online Literature';
menu_items['support'][7]['link'] = 'http://www.vicon-cctv.com/support_literature.html';
menu_items['support'][8] = Array();
menu_items['support'][8]['title'] = 'Graphics Library';
menu_items['support'][8]['link'] = 'http://www.vicon-cctv.com/support_graphics.html';
menu_items['support'][9] = Array();
menu_items['support'][9]['title'] = 'Training Videos';
menu_items['support'][9]['link'] = 'http://www.vicon-cctv.com/training-vids.html';

menu_items['education'] = Array();
menu_items['education'][0] = Array();
menu_items['education'][0]['title'] = 'ViconNet Training';
menu_items['education'][0]['link'] = 'http://www.vicon-cctv.com/training.html';
menu_items['education'][1] = Array();
menu_items['education'][1]['title'] = 'SMS Training';
menu_items['education'][1]['link'] = 'http://events.vicon-cctv.com/index.php?m=EventReg#event_10';
menu_items['education'][2] = Array();
menu_items['education'][2]['title'] = 'Training in Europe/Middle East';
menu_items['education'][2]['link'] = 'http://www.vicon-cctv.com/training2.html';
menu_items['education'][3] = Array();
menu_items['education'][3]['title'] = 'Webinars';
menu_items['education'][3]['link'] = 'training_webinars.html';

function showSideMenu(section) {
	var menu_image;
	var i;

	if(section == 'company') {
		menu_image = '/images/company/company_menu.jpg';
	}
	else if(section == 'media') {
		menu_image = '/images/company/media_menu.jpg';
	}
	else if(section == 'partnerships') {
		menu_image = '/images/company/handshake.jpg';
	}	
	else if(section == 'sales') {
		menu_image = '/images/contact/contact_menu.jpg';
	}	
	else if(section == 'support') {
		menu_image = '/images/support/support_menu.jpg';
	}	
	else if(section == 'training') {
		menu_image = '/images/training/training_menu.jpg';
	}	
	else if(section == 'education') {
		menu_image = '/images/training/training_menu.jpg';
	}	
	else if(section == 'contact') {
		menu_image = '/images/contact/contact_menu.jpg';
	}	
	else {
		menu_image = '/images/viconnet/viconnet_menu.gif';
	}

	document.write('<p align="center"><img src="' + menu_image + '" border="0"></p>');
	for(i=0; i<menu_items[section].length; i++) {
		document.write('<p align="center"><a href="' + menu_items[section][i]['link'] + '" style="font-size: 12px; color: #ffffff; font-weight: regular; font-family: arial, verdana, sans-serif; text-decoration: none">' + menu_items[section][i]['title'] + '</a></p>');
	}

}

function alignObjects(obj1Id, obj2Id) {
	var curleft  = 0;
	var obj1 = document.getElementById(obj1Id);
	var obj2 = document.getElementById(obj2Id);
	if (obj1.offsetParent) {
		curleft = obj1.offsetLeft;
		while (obj1 = obj1.offsetParent) {
			curleft += obj1.offsetLeft;
		}
	}
	obj2.style.left = curleft;
}

function createMenu()
{
menu = "<div id=\"Layer1\" align=\"center\" style=\"position:absolute; width:769px; height:19px; z-index:4; top: 76px; visibility: visible;\"> ";

menu +="<form name=\"menu_search\" action=\"/cgi-bin/htsearch\" method=\"post\">";
menu += "<table width=\"769\" height=\"15\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr valign=\"middle\" height=\"15\">";

//home
menu += "<td align=\"center\">";
menu += "<a href=\"index.html\"><div id=\"home1\" style=\"text-align: center; font-family: arial, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; color: #000000; width: 80px; text-align: center; cursor: pointer; cursor: hand\">HOME</div></a>";
menu +="</td>";

//company
menu +="<td align=\"center\">";
menu += "<a href=\"company.html\"><div onMouseOut=\"assistHide('companyLayer');\" onMouseOver=\"alignObjects('company1', 'companyLayer'); MM_showHideLayers('companyLayer','','show')\" id=\"company1\" style=\"text-align: center; font-family: arial, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; color: #000000; width: 80px; text-align: center; cursor: pointer; cursor: hand\">COMPANY</div></a>";
menu +="</td>";

//products
menu +="<td align=\"center\">";
menu += "<a href=\"itemlist.htm\"><div onMouseOut=\"assistHide('Layer2');\" onMouseOver=\"alignObjects('products1', 'Layer2'); MM_showHideLayers('Layer2','','show')\" id=\"products1\" style=\"text-align: center; font-family: arial, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; color: #000000; width: 80px; text-align: center; cursor: pointer; cursor: hand\">PRODUCTS</div></a>";
menu +="</td>";

//sales
menu +="<td align=\"center\">";
menu += "<a href=\"#\"><div onMouseOut=\"assistHide('salesLayer');\" onMouseOver=\"alignObjects('sales1', 'salesLayer'); MM_showHideLayers('salesLayer','','show')\" id=\"sales1\" style=\"text-align: center; font-family: arial, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; color: #000000; width: 80px; text-align: center; cursor: pointer; cursor: hand\">SALES</div></a>";
menu +="</td>";

//support
menu +="<td align=\"center\">";
menu += "<a href=\"support.html\"><div onMouseOut=\"assistHide('supportLayer');\" onMouseOver=\"alignObjects('support1', 'supportLayer'); MM_showHideLayers('supportLayer','','show')\" id=\"support1\" style=\"text-align: center; font-family: arial, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; color: #000000; width: 80px; text-align: center; cursor: pointer; cursor: hand\">SUPPORT</div></a>";
menu +="</td>";


//education
menu +="<td align=\"center\">";
menu += "<a href=\"#\"><div onMouseOut=\"assistHide('educationLayer');\" onMouseOver=\"alignObjects('education1', 'educationLayer'); MM_showHideLayers('educationLayer','','show')\" id=\"education1\" style=\"text-align: center; font-family: arial, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; color: #000000; width: 80px; text-align: center; cursor: pointer; cursor: hand\">EDUCATION</div></a>";
menu +="</td>";

//search
menu +="<td align=\"center\">";
menu +="<div style=\"text-align: center; font-family: arial,sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; color: #000000\">";
menu +="<input type=\"hidden\" name=\"config\" value=\"vicon\">";
menu +="<input type=\"text\" name=\"words\" style=\"width: 100px; height: 14px; font-family: arial,sans-serif; font-size: 9px\" onClick=\"this.focus(); this.select()\" value=\"Search\">";
menu +="&nbsp;";
menu +="<input type=\"submit\" value=\"Go\" style=\"font-size: 10px; font-weight: bold; border: 1px solid #000000; height: 10px width: 12px\">";
menu +="</div>";
menu +="</td>";

menu +="</tr></table>";
menu +="</form";
menu +="</div>";

document.write(menu);

}

//create dropdown
function dropDown()
{
  var i;

//product menu dropdown
 productDropdown = "<div id=\"Layer2\" style=\"position:absolute;  z-index:2; left: 340px; top: 96px; visibility: hidden;\" onMouseOver=\"is_active('Layer2');\" onMouseOut=\"is_inactive('Layer2');assistHide('Layer2');\" class=\"menuLinkLook\">";
  for(i=0; i<menu_items['products'].length; i++) {
    if(menu_items['products'][i]['link']) {
        if(menu_items['products'][i]['submenu']) {
            productDropdown += '&nbsp;&nbsp;&nbsp;';
        }
    	productDropdown += '<a href="' + menu_items['products'][i]['link'] + '" class="menuLook">' + menu_items['products'][i]['title'] + '</a><br />';
    }
    else {
    	productDropdown += '<span class="menuLook">' + menu_items['products'][i]['title'] + '</span><br />';
    }
  }
productDropdown +="</div>";

//company menu dropdown
 companyDropdown = "<div id=\"companyLayer\" style=\"position:absolute; left:220px; height:110px; z-index:1; top: 96px;visibility: hidden;\" onMouseOver=\"is_active('companyLayer');\" onMouseOut=\"is_inactive('companyLayer');assistHide('companyLayer');\"  class=\"menuLinkLook\">";

  for(i=0; i<menu_items['company'].length; i++) {
    companyDropdown += '<a href="' + menu_items['company'][i]['link'] + '" class="menuLook">' + menu_items['company'][i]['title'] + '</a><br />';
  }
 companyDropdown += "</div>";
   
      
//sales menu dropdown	  
 salesDropdown="<div id=\"salesLayer\" style=\"position:absolute; z-index:3; left: 500px; top: 96px;visibility: hidden;\" onMouseOver=\"is_active('salesLayer');\" onMouseOut=\"is_inactive('salesLayer');assistHide('salesLayer');\"  class=\"menuLinkLook\">";
  for(i=0; i<menu_items['sales'].length; i++) {
    salesDropdown += '<a href="' + menu_items['sales'][i]['link'] + '" class="menuLook">' + menu_items['sales'][i]['title'] + '</a><br />';
  }
salesDropdown += "</div>";

//support menu dropdown
 supportDropdown="<div id=\"supportLayer\" style=\"position:absolute; z-index:2; left: 620px; top: 96px;visibility: hidden;\" onMouseOver=\"is_active('supportLayer');\" onMouseOut=\"is_inactive('supportLayer');assistHide('supportLayer');\"  class=\"menuLinkLook\">";
  for(i=0; i<menu_items['support'].length; i++) {
    supportDropdown += '<a href="' + menu_items['support'][i]['link'] + '" class="menuLook">' + menu_items['support'][i]['title'] + '</a><br />';
  }
supportDropdown += "</div>";


//education menu dropdown      
 educationDropdown="<div id=\"educationLayer\" style=\"position:absolute; z-index:4; left: 720px; top: 96px;visibility: hidden;\" onMouseOver=\"is_active('educationLayer');\" onMouseOut=\"is_inactive('educationLayer');assistHide('educationLayer');\"  class=\"menuLinkLook\">";
  for(i=0; i<menu_items['education'].length; i++) {
    educationDropdown += '<a href="' + menu_items['education'][i]['link'] + '" class="menuLook">' + menu_items['education'][i]['title'] + '</a><br />';
  }
educationDropdown +="</div>";

document.write('<link rel="stylesheet" href="menuStyle.css">');
document.write(productDropdown);
document.write(companyDropdown);
document.write(supportDropdown);
document.write(salesDropdown);
document.write(educationDropdown);	  
//end layer create function


}
