function checkit()

{

                // set the classname to search for

                var targetclass = "diduknow";

                // create the array which will store the id's of the divs in the target class

                var arrgh = new Array();

                var e = 0;  // array placeholder

                // get all divs and search for the target class

                var divs = document.getElementsByTagName('div');

                for (var i = 0; i < divs.length; i++){

                                if (divs[i].className == targetclass)

                                {

                                                // when found assign an array element to the id of the found div, increment the placeholder

                                                arrgh[e] = divs[i].getAttribute('id');

                                                e++;

                                }

   }

                // generate a random number from 0 to the highest array element

                var randomnumber=Math.floor(Math.random()* e)

                // set the specified div element to visible.

                document.getElementById(arrgh[randomnumber]).style.visibility = "visible";

}


