var newtable = ''//'<tr><td style="border: 1px none white;"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="7"><img src="/_includes/images/slices/block_left.gif"></td><td bgcolor="#DDDDDD"><img src="/_includes/images/shims/spacer.gif"></td><td width="7"><img src="/_includes/images/slices/block_right.gif"></td></tr></table></td></tr>'

// Author: Vince Reid, vince@ecommercetemplates.com
// Copyright: Internet Business Solutions S.L.
// http://www.ibswebdesign.com
// DropDownMenu: v1.8.2
var globalsdefined = false;
var ie, ns6, ns, opera, globmenuid, c1, ie5_5;

function vdefineglobals()
    {
    if (globalsdefined == true)
        return;

    globalsdefined = true;
    ie = document.all;
    ns6 = document.getElementById && !document.all;
    ns = document.layers;
    opera = false;
    ie5_5 = false;

    if (ie)
        {
        var agent = navigator.userAgent.toLowerCase();
        opera = (agent.indexOf("opera") != -1);
        ie5_5 = true;
        }

    globmenuid = 1;
    c1 = new Array();
    }

;

function va4()
    {
    if (ie || ns6)
        this.style.visibility = "visible";

    else if (ns)
        this.visibility = "show";
    }

;

function va7()
    {
    if (ie || ns6)
        this.style.visibility = "hidden";

    else if (ns)
        this.visibility = "hide";
    }

;

function vsetsubmenu(themenu, mn)
    {
    var offsetleft = 0;

    if (ie)
        {
        var mnp = mn;

        do
            {
            offsetleft += mnp.offsetLeft;
            mnp = mnp.offsetParent;
            }while (mnp != null);

        mnn = eval(mn.id + "sub");
        mnn.style.pixelTop = themenu.offsetTop + 14;
        mnn.style.pixelLeft = offsetleft;
        mnn.style.visibility = "hidden";
        }

    else if (ns)
        {
        mnn = eval('document.layers.' + mn.id + "sub");
        mnn.left = mn.pageX;
        mnn.top = mn.pageY - 3;
        mnn.visibility = "hide";
        }

    else if (ns6)
        {
        mnn = document.getElementById(mn.id + "sub");
        mnn.style.top = (mn.offsetTop + 14) + "px";
        mnn.style.left = mn.offsetLeft + "px";
        mnn.style.visibility = "hidden";
        }

    mnn.onmouseover = va4;
    mnn.onmouseout = va7;
    }

;

function vmenushow(mn)
    {
    if (ie || ns6)
        {

        var mnp = mn;
        var offsetleft = 0;
        var offsettop = -1;

        do
            {
            offsetleft += mnp.offsetLeft;
            offsettop += mnp.offsetTop;
            mnp = mnp.offsetParent;
            }while (mnp != null);

        if (ns6)
            mnn = document.getElementById(mn.id + 'sub');

        else
            mnn = eval(mn.id + "sub");

        if (ie5_5)
            offsettop -= 1;

        if (opera)
            {
            mnn.style.pixelTop = offsettop + 13;
            mnn.style.pixelLeft = offsetleft;
            }

        else if (ns6)
            {
            mnn.style.top = (offsettop + mn.offsetHeight) + "px";
            mnn.style.left = offsetleft + "px";
            }

        else
            {
            mnn.style.pixelTop = offsettop + mn.offsetHeight;
            mnn.style.pixelLeft = offsetleft;
            }

        mnn.style.visibility = "visible";
        }

    else if (ns)
        {
        mnn = eval(mn + 'sub');
        mnp = eval(mn + 'glob.' + mn);
        mnn.left = mnp.pageX;
        mnn.top = mnp.pageY - 3;
        mnn.visibility = "show";
        }
    }

;

function vmenuhide(mn)
    {
    if (ie)
        {
        mnn = eval(mn.id + "sub");
        mnn.style.visibility = "hidden";
        }

    else if (ns)
        {
        mnn = eval(mn + 'sub');
        mnn.visibility = "hide";
        }

    else if (ns6)
        {
        mnn = document.getElementById(mn.id + 'sub');
        mnn.style.visibility = "hidden";
        }
    }

;

function Menu()
    {
    Menu.prototype.addMenu = function vaddMenu(mid, mtext)
        {
        if (c1[mid])
            alert('Menu id ' + mid + ' is already defined as ' + c1[mid]);

        if (c0 == true)
            alert('You have to define all the main menus before defining the sub menus');

        c1[mid] = mid;

        if (ie)
            {
            this.d8
                += '<td class="vdhtml_menu">';
            this.d8
                += '<div id="'+mid+'" onMouseover="vmenushow(this)" onMouseout="vmenuhide(this)" STYLE="position:relative; z-index: 6">';
            this.d8 += mtext + '</div></td>';
            }

        else if (ns)
            {
            this.d8
                += '<td class="vdhtml_menu" align="left">';
            this.d8 += '<ilayer id="'+mid+'glob">';
            this.d8
                += '<layer id="'+mid+'"  onmouseover="vmenushow(\'document.layers.'+mid+'\')" onMouseout="vmenuhide(\'document.layers.'+mid+'\')">';
            this.d8 += mtext + '</layer></ilayer></td>';
            }

        else if (ns6)
            {
            this.d8
                += '<td class="vdhtml_menu" align="'+this.maincalign+'">';
            this.d8
                += '<div  id="'+mid+'" onMouseover="vmenushow(this)" onMouseout="vmenuhide(this)" STYLE="position:relative; z-index: 6">';
            this.d8 += mtext + '</div></td>';
            }
        };

    Menu.prototype.addSubMenu = function vaddSubMenu(mid, mtext, murl)
        {
        if (c1[mid] == null)
            alert('The menu id ' + mid + ' is not defined');

        if (this.g4 != mid)
            {
            if (this.g4 != null)
                {
                if (ns)
                    this.d7 += newtable+'</table></layer>';

                else
                    this.d7 += newtable+'</table></div>';
                }

            this.g4 = mid;

            if (ie)
                this.d7
                    += '<div id="'+mid+'sub" style="position:absolute; z-index:2; visibility: hidden; width:200; height:0;">';

            else if (ns6)
                this.d7 += '<div id="'+mid+'sub" style="position:absolute; z-index:2; visibility: hidden;"';

            else if (ns)
                this.d7 += '<layer id="'+mid+'sub" visibility="hide">';

            this.d7
                += '<table class="vdhtml" cellspacing="0" cellpadding="0" border="0">';
            }

        this.d7
            += '<tr><td class="vdhtml_submenu"><a class="vdhtml_submenu" href="'+murl+'">'
                   + mtext
                   + '</a></td></tr>';
        };

    Menu.prototype.startMenu = function vstartMenu()
        {
        if (opera)
            this.d8 += '<div id="vrmenu'+globmenuid+'" STYLE="position:relative">';

        else if (ie)
            this.d8 += '<div id="vrmenu'+globmenuid+'" STYLE="position:relative; width:0; height:0;">';

        else if (ns6)
            this.d8 += '<div id="vrmenu'+globmenuid+'" STYLE="position:relative;">';

        this.d8
            += '<table cellpadding="0" cellspacing="0" border="0" align="right"><tr>';
        };

    Menu.prototype.showMainMenu = function vshowMainMenu()
        {
        if (ie || ns6)
            this.d8 += '</tr></table></div>';

        else if (ns)
            this.d8 += '</tr></table></layer>';

        document.write(this.d8);
        };

    Menu.prototype.showMenu = function vshowMenu()
        {
        if (ie)
            this.d7 += newtable+'</table></div>';

        else if (ns6)
            this.d7 += newtable+'</table></div>';

        else if (ns)
            this.d7 += newtable+'</table></layer>';

        document.write(this.d7);

        for (men in c1)
            {
            if (c1[men] != 1)
                {
                if (ie)
                    vsetsubmenu(eval('document.all.vrmenu' + globmenuid), eval(document.all[men]));

                else if (ns)
                    vsetsubmenu(
                        eval('document.layers.' + men + 'glob'), eval('document.' + men + 'glob.document.' + men));

                else if (ns6)
                    vsetsubmenu(
                        eval(document.getElementById('vrmenu' + globmenuid)), eval(document.getElementById(men)));

                c1[men] = 1;
                }
            }

        globmenuid++;
        };

    Menu.prototype.maintableprops = function(bgcolor, spacing, padding, border)
        {
        this.maintbgcolor = bgcolor;
        this.maintspacing = spacing;
        this.maintpadding = padding;
        this.maintborder = border;
        };

    Menu.prototype.maincellprops = function maincellprops(align, bgcolor, bordercolor)
        {
        this.maincalign = align;
        this.maincbgcolor = bgcolor;
        this.maincbordercolor = bordercolor;
        };

    Menu.prototype.subtableprops = function subtableprops(bgcolor, spacing, padding, border)
        {
        this.subtbgcolor = bgcolor;
        this.subtspacing = spacing;
        this.subtpadding = padding;
        this.subtborder = border;
        };

    Menu.prototype.subcellprops = function subcellprops(align, bgcolor, bordercolor)
        {
        this.subcalign = align;
        this.subcbgcolor = bgcolor;
        this.subcbordercolor = bordercolor;
        };

    Menu.prototype.fontdetails = function fontdetails(font, size, color)
        {
        this.font = font;
        this.size = size;
        this.fontcolor = color;
        };

    vdefineglobals();
    this.maintableprops("#cfcfcf", 0, 0, 0);
    this.maincellprops("center", "#cfcfcf", "#000000");
    this.subtableprops("#cfcfcf", 0, 0, 0);
    this.subcellprops("left", "#eeeeee", "#000000");
    this.fontdetails("Arial", 33, "#000000");
    this.g4 = null;
    this.d8 = "";
    this.d7 = "";
    c0 = false;
    c1['vrmenu' + globmenuid] = 1;
    }

;

