   	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;
	var theDivs;
	
	
function FP_changeProp() {//v1.0
 var args=arguments,d=document,i,j,id=args[0],o=FP_getObjectByID(id),s,ao,v,x;
 d.$cpe=new Array(); if(o) for(i=2; i<args.length; i+=2) { v=args[i+1]; s="o"; 
 ao=args[i].split("."); for(j=0; j<ao.length; j++) { s+="."+ao[j]; if(null==eval(s)) { 
  s=null; break; } } x=new Object; x.o=o; x.n=new Array(); x.v=new Array();
 x.n[x.n.length]=s; eval("x.v[x.v.length]="+s); d.$cpe[d.$cpe.length]=x;
 if(s) eval(s+"=v"); }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

   	// 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";





   	

   	// No need to look at the code below
   	
   	var typedVal = "";
	

   	   	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).toString();
   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"));
		tip[i].setAttribute("style", "z-index:50");



   		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);

   	  }
   	  
   	  
   	 // initSortableList1();
   	  
   	  
   	  

   	  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 + "<br>Confidence" + target.tooltip.id + ": " + theVal + "<br><br>";
   	     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 addStyleDef(theid, stylename, newVal){
	var theobj = document.getElementById(theid);
	theobj.style[stylename] = newVal;
	
	}













	


	  //////////////////

 // 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;
   	}