
function ShowImg(IMGPATH, PAGETITLE, IMGDESCRIPTION)
{
	var URL
	
	initWidth  = 250;
	initHeight = 150;
	
	xPos = (screen.availWidth - initWidth) / 2;
	yPos = (screen.availHeight - initHeight) / 2;
	
	URL='/showimg.asp?imgpath='+IMGPATH+'&pagetitle='+PAGETITLE+'&imgdescription='+IMGDESCRIPTION;
	window.open(URL,'','status=no,scrollbars=yes,resizable=yes,width='+initWidth+',height='+initHeight+',top='+yPos+',Left='+xPos)
}



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);
	else return null;
}


function objSetStyle (obj,prop,val)
{
	var o = objGet(obj);
	if (o && o.style) 
	{
		eval ('o.style.'+prop+'="'+val+'"');
		return true;
	}
	else 
		return false;
}


function objDisplay (obj,on,type) 
{
	if (on && !type) type = 'block';
	return objSetStyle(obj,'display',(on) ? type:'none');
}


function browserSpec()
{ 
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6;
	this.ff=(this.agent.indexOf("Firefox")>-1);
	this.ns6=(!ff && this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.mac=this.agent.indexOf("Mac")>-1;

	return this
}


function zmenaBarvy (id, barva1, cas1, barva2, cas2)
{
  if (document.getElementById)
  {
    document.getElementById(id).style.color = barva1;
	setTimeout('zmenaBarvy("' +  id + '","' + barva2 + '",' + cas2 + ',"' + barva1 + '",' + cas1 + ')', cas1);
  }
  else if (document.all)
  {
    document.all[id].style.color = barva1;
	setTimeout('zmenaBarvy("' +  id + '","' + barva2 + '",' + cas2 + ',"' + barva1 + '",' + cas1 + ')', cas1);
  }
}



var timerID = null; 
var timerRunning = false; 

function dispDifTime() { 

DifDays = 0;
DifHours = 0;
DifMinutes = 0;
DifSeconds = 0;

DateMin = new Date ("march 1, 2009");
DateMax = new Date ("april 1, 2009");

DateFrom = new Date;
DateTo = new Date("march 31, 2009") 
DateTo.setHours(23,59,59,0);

msPerDay = 24 * 60 * 60 * 1000 ; 

msLeft = (DateTo.getTime() - DateFrom.getTime()); 
msLeftBeforeDays = msLeft;

DifDays = Math.floor (msLeft/msPerDay);
msLeft = msLeft - (DifDays*msPerDay);

msLeftBeforeHours = msLeft;

tmpHoursText = '*** msLeft='+msLeft; 
DifHours = Math.floor(msLeft/(60*60*1000));
tmpHoursText = tmpHoursText  + ' DifHours='+DifHours + ' ';
msLeft = msLeft - (DifHours*(60*60*1000));

msLeftBeforeMinutes = msLeft;

DifMinutes = Math.floor(msLeft/(60*1000));
msLeft = msLeft - (DifMinutes*(60*1000));

msLeftBeforeSeconds = msLeft;
DifSeconds = Math.floor(msLeft/(1000));

if (DifDays > 4) DaysText = "dnů";
else{
 if (DifDays > 1) DaysText = "dny";
 else{
  if (DifDays == 1) DaysText = "den";
  else{
   if (DifDays == 0) DaysText = "dnů";
  }
 }
}   

if (DifHours > 4) HoursText = "hodin";
else{
 if (DifHours > 1) HoursText = "hodiny";
 else{
  if (DifHours == 1) HoursText = "hodina";
  else{
   if (DifHours == 0) HoursText = "hodin";
  }
 }
}   

if (DifMinutes > 4) MinutesText = "minut";
else{
 if (DifMinutes > 1) MinutesText = "minuty";
 else{
  if (DifMinutes == 1) MinutesText = "minuta";
  else{
   if (DifMinutes == 0) MinutesText = "minut";
  }
 }
}   

if (DifSeconds > 4) SecondsText = "vteřin";
else{
 if (DifSeconds > 1) SecondsText = "vteřiny";
 else{
  if (DifSeconds == 1) SecondsText = "vteřina";
  else{
   if (DifSeconds == 0) SecondsText = "vteřin";
  }
 }
}   

ResultText = '';
if (DifDays > 0) {
  ResultText = DifDays + ' ' + DaysText;
  NextText = ", "
}
else
{   
  NextText = ""
}

if (DifHours > 0) {
  ResultText = ResultText + NextText + DifHours + ' ' + HoursText;
  NextText = ", "
}
else
{   
  if (ResultText == "") NextText = "";
  else NextText = ", ";
}

if (DifMinutes > 0) {
  ResultText = ResultText + NextText + DifMinutes + ' ' + MinutesText;
  NextText = ", "
}
else
{   
  if (ResultText == "") NextText = "";
  else NextText = ", ";
}

if (DifSeconds > 0) ResultText = ResultText + NextText + DifSeconds + ' ' + SecondsText;
ResultText = ResultText + '.';

if ((DateFrom < DateMax) && (DateFrom > DateMin)) { 
 if(document.all){
      document.getElementById('difTimeText').innerText = ResultText;
 } 
 else{
     document.getElementById('difTimeText').textContent = ResultText;
 }
}


timerID = setTimeout("dispDifTime()",1000); 
timerRunning = true; 
} 

var timerID = null; 
var timerRunning = false; 
function stopclock () { 
if(timerRunning) 
clearTimeout(timerID); 
timerRunning = false; 
} 

function stopClock() { 
        stopclock();     
        return; 
} 

function startclock () { 
stopclock(); 
dispDifTime(); 
} 


