var load_callback=false;
function LoadUrl(url,div_id)
{
	new Ajax.Request(url, {
		method: 'get',
		onSuccess: function(transport)
		{
			$(div_id).innerHTML=transport.responseText;			
			if(load_callback)
			{
				eval(load_callback);
				load_callback=false;
			}
		},
		onFailure: function(transport)
		{
			alert('Communication Error: '+transport.responseText);
		}

	});
}

function GetChildCombo(ParentSelect,ChildSelect,AllValuesChild,SelChildValue)
{
	parent_value=$F(ParentSelect);
	var child_obj=$(ChildSelect);
	var all_child_obj=$(AllValuesChild);
	k=child_obj.options.length-1;
	for(i=0;i<k;i++)
	{
		child_obj.options[child_obj.options.length - 1] = null;
	}
	for(i=0;i<all_child_obj.options.length;i++)
	{
		Element.extend(all_child_obj.options[i]);
		if(all_child_obj.options[i].readAttribute('class')==parent_value)
		{
			index=child_obj.options.length;

			child_obj.options[index]=new Option('');
			child_obj.options[index].value=all_child_obj.options[i].value;
			child_obj.options[index].text=all_child_obj.options[i].text;
			if(SelChildValue==all_child_obj.options[i].value)
			{
				child_obj.options[index].selected=true;
			}
		}
	}
}

function ShowSmallWindow(src, width, height)
{
	window.open(src, "message","toolbar=0,scrollbars=1,resizable=1,width="+width+",height="+height+",Left=100,Top=50");
}

function SelectCalendarDay(obj)
{
	Element.extend(obj);
	obj.addClassName('calendar-day-over');
}

function UnSelectCalendarDay(obj)
{
	Element.extend(obj);
	obj.removeClassName('calendar-day-over');
}

function SelectCalendarDaySa(obj)
{
	Element.extend(obj);
	obj.addClassName('calendar-day-7-over');
}

function UnSelectCalendarDaySa(obj)
{
	Element.extend(obj);
	obj.removeClassName('calendar-day-7-over');
}