// JavaScript Document
<!-- Begin
var subs_array = new Array("sub1","sub2","sub3");// Put the id's of your hidden divs in this array
function displaySubs(the_sub){
	
	var TextBox7 = document.form1.TextBox7.value;
	var TextBox6 = document.form1.TextBox6.value;
	var TextBox1 = document.form1.TextBox1.value;
	
	if (TextBox7=='') {
			alert('Last Name Required.');
			document.form1.TextBox7.focus();
			return false;}
	if (TextBox6=='') {
			alert('First Name Required.');
			document.form1.TextBox6.focus();
			return false;}
	if (TextBox1=='') {
			alert('E-mail Add Required.');
			document.form1.TextBox1.focus();
			return false;}
	if (echeck(TextBox1)==false){
   			TextBox1==''
   			document.form1.TextBox1.focus();
    return false;
  }
  if ((TextBox7!='') && (TextBox6!='') && (TextBox1!='')) {
	  	document.getElementById('Label16').style.visibility='visible';
  			
  }

	
    if (document.getElementById(the_sub).style.display==""){
    document.getElementById(the_sub).style.display = "none";return
  	}
  for (i=0;i<subs_array.length;i++){
	  
	  
	  
    var my_sub = document.getElementById(subs_array[i]);
    my_sub.style.display = "none";
	  

    }
  document.getElementById(the_sub).style.display = "";

  }

function displaySubsEdit1(the_sub){
	
	document.getElementById('Label16').style.visibility='hidden';
	document.getElementById('Label17').style.visibility='hidden';
	
	var TextBox7 = document.form1.TextBox7.value;
	var TextBox6 = document.form1.TextBox6.value;
	var TextBox1 = document.form1.TextBox1.value;
	
	if (TextBox7=='') {
			alert('Last Name Required.');
			document.form1.TextBox7.focus();
			return false;}
	if (TextBox6=='') {
			alert('First Name Required.');
			document.form1.TextBox6.focus();
			return false;}
	if (TextBox1=='') {
			alert('E-mail Add Required.');
			document.form1.TextBox1.focus();
			return false;}
	if (echeck(TextBox1)==false){
   			TextBox1==''
   			document.form1.TextBox1.focus();
    return false;
  }
 
	  	
 	
    if (document.getElementById(the_sub).style.display==""){
    document.getElementById(the_sub).style.display = "none";return
  	}
  for (i=0;i<subs_array.length;i++){
	  
	  
	  
    var my_sub = document.getElementById(subs_array[i]);
    my_sub.style.display = "none";
	  

    }
  document.getElementById(the_sub).style.display = "";

  }

function displaySubs2(the_sub){
	
	var TextBox8 = document.form1.TextBox8.value;
	var DropDownList1 = document.form1.DropDownList1.value;
	
	if (TextBox8=='') {
			alert('Serial Number or Service Tag Required.');
			document.form1.TextBox8.focus();
			return false;}
	if ((DropDownList1=='') || (DropDownList1=='---------Select---------')) {
			alert('Operating System Required.');
			document.form1.DropDownList1.focus();
			return false;}
	if ((TextBox8!='') && (DropDownList1!='')) {
	  	document.getElementById('Label17').style.visibility='visible';
  			
  }
	
    if (document.getElementById(the_sub).style.display==""){
    document.getElementById(the_sub).style.display = "none";return
  	}
  for (i=0;i<subs_array.length;i++){
	  
	  
	  
    var my_sub = document.getElementById(subs_array[i]);
    my_sub.style.display = "none";
	

    }
  document.getElementById(the_sub).style.display = "";
  }  
  
  function displaySubsEdit2(the_sub){

	document.getElementById('Label17').style.visibility='hidden';
	
	var TextBox8 = document.form1.TextBox8.value;
	var DropDownList1 = document.form1.DropDownList1.value;
	
	if (TextBox8=='') {
			alert('Serial Number or Service Tag Required.');
			document.form1.TextBox8.focus();
			return false;}
	if ((DropDownList1=='') || (DropDownList1=='---------Select---------')) {
			alert('Operating System Required.');
			document.form1.DropDownList1.focus();
			return false;}
	
	
    if (document.getElementById(the_sub).style.display==""){
    document.getElementById(the_sub).style.display = "none";return
  	}
  for (i=0;i<subs_array.length;i++){
	  
	  
	  
    var my_sub = document.getElementById(subs_array[i]);
    my_sub.style.display = "none";
	

    }
  document.getElementById(the_sub).style.display = "";
  }  

  
  function valSubmit() {
			var DropDownList2 = document.form1.DropDownList2.value;
			var TextBox9 = document.form1.TextBox9.value;
			
			if ((DropDownList2=='') || (DropDownList2=='----------Select----------')) {
				alert('When Does The Problem Occur Required.');
				document.form1.DropDownList2.focus();
				return false;}
			if (TextBox9=='') {
				alert('You Need to Describe the problem you are encountering and the situation or task you were doing when you encountered the problem.');
				document.form1.TextBox9.focus();
				return false;}
			}

// end -->

function valSubmitA() {
			var DropDownList1 = document.form1.DropDownList1.value;
			//var msg = "";
			
				if (DropDownList1 == "Linux") {
				alert('LINUX Disclaimer: The Linux OS was provided pre-installed into your Notebook to provide functionality out-of-the-box at no extra cost.. The Linux OS is free and does not add to the purchase cost of the Notebook. This allows you to install your choice of Operating System. Support for the Linux OS may be found in website of the specific Linux Distribution installed. Although it is a fully functional Operating System and may be used indefinitely, NEO does not provide technical support for Linux as it was intended for use as demonstration of the functionality of NEO Notebooks sold without a Windows Operating System.');
				//document.form1.Label4.visible==true;
				return false;
				}
				
			
			 }
 //  End -->
function valSubmitB() {								
					document.getElementById('TextBox10').style.visibility='hidden';				
					document.getElementById('Label1').style.visibility='hidden';
					document.getElementById('TextBox12').style.visibility='hidden';				
					document.getElementById('Label3').style.visibility='hidden';
					document.getElementById('TextBox11').style.visibility='hidden';				
					document.getElementById('Label2').style.visibility='hidden';
					document.getElementById('Label4').style.visibility='hidden';
					document.getElementById('Label16').style.visibility='hidden';
					document.getElementById('Label17').style.visibility='hidden';
					document.getElementById('TextBox20').style.visibility='hidden';				
					document.getElementById('Label20').style.visibility='hidden';
				}
//  End -->

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          
}

