search and replace in a file

I have a file (say file1.txt) and I have to search for a line which has a text replace it and replace another string too in the same line.
Eg:
file1.txt
--------

x='hai' y='world' z='unix'
x='hai'
y='world'
x='hai' z='perl' y='world' z="world" k="junk" b="world"
z='perl' x='hai' y='world' z="world" k="junk" b="world"

I have to go to line which has both 'hai' and 'world' and replace
'hai' to 'hello' and 'world' to 'universe' (all ocurrence which has 'hai' and 'world' in that line) as below

modified file

x='hello' y='universe' z='unix'
x='hai'
y='world'
x='hello' z='perl' y='universe' z="universe" k="junk" b="universe"
z='perl' x='hello' y='universe' z="universe" k="junk" b="universe"

Can you please give me a command or shell program to do that

Thanks
Ammu

You asked this Q yesterday also...

This is bit different. Here i need to look for occurence of both 'hai' and 'world' and replace all occurence of that. That doenst replace all occurence. I tried a lot.
Can some please help me

Thanks
ammu

sed 's/\(.*\)\(hai\)\(.*\)\(world\)\(.*\)/\1hello\3universe\5/g' yourfile