m_random = Math.round(10000 * Math.random()); function openAnyWindow(url, name, w, h) { openAWindow(url, name, w, h); } function reloadGIF() { // test to see if there is an object to reference if (document.iteristrafficmap) { // make sure there is a src field and that it is not empty (I would be surprised if this fails) if (document.iteristrafficmap.src != null && document.iteristrafficmap.src != "") { // get the src and reload it var trafficMapLocation = document.iteristrafficmap.src; document.iteristrafficmap.src = trafficMapLocation; } else { // reload document if the above fails window.location.reload(); } } else { // reload document if the above fails window.location.reload(); } } function openAWindow(url, name, w, h) { reloadGIF(); // open new window popupWin = window.open(url, name, 'status,resizable,scrollbars,width=' + w + ',height=' + h + ''); // Bring focus to window -- doesn't work with Netscape ;( popupWin.focus(); return popupWin; } function openCaltranCameraWindow(cameraName, cameraLocation, imageURL) { win = openAWindow("","CaltranCCTV", 0,0); win.resizeTo(380,430); win.document.writeln(""); win.document.writeln("Caltrans Camera"); win.document.writeln(""); win.document.writeln(""); win.document.writeln(""); win.document.writeln(""); win.document.writeln(""); win.document.writeln(""); win.document.writeln(""); win.document.writeln(""); win.document.writeln("
" + cameraLocation + "

"); win.document.writeln("The snapshot image is provided
courtesy of"); win.document.writeln("Caltrans
"); win.document.writeln("©2002 Iteris, Inc
"); win.document.close(); win.focus(); }