function fp_form_checker(pform)
{
	if ((pform.nickname.value.length<=15) && (pform.check_code.value.length == 6))
		return true;
	else
	{
		alert("Please, fill all fields correctly.");
		return false;
	}
}

function vis_switch(cbox,area_id)
{
	document.getElementById(area_id).style.display = cbox.checked ? "block" : "none";
}

function checkFilled(names)
{
	filled = true;

	for (i=0;i<names.length;i++)
	{
		f4_title = document.getElementById("f4t_"+names[i]);
		f4_value = document.getElementById("f4v_"+names[i]);

		if (!f4_value.value.length)
		{
			highlightField(f4_title);
			
			filled = false;
		}
		
	}

	return filled;
}

function highlightField(field)
{
	field.style.color = "#a74a4a";
}

function resetFields(names)
{
	for (i=0;i<names.length;i++)
	{
		f4_title = document.getElementById("f4t_"+names[i]);
		f4_title.style.color = "";
		
	}
}



function show_resend_form()
{
	document.getElementById("confirm_link").style.display="none";
	document.getElementById("confirm_form").style.display="block";
}

function resend_email(pform)
{
	pform.submit();
}