// JavaScript Document
function checkregister(obj)
{
	var errormsg="";	
	var valid=true;
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	if(obj.fullname.value=="")
	{
		obj.fullname.style.backgroundColor="#F5F5F5";
		valid=false;
		errormsg+="* Enter Full Name<br />";
	}

	if(obj.username.value=="")
	{
		obj.username.style.backgroundColor="#F5F5F5";
		valid=false;
		errormsg+="* Enter Username<br />";
	}

	if(obj.pass.value=="")
	{
		obj.pass.style.backgroundColor="#F5F5F5";
		valid=false;
		errormsg+="* Enter Password<br />";
	}

	if(obj.pass_conf.value=="")
	{
		obj.pass_conf.style.backgroundColor="#F5F5F5";
		valid=false;
		errormsg+="* Enter Confirm Password<br />";
	}
	
	if(obj.pass_conf.value!=obj.pass.value)
	{
		obj.pass.style.backgroundColor="#F5F5F5";
		obj.pass_conf.style.backgroundColor="#F5F5F5";
		valid=false;	
		errormsg+="* Password Not Match<br />";
	}

	if(obj.email.value=="")
	{
		obj.email.style.backgroundColor="#F5F5F5";
		valid=false;
		errormsg+="* Enter Email Address<br />";
	}

	
	document.getElementById("errormsg").innerHTML=errormsg;

	if(valid==true)
		return true;
	else
		return false;
	
}

function checkval(obj)
{
	if(obj.value == "")
	{
		document.getElementById("error_"+obj.id).innerHTML = "*";
		obj.style.backgroundColor ='#DBE8EE';
	}
	else
	{
		document.getElementById("error_"+obj.id).innerHTML = "";
		obj.style.backgroundColor ='#fff';	
	}
}
