if (document.forms[0])
{
var odkazy = new Array();

odkazy['ESET Smart Security 32bit'] = 'http://download.eset.com/download/win/ess/ess_nt32_sky.msi';
odkazy['ESET Smart Security 64bit'] = 'http://download.eset.com/download/win/ess/ess_nt64_sky.msi';
odkazy['ESET NOD32 32bit'] = 'http://download.eset.com/eval/win/eav/eav_nt32_sky.msi';
odkazy['ESET NOD32 64bit'] = 'http://download.eset.com/eval/win/eav/eav_nt64_sky.msi';
odkazy['AreaGuard Data Audit (freeware)'] = 'http://data.sodatsw.cz/download/AreaGuard_DataAudit.exe';
odkazy['AreaGuard Notes off-line (freeware)'] = 'http://data.sodatsw.cz/download/agfree.exe';
odkazy['OptimAccess EasyReport (freeware)'] = 'http://data.sodatsw.cz/download/oaerep.exe';
odkazy['AreaGuard Notes TRIAL'] = 'http://data.sodatsw.cz/download/agntrial.exe';
odkazy['OptimAccess Solution TRIAL'] = 'http://data.sodatsw.cz/download/oatrial.exe';

function prepni()
{
if (window.odkaz.search(/smart.security/i) == -1)
{
var vypis = 'Ďakujeme za stiahnutie testovacej verzie softvéru. Sťahovanie by malo začať automaticky. Ak sťahovanie súboru nezačne do 5 sekúnd, kliknite prosím na nasledujúci odkaz:';

window.frames['rofl'].location.href = odkazy[window.odkaz];
}
else
{
var vypis = 'Pre stiahnutie a používanie skúšobnej verzie ESET Smart Security je potrebné mať vygenerované licenčné údaje (meno, heslo). Pre vygenerovanie licenčných údajov zadajte prosím e-mailovú adresu, na ktorú vám budú tieto licenčné údaje zaslané:<br><br><iframe frameborder="0" height="40px" scrolling="no" src="http://www.eset.sk/buxus/trial-f/?dis=FBC8D608" style="border: none" width="570px"></iframe><br>Ak už tieto údaje máte, stiahnite si program pužitím nasledujúceho odkazu';
}

document.getElementById('form-256').innerHTML = '<br><img src="/domain/icinfo/files/images/ok.jpg" style="vertical-align: middle" align="middle"><b style="color: #3B6F9D; padding-left: 20px; font-size: 11pt;">Formulár bol úspešne spracovaný</b><br><br><p>'+vypis+'</p><p><br><a href="'+odkazy[window.odkaz]+'" target="_blank">» Stiahnuť '+window.odkaz+'</a></p>';

this.onload = null;
}

document.forms[0].onsubmit = function()
{
if (document.forms[0].field269.value.search(/^[  ]*$/i) != -1)
{
alert('Zadajte prosím vaše meno/spoločnosť');
document.forms[0].field269.value = '';
document.forms[0].field269.focus();
return false;
}

if (document.forms[0].field272.value.search(/^[^@]+@[^@]+\.[a-z]{2,}$/i) == -1)
{
alert('Zadajte prosím platnú e-mailovú adresu');
document.forms[0].field272.focus();
document.forms[0].field272.select();
return false;
}

window.frames['rofl'].document.write('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><body><form action="?p=163" method="post" name="contact-form" enctype="multipart/form-data" id="form-256">');
window.frames['rofl'].document.write(document.forms[0].innerHTML);
window.frames['rofl'].document.write('</form></body></html>');

for (var i=0; i<document.forms[0].elements.length;i++)
{
window.frames['rofl'].document.forms[0].elements[i].value = document.forms[0].elements[i].value;
window.frames['rofl'].document.forms[0].elements[i].checked = (document.forms[0].elements[i].checked) ? true : false;

if (document.forms[0].elements[i].checked) window.odkaz = document.forms[0].elements[i].value;
}

if (!window.odkaz)
{
alert('Vyberte prosím softvér, ktorý chcete stiahnuť');
return false;
}

if(navigator.userAgent.search(/firefox/i) != -1)
  {
    document.getElementById('rofl').onload = prepni;
  }
else
  {
    document.getElementById('rofl').attachEvent('onload', prepni);
  }

window.frames['rofl'].document.forms[0].submit.click();

return false;
}
}

