Add iframe to #main div only if there is a connection