Try this code and get the gadget for Google Maps driving and walking directions from any cities to Cochin.
<script src="http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&up_fromLocation=&up_myLocations=Cochin&up_defaultDirectionsType=&up_autoExpand=&synd=open&w=320&h=55&title=Directions+by+Google+Maps&brand=light&lang=en&country=US&border=%23ffffff%7C0px%2C1px+solid+%23ff9977%7C0px%2C1px+solid+%23ffddcc%7C0px%2C1px+solid+%23ff9977%7C0px%2C1px+solid+%23ffddcc%7C0px%2C1px+solid+%23ff9977&output=js"></script>
Also you can customize the widget settings by clicking and get your own code.