    function hlavnafotoimg(idobrazku)

{


document.getElementById('hlavnafotoimg').src = 'http://easyreal.net/SiteData/Ponuky/' + idobrazku + '.jpg';

}


function hlavnafotoimgbig(idobrazku) {


    document.getElementById('hlavnafotoimgbig').src = 'http://easyreal.net/SiteData/Ponuky/' + idobrazku + '.jpg';

}





function onchange_compute() {
    if (document.getElementById('LengthLoan').value <= 0)
        document.getElementById('LengthLoan').value = '0';
    document.getElementById('MonthPayment').value = Math.round(((document.getElementById('AmountLoanHidden').value * (document.getElementById('InterestLoanHidden').value / 1200)) / (1 - (Math.pow((1 / (1 + (document.getElementById('InterestLoanHidden').value / 1200))), (document.getElementById('LengthLoan').value * 12))))));
    if (isNaN(document.getElementById('MonthPayment').value))
        document.getElementById('MonthPayment').value = '0';
}
function onchangeAmountLoan_compute() {
    if (document.getElementById('AmountLoan').value <= 0)
        document.getElementById('AmountLoan').value = '0';
    var str;
    str = document.getElementById('AmountLoan').value;
    document.getElementById('AmountLoanHidden').value = str.replace(",", ".");
    document.getElementById('MonthPayment').value = Math.round(((document.getElementById('AmountLoanHidden').value * (document.getElementById('InterestLoanHidden').value / 1200)) / (1 - (Math.pow((1 / (1 + (document.getElementById('InterestLoanHidden').value / 1200))), (document.getElementById('LengthLoan').value * 12))))));
    if (isNaN(document.getElementById('MonthPayment').value))
        document.getElementById('MonthPayment').value = '0';
}

function onchangeInterestLoan_compute() {
    if (document.getElementById('InterestLoan').value <= 0)
        document.getElementById('InterestLoan').value = '0';
    var str;
    str = document.getElementById('InterestLoan').value;
    document.getElementById('InterestLoanHidden').value = str.replace(",", ".");
    document.getElementById('MonthPayment').value = Math.round(((document.getElementById('AmountLoanHidden').value * (document.getElementById('InterestLoanHidden').value / 1200)) / (1 - (Math.pow((1 / (1 + (document.getElementById('InterestLoanHidden').value / 1200))), (document.getElementById('LengthLoan').value * 12))))));
    if (isNaN(document.getElementById('MonthPayment').value)) {
        document.getElementById('MonthPayment').value = '0';
    } else

    { document.getElementById('MonthPayment').value = document.getElementById('MonthPayment').value + ' EUR (' + Math.round((document.getElementById('MonthPayment').value * 30.1260) * 100) / 100 + ' Sk)' }
}
function ProductCode_onchange() {
    document.getElementById('InterestLoan').value = document.getElementById('ProductCode').options[document.getElementById('ProductCode').selectedIndex].value
    if (document.getElementById('InterestLoan').value <= 0)
        document.getElementById('InterestLoan').value = '0';
    document.getElementById('InterestLoanHidden').value = document.getElementById('InterestLoan').value
    document.getElementById('MonthPayment').value = Math.round(((document.getElementById('AmountLoanHidden').value * (document.getElementById('InterestLoanHidden').value / 1200)) / (1 - (Math.pow((1 / (1 + (document.getElementById('InterestLoanHidden').value / 1200))), (document.getElementById('LengthLoan').value * 12))))));
    if (isNaN(document.getElementById('MonthPayment').value))
        document.getElementById('MonthPayment').value = '0';
}





function CallPrint() {
    var prtContentHeader = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1250"><title></title><link href="/styles/print.css" rel="stylesheet" type="text/css" /></head><body>';

    var prtTitle = document.getElementById('detailTitlePrint').innerHTML;
    var prtContent = document.getElementById('detailTxtPrint').innerHTML;
    var prtFoto = document.getElementById('detailFotoPrint').innerHTML;
    var prtPopis = document.getElementById('detailPopisPrint').innerHTML;
    var prtPrice = document.getElementById('detailPricePrint').innerHTML;
    var prtPriceEUR = document.getElementById('detailPriceEURPrint').innerHTML;
    var prtPriceSKK = document.getElementById('detailPriceSKKPrint').innerHTML;
    var prtMakler = document.getElementById('detailMaklerPrint').innerHTML;

    var prtAll = '<img name="n00000001" src="/images/design/header_print.gif" width="816" height="141" border="0" id="n00000001" alt="" /><br /><br />' + prtTitle + '<table width="100%"><tr><td class="top" width="400" style="padding-right:45px">' + prtContent + '<br /><br /><br /><span style="line-height:18px">' + prtPopis + '</span></td><td class="top" >' + prtFoto + '<br /><div style="float:left;width:320px;padding-top:30px;padding-bottom:30px"><span style="font-size:13px">' + prtPrice + ':</span><br /> <div style="font-size:16px;margin-top:5px"><b>' + prtPriceEUR + '</b>(' + prtPriceSKK + ')</div></div>' + prtMakler + '</td></tr></table>';

    var prtContentBottom = '</body></html>';
    var WinPrint = window.open('', '', 'letf=0,top=0,width=850,height=600,toolbar=0,scrollbars=1,status=1');
    WinPrint.document.write(prtContentHeader + prtAll + prtContentBottom);
    WinPrint.document.close();
    WinPrint.focus();
    WinPrint.print();
    WinPrint.close();
    //prtAll.innerHTML = strOldOne;
}


function CallPdf(idponuky) {
    var prtContentHeader = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1250"><title></title><link href="/styles/print.css" rel="stylesheet" type="text/css" /></head><body>';

    var prtTitle = document.getElementById('detailTitlePrint').innerHTML;
    var prtContent = document.getElementById('detailTxtPrint').innerHTML;
    var prtFoto = document.getElementById('detailFotoPrint').innerHTML;
    var prtPopis = document.getElementById('detailPopisPrint').innerHTML;
    var prtPrice = document.getElementById('detailPricePrint').innerHTML;
    var prtPriceEUR = document.getElementById('detailPriceEURPrint').innerHTML;
    var prtPriceSKK = document.getElementById('detailPriceSKKPrint').innerHTML;
    var prtMakler = document.getElementById('detailMaklerPrint').innerHTML;

    var prtAll = '<img name="n00000001" src="/images/design/header_print.gif" width="816" height="141" border="0" id="n00000001" alt="" /><br /><br />' + prtTitle + '<table width="100%"><tr><td class="top" width="400" style="padding-right:45px">' + prtContent + '<br /><br /><br /><span style="line-height:18px">' + prtPopis + '</span></td><td class="top" >' + prtFoto + '<br /><div style="float:left;width:320px;padding-top:30px;padding-bottom:30px"><span style="font-size:13px">' + prtPrice + ':</span><br /> <div style="font-size:16px;margin-top:5px"><b>' + prtPriceEUR + '</b>(' + prtPriceSKK + ')</div></div>' + prtMakler + '</td></tr></table>';

    var prtContentBottom = '</body></html>';
    var WinPrint = window.open('/pdf/' + idponuky, 'pdf', 'letf=0,top=0,width=850,height=600,toolbar=0,scrollbars=1,status=1');
    //WinPrint.document.write(prtContentHeader + prtAll + prtContentBottom);

    //prtAll.innerHTML = strOldOne;
}


function menu(imgName, newImg) { if ((navigator.appName == 'Netscape' && parseFloat(navigator.appVersion) >= 3) || (parseFloat(navigator.appVersion) >= 4)) { eval('document.' + imgName + '.src = "/images/design/' + newImg + '"'); } }


function closeLayer() { document.getElementById('ctl00_ContentPlaceHolder1_dsEmail').style.display = 'none'; }
function closefotogalery(closegalery) { document.getElementById(closegalery).style.display = 'none'; }

function openfotogaleryid (opengalery) {document.getElementById('hlavnafotoimgbig').src = document.getElementById('hlavnafotoimg').src;document.getElementById(opengalery).style.display = 'block';}

function openfotogalery(opengalery) { 
document.getElementById(opengalery).style.display = 'block'; 
    
}
function Callemail() { document.getElementById('ctl00_ContentPlaceHolder1_dsEmail').style.display = 'block'; }