   	var contents = new Array();
   	var tip = new Array();
   	var oldcontent;
   	var tips = new Array();
	var numPs = new Array();
	var thecurID = "-1";
	var target;
	var theColor = "#CCFFFF";
	var mySpNum = 0;

	var ddtarget;
	var clone;
	var plannedCloneTop;
	var listItems;
	var firstItemPosition;
	var lastItemPosition;


   	// STEP 1
   	// Mark the block items in the html file which you want to have tooltips
   	// with class="hastooltip" (as illustrated!!)
   	// THEN
   	// STEP 2
   	// Simply put one line, like those below, for each block item with class=hastooltips

	contents[0] = "Double Click source phrase to add a comment OR double click this popup to just close it without commenting";
	contents[1] = "Double Click source phrase to add a comment OR double click this popup  to just close it without commenting";
	contents[2] = "Double Click source phrase to add a comment OR double click this popup to just close it without commenting";
   	// contents[0] = "First First First First First First First First First First First First First First First First First ";
   	// contents[1] = "Second";
   //	contents[2] = "Third";
   	contents[3] = "Double Click source phrase to add a comment OR double click this popup to just close it without commenting";
	contents[4] = "HI mate";





   	// THEN
   	// STEP 3
   	// Open the associated css file and make the corresponding div an approp.
   	//  size and adjust text color, background color , and use a background
   	//  image if desired


   	// No need to look at the code below

   	   	function getElementsByAttribute(attribute, attributeValue)
	   	{

	   	  var elementArray = new Array();
	   	  var matchedArray = new Array();

	   	  if (document.all)
	   	  {
	   	    elementArray = document.all;
	   	  }
	   	  else
	   	  {
	   	    elementArray = document.getElementsByTagName("*");
	   	  }

	   	  for (var i = 0; i < elementArray.length; i++)
	   	  {
	   	    if (attribute == "class")
	   	    {
	   	      var pattern = new RegExp("(^| )" + attributeValue + "( |$)");

	   	      if (elementArray[i].className.match(pattern))
	   	      {
	   	        matchedArray[matchedArray.length] = elementArray[i];
	   	      }
	   	    }
	   	    else if (attribute == "for")
	   	    {
	   	      if (elementArray[i].getAttribute("htmlFor") || elementArray[i].getAttribute("for"))
	   	      {
	   	        if (elementArray[i].htmlFor == attributeValue)
	   	        {
	   	          matchedArray[matchedArray.length] = elementArray[i];
	   	        }
	   	      }
	   	    }
	   	    else if (elementArray[i].getAttribute(attribute) == attributeValue)
	   	    {
	   	      matchedArray[matchedArray.length] = elementArray[i];
	   	    }
	   	  }

	   	  return matchedArray;
}

function  hidePnum() {

numPs = getElementsByAttribute("class", "theNum");
for (var i = 0; i < numPs.length; i++){
   theid = "pnum" + (i + 1);
   addStyleDef(theid, 'display', 'none');

}

}


   	addLoadListener(initTooltips);

   	function initTooltips()
   	{
   	  tips = getElementsByAttribute("class", "hastooltip");

   	  for (var i = 0; i < tips.length; i++)
   	  {
   	    attachEventListener(tips[i], "click", showTip, false);
   	    attachEventListener(tips[i], "dblclick", hideTip, false);
		


   		tip[i] = document.createElement("div");
		tip[i].setAttribute("id", (i + "tooltip"));



   		var newNodetwo = document.createElement("textarea");
   		var abr = document.createElement("br");

   		var abr2 = document.createElement("br");
   		var abr3 = document.createElement("br");
		var abr4 = document.createElement("br");


   		newNodetwo.setAttribute("scroll", "yes");
   		newNodetwo.setAttribute("cols", "24");
   		newNodetwo.setAttribute("rows", "3");

   		var theCenter = document.createElement("center");

   		var atext = document.createElement("input");
   		atext.setAttribute("type", "test");
   		atext.setAttribute("name", "thetext" + i);

   		atext.setAttribute("size", "5");


   		tip[i].appendChild(newNodetwo);
   		tip[i].appendChild(abr);

   		tip[i].appendChild(document.createTextNode(contents[0]));
   		tip[i].appendChild(abr2);
		tip[i].appendChild(abr4);
   		tip[i].appendChild(document.createTextNode("CONFIDENCE: rate 5, 4, 3, 2, or 1"));
   		theCenter.appendChild(atext);
   		tip[i].appendChild(theCenter);

   		tip[i].appendChild(document.createTextNode(" 5 high .. 4 .. 3 medium .. 2 ..1 low "));

   		tip[i].className = "tooltip0";
   		tip[i].style.visibility = "hidden";
		attachEventListener(tip[i], "dblclick", hidethisTip, true);

   	  }

   	  return true;
   	}

	


   	function showTip(event)
   	{


   	  if (typeof event == "undefined")
   	  {
   	    event = window.event;
   	  }

   	  // target = getEventTarget(event);
	  if(target){
	  if(target.getAttribute("name").indexOf("bozo") == -1) {
	  target.style.background = "#FFFFFF";

	  }else{
	  target.style.background = theColor;
	  }

	  }
	  target = getEventTarget(event);

	  if((target.getAttribute("name").indexOf("bozo") == -1)) {
	  target.style.background = "#FFFF99";


	   }else{
	  target.style.background = theColor;
	  }




   	  thecurID = target.getAttribute("id");
	  document.getElementById(thecurID).style.background = "#FFFF99";

   	  	  for(var z=0; z < tips.length; z++)
   	  	  {
   	  	    if(z != thecurID)
   	  		{

   			   tip[z].style.visibility = "hidden";


   	  		}
   	  }
   	 // document.getElementById(thecurID).style.background = "#CCFFCC";
   	  while (target.className == null || !/(^| )hastooltip( |$)/.test(target.className))
   	  {
   	    target = target.parentNode;
   	  }


   	  oldcontent = target.getAttribute("title");

   	  var thenum = parseInt(target.getAttribute("id"));
   	  target.tooltip = tip[thenum];
   	 //  target.tooltip.elements["thegroup"].disabled = false;
   	  target.setAttribute("title", "");


   	   if (target.getAttribute("id") != "")
   	    {
   	      target.tooltip.setAttribute("id", target.getAttribute("id") + "tooltip");
   	    }




   	  var scrollingPosition = getScrollingPosition();
   	  var cursorPosition = [0, 0];

   	  if (typeof event.pageX != "undefined" && typeof event.x != "undefined")
   	  {
   	    cursorPosition[0] = event.pageX;
   	    cursorPosition[1] = event.pageY;
   	  }
   	  else
   	  {
   	    cursorPosition[0] = event.clientX + scrollingPosition[0];
   	    cursorPosition[1] = event.clientY + scrollingPosition[1];
   	  }

   	  target.tooltip.style.position = "absolute";
   	  target.tooltip.style.left = cursorPosition[0] + 10 + "px";
   	  target.tooltip.style.top = cursorPosition[1] + 10 + "px";
   	  target.tooltip.style.visibility = "hidden";
   	  var thetip = target.tooltip;

   	  if(!document.getElementById[(thenum + "tooltip")]) document.getElementsByTagName("body")[0].appendChild(target.tooltip);

   	  var viewportSize = getViewportSize();

   	  if (cursorPosition[0] - scrollingPosition[0] + 10 + thetip.offsetWidth > viewportSize[0] - 25)
   	  {
   	    target.tooltip.style.left = scrollingPosition[0] + viewportSize[0] - 25 - thetip.offsetWidth + "px";
   	  }
   	  else
   	  {
   	    target.tooltip.style.left = cursorPosition[0] + 10 + "px";
   	  }

   	  if (cursorPosition[1] - scrollingPosition[1] + 10 + thetip.offsetHeight > viewportSize[1] - 25)
   	  {
   	    if (event.clientX > (viewportSize[0] - 25 - thetip.offsetWidth))
   	    {
   	      target.tooltip.style.top = cursorPosition[1] - thetip.offsetHeight - 10 + "px";
   	    }
   	    else
   	    {
   	      target.tooltip.style.top = scrollingPosition[1] + viewportSize[1] - 25 - thetip.offsetHeight + "px";
   	    }
   	  }
   	  else
   	  {
   	    target.tooltip.style.top = cursorPosition[1] + 10 + "px";
   	  }

   	  target.tooltip.style.visibility = "visible";

   	  return true;
   	}

   	function hideTip(event)

   	{

   	  if (typeof event == "undefined")
   	  {
   	    event = window.event;
   	  }

   	  target = getEventTarget(event);

   	  while (target.className == null || !target.className.match(/(^| )hastooltip( |$)/))
   	  {
   	    target = target.parentNode;
   	  }

   	  if (target.tooltip != null)
   	  {
   	  	target.style.background = theColor;
		target.setAttribute("name", "bozo" + target.id);

   		var toGetTA = document.getElementById("bigTA");
   		var theVal = "no response";




   		theVal = target.tooltip.childNodes[6].firstChild.value;



   		toGetTA.value += target.tooltip.id + "_Remarks: " + target.tooltip.firstChild.value + "\nConfidence" + target.tooltip.id + ": " + theVal + "\n\n";
   	     target.tooltip.style.visibility = "hidden";
   		  // document.getElementsByTagName("body")[0].removeChild(target.tooltip);


   	  }

   	  return false;
   	}

	 function hidethisTip(event)

	   	{

	   	  if (typeof event == "undefined")
	   	  {
	   	    event = window.event;
	   	  }

	   	  var thistarget = getEventTarget(event);
	   	if(!(target.getAttribute("name").indexOf("bozo") == -1)){
		target.style.background = theColor;
		}else{
		target.style.background = "#FFFFFF";
		}

		 
		while(thistarget.id.indexOf("tooltip") == -1) {
		   thistarget = thistarget.parentNode;
		}
		
		target = null;



	   	  	thistarget.style.visibility = "hidden";


	   	  return false;
   	}

	//////

	function getPosition(theElement)
	{
	  var positionX = 0;
	  var positionY = 0;

	  while (theElement != null)
	  {
	    positionX += theElement.offsetLeft;
	    positionY += theElement.offsetTop;
	    theElement = theElement.offsetParent;
	  }

	  return [positionX, positionY];
	}

	function identifyBrowser()
	{
	  var agent = navigator.userAgent.toLowerCase();

	  if (typeof navigator.vendor != "undefined" && navigator.vendor == "KDE" && typeof window.sidebar != "undefined")
	  {
	    return "kde";
	  }
	  else if (typeof window.opera != "undefined")
	  {
	    var version = parseFloat(agent.replace(/.*opera[\/ ]([^ $]+).*/, "$1"));

	    if (version >= 7)
	    {
	      return "opera7";
	    }
	    else if (version >= 5)
	    {
	      return "opera5";
	    }

	    return false;
	  }
	  else if (typeof document.all != "undefined")
	  {
	    if (typeof document.getElementById != "undefined")
	    {
	      var browser = agent.replace(/.*ms(ie[\/ ][^ $]+).*/, "$1").replace(/ /, "");

	      if (typeof document.uniqueID != "undefined")
	      {
	        if (browser.indexOf("5.5") != -1)
	        {
	          return browser.replace(/(.*5\.5).*/, "$1");
	        }
	        else
	        {
	          return browser.replace(/(.*)\..*/, "$1");
	        }
	      }
	      else
	      {
	        return "ie5mac";
	      }
	    }

	    return false;
	  }
	  else if (typeof document.getElementById != "undefined")
	  {
	    if (navigator.vendor.indexOf("Apple Computer, Inc.") != -1)
	    {
	      if (typeof window.XMLHttpRequest != "undefined")
	      {
	        return "safari1.2";
	      }

	      return "safari1";
	    }
	    else if (agent.indexOf("gecko") != -1)
	    {
	      return "mozilla";
	    }
	  }

	  return false;
	}

	function identifyOS()
	{
	  var agent = navigator.userAgent.toLowerCase();

	  if (agent.indexOf("win") != -1)
	  {
	    return "win";
	  }
	  else if (agent.indexOf("mac"))
	  {
	    return "mac";
	  }
	  else
	  {
	    return "unix";
	  }

	  return false;
}

function stopDefaultAction(event)
{
  event.returnValue = false;

  if (typeof event.preventDefault != "undefined")
  {
    event.preventDefault();
  }

  return true;
}

	function detachEventListener(ddtarget, eventType, functionRef, capture)
	{
	  if (typeof ddtarget.removeEventListener != "undefined")
	  {
	    ddtarget.removeEventListener(eventType, functionRef, capture)
	  }
	  else if (typeof ddtarget.detachEvent != "undefined")
	  {
	    ddtarget.detachEvent("on" + eventType, functionRef);
	  }
	  else
	  {
	    ddtarget["on" + eventType] = null;
	  }

	  return true;
}

function initSortableList1()
{
  if (identifyBrowser().indexOf("ie") != -1 && identifyOS() == "mac")
  {
    return false;
  }

  var LI1s = document.getElementById("footballLadder1").getElementsByTagName("li");

  for (var i = 0; i < LI1s.length; i++)
  {
    attachEventListener(LI1s[i], "mousedown", mousedownSortableList1, false);
    // LI1s[i].style.cursor = "move";
  }
}

function addStyleDef(theid, stylename, newVal){
	var theobj = document.getElementById(theid);
	theobj.style[stylename] = newVal;
	
	}

function disableSlide() {

detachEventListener(document, "mousemove", mousemoveCheckThreshold1, false);
    detachEventListener(document, "mouseup", mouseupCancelThreshold1, false);
	
  
  }

function mousedownSortableList1(event)
{
  generalMDSortableList(event);

  ddtarget.clickOriginY = event.pageY;
 if(!document.getElementById("thecb").checked){
  attachEventListener(document, "mousemove", mousemoveCheckThreshold1, false);
  attachEventListener(document, "mouseup", mouseupCancelThreshold1, false);
  }

  stopDefaultAction(event);

  return true;
}

function mousemoveCheckThreshold1(event)
{
  if (typeof event == "undefined")
  {
    event = window.event;
  }

  if (typeof event.pageY == "undefined")
  {
    event.pageY = event.clientY + getScrollingPosition()[1];
  }

  var ddtarget = document.currentTarget;

  if (Math.abs(ddtarget.clickOriginY - event.pageY) > 3)
  {
    if (typeof document.selection != "undefined")
    {
      var textRange = document.selection.createRange();
      textRange.collapse();
      textRange.select();
    }

    detachEventListener(document, "mousemove", mousemoveCheckThreshold1, false);
    detachEventListener(document, "mouseup", mouseupCancelThreshold1, false);

    attachEventListener(document, "mousemove", mousemoveSortableList1, false);
    attachEventListener(document, "mouseup", mouseupSortableList1, false);

    var cloneItem = ddtarget.cloneNode(true);
    cloneItem.setAttribute("class", "clone");
    cloneItem.style.position = "absolute";
    cloneItem.style.top = getPosition(ddtarget)[1] + "px";
    cloneItem.differenceY = parseInt(cloneItem.style.top) - event.pageY;

    cloneItem = ddtarget.parentNode.appendChild(cloneItem);

    ddtarget.clone = cloneItem;
    ddtarget.style.visibility = "hidden";
  }

  stopDefaultAction(event);

  return true;
}

function mouseupCancelThreshold1()
{
  detachEventListener(document, "mousemove", mousemoveCheckThreshold1, false);
  detachEventListener(document, "mouseup", mouseupCancelThreshold1, false);
  return true;
}

function mousemoveSortableList1(event)
{
  generalMMSortableList(event);

  var LI1s = ddtarget.parentNode.getElementsByTagName("li");
  var currentItemHigher = true;

  for (var i = 0; i < LI1s.length; i++)
  {
    if (LI1s[i] != ddtarget && LI1s[i] != ddtarget.clone)
    {
      if (event.pageY < getPosition(LI1s[i])[1] + LI1s[i].offsetHeight && currentItemHigher)
      {
        ddtarget.parentNode.insertBefore(ddtarget, LI1s[i]);

        break;
      }
      else if (event.pageY > getPosition(LI1s[i])[1] && !currentItemHigher)
      {
        ddtarget.parentNode.insertBefore(LI1s[i], ddtarget);
      }
    }
    else
    {
      currentItemHigher = false;
    }
  }

  stopDefaultAction(event);

  return true;
}



function mouseupSortableList1()
{
  var ddtarget = document.currentTarget;
  var clone = ddtarget.clone;

  clone.parentNode.removeChild(clone);

  ddtarget.style.visibility = "visible";

  detachEventListener(document, "mousemove", mousemoveSortableList1, false);
  detachEventListener(document, "mouseup", mouseupSortableList1, false);

  return true;
}
	function generalMDSortableList(event){
	  if (typeof event == "undefined")
	  {
	    event = window.event;
	  }

	  if (typeof event.pageY == "undefined")
	  {
	    event.pageY = event.clientY + getScrollingPosition()[1];
	  }

	   ddtarget = getEventTarget(event);

	  while (ddtarget.nodeName.toLowerCase() != "li")
	  {
	    ddtarget = ddtarget.parentNode;
	  }

	  document.currentTarget = ddtarget;

	  ddtarget.clickOriginY = event.pageY;

	  }



	function generalMMSortableList (event) {

	  if (typeof event == "undefined")
	  {
	    event = window.event;
	  }

	  if (typeof event.pageY == "undefined")
	  {
	    event.pageY = event.clientY + getScrollingPosition()[1];
	  }

	  ddtarget = document.currentTarget;
	  clone = ddtarget.clone;
	  plannedCloneTop = event.pageY + clone.differenceY;
	  listItems = clone.parentNode.getElementsByTagName("li");
	  firstItemPosition = getPosition(listItems[0]);
	  lastItemPosition = getPosition(listItems[listItems.length - 2]);

	  if (plannedCloneTop < firstItemPosition[1])
	  {
	    plannedCloneTop = firstItemPosition[1];
	  }
	  else if (plannedCloneTop > lastItemPosition[1])
	  {
	    plannedCloneTop = lastItemPosition[1];
	  }

	  clone.style.top = plannedCloneTop + "px";

	  }


	  //////////////////

  addLoadListener(initSortableList1);
	//////

   	function addLoadListener(fn)
   	{
   	  if (typeof window.addEventListener != 'undefined')
   	  {
   	    window.addEventListener('load', fn, false);
   	  }
   	  else if (typeof document.addEventListener != 'undefined')
   	  {
   	    document.addEventListener('load', fn, false);
   	  }
   	  else if (typeof window.attachEvent != 'undefined')
   	  {
   	    window.attachEvent('onload', fn);
   	  }
   	  else
   	  {
   	    var oldfn = window.onload;
   	    if (typeof window.onload != 'function')
   	    {
   	      window.onload = fn;
   	    }
   	    else
   	    {
   	      window.onload = function()
   	      {
   	        oldfn();
   	        fn();
   	      };
   	    }
   	  }
   	}

   	function attachEventListener(target, eventType, functionRef, capture)
   	{
   	  if (typeof target.addEventListener != "undefined")
   	  {
   	    target.addEventListener(eventType, functionRef, capture);
   	  }
   	  else if (typeof target.attachEvent != "undefined")
   	  {
   	    target.attachEvent("on" + eventType, functionRef);
   	  }
   	  else
   	  {
   	    eventType = "on" + eventType;

   	    if (typeof target[eventType] == "function")
   	    {
   	      var oldListener = target[eventType];

   	      target[eventType] = function()
   	      {
   	        oldListener();

   	        return functionRef();
   	      }
   	    }
   	    else
   	    {
   	      target[eventType] = functionRef;
   	    }
   	  }

   	  return true;
   	}

   	function getEventTarget(event)
   	{
   	  var targetElement = null;

   	  if (typeof event.target != "undefined")
   	  {
   	    targetElement = event.target;
   	  }
   	  else
   	  {
   	    targetElement = event.srcElement;
   	  }

   	  while (targetElement.nodeType == 3 && targetElement.parentNode != null)
   	  {
   	    targetElement = targetElement.parentNode;
   	  }

   	  return targetElement;
   	}

   	function getViewportSize()
   	{
   	  var size = [0,0];

   	  if (typeof window.innerWidth != 'undefined')
   	  {
   	    size = [
   	        window.innerWidth,
   	        window.innerHeight
   	    ];
   	  }
   	  else if (typeof document.documentElement != 'undefined'
   	      && typeof document.documentElement.clientWidth != 'undefined'
   	      && document.documentElement.clientWidth != 0)
   	  {
   	    size = [
   	        document.documentElement.clientWidth,
   	        document.documentElement.clientHeight
   	    ];
   	  }
   	  else
   	  {
   	    size = [
   	        document.getElementsByTagName('body')[0].clientWidth,
   	        document.getElementsByTagName('body')[0].clientHeight
   	    ];
   	  }

   	  return size;
   	}

   	function getScrollingPosition()
   	{
   	  //array for X and Y scroll position
   	  var position = [0, 0];

   	  //if the window.pageYOffset property is supported
   	  if(typeof window.pageYOffset != 'undefined')
   	  {
   	    //store position values
   	    position = [
   	        window.pageXOffset,
   	        window.pageYOffset
   	    ];
   	  }

   	  //if the documentElement.scrollTop property is supported
   	  //and the value is greater than zero
   	  if(typeof document.documentElement.scrollTop != 'undefined'
   	    && document.documentElement.scrollTop > 0)
   	  {
   	    //store position values
   	    position = [
   	        document.documentElement.scrollLeft,
   	        document.documentElement.scrollTop
   	    ];
   	  }

   	  //if the body.scrollTop property is supported
   	  else if(typeof document.body.scrollTop != 'undefined')
   	  {
   	    //store position values
   	    position = [
   	        document.body.scrollLeft,
   	        document.body.scrollTop
   	    ];
   	  }

   	  //return the array
   	  return position;
   	}