function over(imgname,imgsrc) {
  document[imgname].src=imgsrc;
  }
function out(imgname,imgsrc) {
  document[imgname].src=imgsrc;
  }

//menu objects

function onLoad() {
    window.onResize = onLoad;
    loadMenus();
}

function Menu(label,msize) {
//    this.version = "020903 [Menu; menu.js]";
    this.type = "Menu";
    this.fontSize = 10;
    this.fontWeight = "normal";
    this.fontFamily = "Verdana, Arial";
    this.fontColor = "#333333";
    this.fontColorHilite = "#000000";
    this.bgColor = "#555555";
	this.size=msize;
    this.menuBorder = 1;
    this.menuItemBorder = 1;
	this.menuItemHeight = 20;
    this.menuItemBgColor = "#FFFFFF";
    this.menuLiteBgColor = "#ffffff";
    this.menuBorderColor = "#cccccc";
    this.menuBorderBgColor = "666666";
    this.menuItemBorderBgColor = "cccccc";
    this.menuHiliteBgColor = "#e6eaed";
    this.menuContainerBgColor = "#FFFFFF";
    this.childMenuIcon = "/img/spacer.gif";
    this.childMenuIconHilite = "/img/spacer.gif";
    this.items = new Array();
    this.actions = new Array();
    this.colors = new Array();
    this.mouseovers = new Array();
    this.mouseouts = new Array();
    this.childMenus = new Array();

    this.addMenuItem = addMenuItem;
    this.addMenuSeparator = addMenuSeparator;
    this.writeMenus = writeMenus;
    this.showMenu = showMenu;
    this.onMenuItemOver = onMenuItemOver;
    this.onMenuItemOut = onMenuItemOut;
    this.onMenuItemDown = onMenuItemDown;
    this.onMenuItemAction = onMenuItemAction;
    this.hideMenu = hideMenu;
    this.hideChildMenu = hideChildMenu;
    this.mouseTracker = mouseTracker;
    this.setMouseTracker = setMouseTracker;

    if (!window.menus) window.menus = new Array();
    this.label = label || "menuLabel" + window.menus.length;
    window.menus[this.label] = this;
    window.menus[window.menus.length] = this;
    if (!window.activeMenus) window.activeMenus = new Array();
    if (!window.menuContainers) window.menuContainers = new Array();
    if (!window.mDrag) {
        window.mDrag    = new Object();
        mDrag.startMenuDrag = startMenuDrag;
        mDrag.doMenuDrag    = doMenuDrag;
        this.setMouseTracker();
    }
    if (window.MenuAPI) MenuAPI(this);
}

function loadMenus () {

	window.products_kloxo = new Menu("Kloxo <img src='/img/spacer.gif' width='77' height='11'><img src='/img/menu/submenu_arrow.gif'>",130);
	products_kloxo.addMenuItem("Kloxo ","window.location='/software/kloxo/ '","0","pas","0");
	products_kloxo.addMenuItem("Features","window.location='/software/kloxo/full-feature/ '","0","pas","0");
	products_kloxo.addMenuItem("Screen Shots","window.location='/software/kloxo/screen/ '","0","pas","0");

	window.products_hypervm = new Menu("HyperVM <img src='/img/spacer.gif' width='77' height='11'><img src='/img/menu/submenu_arrow.gif'>",130);
	products_hypervm.addMenuItem("hyperVM","window.location='/software/hypervm/ '","0","pas","0");
	products_hypervm.addMenuItem("Features","window.location='/software/hypervm/full-feature/ '","0","pas","0");
	//products_hypervm.addMenuItem("Screen Shots","window.location='/software/hypervm/screen/ '","0","pas","0");

	window.products_opensource = new Menu("Open Source <img src='/img/spacer.gif' width='54' height='11'><img src='/img/menu/submenu_arrow.gif'>",130);
	products_opensource.addMenuItem("Overview","window.location='/software/oss/ '","","","");
	products_opensource.addMenuItem("Vimamp","window.location='/software/oss/vimamp/ '","0","pass","0");
	products_opensource.addMenuItem("IdeVim","window.location='/software/oss/idevim/ '","0","pass","0");
	products_opensource.addMenuItem("Comedi For Bsd","window.location='/software/oss/comedi/ '","0","pass","0");


	window.products = new Menu("Products",150);
	products.addMenuItem("Overview", "window.location='/product/ '","0","changepasswd","0");
	products.addMenuItem(products_kloxo, "window.location='/software/kloxo/'");
	products.addMenuItem(products_hypervm, "window.location='/software/hypervm'");
	//products.addMenuItem(products_opensource, "window.location='/software/oss'");
//	products.addMenuItem("Remote Administration", "window.location='/product/remote-admin/ '","0","changepasswd","0");
	products.addMenuItem("Store", "window.location='/store/ '","0","changepasswd","hideMenu('Company')");


   // window.service = new Menu("Service",150);
   // service.addMenuItem("Overview", "window.location='/service/ '","0","changepasswd","0");
   // service.addMenuItem("Enterprise Services", "window.location='/service/enterprise/ '","0","changepasswd","0");
   // service.addMenuItem("Security Network", "window.location='/secnet/ '","0","changepasswd","0");
   // service.addMenuItem("Professional Consulting", "window.location='/product/consulting/ '","0","changepasswd","0");

	window.support_client = new Menu("Client Home Page <img src='/img/spacer.gif' width='24' height='11'><img src='/img/menu/submenu_arrow.gif'>", 130);
	support_client.addMenuItem("Client Home Page", "window.location='/hdesk/ '", "0", "0", "0");
	support_client.addMenuItem("Create PR", "window.location='/hdesk/ '", "0", "0", "0");
	support_client.addMenuItem("List PR", "window.location='/hdesk/ '", "0", "0", "0");

	window.support = new Menu("Support",150);
	support.addMenuItem("Support Home", "window.location='/support/ '","0","changepasswd","0");
	support.addMenuItem("Enterprise", "window.location='/service/enterprise/ '","0","changepasswd","0");
	support.addMenuItem(support_client);
	support.addMenuItem("Developer Assistance", "window.location='/support/developer/ '","0","changepasswd","0");
	support.addMenuItem("Product", "window.location='/support/product/ '","0","changepasswd","0");
	support.addMenuItem("Download", "window.location='http://download.lxlabs.com '","0","changepasswd","0");
	support.addMenuItem("Online", "window.location='/support/online/ '","0","changepasswd","0");
	support.addMenuItem("Live", "window.location='/support/chat/ '","0","changepasswd","0");


	window.partners = new Menu("Partners",150);
	partners.addMenuItem("Partners", "window.location='/partner/ '","0","changepasswd","0");
	partners.addMenuItem("Registration", "window.location='/register/'","0","changepasswd","0");

	window.company = new Menu("Company",150);
	company.addMenuItem("About Lxlabs", "window.location='/company/ '","0","clientlist","0");
    company.addMenuItem("Contact Us", "window.location='/contact/ '","0","newclient","0");
    company.addMenuItem("News", "window.location='/news/ '","0","newclient","0");

	products.writeMenus();
}

loadMenus();
