moved js:Script block into code behind file for Dialog