function confirm_q()
{
cq = confirm("Naozaj chcete odstrániť všetky produkty s košíka?");
if (cq) {var stats = true} else {var stats = false};
return stats;
};

function confirm_q_orders()
{
cq = confirm("Jeden alebo viac vami objednavaných produktov nie je na sklade. Chcete aj napriek tomu odoslať objednávku?");
if (cq) {var stats = true} else {var stats = false};
return stats;
};

function toggle(cislo) {
if(document.getElementById(cislo).style.display=='none')
{
document.getElementById(cislo).style.display = '';
document.getElementById(cislo+"img").src="images/open.png";
} else {
document.getElementById(cislo).style.display = 'none';
document.getElementById(cislo+"img").src="images/close.png";
}
}

function toggle2(cislo) {
if(document.getElementById(cislo).style.display=='none')
{
document.getElementById(cislo).style.display = '';

} else {
document.getElementById(cislo).style.display = 'none';
}
};

function prepis() {
if(document.orderform.samedata.checked==true)
{
document.orderform.post_companyname.value = document.orderform.companyname.value;
document.orderform.post_companyname.disabled = true;
document.orderform.post_ico.value = document.orderform.ico.value;
document.orderform.post_ico.disabled = true;
document.orderform.post_dic.value = document.orderform.dic.value;
document.orderform.post_dic.disabled = true;
document.orderform.post_firstname.value = document.orderform.firstname.value;
document.orderform.post_firstname.disabled = true;
document.orderform.post_lastname.value = document.orderform.lastname.value;
document.orderform.post_lastname.disabled = true;
document.orderform.post_streetnumber.value = document.orderform.streetnumber.value;
document.orderform.post_streetnumber.disabled = true;
document.orderform.post_psc.value = document.orderform.psc.value;
document.orderform.post_psc.disabled = true;
document.orderform.post_city.value = document.orderform.city.value;
document.orderform.post_city.disabled = true;
} else {
document.orderform.post_companyname.value = '';
document.orderform.post_companyname.disabled = false;
document.orderform.post_ico.value = '';
document.orderform.post_ico.disabled = false;
document.orderform.post_dic.value = '';
document.orderform.post_dic.disabled = false;
document.orderform.post_firstname.value = '';
document.orderform.post_firstname.disabled = false;
document.orderform.post_lastname.value = '';
document.orderform.post_lastname.disabled = false;
document.orderform.post_streetnumber.value = '';
document.orderform.post_streetnumber.disabled = false;
document.orderform.post_psc.value = '';
document.orderform.post_psc.disabled = false;
document.orderform.post_city.value = '';
document.orderform.post_city.disabled = false;
}
};

function nickinputfocus() {
if(document.loginform.nick.value=='meno')
{
document.loginform.nick.value ='';
document.loginform.nick.style.color='#dddddd';
}
};

function nickinputblur() {
if(document.loginform.nick.value=='')
{
document.loginform.nick.value ='meno';
document.loginform.nick.style.color='#ffffff';
}
};

function hesloinputfocus() {
if(document.loginform.heslo.value=='HESLO')
{
document.loginform.heslo.value='';
document.loginform.heslo.style.color='#dddddd';
}
};

function hesloinputblur() {
if(document.loginform.heslo.value=='')
{
document.loginform.heslo.value='HESLO';
document.loginform.heslo.style.color='#ffffff';
}
};

function votting(voteid) {
document.voteform.answervote.value=voteid;
document.voteform.submit();
};

function showdiv(divobject) {
document.getElementById(divobject).style.display = '';
};

function hidediv(divobject) {
document.getElementById(divobject).style.display = 'none';
};
