// ********************* testing RG 03/01/08 ***********************

//----------------- from iwl_common_functions.js -----------------

var win

//*****************************************************************************************
function HighlightCell( obj, flag, pointer )
{

/*	// cell. */


//	test.borderColor = "red"

//	if ( flag = 1)
//	 alert( obj.id + " " +  obj.tagName )

	if ( obj.tagName == "TD" )
	{

		switch ( flag )
		{
			case 1:
				// test.bgColor = "blue"
				// test.style.backgroundColor = "blue"
				// test.style.color = "yellow"
				if ( obj.id != "test" )
				{
				obj.style.backgroundColor = "lightsteelblue"
				obj.style.color = "yellow"
				}
				// test.style.borderColor = "grey"
				// test.style.textDecoration = "none"
				break
				
			case 0:
				// test.style.backgroundColor = "green"
				// test.style.color = "blue"
				if ( obj.id != "test" )
				{
				obj.style.backgroundColor = "white"
				obj.style.color = "gray"
				}
				// test.style.borderColor = "grey"
				// test.style.textDecoration = "none"
				break
		}	
	
		switch (pointer)
		{
			case 0:
//				test.style.cursor = ""
				obj.style.cursor = ""
				break	
			
			case 1:
//				test.style.cursor = "pointer"
				obj.style.cursor = "pointer"
				break
			
	
	
		}
	}

}

// function LinkTo(url, mode, xpos, ypos, height, width, name)

//*****************************************************************************************
function LinkTo( sUrl, sWinName, iWinLeftPos, iWinTopPos, iWinWidth, iWinHeight, sScroll, sResize  )
{

	var varName = 'BestSelect'
	var varFeatures = 'width=300,height=300,top=150,left=150'
	var h = '300'
	var w = '300'
	var LeftPosition = '50'
	var TopPosition = '50'
	var scroll = 'no'		// 'yes'
	var mypage = 'http://www.cnn.com'
	var myname = 'RamiTesting'
	var ScreenWidth
	var ScreenHeight
	
/**************** New *******************************/

	varFeatures = 'height='+h+',width='+w+',top='+TopPosition+',	\
				left='+LeftPosition+',scrollbars='+scroll+',resizable'

	varFeatures = 'height=' + iWinHeight.ToString
	varFeatures += ',width='+ iWinWidth.ToString
	varFeatures += ',top=' + TopPosition
	varFeatures += ',left=' + LeftPosition
	// if ( sScroll == 'Y' )
	varFeatures += ',scrollbars=' + sScroll
	if ( sResize == 'Y' )
		varFeatures += ',resizable'

// settings =
// 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'

// alert(settings)
// win = window.open(mypage,myname,settings)

	ScreenWidth = screen.Height
	ScreenHeight = screen.width
	
	// LeftPosition = ScreenWidth - w/2
	LeftPosition = ScreenWidth -60
	TopPosition = 1

	varFeatures = 'height='+h+',width='+w+',top='+TopPosition+',	\
				left='+LeftPosition+',scrollbars='+scroll+',resizable'

	win = window.open( sUrl , sWinName, varFeatures)	// ,'width=100,height=100,top=100,left=100')
	// window.location = url

// win = window.open(mypage,myname,settings)

	return win


}

function CloseWindow( w )
{
	win.close
}


//******************************* spam validation - 15/12/07 **************************************
function CheckSpam( sStr )
{
		sStr = sStr.toLowerCase()
		
		// iLen =  sStr.indexOf( 'http:' )
		// alert( "sStr.indexOf( http: ): " + iLen )

		if ( sStr.indexOf( 'http:' ) >= 0 )
			return false
		else
			if ( sStr.indexOf( 'viagra' ) >= 0 )
				return false
			else
				if ( sStr.indexOf( 'cialis' ) >= 0 )
					return false
				else
					return true

}
//******************************* spam validation - 21/01/07 **************************************


//-----------------------------------------------------------------

<!--Ulead(R) RollOverButton(TM) 1.0 Generated JavaScript. Please do not edit.
nMaxItem = 4;
NameIndex = 0;
DefaultState = 1;

MouseOverState = 2;
MouseDownState = 3;
imgCounter = 0;

ImageList = new Array();

bIsSupportOK = (
	((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) ||
	((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))
);

function AddImageToImageList(name, Default, MouseOver, MouseDown)
{
	ImageList[imgCounter] = new Array(nMaxItem);
	ImageList[imgCounter][NameIndex] = name;
	ImageList[imgCounter][DefaultState] = new Image();
	ImageList[imgCounter][DefaultState].src = Default;
	if (MouseOver != "") {
		ImageList[imgCounter][MouseOverState] = new Image();
		ImageList[imgCounter][MouseOverState].src = MouseOver;
	}
	if (MouseDown != "") {
		ImageList[imgCounter][MouseDownState] = new Image();
		ImageList[imgCounter][MouseDownState].src = MouseDown;
	}

	imgCounter++;
}

function ReplaceImage(name, state)
{
	for (i = 0; i < imgCounter; i++) {
		if (document.images[ImageList[i][NameIndex]] != null) {
			if ((name == ImageList[i][NameIndex]) && (ImageList[i][state] != null))
				document.images[name].src = ImageList[i][state].src;
		}
	}
}

// ------------
// . First:
// . You can copy the "AddImageToImageList(...)" script and
// . paste it into your HTML file to compile and
// . define your rollover button.
// . ------------

AddImageToImageList("tag_book_a_car_now_new", "images/book_a_car_now_new_normal.jpg", "images/book_a_car_now_new_over.jpg", "images/book_a_car_now_new_down.jpg");

// ------------>


function PrevPage()
{

	window.history.back()

}


function HighlightCell( obj, flag, pointer )
{

	if ( obj.tagName == "TD" )
	{

		switch ( flag )
		{
			case 1:
				if ( obj.id != "test" )
				{
				obj.style.backgroundColor = "lightsteelblue"
				obj.style.color = "yellow"
				}
				break
				
			case 0:
				if ( obj.id != "test" )
				{
				obj.style.backgroundColor = "white"
				obj.style.color = "gray"
				}
				break
		}	
	
		switch (pointer)
		{
			case 0:
				obj.style.cursor = ""
				break	
			
			case 1:
				obj.style.cursor = "pointer"
				break
	
	
		}
	}

}

function ChangePointer(obj, pointer)
{
		switch (pointer)
		{
			case 0:
				obj.style.cursor = ""
				break	
			
			case 1:
				obj.style.cursor = "pointer"
				break	
		}
}




// imported from book_car.asp
//*****************************************************************************************

function SetFocus()
	{
	document.frmBooking("txtName").focus()
	}

//*****************************************************************************************

function ValidateDate()
{

	// check date and time not in the past
	
	// date
	var InpDate = new Date(document.frmBooking.lstMonths.value + " " + document.frmBooking.lstDays.value +  ", " + document.frmBooking.lstYears.value)
	// alert( InpDate) 
	
	
	// var datea=new Date("September 8, 2003")
	var CurrDate = new Date()
	
//	alert( "Curr date: " + CurrDate )
//	alert(  InpDate - CurrDate )
	if ( (InpDate - CurrDate) < -86400000 )
		return false
	else
		return true
			
}

//*****************************************************************************************

function ValidateBooking()
{

	var sErrMes, objForm, iErrFlag, objField, sFN, sErrMsg, sStr, sMess
	
	// alert("In Validate Booking")
	
	// objField = ""
	objForm = document.frmBooking
	sFN = ""
	sErrMsg = ""
	sStr = ""
	
	iErrFlag = true
	
	// alert(objForm.txtName.value)

	if ( objForm.txtName.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmBooking.txtName
		sFN = "txtName"
		objForm.txtName.className = "mandatory_field"
		}
	else
		{
		objForm.txtName.className = "valid_field"
		}
/*
	if ( objForm.txtLastName.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtLastName"
		objForm.txtLastName.className = "mandatory_field"	
		}
	else
		objForm.txtLastName.className = "valid_field"
*/

	// alert(objForm.txtTel.value)

	if ( objForm.txtTel.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtTel"
		objForm.txtTel.className = "mandatory_field"
		}	
	else
		objForm.txtTel.className = "valid_field"
/*
	if ( objForm.txtAddress.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtAddress"
		objField = document.frmBooking.txtAddress
		objForm.txtAddress.className = "mandatory_field"
		}
	else
		{
		objForm.txtAddress.className = "valid_field"
		}
*/
	// alert(document.frmBooking.txtCollectAddress.value + " " + document.frmBooking.txtCollectAddress.value.length)

	// alert(objForm.txtPickAddress.value)

	if ( objForm.txtPickAddress.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmBooking.txtPickAddress
		if ( sFN == "" )
			sFN = "txtPickAddress"
		objForm.txtPickAddress.className = "mandatory_field"
		}
	else
		{
		sStr = objForm.txtPickAddress.value
	    // alert ("Checking address! " + sStr )
		if ( CheckSpam( sStr ) == false )
			{
			// alert ("Check contents of Pickup address! " + sStr )
			iErrFlag = false
			if ( sFN == "" )
				sFN = "txtPickAddress"
			}
		else
		    objForm.txtPickAddress.className = "valid_field"
		}


	if ( objForm.txtDestAddress.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmBooking.txtDestAddress
		if ( sFN == "" )
			sFN = "txtDestAddress"
		objForm.txtDestAddress.className = "mandatory_field"
		}
	else
		{
		objForm.txtDestAddress.className = "valid_field"
		}

	// alert(objForm.txtEmail.value)
	if ( objForm.txtEmail.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtEmail"
		objForm.txtEmail.className = "mandatory_field"
		}
	else
		{
		sStr = objForm.txtEmail.value
		if ( sStr.indexOf( '@' ) < 1 )
			{
			iErrFlag = false
			sErrMsg = "\n\nPlease ensure your E-mail address is valid. (user@domain)\n"
			if ( sFN == "" )
				sFN = "txtEmail"
			objForm.txtEmail.className = "mandatory_field"
			}
		else
			objForm.txtEmail.className = "valid_field"
		}

// added R Gan, 15/02/2004
				
	sStr = objForm.lstCar.value
	if ( sStr.indexOf("select_car") >= 0 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "lstCar"
		objForm.lstCar.className = "mandatory_field"
		}
	else
		objForm.lstCar.className = "valid_field"

	/*	
	if ( objForm.txtItinerary.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtItinerary"
		objForm.txtItinerary.className = "mandatory_field"
		}
	else
		objForm.txtItinerary.className = "valid_field"
	*/

//*********************** check date 31/12/06 *********************
		
	if ( objForm.lstDays.value  == "dd" )
		{
		iErrFlag = false
		objField = objForm.lstDays
		if ( sFN == "" )
			sFN = "lstDays"
		objForm.lstDays.className = "mandatory_field"
		}
	else
		{
		objForm.lstDays.className = "valid_field"
		}

	if ( iErrFlag != false )
		{	
		if ( objForm.lstMonths.value == "mm" )
			{
			iErrFlag = false
			objField = objForm.lstMonths
			if ( sFN == "" )
				sFN = "lstMonths"
			objForm.lstMonths.className = "mandatory_field"
			}
		else
			{
			objForm.lstMonths.className = "valid_field"
			}
		}		

	if ( iErrFlag != false )
		{	
		if ( objForm.lstYears.value == "yyyy" )
			{
			iErrFlag = false
			objField = objForm.lstYears
			if ( sFN == "" )
				sFN = "lstYears"
			objForm.lstYears.className = "mandatory_field"
			}
		else
			{
			objForm.lstYears.className = "valid_field"
			}
		}		
				
	if ( iErrFlag != false )
		{
		if ( ValidateDate() == false )
			{
			iErrFlag = false
			if ( sFN == "" )
				sFN = "lstDays"
			objForm.lstDays.className = "mandatory_field"
			objForm.lstMonths.className = "mandatory_field"
			objForm.lstYears.className = "mandatory_field"
			}
		else
			{
			objForm.lstDays.className = "valid_field"
			objForm.lstMonths.className = "valid_field"
			objForm.lstYears.className = "valid_field"
			objForm.lstHours.className = "valid_field"
			objForm.lstMinutes.className = "valid_field"
			}	
		}

		
	if ( iErrFlag != false )
		{
		if ( objForm.lstHours.value  == "hh" )
			{
			iErrFlag = false
			objField = objForm.lstHours
			if ( sFN == "" )
				sFN = "lstHours"
			objForm.lstHours.className = "mandatory_field"
			}
		else
			{
			objForm.lstHours.className = "valid_field"
			}
		}
	if ( iErrFlag != false )
		{		
		if ( objForm.lstMinutes.value == "mm" )
			{
			iErrFlag = false
			objField = objForm.lstMinutes
			if ( sFN == "" )
				sFN = "lstMinutes"
			objForm.lstMinutes.className = "mandatory_field"
			}
		else
			{
			objForm.lstMinutes.className = "valid_field"
			}
		}


	if ( iErrFlag == false )
		{
		// alert("Please complete all the required details which are highlighted in red" + sErrMsg)
		// objField.focus()

		sMess = "To complete your order, please fill in all details highlighted in Red\n\n" // + sMess
		
		sMess = sMess + "\nPlease ensure that:\n1. E-mail address format is: name@domain\n2. Booking date requested isn't earlier than today"
		sMess = sMess + "\n"
		sMess = sMess + "Hint: To identify the error look at the location of the Pointer or the highlighted box"
		sMess = sMess + "\n"
				sMess = sMess + "\nIf you experience difficulties in completing this form,\nor wish to book at a short notice, "
		sMess = sMess + "please contact us on:\nTel. +44 (0) 20 8930 9075, or "
		sMess = sMess + "E-mail: cs@citychauffeurs.com\n"
		
		alert( sMess )
		
//		if ( ( navigator.appName.indexOf("Microsoft" ) >= 0 ) && (sFN == "") )
		if ( navigator.appName.indexOf("Microsoft" ) >= 0 )
			{
			// alert( "Microsoft Internet Explorer")
			objForm(sFN).focus()
			}
		else
			// objForm.getElementById(sFN).focus()
			// objForm(sFN).focus()
			document.frmBooking.txtName.focus()
			
		
		
		// objForm.txtTitle.focus()
		// document.frmBooking.item(objField).focus()
		// document.frmBooking.namedItem
		// document.frmBooking.focus
		}
		
	return iErrFlag

}

//*****************************************************************************************




// *************** from get_a_quote.asp ****************

function ValidateQuoteDate()
{

	// check date and time not in the past
	
	// date
	var InpDate = new Date(document.frmGetQuote.lstMonths.value + " " + document.frmGetQuote.lstDays.value +  ", " + document.frmGetQuote.lstYears.value)
	// alert( InpDate) 
	
	
	// var datea=new Date("September 8, 2003")
	var CurrDate = new Date()
	
	// alert(  InpDate - CurrDate )
	if ( (InpDate - CurrDate) < -86400000 )
		return false
	else
		return true
			
}
//*****************************************************************************************
function GetNavType()
{
	alert( navigator.appCodeName + " [" + navigator.appVersion + "." +  navigator.appMinorVersion + "]") 
	alert( navigator.appName )
}

//*****************************************************************************************
function ValidateQuote()
{

	var sErrMes, objForm, iErrFlag, objField, sFN, sErrMsg, sStr
	
	// objField = ""
	objForm = document.frmGetQuote
	sFN = ""
	sErrMsg = ""
	sStr = ""
	
	iErrFlag = true

	if ( objForm.txtFirstName.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmGetQuote.txtFirstName
		sFN = "txtFirstName"
		objForm.txtFirstName.className = "mandatory_field"
		}
	else
		{
		objForm.txtFirstName.className = "valid_field"
		}

	if ( objForm.txtLastName.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtLastName"
		objForm.txtLastName.className = "mandatory_field"	
		}
	else
		objForm.txtLastName.className = "valid_field"


	if ( objForm.txtTel.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtTel"
		objForm.txtTel.className = "mandatory_field"
		}	
	else
		objForm.txtTel.className = "valid_field"

	if ( objForm.txtEmail.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtEmail"
		objForm.txtEmail.className = "mandatory_field"
		}
	else
		{
		sStr = objForm.txtEmail.value
		if ( sStr.indexOf( '@' ) < 1 )
			{
			iErrFlag = false
			sErrMsg = "\n\nPlease ensure your E-mail address is valid. (user@domain)\n"
			if ( sFN == "" )
				sFN = "txtEmail"
			objForm.txtEmail.className = "mandatory_field"
			}
		else
			objForm.txtEmail.className = "valid_field"
		}
		
	if ( objForm.txtItinerary.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtItinerary"
		objForm.txtItinerary.className = "mandatory_field"
		}
	else
		objForm.txtItinerary.className = "valid_field"


	if ( ValidateQuoteDate() == false )
		{
		objForm.lstDays.className = "mandatory_field"
		objForm.lstMonths.className = "mandatory_field"
		objForm.lstYears.className = "mandatory_field"
		}
	else
		{
		objForm.lstDays.className = "valid_field"
		objForm.lstMonths.className = "valid_field"
		objForm.lstYears.className = "valid_field"
		}	


	if ( iErrFlag == false )
		{
		// alert("Please complete all the required details that are highlighted in red" + sErrMsg)
		// objField.focus()

		sMess = "To complete your quote request, please fill in all details highlighted in Red\n\n" // + sMess
		
		sMess = sMess + "\nPlease ensure that:\n1. E-mail address format is name@domain\n2. Collection date requested isn't earlier than today"
		
		sMess = sMess + "\n"
				sMess = sMess + "\nIf you experience difficulties in completing this form,\nor wish to book at a short notice, "
		sMess = sMess + "please contact us on:\nTel. +44 (0) 20 8930 9075, or "
		sMess = sMess + "E-mail: info@airportchauffeurcars.com\n"

		alert(sMess)
		
		if ( navigator.appName.indexOf("Microsoft" ) >= 0 )
			{
			// alert( "Microsoft Internet Explorer")
			objForm(sFN).focus()
			}
		else
			// objForm.getElementById(sFN).focus()
			// objForm(sFN).focus()
			document.frmGetQuote.txtFirstName.focus()
		
		
		// objForm.txtTitle.focus()
		// document.frmGetQuote.item(objField).focus()
		// document.frmGetQuote.namedItem
		// document.frmGetQuote.focus
		}
		
	return iErrFlag

}


//************************ City Chauffeurs functions *************************

function ValidateCityQuoteDate()
{

	// check date and time not in the past
	
	// date
	var InpDate = new Date(document.frmGetCityQuote.lstMonths.value + " " + document.frmGetCityQuote.lstDays.value +  ", " + document.frmGetCityQuote.lstYears.value)
	// alert( InpDate) 
	
	
	// var datea=new Date("September 8, 2003")
	var CurrDate = new Date()
	
	// alert(  InpDate - CurrDate )
	if ( (InpDate - CurrDate) < -86400000 )
		return false
	else
		return true
			
}


function ValidateCityQuote()
{

	var sErrMes, objForm, iErrFlag, objField, sFN, sErrMsg, sStr
	
	// objField = ""
	objForm = document.frmGetCityQuote
	sFN = ""
	sErrMsg = ""
	sStr = ""
	
	iErrFlag = true

	if ( objForm.txtName.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmGetCityQuote.txtFirstName
		sFN = "txtName"
		objForm.txtName.className = "mandatory_field"
		}
	else
		{
		objForm.txtName.className = "valid_field"
		}


	if ( objForm.txtTel.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtTel"
		objForm.txtTel.className = "mandatory_field"
		}	
	else
		objForm.txtTel.className = "valid_field"

	if ( objForm.txtEmail.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtEmail"
		objForm.txtEmail.className = "mandatory_field"
		}
	else
		{
		sStr = objForm.txtEmail.value
		if ( sStr.indexOf( '@' ) < 1 )
			{
			iErrFlag = false
			sErrMsg = "\n\nPlease ensure your E-mail address is valid. (user@domain)\n"
			if ( sFN == "" )
				sFN = "txtEmail"
			objForm.txtEmail.className = "mandatory_field"
			}
		else
			objForm.txtEmail.className = "valid_field"
		}


	sStr = objForm.lstCar.value
	// alert(sStr + " " + sStr.indexOf('select'))
	if ( sStr.indexOf('select') >= 0 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "lstCar"
		objForm.lstCar.className = "mandatory_field"
		}
	else
		objForm.lstCar.className = "valid_field"
		

	if ( ValidateCityQuoteDate() == false )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "lstDays"
		objForm.lstDays.className = "mandatory_field"
		objForm.lstMonths.className = "mandatory_field"
		objForm.lstYears.className = "mandatory_field"
		}
	else
		{
		objForm.lstDays.className = "valid_field"
		objForm.lstMonths.className = "valid_field"
		objForm.lstYears.className = "valid_field"
		objForm.lstHours.className = "valid_field"
		objForm.lstMinutes.className = "valid_field"
		}	

	if ( objForm.txtCollectAddress.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtCollectAddress"
		objForm.txtCollectAddress.className = "mandatory_field"
		}
	else
		objForm.txtCollectAddress.className = "valid_field"


	if ( objForm.txtDestAddress.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtDestAddress"
		objForm.txtDestAddress.className = "mandatory_field"
		}
	else
		objForm.txtDestAddress.className = "valid_field"




	if ( iErrFlag == false )
		{
		// alert("Please complete all the required details that are highlighted in red" + sErrMsg)
		// objField.focus()

		sMess = "To complete your quote request, please fill in all details highlighted in Red\n\n" // + sMess
		
		sMess = sMess + "\nPlease ensure that:\n1. E-mail address format is name@domain\n2. Collection date requested isn't earlier than today"
		
		sMess = sMess + "\n"
				sMess = sMess + "\nIf you experience difficulties in completing this form,\nor wish to book at a short notice, "
		sMess = sMess + "please contact us on:\nTel. +44 (0) 20 8930 9075, or "
		sMess = sMess + "E-mail: cs@citychauffeurs.com\n"

		alert(sMess)
			
		// alert(sFN)
		
		// alert(navigator.appName.indexOf("Microsoft" ))
			
		if ( navigator.appName.indexOf("Microsoft" ) >= 0 )
			{
			// alert( "Microsoft Internet Explorer")
			objForm(sFN).focus()
			}
		else
			// objForm.getElementById(sFN).focus()
			// objForm(sFN).focus()
			document.frmGetCityQuote.txtName.focus()
		
		
		// objForm.txtTitle.focus()
		// document.frmGetQuote.item(objField).focus()
		// document.frmGetQuote.namedItem
		// document.frmGetQuote.focus
		}
		
	return iErrFlag

}

//*****************************************************************************************
function ValidateAccApp()
{
	var sErrMes, objForm, iErrFlag, objField, sFN, sErrMsg, sStr

//	alert("Test.............")
	
	// objField = ""
	objForm = document.frmAccApp
	sFN = ""
	sErrMsg = ""
	sStr = ""
	
	iErrFlag = true
	
	
	if ( objForm.txtContactName.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmAccApp.txtContactName
		sFN = "txtName"
		objForm.txtContactName.className = "mandatory_field"
		}
	else
		{
		objForm.txtContactName.className = "valid_field"
		}

	if ( objForm.txtTel.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmAccApp.txtTel
		sFN = "txtName"
		objForm.txtTel.className = "mandatory_field"
		}
	else
		{
		objForm.txtTel.className = "valid_field"
		}
		
/*		
	if ( objForm.txtEmail.value.length < 3 )
		{
		iErrFlag = false
		objField = document.frmAccApp.txtEmail
		sFN = "txtName"
		objForm.txtEmail.className = "mandatory_field"
		}
	else
		{
		objForm.txtEmail.className = "valid_field"
		}
*/
	if ( objForm.txtEmail.value.length < 3 )
		{
		iErrFlag = false
		if ( sFN == "" )
			sFN = "txtEmail"
		objForm.txtEmail.className = "mandatory_field"
		}
	else
		{
		sStr = objForm.txtEmail.value
		if ( sStr.indexOf( '@' ) < 1 )
			{
			iErrFlag = false
			sErrMsg = "\n\nPlease ensure your E-mail address is valid. (user@domain)\n"
			if ( sFN == "" )
				sFN = "txtEmail"
			objForm.txtEmail.className = "mandatory_field"
			}
		else
			objForm.txtEmail.className = "valid_field"
		}


	
	// alert(objForm.chkAccept.checked)
	if ( objForm.chkAccept.checked != 1 )
		{
		iErrFlag = false
		objField = document.frmAccApp.chkAccept
		sFN = "chkAccept"
		// objForm.txtName.className = "mandatory_field"
		}
	else
		{
		// objForm.txtName.className = "valid_field"
		}
		
	if ( iErrFlag == false )
		{
		// alert("Please complete all the required details that are highlighted in red" + sErrMsg)
		// objField.focus()

		sMess = "To complete your application please fill in all essential details\n"
		sMess = sMess + "(in the Red boxes) and accept our Terms & Conditions\n" // + sMess		
		sMess = sMess + "\n"
				sMess = sMess + "\nIf you experience difficulties in completing this form,\n"
		sMess = sMess + "please contact us on:\nTel. +44 (0) 20 8930 9075, or "
		sMess = sMess + "\nE-mail: cs@citychauffeurs.com\n"

		alert(sMess)
		
		// if ( navigator.appName.indexOf("Microsoft" ) >= 0 )
			// {
			// alert( "Microsoft Internet Explorer")
			if ( sFN != "" )
				{ 
				// objForm(sFN).focus()
				document.frmAccApp.chkAccept.focus()
				// document.frmAccApp.txtRefTwo.focus()
				}
			// else
			//	document.frmGetQuote.txtFirstName.focus()
			// }
		// else
			// objForm.getElementById(sFN).focus()
			// objForm(sFN).focus()
			// document.frmGetQuote.txtFirstName.focus()
		
		
		// objForm.txtTitle.focus()
		// document.frmGetQuote.item(objField).focus()
		// document.frmGetQuote.namedItem
		// document.frmGetQuote.focus
		}
		
	return iErrFlag

}
//*****************************************************************************************

//************************ City Chauffeurs functions *************************


//*****************************************************************************************

