// JavaScript Document

$(document).ready(function() {
$('#intro').cycle({
fx:   'fade',
timeout: 6000
});
});


$(document).ready(function() {
$('#mycarousel_top, #mycarousel_foot').jcarousel({
easing: 'easeOutQuart',
animation: 3000,
auto: 4,
wrap: 'both'
});
});

    function ValidateForm()
    {
    if (document.getElementById('username').value =="")
    {
        alert("Please enter your  username"); 
        document.getElementById('username').focus();
        return false;
    }
    if (document.getElementById('email').value =="")
    {
        alert("Please enter email address"); 
        document.getElementById('email').focus();
        return false;
    }
	if (document.getElementById('cemail').value!=document.getElementById('email').value)
    {
        alert("Email and confirm email do not match!"); 
        document.getElementById('cemail').focus();
        return false;
    }   
    var oldemail=document.getElementById('email').value ;
    if(oldemail.split("@")==oldemail || oldemail.split(".")==oldemail)
    {
    alert("Please enter the correct email address");
    document.getElementById('email').focus();
    return false;
    }
    if (document.getElementById('password').value =="")
    {
       alert("Please enter the password."); 
       document.getElementById('password').focus();
        return false;
    }
    if (document.getElementById('cpassword').value =="")
    {
        alert("Please enter the confirm password."); 
       document.getElementById('cpassword').focus();
        return false;
    }
    if (document.getElementById('cpassword').value!=document.getElementById('password').value)
    {
        alert("password and confirm password do not matched!"); 
        document.getElementById('cpassword').focus();
        return false;
    } 
	document.form.submit();	
    return true;
	
    }
