<?php
/**
* provides a function to create datepicker input on forms
* 
* @copyright Amit Deo Panwar
* @version 1.0 May 2011
*/
$g=&$GLOBALS;


//$g['HEADER']->addscriptfile(AM_PLUGIN_URL.'/jquery/js/jquery-1.7.1.min.js');
$g['HEADER']->addstylesheet(AM_PLUGIN_URL.'/datepicker/jquery.datepick.css'); 
$g['HEADER']->addscriptfile(AM_PLUGIN_URL.'/datepicker/jquery.datepick.js');  

//dbug($g['HEADER']);



function am_datepicker($eName)
{    
    $g=&$GLOBALS;
    
    echo "
    <script language='javascript'>\$(document).ready(function(){\$('#$eName').datepick();});</script>\r\n";     
     
   
     

}
