//zmienne
var strHTML = "";
var strHTML2 = "";
var profileName = document.getElementById("combo").getAttribute("src");
profileName = profileName.replace("http://interia_genctr.euroticket.pl/genctr/","");
profileName = profileName.replace("http://sale.euroticket.pl/genctr/","");
profileName = profileName.replace(".js","");

var comboColor = document.getElementById("params").getAttribute("xml:space");
var test_test = document.location.href;
    if (test_test.indexOf("testtest") != -1)
        {
            test_switch();
        }

var strFrom = "Kraj wyjazdowy:"
var strTo = "Kraj docelowy:";
var strButton = "&nbsp;&nbsp;&nbsp;Dalej";
var strLog = "Tw&oacute;j bilet";
var strURL = "http://sale.euroticket.pl/start.php?profile=";
var strChange = "Zmiany na bilecie";
var strDefaultFrom = "636";
var strDefaultTo = "23742";

//obrazki
var leftImg = "http://sale.euroticket.pl/combo/img/combo_" + comboColor + "_h_l.png";
var midImg = "http://sale.euroticket.pl/combo/img/combo_" + comboColor + "_h_m.png";
var rightImg = "http://sale.euroticket.pl/combo/img/combo_" + comboColor + "_h_r.png";
var arrowImg = "http://sale.euroticket.pl/combo/img/arrow_h_" + comboColor + ".png";
var buttonImg = "http://sale.euroticket.pl/combo/img/rightnavigator_over.png";

var t_width = "640px";
var t_height = "200px";

//kolory fontów
var Font1;
var Font2;
var Font3;
    if (comboColor == "dblue")
        {
        Font1 = "Yellow";
        Font2 = "White";
        Font3 = "White";
        }
    if (comboColor == "lblue")
        {
        Font1 = "DarkBlue";
        Font2 = "DarkBlue";
        Font3 = "DarkBlue";
        }
    if (comboColor == "steel")
        {
        Font1 = "Black";
        Font2 = "DarkBlue";
        Font3 = "Black";
        }
    if (comboColor == "yellow")
        {
        Font1 = "Black";
        Font2 = "Black";
        Font3 = "DarkBlue";
        }                   
        
// wygląd


// html
strHTML = strHTML + '<h3>Rezerwacja biletów w systemie EuroTicket</h3>';
strHTML = strHTML + '<p><strong>Wybierz kraj wyjazdu i przyjazdu, następnie naci¶nij "Wyszukaj"</strong></p>';
strHTML = strHTML + '<form name="ETX" action="bilety-autokarowe-euroticket.php?profile=' + profileName + '&cnt=cts" method="get">';
strHTML = strHTML + '';
strHTML = strHTML + '';

strHTML2 = strHTML2 + '<fieldset class="inputs"><ol><li><label for="dctr">1. Kraj wyjazdu</label>';
strHTML2 = strHTML2 + '<script language="javascript">ShowTopCombo()</script>';
strHTML2 = strHTML2 + '</li>';
strHTML2 = strHTML2 + '<li>';
strHTML2 = strHTML2 + '<label for="actr">2. Kraj przyjazdu</label>';
strHTML2 = strHTML2 + '<script language="javascript">ShowBottomCombo();</script>';
strHTML2 = strHTML2 + '</li>';
strHTML2 = strHTML2 + '</ol>';
strHTML2 = strHTML2 + '</fieldset>';
strHTML2 = strHTML2 + '';
strHTML2 = strHTML2 + '<fieldset class="buttons"><input type="submit" value="Wyszukaj" /></fieldset>';
strHTML2 = strHTML2 + '</form>';                   

function showTop() {
document.write(strHTML);
}    
function showBottom() {
document.write(strHTML2);
}
function showDefaults() {
//document.ETX.et_dctr.value = strDefaultFrom;
//document.ETX.et_actr.value = strDefaultTo;
document.getElementById("et_dctr").value = strDefaultFrom;
SetBottomCombo(document.getElementById("et_dctr"));
document.getElementById("et_actr").value = strDefaultTo;
}
function setSize(ile)
{
document.getElementById("t_main").style.width = ile;
}

function test_switch()
{
if (test_test.indexOf("dblue") != -1)
    {
        comboColor = "dblue";
    }
if (test_test.indexOf("lblue") != -1)
    {
        comboColor = "lblue";
    }    
if (test_test.indexOf("steel") != -1)
    {
        comboColor = "steel";
    }    
 if (test_test.indexOf("yellow") != -1)
    {
        comboColor = "yellow";
    }    
}                
                    

