﻿
function addArrows() {
    var divs = document.getElementsByTagName("div");
    for (var i=0;i<divs.length;i++)
    {
        if (divs[i].getAttribute("className")=="box" || divs[i].getAttribute("class")=="box") { //if the link has a class of "box"...

/*
                //create the img tag
                var graphic = document.createElement("img");
                graphic.setAttribute("src", "App_Themes/SccaTheme/images/arrow.gif");
                graphic.setAttribute("alt", "Arrow");
                //graphic.setAttribute("class", "arrow");
                graphic.className = "arrow";
*/
                //create the div tag
                var graphic = document.createElement("div");
                graphic.className = "arrow";

                var parent = divs[i];

                var h2s = divs[i].getElementsByTagName("h2");
                if(h2s.length > 0)
                {
                    parent.insertBefore(graphic, h2s[0].nextSibling);
                }
        }
    }

}

