$(document).ready(function(){
						   $('#usertable tbody tr:even').css('background-color','#dddddd');
						   });

function selectAll() {
	if(document.getElementById('chk').checked==true)
{
    $("input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
}//end if
	
}//end function


function checkAll()
{
	field = document.frm_user.add_pages;
for (i = 0; i < field.length; i++)
if(field[i].checked ==false){
   document.getElementById('chk').checked=false;
		 }

	
}//end function
$(document).ready(function(){
  $('#menu li ul').css({
    display: "none",
    left: "auto"
  });
  $('#menu li').hover(function() {
    $(this)
      .find('ul')
      .stop(true, true)
      .slideDown('fast');
  }, function() {
    $(this)
      .find('ul')
      .stop(true,true)
      .fadeOut('fast');
  });
});


        $(function() {
            $('.isthumb').each(function() {
                $(this).hover(
                    function() {
                        $(this).stop().animate({ opacity: 0.6 }, 2);
                    },
                   function() {
                       $(this).stop().animate({ opacity: 1.0 }, 2);
                   })
                });
        });
		        $(function() {
            $('.isthumb2').each(function() {
                $(this).hover(
                    function() {
                        $(this).stop().animate({ opacity: 0.6 }, 2);
                    },
                   function() {
                       $(this).stop().animate({ opacity: 1.0 }, 2);
                   })
                });
        });

function onBefore() { 

    $('#s6').cycle('resume');
}
function onAfter() { 

    $('#s6').cycle('pause');
}
function ValidateForm()
{
	var TREF_Email=document.emailsub.email.value;
	if (TREF_Email=="")
		{
			alert("Please Enter Email");
			document.emailsub.email.focus();
			return false;
		}
	if (TREF_Email!="")
		{
			str=TREF_Email;
			var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			
			if (regex.test(str))
			{}
			else{
			alert("Please enter valid email address.");
			document.emailsub.email.focus();
			 return false;
			}
		}
}
function ValidateForm2()
{
	var TREF_Email=document.contact.email2.value;
	if (TREF_Email=="")
		{
			alert("Please Enter Email");
			document.contact.email2.focus();
			return false;
		}
	if (TREF_Email!="")
		{
			str=TREF_Email;
			var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			
			if (regex.test(str))
			{}
			else{
			alert("Please enter valid email address.");
			document.contact.email2.focus();
			 return false;
			}
		}
}
