function OpenCalendar(o,sForm)
{
	var cID = o.id;
	var aID = cID.split("_");
	try {
		var io=document.getElementById('_'+aID[1]+'_'+aID[3]);
	}
	catch(e){
		alert('Error: '+e.description);
	}
	alert('hello!');
	try {
		g_Calendar.show(event,sForm+'.'+io.id,false, 'mm/dd/yyyy', new Date());
		return false;
	}
	catch(e){
		alert('Error: '+e.description);
	}		
}

function getElementNameByEnding(s)
{
	for (e in document.all)
	{
		if (e.substr(e.length-s.length,e.length) == s)
			return e.toString();
	}
}

function toggledays(n)
{
	var h = document.getElementById(days[n].hkey);
	var i = document.getElementById(days[n].ikey);	
	if (h.value == 'True') {
		h.value = 'False'
		i.src   = days[n].imgweekend;
	} else {
		h.value = 'True'
		i.src   = days[n].imgweekday;
	}
}

function oday(hkey, ikey, imgweekday, imgweekend)
{
	this.hkey = hkey;
	this.ikey = ikey;
	this.imgweekday = imgweekday;
	this.imgweekend = imgweekend;
}