function Newsletter() {
	
	firstName = document.form1.Name
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}

	mailid = document.form1.Email1
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}	
}

// Contact Us form validation
function Training() {
	
	Company = document.Cust.CName
	if (Company.value == "" || !isNaN(Company.value))
	{
		alert("Please enter your company name");
		Company.focus()
		return false		
	}
	
	firstName = document.Cust.txtName
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}

	mailid = document.Cust.txtEmail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}

	comments = document.Cust.txtMessage
	if (comments.value == "" || !isNaN(comments.value))
	{
		alert("Please add your comments");
		comments.focus()
		return false		
	}	
	if (document.Cust.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.Cust.uword.focus();
	return false;
	}
	return jcap();
}

// Contact Us form validation
function Contact2() {
	
	Company = document.abcForm.txtCName
	if (Company.value == "" || !isNaN(Company.value))
	{
		alert("Please enter your company name");
		Company.focus()
		return false		
	}
	
	firstName = document.abcForm.txtName
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}

	mailid = document.abcForm.txtEmail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}

	comments = document.abcForm.txtMessage
	if (comments.value == "" || !isNaN(comments.value))
	{
		alert("Please add your comments");
		comments.focus()
		return false		
	}	
	if (document.abcForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.abcForm.uword.focus();
	return false;
	}
	return jcap();
	
	
}
// Contact Us form validation
function Contactus() {
	
	Company = document.cuForm.CName
	if (Company.value == "" || !isNaN(Company.value))
	{
		alert("Please enter your Company name");
		Company.focus()
		return false		
	}
	
	firstName = document.cuForm.txtName
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}
	Last = document.cuForm.LasttxtName
	if (Last.value == "" || !isNaN(Last.value))
	{
		alert("Please enter your last name");
		Last.focus()
		return false		
	}
	CityAA = document.cuForm.City
	if (CityAA.value == "" || !isNaN(CityAA.value))
	{
		alert("Please enter your City");
		CityAA.focus()
		return false		
	}
	Count = document.cuForm.Country
	if (Count.value == "" || !isNaN(Count.value))
	{
		alert("Please enter your Country");
		Count.focus()
		return false		
	}
	mailid = document.cuForm.txtEmail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}

	if (document.cuForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.cuForm.uword.focus();
	return false;
	}
	return jcap();
	
	
}

// Contact Us form validation
function Contactus() {
	
	Company = document.cuForm.CName
	if (Company.value == "" || !isNaN(Company.value))
	{
		alert("Please enter your Company name");
		Company.focus()
		return false		
	}
	
	firstName = document.cuForm.txtName
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}
	Last = document.cuForm.LasttxtName
	if (Last.value == "" || !isNaN(Last.value))
	{
		alert("Please enter your last name");
		Last.focus()
		return false		
	}
	CityAA = document.cuForm.City
	if (CityAA.value == "" || !isNaN(CityAA.value))
	{
		alert("Please enter your City");
		CityAA.focus()
		return false		
	}
	Count = document.cuForm.Country
	if (Count.value == "" || !isNaN(Count.value))
	{
		alert("Please enter your Country");
		Count.focus()
		return false		
	}
	mailid = document.cuForm.txtEmail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}

	if (document.cuForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.cuForm.uword.focus();
	return false;
	}
	return jcap();
	
	
}

//Home page interactivite
var tabLinks = new Array();
    var contentDivs = new Array();

    function init() {

      // Grab the tab links and content divs from the page
      var tabListItems = document.getElementById('tabs').childNodes;
      for ( var i = 0; i < tabListItems.length; i++ ) {
        if ( tabListItems[i].nodeName == "LI" ) {
          var tabLink = getFirstChildWithTagName( tabListItems[i], 'A' );
          var id = getHash( tabLink.getAttribute('href') );
          tabLinks[id] = tabLink;
          contentDivs[id] = document.getElementById( id );
        }
      }

      // Assign onclick events to the tab links, and
      // highlight the first tab
      var i = 0;

      for ( var id in tabLinks ) {
        tabLinks[id].onclick = showTab;
        tabLinks[id].onfocus = function() { this.blur() };
        if ( i == 0 ) tabLinks[id].className = 'selected';
        i++;
      }

      // Hide all content divs except the first
      var i = 0;

      for ( var id in contentDivs ) {
        if ( i != 0 ) contentDivs[id].className = 'tabContent hide';
        i++;
      }
    }

    function showTab() {
      var selectedId = getHash( this.getAttribute('href') );

      // Highlight the selected tab, and dim all others.
      // Also show the selected content div, and hide all others.
      for ( var id in contentDivs ) {
        if ( id == selectedId ) {
          tabLinks[id].className = 'selected';
          contentDivs[id].className = 'tabContent';
        } else {
          tabLinks[id].className = '';
          contentDivs[id].className = 'tabContent hide';
        }
      }

      // Stop the browser following the link
      return false;
    }

    function getFirstChildWithTagName( element, tagName ) {
      for ( var i = 0; i < element.childNodes.length; i++ ) {
        if ( element.childNodes[i].nodeName == tagName ) return element.childNodes[i];
      }
    }

    function getHash( url ) {
      var hashPos = url.lastIndexOf ( '#' );
      return url.substring( hashPos + 1 );
    }
