// Contract Analysis Prototype 0.2
function analyzeTerm ()
{
// Convert to uppercase; remove punctuation; remove spacing.
var term = prepareTerm(document.getElementById('contractTerm').value);
// Perform analysis.
document.getElementById('resultsTable').innerHTML = analyzeAssignmentClause(term);
// Show analysis.
if (document.getElementById('analysisResults').getAttribute('style') == 'visibility:hidden;')
document.getElementById('analysisResults').setAttribute('style', 'visibility:visible;');
else
document.getElementById('analysisResults').setAttribute('style', 'visibility:hidden;');
}
function prepareTerm (term)
{
return term.toUpperCase().replace(new RegExp("[^A-Z0-9]", "gm"), "");
}
function analyzeAssignmentClause (term)
{
var result = "";
// Rights to money.
var moneyExpl = "Courts favor assignments of rights to money, and will require explicit language to forbid the right to assign when a contract is no longer executory.";
var money1 = "ANYCLAIMFORDAMAGESARISINGOUTOFTHENONASSIGNINGPARTYSBREACHOFTHEWHOLECONTRACT";
var money2 = "ANYRIGHTSARISINGOUTOFTHEASSIGNORSFULLPERFORMANCEOFTHISAGREEMENT";
var moneyClass = "negative";
if (term.search(money1) >= 0 || term.search(money2) >= 0)
moneyClass = "positive";
var quote1 = "A promise not to assign any "interests" in the agreement "does not clearly and unambiguously prohibit the assignment of the right to pursue a claim for breach of the contract. The term 'interests' does not manifest an intent to include the right to sue. If it were intended, the parties would have been specific in their reference to the right to pursue a damage claim."";
var cite1 = "<i>Lomas Mortgage U.S.A., Inc. v. W.E. O'Neil Construction Co.</i>, 812 F. Supp. 841, 843-844 (N.D. Ill. 1993)";
var quote2 = "A clause that prohibits the assignment of a party's rights under a contract and...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.