Help needed with Google maps API

Hi,
I am trying to add custom Control to my map, but for some reason , the browser is showing myMap.controls as undefined

here is my code>>>>
var myMap;
function HomeControl()
{
homeControl=$(“<div id=‘mapHomeControl’></div>”);
$(homeControl).css(“background-image”,“.\images\gui\homeIcon24.png”);

 google.maps.event.addDomListener(homeControl, 'click', function() {
   myMap.setCenter(myLatLng);
  });

}
function addHomeControl()
{

HomeControl();
homeControl.index = 1;

myMap.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(homeControl);

}

function displayMap(lat,lng,zoomLevel)
{setMapProperties(lat,lng,zoomLevel);
createMap();

}
function createMap()
{
var map=document.getElementById(‘myMap’);
myMap= new google.maps.Map( map,
mapOptions);
addHomeControl();
}

If anyone can please help me as to where I am going wrong .

Thanks

its giving type error a[z] is undefined

Ok ,I have fixed the issue, for some reason, my jQuery statements were not adding appropriate styles and creating divs :S , now I am using javascript, and it works!

Hope this will help someone…