d 				= document;
ListTxt     	= new Array();
ListColor     	= new Array();

/////////////////////////////////////////////////////////////////////////////////////
//    ALL THE VARIABLES
/////////////////////////////////////////////////////////////////////////////////////

MailField		= 'Required_1';

/////////////////////////////////////////////////////////////////////////////////////
//    CHECK MAILFIELD-SYNTAX
/////////////////////////////////////////////////////////////////////////////////////

function CheckMail()
    {
Field = d.getElementById(MailField);

ValidChr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@.-_;';

	for (x=0; x<Field.value.length; x++) 
    	{
	TempValue = '' + Field.value.substring(x, x+1);
	if (ValidChr.indexOf(TempValue) == '-1')
	    {
	alert(ListTxt[1]);
	ErrorField('Error',Field);
	return false;
	    }
    	}

	if ((Field.value.indexOf('@') == -1) || (Field.value.indexOf('.') == -1))
        {
	alert(ListTxt[2]);
    ErrorField('Error',Field);
    return false;
        }

	MailConfirm = confirm(ListTxt[3]+d.getElementById('Required_1').value+ListTxt[4]);

	if(MailConfirm){d.getElementById('ListButt').style.display = 'none';}
	else{d.getElementById('Required_1').focus();return false;}

	}

/////////////////////////////////////////////////////////////////////////////////////
//    SET ATTENTION TO WRONG FIELDS
/////////////////////////////////////////////////////////////////////////////////////

function ErrorField(ActionType)
    {
if(ActionType == 'Error')
    {
d.getElementById("ListDiv").style.background 		= ListColor[3];
d.getElementById("Required_1").style.background 	= ListColor[3];
d.getElementById("Required_1").style.color 			= ListColor[4];
d.getElementById("Required_1").focus();
    }
else
    {
d.getElementById("ListDiv").style.background 		= ListColor[1];
d.getElementById("Required_1").style.background 	= ListColor[1];
d.getElementById("Required_1").style.color 			= ListColor[2];
    }
    }