

function styleElement(element, className) {
	element.className = className;
	return false;
}

function gotoUrl(url) {
	window.location.href = url;
	return false;
}

function newWindow(url) {
	window.open(url, '_blank');
	return false;
}

function showDrawing(evt, fixture) {
    var Drawing = document.getElementById("Drawing");
    var Image = document.getElementById("DrawingImage");
    Image.src= "http://www.spilighting.com/ImageLibrary/Public/Line Drawings/" + fixture + ".jpg";
    var DrawingName = document.getElementById("DrawingName");
    var RegEx = /[a-zA-Z]{3}[0-9]{4,5}/;
    var Match = RegEx.exec(fixture);
    if (Match != null) {
        DrawingName.innerText = Match[0];
    }
    Drawing.style.display = "block";
    if (window.event)
        event.cancelBubble = true
    else
        evt.cancelBubble = true;
    return false;
}

function closeDrawing() {
    document.getElementById("DrawingImage").src = "images/onePixel.gif";
    document.getElementById("Drawing").style.display = "none";
}
