
  var FrontisID = "101418390187104512";

         function show(DivID) {
         var d = document.getElementById(DivID);
            d.style.display="block";
          }

          function hide(DivID) {
          var d = document.getElementById(DivID);
                d.style.display="none";
          }

          function swap(ShowDiv, HideDiv) {
            show(ShowDiv) ;
            hide(HideDiv) ;
          }
 
 
 function hidePopupMenu()
 {
 
 if(PopupMenu)
   PopupMenu.style.display="none";
 }
 
 
 function makePopupMenu(itemNum, menuCaller, title, items)
 {
 //alert(itemNum);
 var i;
 var menuText="<table class='popupmenubox' width='100%' cellspacing=0>";
 
   menuText+="\n<tr class='popupmenuboxtitle'>\n <td align='left' >\n  <span class='popupmenutitle'>"+title+"<\/span><\/td>";
 
   menuText+="\n <td align='right'>\n  <img alt='Close menu' src='../images/closemenu.png'  onmousedown='javascript:buttondown(this);'  onmouseout='javascript:buttonup(this);' onmouseup='javascript:buttonup(this);' class='buttonlink' align='absmiddle' onclick='hidePopupMenu()'  onmouseover=\"this.style.cursor='pointer';\"><\/td>";
   menuText+="\n<\/tr>";
 
 for(i=0;i<items.length;i++)
  {
   if (items[i][1] == 'separator')
    {
   menuText += "\n<tr>\n <td colspan='2'  class='menuboxitems'>";
   menuText += "\n  <span style='font-variant:small-caps;'>"+items[i][0]+"<\/span>";
   menuText += "\n <\/td>\n<\/tr>";
    }
   else
    {
   menuText += "\n<tr>\n<td onmouseover=\"this.style.backgroundColor='#eeeeee'\" onmouseout=\"this.style.backgroundColor=\'\'\" colspan='2'  class='popupmenuboxitems'>";
   menuText += "\n  <a href='"+items[i][1]+"'>" + items[i][0]+"<\/a>";
   menuText += '\n <\/td>\n<\/tr>';
    }
 
  }

 menuText+="<\/table>";

//alert(menuText);
 //menuText+='<\/table><\/td>';
 showPopupMenu(itemNum, menuCaller,menuText);
 }
 
 function makePopupDesc(itemNum, menuCaller, title, text)
 {

 var i;
 var menuText='<table class="popupmenubox" width="100%" cellspacing=0>';

   menuText+='<tr class="popupmenuboxtitle"><td><span class="popupmenutitle">'+title+'<\/span><\/td>';

   menuText+="<td align=\"right\"><img alt=\"Close menu\" src=\"../images/closemenu.png\"  onmousedown=\"javascript:buttondown(this);\"  onmouseout=\"javascript:buttonup(this);\" onmouseup=\"javascript:buttonup(this);\" class=\"buttonlink\" align=\"absmiddle\" onclick=\"javascript:hidePopupMenu()\"  onmouseover=\"this.style.cursor='pointer';\"><\/td>";
   menuText+='<\/tr>';

   menuText += '<tr><td colspan="2"><span class=\'smalltext\'>';
   menuText += text;
   menuText += '<\/span><\/td><\/tr>';

 
 menuText+='<\/table><\/td>';
 showPopupMenu(itemNum, menuCaller,menuText);
 }

 
 var PopupMenu=null;
 
 function showPopupMenu(itemNum, menuCaller,menuText)
 {
   hidePopupMenu(); //if(PopupMenu==null)
  //{
  if(document.all)
   {
   PopupMenu=document.all("PopupMenuAnchor"+itemNum);
   }
  else
   if(document.getElementById)
    {
    PopupMenu=document.getElementById("PopupMenuAnchor"+itemNum);
    }
 // }

 //alert(itemNum);
 
 if(document.all)
  {
  var left=event.clientX+document.body.scrollLeft+10;
  var top=event.clientY+document.body.scrollTop-10;
  }
 else
  if(document.getElementById)
   {
   var left=menuCaller.offsetLeft+menuCaller.offsetWidth;
   var top=menuCaller.offsetTop;
   while(menuCaller.offsetParent)
    {
    menuCaller=menuCaller.offsetParent;
    left+=menuCaller.offsetLeft;
    top+=menuCaller.offsetTop;
    }
   }
//alert("left: "+left+", top:"+top+", PopupMenu: "+PopupMenu.id);
 
 PopupMenu.innerHTML=menuText;
 if (left < 150)
  left = 0;

 PopupMenu.style.left=left-150+"px";
 PopupMenu.style.top=top+"px";
 PopupMenu.style.display="block";
 timeoutPopupMenu();
 }
 
 
 xMousePos=0;
 yMousePos=0;
 xMousePosMax=0;
 yMousePosMax=0;
 if(document.all||document.getElementById)
   {
   document.onmousemove=captureMousePosition;
   }
 
 function timeoutPopupMenu()
  {
  var boxX=parseFloat(PopupMenu.offsetLeft);
  var boxY=parseFloat(PopupMenu.offsetTop);
  var boxW=parseFloat(PopupMenu.offsetWidth);
  var boxH=parseFloat(PopupMenu.offsetHeight);
 
  if(xMousePos>boxX&&xMousePos<(boxX+boxW)&&yMousePos>boxY&&yMousePos<(boxY+boxH))
   {
   setTimeout("timeoutPopupMenu(PopupMenu)",1000);
   }
  else
   {
   hidePopupMenu();
   }
  }
 
 function captureMousePosition(e)
  {
  if(document.layers)
   {
   xMousePos=e.pageX;
   yMousePos=e.pageY;
   xMousePosMax=window.innerWidth+window.pageXOffset;
   yMousePosMax=window.innerHeight+window.pageYOffset;
   }
  else if(document.all)
   {
   xMousePos=window.event.x+document.body.scrollLeft;
   yMousePos=window.event.y+document.body.scrollTop;
   xMousePosMax=document.body.clientWidth+document.body.scrollLeft;
   yMousePosMax=document.body.clientHeight+document.body.scrollTop;
   }
  else if(document.getElementById)
   {
   xMousePos=e.pageX;
   yMousePos=e.pageY;
   xMousePosMax=window.innerWidth+window.pageXOffset;
   yMousePosMax=window.innerHeight+window.pageYOffset;
   }
  }


var marked_row = new Array;

function setPointer(theRow, newColor)
{
    var theCells = null;

    theCells = theRow.cells;

    var rowCellsCnt  = theCells.length;
    
    for (c = 0; c < rowCellsCnt; c++) 
        theCells[c].style.backgroundColor = newColor;
            

    return true;
} // end of the 'setPointer()' function

var inID = 0, outID = 0, inRow;

function moveClass(theRow, a)
// used on the source_classification page
// a = 0 mouse up, a = 1 mouse down
//theRow actually the object which has had the mouseup/down event.  if correct it will be a row
{
  // alert(theRow.className);
  if ((theRow.className != 'classconfig') && a == 0) // if it is a mouse up on an invalid area
   {
//alert (inID);
   if (inID == 0) // if there hasn't been a valid mouse down then return
    return 0;
   else // otherwise the mouse has been clicked on a valid area so need to clear the down ID and reset the cursor
      {
      inID = 0;
      document.body.style.cursor='default'; // restore the cursor
      inRow.parentNode.style.cursor='pointer';
      inRow.parentNode.rows[0].style.cursor='default';

      for (c=0; c < document.images.length; c++)// restore the cursors over the buttons
        {
        if (document.images[c].className == 'buttonlink')
          document.images[c].style.cursor='pointer';
        }

      return 0;
      }
  }  // end of mouse up on an invalid area


  if (a ==1)  //mouse down
   {
   inID=theRow.id;
   inRow = theRow;
   //document.onmouseup = moveClass(this, 0);
   document.body.style.cursor='no-drop';
   theRow.parentNode.style.cursor='N-resize';
   theRow.parentNode.rows[0].style.cursor='no-drop';

   for (c=0; c < document.images.length; c++)
     {
     if (document.images[c].className == 'buttonlink')
       document.images[c].style.cursor='no-drop';
     }

   theRow.parentNode.contentEditable = false;
   }
  else  //mouse up
   {
   if (inID == 0) // if there hasn't been a valid mouse down then return
    return 0;

   if (theRow.className == 'classconfig') // if it has been dropped on a valid line in the table
    {
     outID=theRow.id;
     if (inID == outID) //mouse up and down on the same row then reset cursor, but do nothing
      {
      document.body.style.cursor='default'; // restore the cursor
      inRow.parentNode.style.cursor='pointer';
      inRow.parentNode.rows[0].style.cursor='default';

      for (c=0; c < document.images.length; c++)// restore the cursors over the buttons 
        {
        if (document.images[c].className == 'buttonlink')
          document.images[c].style.cursor='pointer';
        }


      inID = 0;
      outID = 0;
      }
     else // set hidden inputs on the form and submit
      {
      //alert("in: "+inID+", out :"+outID);
      document.forms['moveclass'].classID.value = inID;
      document.forms['moveclass'].newParentID.value = outID;
      document.forms['moveclass'].submit();
      }
     }
    else
     {
     alert("not on row"); // this eventually should have been filtered out at the top
     }
   }

    return true;
} // end of the '()' function



/*========================================================
	Document Text Sizer- Copyright 2003 - Taewook Kang.  All rights reserved.
	Coded by: Taewook Kang (txkang.REMOVETHIS@hotmail.com)
	Web Site: http://txkang.com
	Script featured on Dynamic Drive (http://www.dynamicdrive.com)

	Please retain this copyright notice in the script.
	License is granted to user to reuse this code on
	their own website if, and only if,
	this entire copyright notice is included.
==========================================================*/

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr');

//Specify spectrum of different font sizes:
var szs = new Array('xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;

	sz +=inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;

	if ( !( cEl = d.getElementById( trgt ) ) )
	 cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ )
		 cTags[ j ].style.fontSize = szs[ sz ];
	}
}

function removewait()
   {
   if (document.getElementById)
        var returnVar = document.getElementById("pleasewait");
    else if (document.all)
        var returnVar = document.all["pleasewait"];
    else if (document.layers)
        var returnVar = document.layers["pleasewait"];

     returnVar.style.display = "none";
  //window.pleasewait.style.display = "none";
  }

function buttondown(b)
{
b.style.marginRight="0";
b.style.marginLeft="2px";
b.style.marginTop="2px";
b.style.marginBottom="0";


}
function buttonup(b)
{
b.style.marginRight="2px";
b.style.marginLeft="0";
b.style.marginTop="0";
b.style.marginBottom="2px";

}


