I've managed to create some code that creates a dialog window with an OK button, a choice of 3 images (warn, error, info) and I made it modal using some other semi-transparent divs.
What I'd like to do now is create my own custom confirm dialog that has YES/NO buttons similar to how I've done everything else. I've seen examples on the web, but the ones I have found are commercial so I can't see the code.
What I need to figure out how to do is attach a function handler to the YES/NO buttons and somehow from my function I use to actually create and display the dialog, return true/false from that handler to said function.
I'm a bit out of my league on this though. Any helpful tips?
That is not going to happen. You are going to have to break your funciotn into two parts since there is no way to make JavaScript sleep. If you would look into an OO JavaScript it would be easier to implement in my eyes.