﻿function getObj(name)
	{
		if (document.getElementById)
  			{
    			return document.getElementById(name).style;
  			}
  		else if (document.all)
  			{
    			return document.all[name].style;
  			}
  		else if (document.layers)
  			{
    			return document.layers[name];
  			}
  		else return false;
	}

function image_open(image_loc,width,height)
{
	HTML = "<html><head><title>Airnet</title></head><body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onBlur='self.close()'><img src='img/foto/"+ image_loc +"' border=0 name=load_image></body></html>";
	if ((width==null) && (height==null)) popupImage = window.open('','_blank','width=410,height=270,toolbar=no,scrollbars=no');
	else popupImage = window.open('','_blank','width='+width+',height='+height+',toolbar=no,scrollbars=no');
	popupImage.document.open();
	popupImage.document.write(HTML);
	popupImage.document.close();
	//obj_img = document.getElementById(img);
	//obj_img.src= obj_img.src;
}



		var tWidth='462';
		var moStop=true;
		var tSpeed=2;
		var cps=tSpeed; var aw, mq;
		
		function startticker(content) {
			if (document.getElementById) {
				var tick = '<div class="begam"';
				if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"';
				tick +='><div id="mq"><\/div><\/div>';
				document.getElementById('ticker').innerHTML = tick;
				mq = document.getElementById("mq");
				mq.style.left=(parseInt(tWidth)+10)+"px";
				mq.innerHTML='<span id="tx">'+content+'<\/span>';
				aw = document.getElementById("tx").offsetWidth;
				lefttime=setInterval("scrollticker()",50);
			}
		} 
		function scrollticker() {
			mq.style.left = (parseInt(mq.style.left)>(-10 - aw)) ?parseInt(mq.style.left)-cps+"px" : parseInt(tWidth)+10+"px"; 
		}  
		
		
function showa(name)
	{
		var x = getObj(name);
		x.visibility = 'visible';
	}
function hidea(name)
	{
		var x = getObj(name);
		x.visibility = 'hidden';
	}
	
function menukaz(count)
	{
		o1 =document.getElementById('m'+count); 
		tmp1=o1.offsetLeft;
		if (tmp1>475) {
			o2 =document.getElementById('ml'+count);
			o2.style.left=475;
		}
		else {
			o2 =document.getElementById('ml'+count);
			o2.style.left=tmp1-7;
		}
	}	
