/* ----------------------   DHTML knihovna by Pixy   ---------------------- */	
function objGet(x) {
	if (typeof x != 'string') return x;
	else if (Boolean(document.getElementById)) return document.getElementById(x);
	else if (Boolean(document.all)) return eval('document.all.'+x);  // pro MSIE 4
	else return null;
} // end f

function objSetStyle (obj,prop,val) {
	var o = objGet(obj);
	if (o && o.style) {
			eval ('o.style.'+prop+'="'+val+'"');
			return true;
			}
	else return false;
} // end f
function objShow (obj, on) {
		return objSetStyle(obj,'visibility',(on) ? 'visible':'hidden');
} // end f
function objDisplay (obj, on, type) {
		if (on && !type) type = 'block';
		return objSetStyle(obj,'display',(on) ? type:'none');
} // end f
/* end DHTML knihovna */
/* ----------------------------------------------------------------------- */

function hiliteTR(obj) {
	//alert(obj);
	if ( typeof obj == 'object' && obj.hasChildNodes() == true ) {
		var x,s;

		for (var i=0; i < obj.childNodes.length; i++) {
      		s += "  " + i + ": " + obj.childNodes[i] + ";\n"
      		if  ( typeof obj.childNodes[i] == 'object' && obj.childNodes[i]['style'] ) {
      			objSetStyle(obj.childNodes[i], 'backgroundColor', '#eaf1eb');
      		}
      	}
		x=obj.getElementsByTagName('span');
		for (var i=0; i<x.length; i++) {
			if (x[i].className=='cyklusArrow')
				x[i].className='cyklusArrow2';
			if (x[i].className=='rezervaceBg')
				x[i].className='rezervaceBg2';				
		}
      	//alert(s);
	}
}

function hiliteTRReset(obj) {
	if ( typeof obj == 'object' && obj.hasChildNodes() == true ) {
		var s;


		for (var i=0; i < obj.childNodes.length; i++) {
      		s += "  " + i + ": " + obj.childNodes[i] + ";\n"
      		if  ( typeof obj.childNodes[i] == 'object' && obj.childNodes[i]['style'] ) {
      			objSetStyle(obj.childNodes[i], 'backgroundColor', 'transparent');
      		}
      	}
		x=obj.getElementsByTagName('span');
		for (var i=0; i<x.length; i++) {
			if (x[i].className=='cyklusArrow2')
				x[i].className='cyklusArrow';
			if (x[i].className=='rezervaceBg2')
				x[i].className='rezervaceBg';								
		}
      	//alert(s);
	}
}


function winW() {
   if (window.innerWidth)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerWidth;
   else if
   (document.documentElement &&
   document.documentElement.clientWidth)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.clientWidth */
      return document.documentElement.clientWidth;
   else if
   (document.body && document.body.clientWidth)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientWidth;
   else
      return null;
}

function winSize() {
  // alert ("1");
  if (winW() < 800) { 
  // alert ("2");  
    document.getElementById("kinoSvetozor").style.backgroundImage = "url(/img/kino-svetozor-800.png)";
    document.getElementById("kinoSvetozor").style.backgroundRepeat = "no-repeat";
    document.getElementById("kinoSvetozor").style.top = "0px";   
    document.getElementById("kinoSvetozor").style.marginLeft = "-375px";
    document.getElementById("kinoSvetozorAnchor").style.width = "215px";   
    document.getElementById("kinoSvetozorAnchor").style.height = "37px";  
  }
}
