/*****************************************************************************************************/
/*                                                                                                   */
/*                                      'REGISTER' CONTROL PANEL                                     */          
/*                                                                                                   */
/*****************************************************************************************************/
var RegisterObject = new Object();


function initRegisterPanel(){
	if (document.forms['register_form'] == null){
		return;	
	}
	
	RegisterObject.info = new REGISTER_GINFO(this);
	RegisterObject.info.init();
	RegisterObject.info.initCreate();
	
	if (document.getElementById("edit_profile_container") != null){
		animatedcollapse.addDiv('edit_profile_container');
		animatedcollapse.init();
	}
}


/*****************************************************************************************************/
/*                                                                                                   */
/*                                         FUNCTION VALIDATION                                       */          
/*                                                                                                   */
/*****************************************************************************************************/
function validateRegister(){
	if (RegisterObject.info != null){
		if (document.getElementById("reg_terms") == null || document.getElementById("reg_terms").checked == false){
			alert("Pentru ati putea creea un cont nou, trebuie sa fii de acord cu termenii si conditiile e-learn.ro");
			return;
		}
		
		RegisterObject.info.initServerValidate();
	}
}



function changeBlockDisplay(img, div){
	var _src = img.src;
	if (_src.lastIndexOf("minus") != -1){
		img.src = _src.substring(0,	_src.lastIndexOf("minus")) + "plus" + "_big.gif";
	}
	else{
		img.src = _src.substring(0,	_src.lastIndexOf("plus")) + "minus" + "_big.gif";	
	}
	
	animatedcollapse.toggle(div.id);
}