Here's how to access each control on your forms using Javascript. Using this information you can add very useful functionality to CRM's front end.
There are a couple of ways to do this, you can choose which ever suits your situation best...
Currently displayed entitie's GUID:
        crmForm.ObjectId
To access a control on the form:
    crmForm.all.[attributename]
    // OR
    document.getElementById("[attributename]")
Hide/show attribute(set to visible or invisible):
    //Hide it
    crmForm.all.[attributename].style.display = "none";
    //Show it
    crmForm.all.[attributename].style.display = "inline";
Enable/disable attribute:
   //Disable
   crmForm.all.[attributename].Disabled = true;
   //Enable
   crmForm.all.[attributename].Disabled = false;
Does control/attribute contain any data?
   if (crmForm.all.[attributename] != null)
       //Contains some data
Control's value(this is the current on screen value. ie, may not have been saved yet):
   crmForm.all.[attributename].DataValue
   // OR
   crmForm.all.[attributename].value
   // OR if its a checkbox
   crmForm.all.[attributename].Checked = [true false=""]
   // OR if its a lookup
     //Descriptive name for the selected item
     crmForm.all.[attributename].DataValue.name
     //GUID value of the selected item
     crmForm.all.[attributename].DataValue.id
     //Type of entity selected in the lookup(1=Account, 2=Contact...)
     crmForm.all.[attributename].DataValue.type
     //Descriptive name for the selected entity type
     crmForm.all.[attributename].DataValue.typename