perche fai: typeof window[variabile] == 'undefined' ?

per quanto ne so typeof variabile == 'undefined' funziona benissimo...