var error_message = "" ; 
function showflash(file,width,height,bgcolor)
	{
	document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"'+width+'\" height=\"'+height+'\">');
	document.write('<param name=\"allowScriptAccess\" value=\"always\" />');
	document.write('<param name=\"movie\" value=\"'+file+'\" />');
	document.write('<param name=\"quality\" value=\"high\" />');
	document.write('<param name=\"wmode\" value=\"transparent\" />');
	document.write('<param name=\"bgcolor\" value=\"'+bgcolor+'\" />');
	document.write('<param name=\"swliveconnect\" value=\"true\" />');
	document.write('<param name=\"menu\" value=\"false\" />');
	document.write('<embed src=\"'+file+'\" quality=\"high\" bgcolor=\"'+bgcolor+'\" width=\"'+width+'\" height=\"'+height+'\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"transparent\"  swliveconnect=\"true\" menu=\"false\"/>');
	document.write('</object>');    
	}
function showplace(element)
    {
    document.getElementById(element).style.display = "block" ;
    document.getElementById("a"+element).href = "javascript: hideplace('"+element+"')" ;
    window.focus() ;
    }
function hideplace(element)
    {
    document.getElementById(element).style.display = "none" ;
    document.getElementById("a"+element).href = "javascript: showplace('"+element+"')" ;
    window.focus() ;
    }
function map(id)
    {
    window.open("map.php?id="+id,"_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,width=525,height=410,scrollbars=0") ;
    }
function centermessagebox()
    {
    boxleftpos = 0 ;
    boxtoppos = 0 ;
    if (screen)
        {
        boxleftpos = (document.body.clientWidth/2) - 150 ;
        boxtoppos = (document.body.scrollTop + document.body.clientHeight/2) - 150 ;
        }
    document.getElementById("messagebox").style.display = "none" ;
    document.getElementById("messagebox").style.left = 250 ;
    document.getElementById("messagebox").style.top = boxtoppos ;
    document.onclick = hidemessagebox ;
    }
function showmessagebox()
    {
    showelement('messagebox') ;
    }
function hidemessagebox()
    {
    document.getElementById("messagebox").style.display = "none" ;
    }
function showelement(element)
    {
    document.getElementById(element).style.display = "block" ;
    }
function hideelement(element)
    {
    document.getElementById(element).style.display = "none" ;
    }
function showinfobox(text,toppos)
    {
    var infoboxtop ;
    if (toppos)
        infoboxtop = "167" ;
    else
        infoboxtop = "488" ;
    document.getElementById('infobox').style.top = infoboxtop ;
    document.getElementById('infobox').innerHTML = '<img src="frame/info.gif" width="64" height="59" align="right">'+text ;
    document.getElementById('infobox').style.display = "block" ;
    }
function strim(sstring) 
    {
    while (sstring.substring(0,1)==' ')
        {
        sstring = sstring.substring(1,sstring.length) ;
        }
    while (sstring.substring(sstring.length-1,sstring.length)==' ')
        {
        sstring = sstring.substring(0,sstring.length-1) ;
        }
    return sstring ;
    }

    
function step1()
    {
    hideelement('step1') ;
    hideelement('step2m') ;
    hideelement('step2t') ;
    showelement('step2') ;
    if (document.orderform.tipus[0].checked)
        showelement('step2m') ;
    else
        showelement('step2t') ;
    gototop() ;
    }
function step1back()
    {
    showelement('step1') ;
    hideelement('step2') ;
    hideelement('step2m') ;
    hideelement('step2t') ;
    gototop() ;
    }
function step2()
    {
    if (document.orderform.tipus[0].checked)
        {
        xajax_checkpform(document.orderform.m_nev.value,document.orderform.m_anyanev.value,document.orderform.m_szemszig.value,document.orderform.m_cim.value,document.orderform.m_szuldatum.value,document.orderform.m_szulhely.value,document.orderform.m_telefon.value,document.orderform.m_fax.value,document.orderform.m_email.value,document.orderform.m_telepitescim.value) ;
        }
    else
        {
        xajax_checksform(document.orderform.t_cegnev.value,document.orderform.t_szekhely.value,document.orderform.t_cegjegyzekszam.value,document.orderform.t_adoszam.value,document.orderform.t_bank.value,document.orderform.t_szamlaszam1.value,document.orderform.t_szamlaszam2.value,document.orderform.t_szamlaszam3.value,document.orderform.t_kapcsolattarto.value,document.orderform.t_telefon.value,document.orderform.t_fax.value,document.orderform.t_email.value,document.orderform.t_telepitescim.value,document.orderform.t_szamlazasicim.value,document.orderform.t_postazasicim.value) ;
        }
    }
function step2end(error_message)
    {
    if (error_message)
        {
        document.getElementById("messagebox").innerHTML = error_message ;
        centermessagebox() ;
        setTimeout("showmessagebox()",1) ;
        }
    else
        {
        hideelement('step1') ;
        hideelement('step2') ;
        hideelement('step2m') ;
        hideelement('step2t') ;
        showelement('step3') ;
        calculate() ;
        gototop() ;
        }
    }
function step2back()
    {
    hideelement('step1') ;
    hideelement('step2m') ;
    hideelement('step2t') ;
    hideelement('step3') ;
    if (document.orderform.tipus[0].checked)
        showelement('step2m') ;
    else
        showelement('step2t') ;
    showelement('step2') ;
    gototop() ;
    }
function step3back()
    {
    hideelement('step4') ;
    showelement('step3') ;
    gototop() ;
    }
function step4()
    {
    deliverycode = "" ;
    if (document.orderform.tipus[0].checked)
        {
        if (strim(document.orderform.m_telefon.value))
            deliverycode += '<input class="check" type="checkbox" name="ert_telefon"> telefonon' ;
        if (strim(document.orderform.m_fax.value))
            {
            if (deliverycode)
                deliverycode += "<br>" ;
            deliverycode += '<input class="check" type="checkbox" name="ert_fax"> faxon' ;
            }
        if (strim(document.orderform.m_email.value))
            {
            if (deliverycode)
                deliverycode += "<br>" ;
            deliverycode += '<input class="check" type="checkbox" name="ert_email"> emailben' ;
            }
        }
    else
        {
        if (strim(document.orderform.t_telefon.value))
            deliverycode += '<input class="check" type="checkbox" name="ert_telefon"> telefonon' ;
        if (strim(document.orderform.t_fax.value))
            {
            if (deliverycode)
                deliverycode += "<br>" ;
            deliverycode += '<input class="check" type="checkbox" name="ert_fax"> faxon' ;
            }
        if (strim(document.orderform.t_email.value))
            {
            if (deliverycode)
                deliverycode += "<br>" ;
            deliverycode += '<input class="check" type="checkbox" name="ert_email"> emailben' ;
            }
        }
    document.getElementById("delivery").innerHTML = deliverycode ;
    emailcode = "" ;
    counter = 0 ;
    for (i=1;i<=(document.orderform.email.value);i++)
        {
        if (counter)
            emailcode += "<br>" ;
        emailcode += i+'. e-mail cím*:<br><input type="text" name="email'+i+'" style="width:270px" maxlength="128">' ;
        if (document.orderform.domain.value!=1)
            emailcode += '@borsodweb.hu' ;
        if (document.orderform.domain.value==1)
            emailcode += '@domain.hu' ;
        counter++ ;
        }
    document.getElementById("emails").innerHTML = emailcode ;    
    domaincode = "" ;
    if (document.orderform.domain.value==0)
        domaincode += 'nem kért domain szolgáltatást' ;
    if (document.orderform.domain.value==2)
        domaincode += 'másodlagos domain:<br>www.borsodweb.hu/<input type="text" name="domainnev" style="width:240px" maxlength="64">' ;
    if (document.orderform.domain.value==1)
        domaincode += 'elsődleges domain:<br><input type="text" name="domainnev" style="width:270px" maxlength="64">.<select name="tld"><option value="hu">hu</option><option value="com">com</option><option value="net">net</option><option value="org">org</option></select>' ;
    document.getElementById("domains").innerHTML = domaincode ;        
    hostingcode = "" ;
    if (document.orderform.tarhely.value==0)
        hostingcode += 'nem kért webtárhely szolgáltatást' ;
    else
        hostingcode += 'webtárhely felhasználói név:<br><input type="text" name="tarhelynev" style="width:373px" maxlength="64">' ;
    document.getElementById("hostingblock").innerHTML = hostingcode ;        
    hideelement('step3') ;
    showelement('step4') ;
    gototop() ;
    }
function step5()
    {
    if (document.orderform.ert_iras != null)
        ert_iras = document.orderform.ert_iras.checked ;
    else
        ert_iras = false ;
    if (document.orderform.ert_telefon != null)
        ert_telefon = document.orderform.ert_telefon.checked ;
    else
        ert_telefon = false ;
    if (document.orderform.ert_fax != null)
        ert_fax = document.orderform.ert_fax.checked ;
    else
        ert_fax = false ;
    if (document.orderform.ert_email != null)
        ert_email = document.orderform.ert_email.checked ;
    else
        ert_email = false ;
    email1 = "" ;
    email2 = "" ;
    email3 = "" ;
    email4 = "" ;
    email5 = "" ;
    email6 = "" ;
    email7 = "" ;
    email8 = "" ;
    email9 = "" ;
    email10 = "" ;
    email11 = "" ;
    email12 = "" ;
    email13 = "" ;
    email14 = "" ;
    email15 = "" ;
    for (i=1;i<=(document.orderform.email.value);i++)
        {
        eval("var email" + i + " = document.orderform.email"+i+".value");
        }
    xajax_checkformvalues(ert_iras,ert_telefon,ert_fax,ert_email,document.orderform.email.value,email1,email2,email3,email4,email5,email6,email7,email8,email9,email10,email11,email12,email13,email14,email15) ;
    }
function step5end(error_message)
    {
    if (error_message)
        {
        document.getElementById("messagebox").innerHTML = error_message ;
        centermessagebox() ;
        setTimeout("showmessagebox()",1) ;
        }
    else
        document.orderform.submit() ;
    }

function gototop()
    {
    window.location = "#top" ;
    }
function mixer()
    {
    xajax_mixer(document.orderform.letoltes.value,document.orderform.feltoltes.value,document.orderform.korlat.value,document.orderform.email.value,document.orderform.tarhely.value,document.orderform.domain.value,document.orderform.megosztas.checked,document.orderform.ip.value,document.orderform.voip.checked,document.orderform.panel.checked,document.orderform.huseg.value,1) ;
    }