﻿function swap(li, over)
{
    var img = null;
    if (li && li.firstChild && li.firstChild.firstChild)
        img = li.firstChild.firstChild;

    if (img && img.src)
    {
        if (over) img.src = img.src.replace(/_off/, '_on');
        else img.src = img.src.replace(/_on/, '_off');
    }
}

function GenerateGetElement()
{
	if (document.getElementById) return function(id) { return document.getElementById(id); }
	else if (document.all) return function(id) { return document.all[id]; }
	else if (document.layers) return function(id) { document.layers[id]; }
}
var GetElement = GenerateGetElement();