I am not a javaScript guy but I think you need to use double
equals "==" when testing for a condition. so instead of saying:
text3=dummy, you need to use text3==dummy
also I don't think you can test if three things are equal at the
same time i.e. instead of:
text3=dummy=text4
use:
(text3==dummy)&&(dummy==text4)
note: dummy needs to exist as a global String variable or a one
declared in your function.
also 1111 should be "1111" if you need to compare it with a String.
I am not sure about all the points here, but have a look on the
Internet for how to use if statements in JavaScript, I'm sure you'll
find a lot of material!!