var insideNightlifeGuide =
{
	start: function()
	{
		$('guideStartDay').onchange = insideNightlifeGuide.setCustom;
		$('guideStartMonth').onchange = insideNightlifeGuide.setCustom;
		$('guideStartYear').onchange = insideNightlifeGuide.setCustom;
		$('guideEndDay').onchange = insideNightlifeGuide.setCustom;
		$('guideEndMonth').onchange = insideNightlifeGuide.setCustom;
		$('guideEndYear').onchange = insideNightlifeGuide.setCustom;
	},
	
	toggleTagBox: function(bShow)
	{
		$('guideTagBox').style.display = (bShow == true) ? 'block' : 'none';
	},
	
	toggleRegionBox: function(bShow)
	{
		$('guideRegionBox').style.display = (bShow == true) ? 'block' : 'none';
	},
	
	setDateRange: function(sStart, sEnd)
	{
		var aStart = sStart.split('-');
		$('guideStartDay').value 	= aStart[2].toInt();
		$('guideStartMonth').value 	= aStart[1].toInt();
		$('guideStartYear').value 	= aStart[0].toInt();
		
		var aEnd = sEnd.split('-');
		$('guideEndDay').value 		= aEnd[2].toInt();
		$('guideEndMonth').value 	= aEnd[1].toInt();
		$('guideEndYear').value 	= aEnd[0].toInt();
		
		console.debug(aStart);
	},
	
	setCustom: function()
	{
		$('guideDateType').value = 'CUSTOM';
	}
};

window.addEvent('domready', insideNightlifeGuide.start);