var glossary = new Object();
glossary.ENTITLEDIRECT = "ENTITLE DIRECT operates through EnTitle Insurance Company, Cleveland, OH. EnTitle Insurance Company has been in operation for over 30 years, is state regulated, and is accepted by all major lenders. EnTitle Insurance Company currently has an A', Unsurpassed, Financial Stability Rating® from Demotech, Inc. is the ONLY title insurance company that markets and sells title insurance.";
glossary.titleinsurance = "A contractual obligation between a homeowner and/or a lender and the title insurance company, wherein the title insurer, in exchange for a premium payment, provides protection against future losses that might result from a variety of possible title defects or encumbrances that existed at the time of closing.";
glossary.closinganxiety = "The unnecessary level of stress felt by consumers in the time period leading up to and including their home closing or refinancing. This is usually brought on by receiving the HUD-1 Settlement Statement and other documents for the first time at closing. Symptoms include feeling uninformed and writing checks for last-minute surprise closing costs. Recommended Treatment: ENTITLE DIRECT.";
glossary.titlesearch = "A review of all recorded documents affecting a specific piece of property to determine the present condition of the title.";
glossary.ownerspolicy = "A title policy that provides coverage up to the purchase price of the property. When compared to a lender's policy, an owner's policy protects owner's equity in the property.";
glossary.EnhancedPolicy ="The quote you receive from ENTITLE DIRECT for owner's title insurance policies is for an enhanced homeowner's policy which provides additional protection against title-related claims when compared to a standard title insurance owner's policy. Some of the additional coverages provided by an enhanced homeowner's Policy, include, but are not limited to, the following:\n\nPost Policy Forgery and Identity Theft\nBuilding Permit Violations of Previous Owners\nViolations of Restrictive Covenants\nInability to Access Property\nZoning Law Violations\nBuilding Permit Violations\nAn ENTITLE DIRECT homeowner's policy of title insurance also increases in value by 10% each year for the first five years you hold the policy.";
glossary.lenderspolicy = "A title policy that is issued in the amount of the borrower's mortgage loan. It protects the lender up to the amount of the outstanding balance of the mortgage if a title claim is made. If you are financing a property with a commercial lender, they will require that you purchase a lender's policy of title insurance.";

var innerPerm = '';

function getDefinition(termname, termid) 
{
  termid2 = termid + '2';
  if (document.getElementById(termid2) && document.getElementById(termid2).style.display=='block') 
  {
    document.getElementById(termid2).style.display=='none';
  } 
  else 
  {
    var termid2 = termid + '2';
    var termid3 = termid + '3';
    var term_div = document.getElementById(termid);
    innerPerm = term_div.innerHTML;
    var inner = term_div.innerHTML;
    var posx = findPosX(term_div) + 'px';
    var posy = findPosY(term_div) + 20 + 'px';
    term_div.innerHTML += '<div onclick="event.cancelBubble = true; return false;" id="'+termid2+'" style="display:block; position:absolute; top:'+posy+'; left:'+posx+';" class="box"><div class="bar" style="width:12em;" onmousedown="mD(\''+termid2+'\',event);"><span style="cursor: pointer; float: right;" onmousedown="event.cancelBubble = true; return false;" onclick="javascript:closeWin(\''+inner.replace("'", "|")+'\',\''+termid+'\')">X</span>'+inner+'</div><div id="'+termid3+'" class="content" style="width:12em;"><img src="'+loadImage.src+'" /></div></div>';
    document.getElementById(termid3).innerHTML = glossary[termname];
  }
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

 function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

function closeWin(tname,term) {
	term_div = document.getElementById(term);
	term_div.innerHTML = tname.replace("|", "'");;
}