// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

// put is app_root/public/javascript/application.js

function set_today(model, atrib)
{
    t3 = document.getElementById(model + '_' + atrib + '_3i');
    var dt = new Date(); 
    t3.selectedIndex = dt.getDate();
	
    t2 = document.getElementById(model + '_' + atrib + '_2i')
    t2.selectedIndex = dt.getMonth() + 1;
    
    t1 = document.getElementById(model + '_' + atrib + '_1i')

    for (i = 0; i < t1.length; i++)
	       {
	           if (t1.options[i].text == dt.getFullYear())
	           {
	               t1.selectedIndex = i;
	          }
    } 
}

