
 var last_id='';
function imgx(id){
  if(last_id==id)return false;
  if(last_id!='')hide(last_id);
  show(id);
  last_id=id;  
  return false;
}
function show(id){
  var o = document.getElementById(id);
  if (o) o.style.display="block";
}
function hide(id){
  var o = document.getElementById(id);
  if (o) o.style.display="none";
}

function textColor(id){
  var o = document.getElementById(id);
  if (o){
     o.style.color="#FF9200";
   }
 }
function textUnColor(id){
  var o = document.getElementById(id);
  if (o){
   o.style.color="#D5DADE";
  }
}

function newWindow(imagePath){
window.open (imagePath, 'newwindow', config='heigth=750,width=750,toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');
return false;
}
function disable(id){
  var o = document.getElementById(id);
  if (o){
  	if(o.disabled==true){
	o.disabled=false;
	return;
	}
	if(o.disabled==false){
	o.disabled=true;
	return;
	}
  }
}

//<input type="text" onkeypress="return numbersonly(this, event)">
function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
   return true;

else if ((("0123456789").indexOf(keychar) > -1))
   return true;

else if (dec && (keychar == "."))
   {
   //myfield.form.elements[dec].focus();
   return true;
   }
else
   return false;
}

function img(src,title){

  var titlebody = "height=10,width=10,resizable=1,scrollbars=0";
  newwindow=window.open('','name',titlebody);
  newwindow.document.write('<html><head><meta http-equiv="imagetoolbar" content="no"/><title>' +title +'</title></head><body  onload="window.resizeTo(document.images[0].width+12,document.images[0].height+51);" text="#000000" style="background-color:white; margin: 0px; padding: 0px;">');
  newwindow.document.write('<div align="center">');
  newwindow.document.write('<img title="Zavøít" onclick="window.close()"  border=0 src="');
  newwindow.document.write(src);
  newwindow.document.write('"');

  newwindow.document.write(' alt="');
  newwindow.document.write(title);
  newwindow.document.write('"');
  
  newwindow.document.write(' style="cursor:hand;">');
  newwindow.document.write('</div>');
  newwindow.document.write('</body></HTML>');
  newwindow.focus();
  newwindow.document.close();
  return false;
}


