function changeDestType() { var dest = 'patchWiz_Targets'; var counter = 0; for(counter = 0; counter < 1999999; counter++); shortName = document.forms[0].SEL_DEST_TYPE; destType = shortName.options[shortName.selectedIndex].value; alert(destType); if (destType == 'OPT_ORAHOMES') dest = 'patchWiz_Homes'; else if (destType == 'OPT_AGENT') dest = 'patchWiz_Agents'; else if (destType == 'OPT_HOSTDIR') dest = 'patchWiz_Dest'; else dest = 'patchWiz_Targets'; location.replace(dest); }