function activateField(field)
{
	imagesCommon = document.getElementById(shiddenImagesCommonPathID).value;
	//
	field.className='textInputYellow';
	elementName = 'validateIconFor' + field.id;
	if (document.getElementById(elementName)!=null)
		document.getElementById(elementName).src=imagesCommon+"spacer.gif";
}
//
function activateField_InputBlock(field)
{
	imagesCommon = document.getElementById(shiddenImagesCommonPathID).value;
	//
	field.className='textInputYellow';
	elementName = 'validateIconFor' + field.id;
	if (document.getElementById(elementName)!=null)
		document.getElementById(elementName).src=imagesCommon+"spacer.gif";
}
//
function activateFieldById(id)
{
	imagesCommon = document.getElementById(shiddenImagesCommonPathID).value;
	field = $("input[id $='" + id + "']").get(0);
	//field = document.getElementById(id);
	//
	field.className='textInputYellow';
	elementName = 'validateIconFor' + field.id;
	if (document.getElementById(elementName)!=null)
		document.getElementById(elementName).src=imagesCommon+"spacer.gif";
}
//
function deactivateField(field)
{
	field.className='textInput';
}
//
function deactivateFieldById(field)
{
	$("input[id $='" + id + "']").get(0).className='textInput';
}
//
function deactivateField_InputBlock(field)
{
	field.className='textInput';
}
//
function validateIcon(control_to_validate)
{
	var imagesCommon = document.getElementById(shiddenImagesCommonPathID).value;
	//
	var fieldNotFilledCorrectly = false;
	//Do nothing if client validation is not active...
	if(typeof(Page_Validators) == undefined) return;
	for (var i = 0; i < Page_Validators.length; i++)
	{
		if(dom_getAttribute(Page_Validators[i], "controltovalidate") == control_to_validate.id)
		{
			ValidatorValidate(Page_Validators[i]);
			if(!Page_Validators[i].isvalid)
			{
				$(control_to_validate).parent().prev().children("img").attr("src", imagesCommon+"icon_field_invalid.gif");							
				fieldNotFilledCorrectly = true;
				break;
			}
		}
	}
	if(!fieldNotFilledCorrectly)
	{
		$(control_to_validate).parent().prev().children("img").attr("src", imagesCommon+"spacer.gif");
	}
}
function KeyDownDate(ctrlId,imagePath)
{
	//alert(ctrlId);
	if(event.keyCode==13)
	{
		if(!$("input[id $='" + ctrlId + "']").get(0).disabled)NewCal(ctrlId,'ddmmyyyy',null,null,imagePath)
		//if(!$("input[id $='" + ctrlId + "']").get(0).disabled)NewCal(ctrlId,'ddmmyyyy',null,null,'../voucher/Design/')
	}
}
			
			
