Fixing onchange function for iframes with selectedIndex