// -->

//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="#FFFFCC"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}


// JavaScript Document
function CheckTheForm() {
    var result = true;
    var msg="";
 
    if (document.validate.FieldData0.value=="") {
        document.validate.FieldData0.focus();
        document.getElementById('FieldData0').style.color="red";
        result = false;
       
    }
	    if (document.validate.FieldData1.value=="") {
        document.validate.FieldData1.focus();
        document.getElementById('FieldData1').style.color="red";
        result = false;
		
		    } 
	if (document.validate.FieldData1.value != document.validate.FieldData2.value) {
        document.validate.FieldData2.focus();
        document.getElementById('FieldData2').style.color="red";
        result = false;
       
    }    if (document.validate.FieldData3.value=="") {
        document.validate.FieldData3.focus();
        document.getElementById('FieldData3').style.color="red";
        result = false;

           }    if (document.validate.FieldData4.value=="") {
        document.validate.FieldData4.focus();
        document.getElementById('FieldData4').style.color="red";
        result = false;
		
		    }    if (document.validate.FieldData5.value=="") {
        document.validate.FieldData5.focus();
        document.getElementById('FieldData5').style.color="red";
        result = false;
		
		    }    if (document.validate.FieldData6.value=="") {
        document.validate.FieldData6.focus();
        document.getElementById('FieldData6').style.color="red";
        result = false;

		    }    if (document.validate.FieldData7.value=="") {
        document.validate.FieldData7.focus();
        document.getElementById('FieldData7').style.color="red";
        result = false;

    }    if (document.validate.FieldData8.value=="") {
        document.validate.FieldData8.focus();
        document.getElementById('FieldData8').style.color="red";
        result = false;
		
    }    if (document.validate.FieldData9.value=="") {
        document.validate.FieldData9.focus();
        document.getElementById('FieldData9').style.color="red";
        result = false;
       
    }    if (document.validate.FieldData10.value=="") {
        document.validate.FieldData10.focus();
        document.getElementById('FieldData10').style.color="red";
        result = false;
		
           }    if (document.validate.FieldData11.value=="") {
        document.validate.FieldData11.focus();
        document.getElementById('FieldData11').style.color="red";
        result = false;
		
       }    if (document.validate.FieldData12.value=="") {
        document.validate.FieldData12.focus();
        document.getElementById('FieldData12').style.color="red";
        result = false;
	

	}
    if(msg==""){
    return result;
    }{
    alert(msg)
    return result;
    }
} 