function get_display(per)
{
	_td1 = document.getElementById('div_td_1');
	_td2 = document.getElementById('div_td_2');
	_td3 = document.getElementById('div_td_3');
	if(per=='all') {
		_td1.style.display='none';
		_td2.style.display='none';
		_td3.style.display='none';
	}
	if(per=='current') {
		_td1.style.display='block';
		_td2.style.display='block';
		_td3.style.display='none';
	}
	if(per=='book') {
		_td1.style.display='block';
		_td2.style.display='none';
		_td3.style.display='block';
	}
}

function SetState(country, control) 
{
	var NumState = control.options.length;
	found=0;
	while(NumState > 0) 
	{
		NumState--;
		if ((NumState>0) && (control.options[NumState-1].text == '[== '+country+' ==]')) 
		{
			control.selectedIndex=NumState;
			found=1;
		};
	}
	if (!found) 
	{
		control.selectedIndex=0;
	}
}

function CheckState(country, control) 
{
	var NumState = control.options.length;
	var Sel = control.options[control.selectedIndex].text;
	var Beg=0;
	var found=0;
	var st=new String;

	/*if (country.selectedIndex==0)
	{
		control.selectedIndex=0;
		return false;
	}*/
	for (i=0; i < NumState; i++)
	{
		if (control.options[i].text == '[== '+country.options[country.selectedIndex].text+' ==]') 
		{
			Beg=i+1;
			break;
		}
	}
	if (Sel.substring(0,2) != '[=')
	for (i=Beg; i < NumState; i++) 
	{
		if (control.options[i].text == Sel) 
		{
			found=1;
			break;
		}
		st=control.options[i].text;
		if (st.substring(0,2) == '[=') break;
	}

	if (!found) 
	{
		control.selectedIndex=Beg;
	}
}

function vis(per)
{
	_diver = document.getElementById('sicret');
	if(per) _diver.style.display='none';
	else _diver.style.display='block';
}
