Ok , i see that the php got you guys confused : )
the above code doesnt work even if i take the variable out and change it with static one.
onclick="Calendar.setup({ inputField:"date1", ifFormat:"%Y-%m-%d %I:%M %p", showsTime:true, button:"date_1", step:1});
the debuger says "syntax error...