for changing any settings in the parent window from child window you have to use
window.opener. to access the parent document ...!!!
so if you want to change bgcolor property of parent use
in your javascript function... which will change your parent window bgcolor to red......