function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
/////////////////////////////////////////
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'':(v='hide')?'none':v; }
    obj.display=v; }
}
var cssmenuids=["cssmenu1"]; //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=0; //Offset of submenus from main menu. Default is 0 pixels.
////////////////////////////////////////////////////
function createcssmenu2(){
for (var i=0; i<cssmenuids.length; i++){
  var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
			ultags[t].style.top=ultags[t].parentNode.offsetHeight+csssubmenuoffset+"px"
    	var spanref=document.createElement("span")
			spanref.className="arrowdiv"
			spanref.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"
			ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
    	ultags[t].parentNode.onmouseover=function(){
    	this.getElementsByTagName("ul")[0].style.visibility="visible"
    	}
    	ultags[t].parentNode.onmouseout=function(){
			this.getElementsByTagName("ul")[0].style.visibility="hidden"
    }
    }
  }
}

if (window.addEventListener)
	window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
	window.attachEvent("onload", createcssmenu2)
///////////////////////////////////////////////////////	
function readCookie(name)
{
  var cookieValue = "";
  var offset=0;
  var end=0;
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}
////////////////////////////////////////////////
function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + (hours * 3600000));
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value)+ expire;
}
//  === Highlight row when mouseOver ===================================  //
function rowOverEffect(object) {
  if (object.className == 'normal') object.className = 'highlight';
}
//  === Return to normal when mouseOut =================================  //
function rowOutEffect(object) {
  if (object.className == 'highlight') object.className = 'normal';
}

function jump(recno) {
	document.cookie = 'selected' + "=" + escape(recno);
	x=readCookie('status');
	if(x>=6) {window.location='/editDebtors.php';}
}