var d = new Array();
var _lang;
var path = document.location.toString();
if (path.indexOf("inquiry") >= 0) {
	if (path.indexOf("-cn.html") > 0) {
        d["Griechenland"] = "希腊";
        d["Italien"] = "意大利";
        d["Montenegro"] = "黑山";
        d["Kroatien"] = "克罗地亚";
        d["Türkei"] = "土耳其";
        _lang = "cn";
    }
    else {
		d["Griechenland"] = "Greece";
		d["Italien"] = "Italy";
		d["Montenegro"] = "Montenegro";
		d["Kroatien"] = "Croatia";
		d["Türkei"] = "Turkey";
		_lang = "en";
	}
}
else {
    d["Griechenland"] = "Griechenland";
    d["Italien"] = "Italien";
    d["Montenegro"] = "Montenegro";
    d["Kroatien"] = "Kroatien";
    d["Türkei"] = "Türkei";
    _lang = "de";
}
var s = ["Bahriyeli", "Kapetan Jure", "Linda", "Luna",
    "Maria Giovanna", "Panagiota", "Romantica", "San Snova", "Tarin"];
var ds = new Array();
ds["----------------------------"] = s;
ds["Griechenland"] = ["Bahriyeli", "Panagiota"];
ds["Italien"] = ["Maria Giovanna"];
ds["Kroatien"] = ["Kapetan Jure", "Linda", "Luna", "Romantica", "San Snova", "Tarin"];
ds["Montenegro"] = ["San Snova"];
ds["Türkei"] = ["Bahriyeli"];
ds["Greece"] = ["Bahriyeli", "Panagiota"];
ds["Italy"] = ["Maria Giovanna"];
ds["Croatia"] = ["Kapetan Jure", "Linda", "Luna", "Romantica", "San Snova", "Tarin"];
ds["Montenegro"] = ["San Snova"];
ds["Turkey"] = ["Bahriyeli"] ;
ds["希腊"] = ["Bahriyeli", "Panagiota"];
ds["意大利"] = ["Maria Giovanna"];
ds["克罗地亚"] = ["Kapetan Jure", "Linda", "Luna", "Romantica", "San Snova", "Tarin"];
ds["黑山"] = ["San Snova"];
ds["土耳其"] = ["Bahriyeli"] ;
var sd = new Array();
sd["----------------------------"] = d;
sd["Bahriyeli"] = [d["Griechenland"], d["Türkei"]];
sd["Kapetan Jure"] = [d["Kroatien"]];
sd["Linda"] = [d["Kroatien"]];
sd["Luna"] = [d["Kroatien"]];
sd["Maria Giovanna"] = [d["Italien"]];
sd["Panagiota"] = [d["Griechenland"]]
sd["Romantica"] = [d["Kroatien"]];
sd["San Snova"] = [d["Kroatien"], d["Montenegro"]];
sd["Tarin"] = [d["Kroatien"]];

function change(selMaster,selDetail) {
    _selectedIndex = selMaster.selectedIndex;
    _selected = selMaster.options[_selectedIndex].value;
    if (selMaster.name == "Schiff")
        _detail = sd[_selected];
    else 
        _detail = ds[_selected];
    
    while (selDetail.options.length > 0) {
            selDetail.options[0] = null;
    }
    for (i = 0; i < _detail.length; i++) {
            _option = new Option(_detail[i], _detail[i]);
            selDetail.options.add(_option);
    }
    _option = new Option("----------------------------", "----------------------------");
    selDetail.options.add(_option);
}

function setParams(sel, wert) {
    // sel: select Schiff oder Destination
    // wert: zu setzender Wert
    if (sel == "Schiff") {
        document.AnfrageAF.Schiff.value = wert;
        change(document.AnfrageAF.Schiff, document.AnfrageAF.Destination);
    }
    else {
        document.AnfrageAF.Destination.value = wert;
        change(document.AnfrageAF.Destination, document.AnfrageAF.Schiff);
    }
}


