/*
 * vw dhtml
 */

var ie_version = 5;
var mouseX = 0;
var mouseY = 0;
var image_list = new Array();
var preloads   = new Array();
var onloads    = new Array();
var mouseMoveAction = null;

function getStyle(oElm, strCssRule) {
 var strValue = "";
 if(document.defaultView && document.defaultView.getComputedStyle){
  strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
 }
 else if (oElm.currentStyle) {
  strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1) { return p1.toUpperCase();});
  strValue = oElm.currentStyle[strCssRule];
 }
 return strValue;
}


function vw_mousePos(evt) 
{
    if(typeof(evt.pageX) != 'undefined') {
        return {
            x : evt.pageX,
            y : evt.pageY
        };
    } else if (typeof(evt.clientX) != 'undefined') {
        return {
            x :evt.clientX + document.documentElement.scrollLeft,
            y :evt.clientY + document.documentElement.scrollTop
        };
    } else {
        return {
            x : mouseX,
            y : mouseY
        };
    }
}

function mouse_pos(evt) {
 if(typeof(evt.pageX) != 'undefined') {
  mouseX = evt.pageX ;
  mouseY = evt.pageY ;
 }
 else {
  mouseX = evt.clientX + document.documentElement.scrollLeft ;
  mouseY = evt.clientY + document.documentElement.scrollTop ;
 }


 if(mouseMoveAction != null) {
  mouseMoveAction();
 }
}

function vw_onload() {
 addEvent(document, 'mousemove', mouse_pos);
 for(var i = 0; i < onloads.length; i++) {
  onloads[i]();
 }
}



function setOpacity(Obj, Level) 
{
    if (typeof(Obj.style.opacity) == "string") {
        Obj.style.opacity=Level > 0 ? Level / 100 : 0;
    } else if( typeof(Obj.style.filter) == "string") {
        Obj.style.filter = 'alpha(opacity='+Level+')';
    }
}


function getPos(thisId, abs) {
 var pos  = new Object();
 pos.left = 0;
 pos.top  =  0;


 if (thisId.style.top && getStyle(thisId, 'position') == 'absolute') {
  pos.top  = parseInt(thisId.style.top);
  pos.left = parseInt(thisId.style.left);
  return pos;
 }

 for (var p = thisId; p.parentNode ; p =  p.parentNode) {
  if (getStyle(p, 'position') == 'fixed') {
   pos.top += typeof(window.scrollY) != 'undefined' ? window.scrollY : document.body.parentNode.scrollTop;
   pos.left += typeof(window.scrollX) != 'undefined' ? window.scrollX : document.body.parentNode.scrollLeft;
   break;
  }
 }

 for (var p = thisId; p ; p = p.offsetParent) {
  var position = getStyle(p, 'position');
  if (abs == true && (position == 'relative' || position == 'absolute')) {
   break;
  }
  pos.top+= p.offsetTop;
  pos.left+= p.offsetLeft;
 }

 pos.bottom = pos.top + thisId.offsetHeight
 pos.right  = pos.left + thisId.offsetWidth;
 return pos;
}

onloads[onloads.length] = function () {
 var id;
 for (id in preloads) {
  if (id.match(/^vw_/)) {
   var tmp = new Image();
   tmp.src = preloads[id];
  }
 }
}



function vw_over(thisId) {
 if (typeof(thisId) == 'string') {
  thisId = document.getElementById(thisId);
 }
 var id = thisId.id;

 if(thisId.ie_png_src) {
  image_list[id] = thisId.ie_png_src;
  thisId.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+preloads[id]+"', sizingMethod='scale')";
 }
 else {
  image_list[id] = thisId.src;
  thisId.src = preloads[id];
 }
}

function vw_out(thisId) {
 if (typeof(thisId) == 'string') {
  thisId = document.getElementById(thisId);
 }
 var id = thisId.id;


 if(thisId.ie_png_src)
  thisId.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+image_list[id]+"', sizingMethod='scale')";
 else
  thisId.src = image_list[id];
}

function ie_png_loader() {
 var images = document.getElementsByTagName("img");
 for(var i = 0; i < images.length; i++) {
  var img = images.item(i);
  if(img.src.match(/\.png$/i)) {
   iePNG(img);
  }
 }
}

function iePNG(thisId) {
 var version = navigator.appVersion.match(/MSIE ([0-9])/);
 var pixel = VW_FILES+"/images/pixel.gif";
 if(version && parseInt(version[1]) < 7) {
  thisId.style.height = thisId.offsetHeight +"px";
  thisId.style.width  = thisId.offsetWidth +"px";
  var src = thisId.src;
  thisId.ie_png_src = src;
  thisId.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')";
  thisId.src = pixel;
//  thisId.style.visibility = 'visible';
 }
 else {
//  thisId.style.visibility = 'visible';
 }
}

var vwShowThumb;
function vw_show_thumbnail(thisId, src, width, height) {
 vw_hide_thumbnail();
 pos = getPos(thisId);
 var div = vwShowThumb = vw_node(document.body, "div");
 div.style.visibility = 'hidden';
 div.style.position = 'absolute';
 div.style.zIndex = 17000;
 div.style.border = 'solid 2px #666666';
 div.style.top  = pos.top  - height / 2 + 8  +"px";
 div.style.left = pos.left - width - 10 + "px";
 div.style.width = width+'px';
 div.style.height = height+'px';
 img = vw_node(div, "img");
 img.src = src;
 div.style.background = 'url('+VW_FILES+'/images/bg_repeat.gif)';
/*
 div.style.backgroundImage = "url("+src+")";
 div.style.backgroundRepeat = 'no-repeat';
*/
 div.style.visibility = 'visible';
}

function vw_hide_thumbnail() {
 if(vwShowThumb) {
  document.body.removeChild(vwShowThumb);
  vwShowThumb = null;
 }
}

function vw_toggle(thisId, ID) {
 var element = document.getElementById(ID);

 var status;
 if(status = getCookie("toggles")) {
  status = status.split(',');
 }
 else {
  status = new Array();
 }

 if(element.style.display == 'none') {
  thisId.parentNode.className = "vw_expander on";
  element.style.display = 'block';
  status[status.length] = ID;
 }
 else {
  thisId.parentNode.className = "vw_expander";
  element.style.display = 'none';
  for(var i = 0; i < status.length; i++) {
   if(status[i] == ID) {
    delete status[i];
   }
  }

 }

 var retval = "";
 for(var i = 0; i < status.length; i++) {
  if(status[i]) {   
   retval += (retval.length ? "," : "") + status[i];
  }
 }
 document.cookie = "toggles="+retval;

}

var vw_reload_time;

function vw_set_reload() {
 if(vw_reload_time) {
  clearTimeout(vw_reload_time);
  vw_reload_time = null;
 }
 vw_reload_time = setTimeout(vw_reload, 3600 * 1000);
}

function vw_reload() {
 window.location.replace(window.location.href);
}

function vw_isTarget(e, node) {
 /** Detect if element is the element that originated the event */
 if (e.type != 'mouseout' && e.type != 'mouseover') return false;
 var reltg = e.relatedTarget ? e.relatedTarget :e.type == 'mouseout' ? e.toElement : e.fromElement;
 while (reltg && reltg != node) reltg = reltg.parentNode;
 return (reltg != node); 
}

function vw_rollover(img) {
 var match = img.src.match(/\.(png)|(gif)$/);
 if (match != null) {
  var out  = img.src;
  var over = img.src.replace(match[0], "_over"+match[0]);
  var pre = new Image();
  pre.src = over;
  img.onmouseover = function() {this.src = over}
  img.onmouseout  = function() {this.src = out}
 }
}


function vw_css(file) 
{
    var path = file + "?VW_FILES="+VW_FILES;

    var links = document.getElementsByTagName('link');
    for (var i = 0; i < links.length; i++) {
        link = links.item(i);
        if (
            link.getAttribute('type') == 'text/css'
            && link.getAttribute('href').match(file)
        ) {
            return;
        }
    }

    var link = document.createElement("link")
    link.setAttribute("href", path)
    link.setAttribute("rel", "stylesheet")
    link.setAttribute("type", "text/css")

    var head  = document.getElementsByTagName("head").item(0);
    head.appendChild(link);
}

var vwIncluded = new Array();
function vw_include(file, ref) {
 var scripts = document.getElementsByTagName('script');
 for (var i = 0; i < vwIncluded.length; i++) {
  if (vwIncluded[i] == file) {
   return;
  }
 }
 vwIncluded.push(file);

 var head = document.getElementsByTagName("head").item(0);

 var script = document.createElement('script');
 script.type = 'text/javascript';
 script.src  = file;
 if (ref) {
  if (typeof(script.onreadystatechange) == 'undefined') {
   script.onload = function() {
    ref();
   }
  }
  else {
   script.onreadystatechange = function() {
    if (this.readyState == 'loaded') { 
     ref();
    }
   } 
  }
 }
 head.appendChild(script);
}


onloads[onloads.length] = function() {
 /** MSIE **/
 var ie = new Array();
 var state = new Object();
 if ((ie = navigator.appVersion.match(/MSIE ([0-9]+\.[0-9]+)/))) {
  var version = parseFloat(ie[1]);


  if (version < ie_version && !getCookie('ieWarning')) {
    var ref = function(obj) {
    if (obj.ref1 == true && obj.ref2 == true) {
     vw_css(VW_FILES+'/css/window.css')
     var kit = new vwwin();
     kit.title = "Old version of Internet Explorer Detected.";
     kit.underlay = true;
     kit.align = 'center';
     kit.cont.style.width = '500px';

     var browsers = [
      { icon : 'chrome.gif', name : 'Google Chrome', link : 'http://www.google.com/chrome' },
      { icon : 'firefox.gif', name : 'Firefox', link : 'http://www.getfirefox.com' },
      { icon : 'ie.gif', name : 'Internet Explorer', link : 'http://www.getie.com' },
      { icon : 'safari.gif', name : 'Safari', link : 'http://www.apple.com/safari/download/' }
     ];

     kit.head.className += ' ie_message_head';
     var cont = vw_node(kit.body, 'div');
     cont.className = 'ie_message';
     
     var p, a, table, tbody, tr, td, img;
     p = vw_node(cont, 'p', "You are using an out of date version of Internet Explorer (IE) which is not supported by this website. Newer browsers are available with greatly improved support for web standards, security and load times. Please see alternatives below:");
     p = vw_node(cont, 'p', "If you would like to continue browsing this website using your current browser simply close this window.");
     vw_node(cont, 'br');
     table = vw_node(vw_node(cont, 'div'), 'table');
     tbody = vw_node(table, 'tbody');   
     for (var i = 0; i < browsers.length; i++) {
      var browser = browsers[i];
      tr    = vw_node(tbody, 'tr');
      td    = vw_node(tr, 'td');
      a     = vw_node(td, 'a');
      a.href = browser.link;
      a.target = '_new';
      img   = vw_node(a, 'img');
      img.src = VW_FILES+'/images/browsers/'+browser.icon;
      td    = vw_node(tr, 'td');
      td.style.paddingLeft = '15px';
      a     = vw_node(td, 'a', browser.name);
      a.href = browser.link;
      a.target = '_new';
     }   

     vw_node(cont, 'br');
     p = vw_node(cont, 'p', "For more information on this decision please ");
     a = vw_node(p, 'a', 'click here');
     a.href = '#';
     a.target = '_new';
     vw_text_node(p, '.');

 

     kit.open();
     var now = new Date();
     now.setTime(now.getTime() + 1000 * 60 * 60);
     document.cookie = "ieWarning=1;expires=" + now.toGMTString();
    }
   }
   vw_include(VW_FILES+'/js/xml.js', function() {state.ref1 = true;ref(state);});      
   vw_include(VW_FILES+'/js/windows.js', function() {state.ref2 = true;ref(state);});      
  }
 }
}

var toolTip;
function vw_tooltip(node, text) {
 vw_tooltip_clear();
 var pos = getPos(node);
 
 
 var div = toolTip = document.createElement('div');
 div.style.left = pos.left + 'px';
 div.className = 'vw_tooltip';
 textNode = document.createTextNode(text);
 div.appendChild(textNode);
 document.body.appendChild(div);

 if (pos.left + div.offsetWidth > document.body.offsetWidth - 5) {
  div.style.left = 'auto';
  div.style.right = '5px';
 }
 if (pos.top - 5 - div.offsetHeight > 5)
  div.style.top = pos.top - 5 - div.offsetHeight + 'px';
 else
  div.style.top = pos.bottom + 5 + 'px';

}

function vw_tooltip_clear() {
 if (toolTip) {
  document.body.removeChild(toolTip);
  toolTip = null;
 }
}


function vw_load_it(Node, Image) {
 var node = document.getElementById(Node);
 var image = document.getElementById(Image);
 if (node && image) { // && node.lastChild.nodeName == '#text') {
//  node.removeChild(node.lastChild);
  node.parentNode.removeChild(node);
  image.style.visibility = 'visible';
 }
}

function vw_setClass(node, name) {
 if (!vw_hasClass(node, name)) {
  node.className += (node.className ? ' ' : '')+name;
 }
}


function vw_toggleClass(node, name) {
 if (vw_hasClass(node, name)) {
  return;
 }
 else {
  for (var i = 2; i < vw_toggleClass.arguments.length; i++) {
   vw_deleteClass(node, vw_toggleClass.arguments[i]);
  }
  vw_setClass(node, name);
 }
}

function vw_hasClass(node, name) {
 if (node) {
  return node.className.match("(^| )"+name+"( |$)");
 }
}

function vw_deleteClass(node) {
 var split = node.className.split(' ');
 for (var i = 1; i < vw_deleteClass.arguments.length; i++) {
  var name  = vw_deleteClass.arguments[i];
  var index = split.indexOf(name);
  if (index > -1) {
   split.splice(index, 1);
   node.className = split.join(' ');
  }
 }
}

function vwCenter(node, w, h) {
 var offset = 0;
 if (document.getElementById('vw_toolbar')) {
  offset = document.getElementById('vw_toolbar').offsetHeight;
 }
 var width   = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth;
 var height  = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight;
 var scrollY = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;

 if (!w) {
  w = node.offsetWidth;
 }

 if (!h) {
  h = node.offsetHeight;
 }

 var top = (height - h) / 2  + scrollY + offset;
 node.style.top = (top > offset ? top : offset) + 'px';
 var left = (width - w) / 2;
 node.style.left = (left < 0 ? 0 : left) + 'px';
}

function vw_isVisible(thisId)
{
    for (var p = thisId; (typeof(p) != 'undefined') && (p.nodeType == 1); p = p.parentNode) {
        if (
            getStyle(p, 'display') == 'none' 
            || getStyle(p, 'visibility') == 'hidden' 
            || p.className.match(/^noErrors$|^noErrors | noErrors$| noErrors /)) {
            return false;
        }
    }
    return true;
}


var contextMenu = null;
addEvent(document, 'keydown', vw_escapeContext);

function vw_contextMenu(evt) 
{
    var node = evt.target ? evt.target : evt.srcElement;
    vw_setClass(node, 'on');
    var zIndex = 1;
    for (var p = node; p.nodeType == 1; p = p.parentNode) {
        var z = parseInt(getStyle(p, 'z-index'));
        if (z > zIndex) {
            zIndex = z + 1;
        }
    }

    var mouse = vw_mousePos(evt);
    contextMenu = document.createElement('div');
    contextMenu.node = node;
    contextMenu.className = 'contextMenu';
    contextMenu.style.left = mouse.x + 'px';
    contextMenu.style.top = mouse.y + 'px';
    contextMenu.style.zIndex = zIndex;

    contextMenu.onmousedown = function(e) {
        var evt = e ? e : event;
        stopPropagation(evt)
    }
    contextMenu.onclick = vw_clearContext;

    document.body.appendChild(contextMenu);
    setTimeout(function() {contextMenu.style.opacity = 1},  25);
    
    return contextMenu;        
}

function vw_clearContext(e, menu) {
    if (menu) {
        vw_deleteClass(menu.node, 'on');
        vw_node_delete(menu);
    }
    else if (contextMenu) {
        vw_deleteClass(contextMenu.node, 'on');
        vw_node_delete(contextMenu);
        contextMenu = null;
        return true;
    }
}

function vw_escapeContext(e) {
    var evt = e || event;
    if (evt.keyCode == 27 && contextMenu && !evt.vwHandled) {
        evt.vwHandled = true;
        vw_clearContext();
    }
}


function vw_transition_add(node, style, value, yang)
{
    var ieOpacity = false;
    if (
        style == 'opacity'
        && typeof(node.style.opacity) == 'undefined'
        && typeof(node.style.filter) != 'undefined'
    ) {
        ieOpacity = true;
        if (ieValue = getStyle(node, 'filter')) {
            ieValue = parseFloat(ieValue.match(/[0-9.]+/)) / 100;
        } else {
            var ieValue = 1;
        }
        originalValue = ieValue;
    } else {
        var originalValue = parseFloat(getStyle(node, style));
    }

    var yangOriginalValue = yang ? parseFloat(getStyle(yang, style)) : null;
    var suffix =  (style == 'opacity' ? '' : 'px');
    var JSStyle =  style.replace(/-([a-z])|-/, function(match, i) {return i ? i.toUpperCase() : ''});
    var displacement = value - originalValue;

    var add = {
        node : node,
        yang : yang, 
        style : style,
        ieOpacity : ieOpacity,
        JSStyle : JSStyle,
        value : value,
        displacement : displacement,   
        originalValue : originalValue,
        yangOriginalValue : yangOriginalValue,
        suffix : suffix
    }

    this.list.push(add);
}

function vw_transition_engage(duration, oncomplete)
{
    var obj = this;
    var node = this.list[this.list.length - 1].node;
/*
    var transition  = null;
    if (typeof(node.style.webkitTransition) == 'string') {
        var transition = 'webkitTransition';
    }
                            
    if (transition) {
        for (var i = 0; i < obj.list.length; i++) {
            var item = obj.list[i];
            item.node.style[transition] = 'all '+(duration / 1000)+'s linear';
        }

        if (node.ref) {
            node.removeEventListener(transition + 'End', node.ref);
            node.ref = null;
        }
        var ref = function() {
            for (var i = 0; i < obj.list.length; i++) {
                obj.list[i].node.style[transition] = '';
            }
            if (oncomplete) {
                oncomplete();
            }
        }
        node.ref = ref;
        node.addEventListener(transition + 'End', ref, false);

        for (var i = 0; i < obj.list.length; i++) {
            var item = obj.list[i];
//            item.node.style[transition] = 'all '+(duration / 1000)+'s linear';
            item.node.style[item.JSStyle] = item.value + item.suffix;
           console.log(item.JSStyle + ' ' +  item.node.style[item.JSStyle]);
        }
        return;            
    }
*/
    /** Javascript Transition **/
    if (node.interval) {
        clearInterval(node.interval);
        node.interval = null;
    }

    var frequency = Math.PI / (2 * duration); 
    var startTime = new Date().getTime();

    var func = function()
    {
        var elapsedTime = new Date().getTime() - startTime;
        for (var i = 0; i < obj.list.length; i++) {
            var item = obj.list[i];
            if (elapsedTime < duration) {
                var f = Math.abs(Math.sin(elapsedTime * frequency));
            //    var f = elapsedTime / duration;

                var amount = (f * item.displacement + item.originalValue);
                if (item.yang) {
                    var foo = item.yangOriginalValue + item.originalValue - amount;
                    item.yang.style[item.JSStyle] = foo + item.suffix;
                }
                if (item.ieOpacity) {
                    item.node.style.filter = "alpha(opacity="+(amount * 100)+")";
                } else {
                    item.node.style[item.JSStyle] = amount + item.suffix;
                }
            } else {
                clearInterval(node.interval);
                node.interval = null;
                if (item.yang) {
                    var foo = item.yangOriginalValue + item.originalValue - item.value;
                    item.yang.style[item.JSStyle] = foo + item.suffix;
                }
                if (item.ieOpacity) {
                    item.node.style.filter = "alpha(opacity="+(item.value * 100)+")";
                } else {
                    item.node.style[item.JSStyle] = item.value + item.suffix;
                }
                if (oncomplete) {
                    oncomplete();
                }

            }
        }
    }
    return node.interval = setInterval(func, 10);
}

function vw_transition(node, style, value, yang) 
{
    this.add = vw_transition_add;
    this.engage = vw_transition_engage;
    this.list = new Array();

    this.add(node, style, value, yang);    
    
    
}

/*
function vw_clipEffect(node, mode) 
{
    if (node.timeout) {
        clearTimeout(node.timeout);
        node.timeout = null;
    }

    var clip = node.style.clip ? node.style.clip.split(/, | |,/) : '';
    if (mode == 'down') {
        if (!node.style.clip) {
            var percent = 10;
        } else {
            value = parseInt(clip[2]);
            var percent = Math.floor(value / node.offsetHeight * 10) * 10 + 10; 
        }
    } else if(mode == 'up') {
        if (!node.style.clip) {
            var percent = 90;
        } else {
            value = parseInt(clip[2]);
            var percent = Math.floor(value / node.offsetHeight * 10) * 10 - 10; 
        }
    }
    
    node.style.clip = "rect(auto, 2500px, "+Math.ceil(node.offsetHeight * percent / 100)+"px, -10px)";
    if (percent < 110 && percent > 0) {
        node.timeout = setTimeout(function() {vw_clipEffect(node, mode)}, 20);
    } else if (mode == 'down' || mode == 'right') {
        node.style.clip = '';;
    } else if (mode == 'up' || mode == 'left') {
        node.style.visibility = 'hidden';
    }
}
*/

function vwMenuOver(e) 
{
    var evt = e ? e : event;
    var target = evt.target ? evt.target : evt.srcElement;
    if (!vw_isTarget(evt, this)) {
        return;
    }

    var vertical = null, horizontal = null, fade = null, vwMenu;
    var child = null;
    

    for (var i = 0; i < this.childNodes.length; i++) {
        var child = this.childNodes.item(i);
        if (child.nodeName == '#text') {
            continue;
        }
        if (child.className.match(/vertical/)) {
            vertical = child;
            break;
        }
        if (child.className.match(/fade/)) {
            fade = child;
            break;
        }
    }

    if (!vertical && !horizontal && !fade) {
        return;
    }

    var ul = null;
    for (var i = 0; i < child.childNodes.length; i++) {
        var node = child.childNodes.item(i);
        if (node.nodeName == '#text') {
            continue;
        }
        if (node.nodeName == 'UL') {
            ul = node;
        }
    } 

    if (!ul) {
        return;    
    }

    if (evt.type == 'mouseover') {
        child.style.width = ul.offsetWidth + 'px';
        child.style.height = ul.offsetHeight + 'px';
        child.style.visibility = 'visible';
        var oncomplete = function() {
            child.style.overflow = 'visible';
        }
    } else {
        var oncomplete = function() {
            child.style.visibility = 'hidden';
        }
    }

    if (vertical) {
        if (evt.type == 'mouseover') {
            child.style.overflow = 'hidden';
            if (!ul.style.marginTop) {
                ul.style.marginTop = '-' + ul.offsetHeight + 'px';
            }
            var t = new vw_transition(ul, 'margin-top', 0);
            t.engage(200, oncomplete);
        } else {
            child.style.overflow = 'hidden';
            var t = new vw_transition(ul, 'margin-top', -ul.offsetHeight);
            t.engage(200, oncomplete);
        }

//        vw_clipEffect(child, evt.type == 'mouseover' ? 'down' : 'up');
    } else if (fade && typeof(child.style.opacity) == 'string') {
        if (evt.type == 'mouseover') {
            if (!ul.style.opacity) {
                ul.style.opacity = 0;
            }
            var t = new vw_transition(ul, 'opacity', 1);
            t.engage(200, oncomplete);
        } else {
            var t = new vw_transition(ul, 'opacity', 0);
            t.engage(200, oncomplete);
        }
    } else if (fade) {
        if (evt.type == 'mouseout') {
            child.style.visibility = 'hidden';
        }
    }
}

function vwMenuOut(e) 
{
    var evt = e ? e : event;
    var target = evt.target ? evt.target : evt.srcElement;
    if (!vw_isTarget(e, this)) {
        return;
    }
}

function vwMenu() 
{
    var menus = getElementsByClassName('vwMenu');

    for (var i = 0; i < menus.length; i++) {
        var menu = menus[i];
        menu.onmouseover = vwMenuOver;
        menu.onmouseout =  vwMenuOver;
    }
}
addEvent(window, 'load', vwMenu);


