<!-- //

/*Dateiname: MitgliedStaaten.js
*/
//alert (1);
var vIaOld = "";
var vDatumOld = "";
var vLCaOld = "";
var vLCbOld = "";


function fStaatenInit(vFocusIndex, vIA, vDatum, vLCa, vLCb )
/* vS: 2-Buchstabencode
*/
{
//alert ("fStaatenInit");
vIaOld = vIA;
vDatumOld = vDatum;
vLCaOld = vLCa;
vLCbOld = vLCb;
if ( vDatum.length < 1 )
	{
	d = new Date();
	y = d.getYear();
	if (y<1000) y+=1900;
	document.Staaten.Datum.value = "" + d.getDate() + "." + (d.getMonth()+1) + "." + y;
	}
fStaatenFocus(vFocusIndex);
} // fStaatenInit


function fStaatenSprache(vS)
/* vS: "DE" oder "GB": Sprache; default: GB
*/
{
//alert ("fStaatenSprache");
if (fStaatenSprache.arguments.length<=0)
	{ vS="GB"; };
document.Staaten.Sprache.value = vS;
document.Staaten.submit();
} // fStaatenSprache(vS)


function fStaatenFocusIndex(vI)
/* 
*/
{
//alert ("fStaatenFocusIndex; vI:" + vI);
if ( 3 == vI )
	{
	if ( vIaOld != document.Staaten.IA.value )
		{ fStaatenFocusIndexInt(vI); }
	}
else 
	{
	if ( 9 == vI )
		{
		if ( vLCaOld != document.Staaten.LCa.value )
			{ fStaatenFocusIndexInt(vI); }
		}
	else 
		{
		if ( 10 == vI )
			{
			if ( vLCbOld != document.Staaten.LCb.value )
				{ fStaatenFocusIndexInt(vI); }
			}
		else
			{ fStaatenFocusIndexInt(vI); }
		}
	}
} // fStaatenFocusIndex(vI)


function fStaatenFocusIndexInt(vI)
/* 
*/
{
// alert ("fStaatenFocusIndex");
document.Staaten.FocusIndex.value = vI;
document.Staaten.submit();
} // fStaatenFocusIndex(vI)


function fStaatenLc(vS)
/* vS: 2-Buchstabencode
*/
{
// alert ("fStaatenLc");
if (fStaatenLc.arguments.length<=0)
	{ alert ("Fehler in fStaatenLc: kein Argument"); };
//document.Staaten.LC.value = vS;
document.Staaten.LCa.value = vS;
document.Staaten.FocusIndex.value = 9;
document.Staaten.submit();
} // fStaatenLc(vS)


function fStaatenFocus(vFocusIndex)
{
//alert("fStaatenFocus meldet sich");
for ( i=0 ; i<=10 ; i++ ) // PHP-Server bei Kluthe-Thiemann fügt PHPSESSID nach Form ein
	{
	if ( "FocusIndex" == document.Staaten[i].name )
		{ 
		vOffset = i; break;
		}
	}
//alert ("fStaatenFocus; vOffset:" + vOffset);
if ( vFocusIndex<3 )
	{ vFocusIndex=3 + vOffset; }
vFocusIndexOff = vFocusIndex + vOffset;
vV = document.Staaten[vFocusIndexOff].value;
document.Staaten[vFocusIndexOff].focus();
if ( vFocusIndex!=4 ) // Bei Daten soll Cursor soll am Anfang im Feld, also bei den Tagen stehen !
	{ document.Staaten[vFocusIndexOff].value = vV; }
} // fStaatenFocus(vFocusIndex)


//alert (2);

// -->

