function oroluz() {
	oroluz = function() {};
	var izohora=new Date();
	HH=izohora.getUTCHours()+''
	if (izohora.getUTCMinutes() <10)
	{
		HH= HH + '0' + izohora.getUTCMinutes();
		}
	else
	{
		HH= HH + izohora.getUTCMinutes();
	}
	HHint=parseInt(HH,10);
	if (HHint < 630 || HHint > 1930) document.getElementById("oromascara").src="/images/camaras/oromask1inv.png";	
}

function guiluz() {
	guiluz = function() {};
	var izohora=new Date();
	HH=izohora.getUTCHours()+''
	if (izohora.getUTCMinutes() <10)
	{
		HH= HH + '0' + izohora.getUTCMinutes();
		}
	else
	{
		HH= HH + izohora.getUTCMinutes();
	}
	HHint=parseInt(HH,10);
	if (HHint < 630 || HHint > 1930) document.getElementById("guimascara").src="/images/camaras/guimask1inv.png";	
}

function sthluzen() {
	guiluz = function() {};
	var izohora=new Date();
	HH=izohora.getUTCHours()+''
	if (izohora.getUTCMinutes() <10)
	{
		HH= HH + '0' + izohora.getUTCMinutes();
		}
	else
	{
		HH= HH + izohora.getUTCMinutes();
	}
	HHint=parseInt(HH,10);
	if (HHint < 630 || HHint > 1930) document.getElementById("sthmascara").src="/images/camaras/sthmasken1inv.png";	
}

function sthluzes() {
	guiluz = function() {};
	var izohora=new Date();
	HH=izohora.getUTCHours()+''
	if (izohora.getUTCMinutes() <10)
	{
		HH= HH + '0' + izohora.getUTCMinutes();
		}
	else
	{
		HH= HH + izohora.getUTCMinutes();
	}
	HHint=parseInt(HH,10);
	if (HHint < 630 || HHint > 1930) document.getElementById("sthmascara").src="/images/camaras/sthmaskes1inv.png";	
}

function point_it(event){
	pos_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("orotava").offsetLeft;
	pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("orotava").offsetTop;
	if (pos_x < 508 && pos_x > 220 && dist2oro(pos_x,pos_y)<6)
	{
		document.getElementById("orotip").innerHTML = alturaoro(pos_x)+' m';
		document.getElementById("orotip").style.left = (pos_x+10) + "px";
		document.getElementById("orotip").style.top = (pos_y-25) + "px";
		document.getElementById("orotip").style.visibility = "visible" ;
		}
	else
	{
		document.getElementById("orotip").style.visibility = "hidden" ;
	}
}

function alturaoro(x) {
	//h = 11423.4-34.55*y;
	h=3231.91-4.83*x;
	return 10*Math.round(h/10);
}

function dist2oro(x,y) {
	d =  Math.abs(237-y+0.14*x);
	return Math.round(d);
}

