in reply to Variable scope issue
The temp1 was an issue with the HTML format. I have corrected that.