var menuHierarchy = [
	['Company', null,
		['Home', 'index.htm'],
                ['Sites by Manufacturer',null,
                       ['Avaya Compliant Solutions' ,'http://www.telecost.com/avaya'],
                       ['Cisco Compliant' ,'http://www.telecost.com/cisco'],
                       ['Nortel Compatible Products' ,'http://www.callaccountingsoftware.com'],
                       ['Adtran Alliance' ,'http://www.telecost.com/adtran.htm'],
                       ['Epygi Technology ' ,'http://www.telecost.com/epygi.htm'],
                       ['ShoreTel Certified' ,'http://www.telecost.com/shoretel.htm'],
                       ['Siemens HiPath Ready' ,'http://www.telecost.com/siemens'],
                       ['Mitel MSA' ,'http://www.telecost.com/mitel'],
                       ['Other Partners' ,'vendors.htm'],
                       ['Multi Vendor Environments' ,'m_multi.htm'],
                       ], 
 
		['About Us', 'about.htm'],
		['Contact Us', 'contact.htm'],
		['Mission', 'mission_statement.htm'],
		['Request Information', 'feedback.htm'],
		['Become A Partner', 'dealer.htm']

	],
	['Products', null, 
           ['by Solution',null,
  	      ['Call Accounting', null,
	  	   ['Web Enabled SMB', 'revcall_web.htm'],
		   ['Basic Desktop', 'revcall.htm'],
		   ['Hospitality', 'shadhosp.htm'],
		   ['Professional', 'shadow.htm'],
		   ['Enterprise', 'shadow.htm'],
		   ['Hosted / SaaS', 'managed.htm'],

              ],
	      ['Desktop Productivity', 'raptapi.htm',
              ],
	      ['Data Storage', 'winlink.htm',
              ],
	      ['Call Center', null,
	  	   ['ACD Reporting', 'http://callaccountingsoftware.com/modules/wiwimod/index.php?page=ACD+Reporting'],
		   ['BCM Call Center', 'http://callaccountingsoftware.com/modules/wiwimod/index.php?page=BCM+Call+Center'],
              ],
	      ['Call Control', 'http://callaccountingsoftware.com/modules/wiwimod/index.php?page=tools+CTI+Pack',
              ],
	      ['Internet Management', null,
	  	   ['SHADOW Internet Control', 'shadow_ic.htm'],
	  	   ['SHADOW Internet Reporting', 'shadow_ir.htm'],
	  	   ['SHADOW Device Patrol', 'shadow_dp.htm'],
	      ],  	   
	      ['Emergency Notification', 'http://callaccountingsoftware.com/modules/wiwimod/index.php?page=tools+OSN',
              ],
//	      ['Other', 'download.htm',
//              ]
           ],
	   ['by Manufacturer', null,
                       ['Avaya Compliant Solutions' ,'http://www.telecost.com/avaya'],
                       ['Cisco Compliant' ,'http://www.telecost.com/cisco'],
                       ['Nortel Compatible Products' ,'http://www.callaccountingsoftware.com'],
                       ['Adtran Alliance' ,'http://www.telecost.com/adtran.htm'],
                       ['Epygi Technology ' ,'http://www.telecost.com/epygi.htm'],
                       ['ShoreTel Certified' ,'http://www.telecost.com/shoretel.htm'],
                       ['Siemens HiPath Ready' ,'http://www.telecost.com/siemens'],
                       ['Mitel MSA' ,'http://www.telecost.com/mitel'],
                       ['Other Partners' ,'vendors.htm'],
                       ['Multi Vendor Environments' ,'m_multi.htm'],
           ], 
	   ['by Product Name', null,
	        ['Revolution Web', 'revcall_web.htm'],
	        ['Revolution', 'revcall.htm'],
	        ['SHADOW',null,
	           ['SHADOW Call Accounting', 'shadow.htm'],
	           ['SHADOW Internet Control', 'shadow_ic.htm'],
	           ['SHADOW Internet Reporter', 'shadow_ir.htm'],
	           ['SHADOW Device Patrol', 'shadow_dp.htm'],
	           ['SHADOW Hospitality', 'shadhosp.htm'],
  	           ['SHADOW ACD Reporting', 'http://callaccountingsoftware.com/modules/wiwimod/index.php?page=ACD+Reporting'],
 	   	   ['SHADOW Call Center', 'http://callaccountingsoftware.com/modules/wiwimod/index.php?page=BCM+Call+Center'],
	        ],   
	        ['TELEALARM', 'telealarm.htm'],
	        ['TELECOST', 'telecost.htm'],
	        ['TELECOST Hospitality', 'telehosp.htm'],
	        ['tools CTI Pack', 'http://callaccountingsoftware.com/modules/wiwimod/index.php?page=tools+CTI+Pack'],
	        ['Visual Rapport',null,
	           ['Visual Rapport Console NET', 'http://www.telecost.com/vrconsole.htm'],
	           ['Visual Rapport Navigator', 'http://www.telecost.com/vrnavigator.htm'],
	           ['Visual Rapport Integrator', 'http://www.telecost.com/vrintegrator.htm'],
	           ['Visual Rapport Desktop', 'raptapi.htm'],
	        ],   
	        ['Winlink Data Storage', 'winlink.htm']  //,
//	        ['all...', 'download.htm']
           ] 
	],
	['Services', null,
		['Managed Services', 'managed.htm'],
		['Support Services', 'services.htm'],
		['Hosted Call Accounting', 'http://www.hostedcallaccounting.com']
                   ],
	['News & Events', null,
		['Press Releases', 'news.htm'],
		['Articles', 'articles.htm'],
		['Upcoming Public Webinars', 'http://ftp.telecost.com/data/webinar_public.asp'],
		['Blog', 'http://call-accounting.blogspot.com/']
	],
	['Resources', null,
		['Request Information', 'feedback.htm'],
		['Become A Partner', 'dealer.htm'],
		['Subscriber Login', 'login.htm'],
		['Live Help', 'livechat.htm'],
		['Remote Support', 'remote.php'],
		['Area Code Lookup', 'area.htm'],
		['Tell A Friend', 'tellafriend.htm'],
		['Webinar Registration', 'webinar.htm'],
		['Upcoming Public Webinars', 'http://ftp.telecost.com/data/webinar_public.asp'],
		['Make Online Payment', 'payment.htm']
	],
	['Links', null,
                ['Sites by Manufacturer',null,
                       ['Avaya Compliant Solutions' ,'http://www.telecost.com/avaya'],
                       ['Cisco Compliant' ,'http://www.telecost.com/cisco'],
                       ['Nortel Compatible Products' ,'http://www.callaccountingsoftware.com'],
                       ['Adtran Alliance' ,'http://www.telecost.com/adtran.htm'],
                       ['Epygi Technology ' ,'http://www.telecost.com/epygi.htm'],
                       ['ShoreTel Certified' ,'http://www.telecost.com/shoretel.htm'],
                       ['Siemens HiPath Ready' ,'http://www.telecost.com/siemens'],
                       ['Mitel MSA' ,'http://www.telecost.com/mitel'],
                       ['Other Partners' ,'vendors.htm'],
                       ['Multi Vendor Environments' ,'m_multi.htm'],
                       ], 
		['Partners', 'links.htm'],
		['Follow us on Twitter', 'http://www.twitter.com/telecost'],
		['Fan Page on Facebook', 'http://www.facebook.com/pages/RSI/101093224901'],
		['LinkedIn Group','http://www.linkedin.com/groups?gid=1953734'],
		['Tell A Friend', 'tellafriend.htm'],
		['Bookmark Us','javascript:bookmark("http://www.telecost.com/","Call Accounting Software")'],
		['Link To Us', 'linktous.htm'],
		['Links of Interest', 'otherlinks.htm'],
		['Contact Us', 'contact.htm']
	],


]


var winW = -1;
winW = Math.min(screenSize(winW),1248);
// WinPosX = Math.floor(winW / 2);
winW = winW - 90;
//winW = screen.width - 90;


var mainItems = 6;
var itemWidth = Math.max(Math.floor((winW) / (mainItems)),70);
//var itemWidth = Math.max(Math.floor((document.body.clientwidth-90) / (mainItems)),70);
var menuConfig = [
{
	'height':  15,
	'width' : itemWidth,
	'firstX' : 17,
	'firstY' : 126,
	'nextX' : 1,
//	'nextY' : 1;
	'hideAfter' : 200,
	'css'   : 'gurtl0o',
	'trace' : true
},
{
	'height':  23,
	'width' : 155,
	'firstX' :  0,
	'firstY' : 25,
	'nextY' : -1,
	'css' : 'gurtl1o'
},
{
	'firstX' : 110,
	'firstY' : 0
}
];

