function openCalendar()
{
 	myCalendar=window.open('../services/calendar.html', 'calender', 'toolbar=no,scrollbars=no,width=270,height=295')
	myCalendar.focus()
}

function doStuff(elem)
{
var i=1;
var cells = document.getElementById('container').childNodes.length;
for (i=1; i<=cells; i++)
	{
		if (document.getElementById('div'+i))
		{
			if (document.getElementById('div'+i).id==("div"+elem))
				{
					document.getElementById('div'+i).className="selected";
				}
			else
			{
				document.getElementById('div'+i).className="out";
			}
		}
	}

var j=1;
var nodes=document.getElementById('bodyTxt').childNodes.length;
for (j=1; j<=nodes; j++)
	{
		if (document.getElementById('bodyTxt'+j))
		{
			if (document.getElementById('bodyTxt'+j).id==("bodyTxt"+elem))
			{
				document.getElementById('bodyTxt'+j).style.display="block";
			}
			else
			{
				document.getElementById('bodyTxt'+j).style.display="none";
			}
		}
	}
}


function matchField(f1,f2){
	var p = f1.value.toLowerCase();
	var f = f2.value.toLowerCase();
	if(p==f)
		return true;
	var m = p.match(f);
	if(m!=null) return true;
	return false;
}

function showError(field,msg){
	field.style.backgroundColor = '#FFFFCC';
	field.focus();
    var errObj = eval('err_' + field.name);
	if(typeof errObj == "object"){
		errObj.innerHTML = msg;
		errObj.focus();
	}
}


