var g_bg_color = "yellow";
var g_color = "#fff";

//culoare text
var tx_color = "#000"; //optiunea curenta
var t_color = "#000"; //celelalte optiuni

function changeColor(id, color) 
{
element = document.getElementById(id);
event.cancelBubble = true;
oldColor = element.currentStyle.background;
element.style.background = color;
}

//Click raspuns
function markA()
{
	document.getElementById("cA").checked = true;
	document.getElementById("cB").checked = false;
	document.getElementById("cC").checked = false;
	document.getElementById("cD").checked = false;
    //changeColor('DA', '#cc3300');
    
    document.getElementById("DA").style.background = g_bg_color;
    document.getElementById("DB").style.background = g_color;
    document.getElementById("DC").style.background = g_color;
    document.getElementById("DD").style.background = g_color;            
    
    document.getElementById("DA").style.color = tx_color;
    document.getElementById("DB").style.color = t_color;
    document.getElementById("DC").style.color = t_color;
    document.getElementById("DD").style.color = t_color;

	return true;	
}

//Click raspuns
function markB()
{
	document.getElementById("cA").checked = false;
	document.getElementById("cB").checked = true;
	document.getElementById("cC").checked = false;
	document.getElementById("cD").checked = false;

    document.getElementById("DA").style.background =  g_color;
    document.getElementById("DB").style.background =  g_bg_color;
    document.getElementById("DC").style.background =  g_color;
    document.getElementById("DD").style.background =  g_color;            
    
    document.getElementById("DA").style.color = t_color;
    document.getElementById("DB").style.color = tx_color;
    document.getElementById("DC").style.color = t_color;
    document.getElementById("DD").style.color = t_color;	
	
	return true;	
}

//Click raspuns
function markC()
{
	document.getElementById("cA").checked = false;
	document.getElementById("cB").checked = false;
	document.getElementById("cC").checked = true;
	document.getElementById("cD").checked = false;
	
    document.getElementById("DA").style.background = g_color;
    document.getElementById("DB").style.background = g_color;
    document.getElementById("DC").style.background = g_bg_color;
    document.getElementById("DD").style.background = g_color;            
    
    document.getElementById("DA").style.color = t_color;
    document.getElementById("DB").style.color = t_color;
    document.getElementById("DC").style.color = tx_color;
    document.getElementById("DD").style.color = t_color;	

	return true;	
}

//Click raspuns
function markD()
{
	document.getElementById("cA").checked = false;
	document.getElementById("cB").checked = false;
	document.getElementById("cC").checked = false;
	document.getElementById("cD").checked = true;
	
    document.getElementById("DA").style.background = g_color;
    document.getElementById("DB").style.background = g_color;
    document.getElementById("DC").style.background = g_color;
    document.getElementById("DD").style.background = g_bg_color;            
    
    document.getElementById("DA").style.color = t_color;
    document.getElementById("DB").style.color = t_color;
    document.getElementById("DC").style.color = t_color;
    document.getElementById("DD").style.color = tx_color;	

	return true;	
}

//Check raspuns
function checkABCD()
{
	if ( 
	     (document.getElementById("cA").checked == false) &&
	     (document.getElementById("cB").checked == false) &&
	     (document.getElementById("cC").checked == false) &&
	     (document.getElementById("cD").checked == false) 
	   )
	{
		alert('Trebuie sa alegeti un raspuns pentru a continua.'); 	
		return false; 		
	}	
	
	return true;
}

/*//Log In Verif.
function checkLogInForm()
{
    if (document.getElementById("t_user").value == '')
	{
		alert('Please provide a valid Username (Your E-mail registration address).'); 	
		return false; 		
	}	
	else if (document.getElementById("t_pass").value == '')
	{
		alert('Please provide a valid Password.'); 	
		return false; 		
	}

	return true;	
}

//Pass Recovery Verif.
function checkPassRecForm()
{
    if (document.getElementById("t_mail").value == '')
	{
		alert('Please provide a valid E-Mail (Your E-mail registration address).'); 	
		return false; 		
	}	

	return true;	
}

//Sign Up Verif.
function checkSignUpForm()
{
    if (document.getElementById("t_mail").value == '')
	{
		alert('Please provide a valid E-Mail.'); 	
		return false; 		
	}	
	else if (document.getElementById("t_pass").value == '')
	{
		alert('Please provide a valid Password in the Password Field.'); 	
		return false; 		
	}
	else if (document.getElementById("t_rpass").value == '')
	{
		alert('Please provide a valid Password in the Retype Password Field.'); 	
		return false; 		
	}	
	else if (document.getElementById("t_pass").value != document.getElementById("t_rpass").value)
	{
		alert('Passwords doesn\'t match'); 	
		return false; 		
	}		
    else if (document.getElementById("t_phone").value == '')
	{
		alert('Please provide a valid Mobile Phone Number. Make sure the Phone Number is CORRECTELY typed and prefixed with your country code.'); 	
		return false; 		
	}	
    else if (document.getElementById("t_agree").checked == false)
	{
		alert('You must agree with TERMS and CONDITIONS.'); 	
		return false; 		
	}		

	return true;
}

//Sign Up Verif.
function checkAccSetForm()
{
	if (document.getElementById("t_pass").value == '')
	{
		alert('Please provide a valid Password in the Password Field.'); 	
		return false; 		
	}
	else if (document.getElementById("t_rpass").value == '')
	{
		alert('Please provide a valid Password in the Retype Password Field.'); 	
		return false; 		
	}	
    else if (document.getElementById("t_phone").value == '')
	{
		alert('Please provide a valid Mobile Phone Number. Make sure the Phone Number is CORRECTELY typed and prefixed with your country code.'); 	
		return false; 		
	}	

	return true;
}*/
