var alertTimerId = 0;var timeInterval = 50000; alertTimerId = setTimeout ( "stopStream()", timeInterval ); function stopStream () {frames['cam'].location.href = "camstop.htm";}