//var base = "http://www.trafficengland.com/TCC/shared/camera.jsp?id=http://public.hanet.org.uk/cctvpublicaccess/html/";
//var base = "http://public.hanet.org.uk/cctvpublicaccess/html/";
var base = "http://support.thisisdev.co.uk/traffic/images/";
//var base = "http://cctvb.trafficlink.co.uk/cctvgateway.aspx?curl=";
var ext =".jpg";

var view = "<iframe src=\'"+base+camera+ext+"\' allowtransparency=true name=\'jamcams\' border=\'0\' width=\'380\' height=\'400\'  frameborder=\'0\' scrolling=\'no\' id=\"fade\"></iframe>";
var protect = "<div id=\"layer1\" style=\"width:400px; height:404px; position:absolute; left:0px; top:0px; z-index:1;\"><img src=\"protect.gif\" width=\"400\" height=\"404\" border=\"0\"><div id=\"layer2\" style=\"width:322px; height:71px; position:absolute; left:27px; top:267px; z-index:1;\"><a href=\"http://www.radisol.com\" target=\"_blank\"><img src=\"concept.gif\" width=\"309\" height=\"21\" border=\"0\"></a></div>";

function hidestatus(){
window.status='images copyright The Highways Agency'
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
var message="images copyright The Highways Agency";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

var limit="2:01"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{ 
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
//window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
