function slideSwitch() {
var active = $('#slideshow IMG.active');
if ( active.length == 0 ) active = jQuery('#slideshow IMG:last');
var next =  active.next().length ? active.next()
	: jQuery('#slideshow IMG:first');
active.addClass('last-active');
next.css({opacity: 0.0})
	.addClass('active')
	.animate({opacity: 1.0}, 1000, function() {
		active.removeClass('active last-active');
	});
}
$(document).ready(function(){ 
	setInterval( "slideSwitch()", 4000 );
	$("#nev_bg ul li").hover(
      function () {
        $(this).find('ul').css("display","block");
      }, 
      function () {
         $(this).find('ul').css("display","none");
      }
    );
	$("#nev_bg ul li ul").hover(
      function () {
        $(this).parent().addClass('active-child1');
		$(this).css("display","block");
      }, 
      function () {
        $(this).parent().removeClass('active-child1');
      }
    );
	$("#nev_bg ul li:first").attr({id: "first-child"});

});

function echeck(email) 
{
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   if(reg.test(email) == false) 
   {
      return false;
   }
}
function Isalpha(val)
{
	var numaric = val;
	for(var j=0; j<numaric.length; j++)
	{
		  var alphaa = numaric.charAt(j);
		  var hh = alphaa.charCodeAt(0);
		  if((hh > 47 && hh<58) || (hh > 64 && hh<91) || (hh > 96 && hh<123))
		  {}
		  else
		  	{
			 return false;
		    }
	}
}
function highlight(obj)
{	
	var element;
	element = document.getElementById(obj).style;
	element.backgroundColor = "#faebe7";
	element.border= "dashed 1px #ff0000";
	//return false;
}
function lowlight(par1,par2)
{	
	var element;
	element = document.getElementById(par1).style;
	element.backgroundColor = "";
	element.border= "";
	document.getElementById(par2).style.display='none';
	//return false;
}
