I've got a custom class in Javascript called Booking:
function Booking(technicianID, startTime, start, street, zipcode, jobtypeID) {
    this.technicianID = technicianID;
    this.startTime = startTime;
    this.start = start;
    this.street = street;
    this.zipcode = zipcode;
    this.jobtypeID = jobtypeID;
}
I want to use an object of this class as input in a function.
function bookTime(inputBooking) {
    var tmpBooking = inputBooking;
    alert("You chose: " + tmpBooking.start + ". Tech: " + tmpBooking.technicianID);
}
But for some reason all I get from the alert is "undefined" for the variables. I guess it's because it doesn't see inputBooking as a Booking object, which means it doesn't have the variables start and technicianID...
I read that there is a Object.create function you can use, but I can't get it to work.
    tmpBooking = Object.create(Booking, inputBooking); 
Any ideas on how to solve this?
EDIT:
If I send in the inputBooking object from javascript directly it works as expected.
    var tmpBooking = new Booking(tmpTechID, tmpStartTime, tmpStart, tmpStreet, tmpZipcode, tmpJobtypeID);
    bookTime(tmpBooking);
    //Works
But the problem is that I want to send a temp object to HTML and generate a button that will call the bookTime function:
    var tmpBooking = new Booking(tmpTechID, tmpStartTime, tmpStart, tmpStreet, tmpZipcode, tmpJobtypeID);
    resultsHTML += "<a href=\"#\" onclick=\"bookTime('" + tmpBooking + "')\">Book!</a>";
    //Doesn't work
When I run this with debugger it says that inputBooking is of type [object Object] and "Children could not be evaluated".. The result is that start and technicianID variables are undefined.

tmpBookingis totally unnecessary btw.