// JavaScript Document

var corAnterior;

function mOvr (src,clrOver) {
	if (!src.clicked) {
		corAnterior = src.style.backgroundColor;
		src.style.backgroundColor = clrOver;
	}
}
function mOut (src,clrIn) {
	if (!src.clicked) {
		src.style.backgroundColor = corAnterior;		
	}
}

function cOvr (src,clrIn) {
	if (src.clicked) {
		src.style.backgroundColor = src.oldColor;
		src.clicked = false;
	}
	else {
		src.style.backgroundColor = clrIn;
		src.clicked = true;
	}
}

//Funções alteradas para marcar 2 tr
function mOvr2 (src,clrOver,IdOther) {
	if (!src.clicked) {
//		src.bgColor = clrOver;
		src.style.backgroundColor = clrOver;
		
		Other = document.getElementById(IdOther);
		Other.style.backgroundColor = clrOver;
	}
}
function mOut2 (src,clrIn,IdOther) {
	if (!src.clicked) {
		src.style.backgroundColor = clrIn;
		
		Other = document.getElementById(IdOther);
		Other.style.backgroundColor = clrIn;
	}
}

function cOvr2 (src,clrIn,IdOther) {
	if (src.clicked) {
		src.style.backgroundColor = src.oldColor;
		
		Other = document.getElementById(IdOther);
		Other.style.backgroundColor = src.oldColor;
		
		src.clicked = false;
	}
	else {
		src.oldColor = src.style.backgroundColor;
		src.style.backgroundColor = clrIn;
		
		Other = document.getElementById(IdOther);
		Other.oldColor = src.style.backgroundColor;
		
		src.clicked = true;
	}
}
