<!--
function CheckAll()
{
	var theForm = document.forms['frm'];
	count = theForm.elements.length;
	if(theForm.all.checked == 1)
	{
		for(i = 0; i < count; i++) 
		{
    		if(theForm.elements[i].checked == 0)
    		{
        		theForm.elements[i].checked = 1;
        	}
   			else
   	   		{
   	   	   		theForm.elements[i].checked = 1;
   	   	   	}
		}
	}
   	else
   	{
		for(i = 0; i < count; i++) 
		{
    		if(theForm.elements[i].checked == 1)
    		{
        		theForm.elements[i].checked = 0;
        	}
   			else
   	   		{
   	   	   		theForm.elements[i].checked = 0;
   	   	   	}
		}
    }
}

function UnCheck()
{
	document.forms['frm'].all.checked = 0;
}

function showHideListItems(el_link)
{
	for(var el = document.getElementById("listItem"); (el && el.id == "listItem"); el = el.nextSibling)
	{
		el.style.display = (el.style.display == "none") ? "" : "none";
		el_link.innerHTML = (el_link.innerHTML == "See More...") ? "Hide..." : "See More...";
	}
}

function isEmpty(s) {
    return ((s == null) || (s.length == 0));
}

function check_registration(){
    var whitespace = " \t\n\r";
	if(isEmpty(document.getElementById("username").value)){
        alert("Username could not be empty!");
        return false;
    }
	if(isEmpty(document.getElementById("email").value)){
        alert("Email address could not be empty!");
        return false;
    }
	
	var objRegExp  =/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
    if (objRegExp.test(document.getElementById("email").value)==false) {
        alert('Please enter your valid email address!');return false;
    }
	if(isEmpty(document.getElementById("password_one").value)){
        alert("Password could not be empty!");
        return false;
    }
	if(isEmpty(document.getElementById("password_two").value)){
        alert("Please confirm password!");
        return false;
    }
    if(isEmpty(document.getElementById("firstname").value)){
        alert("Please provide your first name");
        return false;
    }
    if(isEmpty(document.getElementById("lastname").value)){
        alert("Please provide your last name");
        return false;
    }
	return true;
}

function getParent(el)
{
	if(typeof(el.parentNode) != "undefined")
		return el.parentNode;
	else if(typeof(el.parentElement) != "undefined")
		return el.parentElement;
	return null;
}
//-->