Merged emailvalidation social

save document.forms["changePassword"] in a varaible and then use the same for accessing the sub elements instead of calling the document call everytime

var changePwdForm = document.forms["changePassword"];
var oldPwd     = changePwdForm["oldPassword"].value;
var newPwd   = changePwdForm["newPassword"].value;