function toggleList(n){
for(i=1;i<=3;i++)
{
	if (document.getElementById)
	{
		document.getElementById("list"+i).style.display="none";
		document.getElementById("list"+n).style.display="block";
		document.getElementById("list"+n).style.fontSize+1;
	}
	else if (document.all)
	{
		document.all["list"+i].style.display="none";
		document.all["list"+n].style.display="block";
	}
	else if (document.layers)
	{
		document.layers["list"+i].style.display="none";
		document.layers["list"+n].style.display="block";
	}
}
}

function validateForm()
{
var count=0;
var msg="";

    for(i=0;i<=4;i++)
    {
        if(document.UD.elements[i].value=="")
        {
        count=1;
        msg=msg+"\n"+document.UD.elements[i].name;
        }
        else if((i>3) && (count==0))
        {
            return(true);
        }
    }
    for(i=0;i<=4;i++)
    {
        if(document.UD.elements[i].value=="")
        {
        alert("PLEASE FILL IN THE FOLLOWING FIELD(S)\n "+msg);
        document.UD.elements[i].focus();
        return(false);
        }

    }
echeck("asdasd")

}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
}