
var x = navigator.appName;
var z = x.indexOf("Explorer",0);


function winW() { /* NN4 a kompatibilní prohlížeče */
				if (window.innerWidth)
					return window.innerWidth; 
				/* MSIE6 v std. režimu - Opera a Mozilla již uspěly s window.innerHeight */
				else if (document.documentElement && document.documentElement.clientWidth)
					return document.documentElement.clientWidth;
				/* starší MSIE + MSIE6 v quirk režimu */
				else if (document.body && document.body.clientWidth)
					return document.body.clientWidth;
				else
					return null;
	}
	
function winH() { /* NN4 a kompatibilní prohlížeče */
				if (window.innerHeight)
					return window.innerHeight; 
				/* MSIE6 v std. režimu - Opera a Mozilla již uspěly s window.innerHeight */
				else if (document.documentElement && document.documentElement.clientHeight)
					return document.documentElement.clientHeight;
				/* starší MSIE + MSIE6 v quirk režimu */
				else if (document.body && document.body.clientHeight)
					return document.body.clientHeight;
				else
					return null;
	}
	

function zmen_sirka()  
{	
	var a=winW(); /* šířka */
   	var b=winH(); /* vyska */
	
	if(a < 996){
		document.getElementById('page').style.left='0';
		document.getElementById('page').style.marginLeft='0';
		}
	else{
		document.getElementById('page').style.left='50%';
		document.getElementById('page').style.marginLeft='-498px';
		}
		
	if(b < 740){
		document.getElementById('page').style.top='0';
		document.getElementById('page').style.marginTop='0';
		}
	else{
		document.getElementById('page').style.top='50%';
		document.getElementById('page').style.marginTop='-370px';
		}		
}

function openImgWin(what, x, y) /* otevření zvětšeniny obrázku*/
	{
			   wokno = window.open('', 'BigWin', 'menubar=no, scrollbars=no, resizable=no, statusbar=no, width='+x+', height='+y+',top=0,left=0');
			   wokno.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML><HEAD><TITLE>Stavimat</TITLE></HEAD><BODY onblur="window.close();" style="margin: 0px"><a href="#" onclick="window.close()"><img src="'+what+'" border="0" alt="Kliknutím zavřete okno"></a></BODY></HTML>');
			   /*if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }*/
	}
							 
function changeProductBackground (imgpath, prodId)
	{
	  //alert ('.'+imgpath+prodId+'_b.jpg');
	  document.getElementById('headerTPart').style.backgroundImage='url('+imgpath+prodId+'_b.jpg)';
	}
