var ddrs = "cam005.internetworks.it/";
var JsWidth = "352";
var JsHeight = "288";
var FlWidth = "352";
var FlHeight = "280";
var SwitchOff = 300000;

var MM_contentVersion = 6;
var gth = window.location.hostname;
var gtr = document.referrer;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+FlWidth+'" height="'+FlHeight+'" id="webcam" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="http://'+ddrs+'/webcam.swf?gta='+ddrs+'&gth='+gth+'&gtr='+gtr+'&so='+SwitchOff+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="http://'+ddrs+'/webcam.swf?gta='+ddrs+'&gth='+gth+'&gtr='+gtr+'&so='+SwitchOff+'" quality="high" bgcolor="#000000" width="'+FlWidth+'" height="'+FlHeight+'" name="webcam" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
	//document.write('<br /><font size="1"><a href="http://www.panolive.com" target="_blank">www.panolive.com</a> &copy; by Gardena.Net</font>');
} else{
	var message="";
	function clickIE4(){ if (event.button==2){ alert(message); return false; } } 
	function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("return false");       
	
	var EnInd="http://" + ddrs + "/readImage.asp"; 
	var count=Math.round(100000+(Math.random() * 100000)); 
	Illtmp = new Image(); 
	var first=1; var fehler=1; 
	var err=0;  

	//timeout test
	var isTimeOut = false
	function TimerStart() {
		setTimeout("TimedOut()", SwitchOff);
	}
	function TimedOut(){
		isTimeOut = true
	}
	//-------------


	function IllSuc(){ 
		//timeout test
		if (isTimeOut == true){
		} else {
		//------------

		count++; 	
		if(err==0){document.images.IllWcam.src=Illtmp.src;}
		err = 0; 	
		Illtmp.src=EnInd+"?"+count;
		
		//timeout test
		}
		//------------
	} 	 
	function IllPre() {
		if (first == 1) { 		
			first = 0; 		
			count++; 		
			Illtmp.src=EnInd+"?"+count;
			//timeout test
			TimerStart();
			//------------
		} 
	}  
	function IllEr(){ 	
		err = 1; 
		IllSuc(); 
	}  
	IllPre.onerror=IllEr; 
	Illtmp.onerror=IllEr; 
	document.onerror=IllEr; Illtmp.onload=IllSuc;
	document.write('<IMG border="0" SRC="http://'+ddrs+'/readImage.asp" name="IllWcam" onload="javascript:IllPre()" onerror="javascript:IllEr()" height="'+JsHeight+'" width="'+JsWidth+'">');
}
