function CnTool(){} CnTool.gTP = function(camId,thumbnailId){ return "http://www.camnetwork.org/thumbnail_"+camId+"_"+thumbnailId+".jpg"; }; CnTool.sTM = function(imgElement,camId,picId){ if(imgElement instanceof HTMLImageElement){ if(typeof(imgElementTimeOuts[imgElement]) === "number"){ window.clearTimeout(imgElementTimeOuts[imgElement]); } imgElement.src = CnTool.getThumbnailPath(camId,picId); picId++; picId%=24; imgElementTimeOuts[imgElement] = window.setTimeout(function(){ CnTool.sTM(imgElement,camId,picId) },265); } }; CnTool.soTM= function(imgElement,camId,picId){ if(imgElement instanceof HTMLImageElement){ window.clearTimeout(imgElementTimeOuts[imgElement]); imgElement.src = CnTool.getThumbnailPath(camId,picId); } }; CnTool.getThumbnailPath = function(camId,thumbnailId){ return "http://www.camnetwork.org/thumbnail_"+camId+"_"+thumbnailId+".jpg"; }; CnTool.setCamThumbnailBorder = function(imgElement){ imgElement.style.borderColor='black'; }; CnTool.removeCamThumbnailBorder = function(imgElement){ imgElement.style.borderColor='transparent'; };