// JavaScript Document
function confirmLink1(theLink, question)
{
    if (typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(question);
    if (is_confirmed) {
        if ( typeof(theLink.href) != 'undefined' ) {
            theLink.href += '&confirmed=1';
        } else if ( typeof(theLink.form) != 'undefined' ) {
            theLink.form.action += '?confirmed=1';
        }
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

function confirmLink(theLink,question,ajaxlink,ajaxdest) {
	var htmllink='';
	if ( typeof(theLink.href) != 'undefined' ) {
		htmllink = theLink.href + '&confirmed=1';
	}
	$.ajax({
		type: "GET",
		url: webroot+"/ajax.php",
		data: {"script": "./_scripts/ajax/confirmLink.php","question": question, "htmllink": htmllink, "ajaxlink": ajaxlink,"ajaxdest": ajaxdest},
		cache: false,
		success: function(html) {
			$('#dialog-thumbwrapper').html(html);
		}
	});
	return false;
}

function CountDown(seconds,element,zerolink) {
seconds = seconds-1;
zbytek=seconds;
hodin=Math.floor(zbytek/3600);
zbytek=zbytek-(hodin*3600);
minut=Math.floor(zbytek/60);
vterin=zbytek-(minut*60);
top.document.getElementById(element).innerHTML=hodin+'h '+minut+'m '+vterin+'s';
if (seconds==0) {document.location.href=zerolink;}
window.setTimeout("CountDown("+seconds+",'"+element+"','"+zerolink+"');",1000);
}

function ShowSaveContentButton(destination,name,value) {
parent.document.getElementById(destination).innerHTML='<input type="submit" id="'+name+'" name="'+name+'" value="'+value+'" />';
return true;
}

function show_date_time()
{
var now = new Date();
var hours = now.getHours();
var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
var den = now.getDate();
var mesic = now.getMonth()+1;
var rok = now.getFullYear();
var timeValue =( den + "." + mesic + "." + rok + " <br /> " + hours + minutes + seconds);
document.getElementById("aktcas").innerHTML=timeValue;
window.setTimeout("show_date_time();",1000);
}

