First, don't use the name "data" for your root node, since "data" is already the name of the dataset the form data is stored in. Using the same name with other form objects can cause strange side effects. Rename it to "form" or someting else.
Ok, you need to reference all instances of the master page "DocumentHeader" and manipulate everyone of them separately.
The best way is to use a for loop like this:
var cType = form.#pageSet.DocumentHeader.TYPE").rawValue,
oHeaders = form.#pageSet.resolveNodes("DocumentHeader[*]"),
i;
for (i = 0; i < oHeaders.length; i += 1) {
oHeaders.item(i).DOC_TYPE.fontColor = cType === "G2" ? "60,60,160" : "0,0,0";
}