function oneDirection()
{
var onedir;
onedir = GetEl('two_item').className == 'two_way_act';
// onedir = GetEl('returnTicket').checked;
// GetEl('flights0departureDate').disabled = onedir;
if( onedir )
{
ShowLayerBlock('divcld20');
ShowLayerBlock('divcld21');
}
else
{
HideLayer('divcld20');
HideLayer('divcld21');
}
GetEl('addctrs').innerHTML = '';
}
function CheckOne()
{
HideLayer('divcld20');
HideLayer('divcld21');
GetEl('one_item').className = 'one_way_act';
GetEl('two_item').className = 'two_way_inact';
}
function CheckTwo()
{
ShowLayerBlock('divcld20');
ShowLayerBlock('divcld21');
GetEl('one_item').className = 'one_way_inact';
GetEl('two_item').className = 'two_way_act';
}
function prepareGet(typelink)
{
var cnt_tr, ctrs, ret, ttd, dte;
if( GetEl('flights0destination').value == GetEl('flights0origin').value )
{
alert('[!]ErrorOriginDestination');
return(false);
}
ttd = 1283893200
if( ttd > GetEl('cld1').value )
{
alert('[!]ErrorDates0');
return(false);
}
ret = GetEl('two_item').className == 'two_way_act';
if( ret )
{
if( GetEl('cld1').value > GetEl('cld2').value )
{
alert('[!]ErrorDates');
return(false);
}
}
// ret = (GetEl('one_item').className == 'one_way_inact')?true:false;
// ret = GetEl('returnTicket').checked;
cnt_tr = GetEl('tr').value;
ctrs = '';
if( typelink==1 )
{
ctrs += '';
ctrs += '';
if( ret )
{
ctrs += '';
ctrs += '';
ctrs += '';
}
else
{
ctrs += '';
}
for(var i=0;i';
ctrs += '';
ctrs += '';
}
if( typelink==2 )
{
ctrs += '';
ctrs += '';
dte = GetEl('d_cld1').value;
ctrs += '';
ctrs += '';
ctrs += '';
ctrs += '';
if( ret )
{
ctrs += '';
ctrs += '';
dte = GetEl('d_cld2').value;
ctrs += '';
ctrs += '';
ctrs += '';
}
else
{
ctrs += '';
}
for(var i=0;i';
ctrs += '';
ctrs += '';
ctrs += '';
GetEl('flights0origin').disabled = true;
GetEl('flights0destination').disabled = true;
GetEl('tr').disabled = true;
}
GetEl('addctrs').innerHTML = ctrs;
// alert(ctrs);
GetEl('cld1').disabled = true;
GetEl('d_cld1').disabled = true;
GetEl('cld2').disabled = true;
GetEl('d_cld2').disabled = true;
GetEl('tr').disabled = true;
setTimeout('RefreshCtrls("'+typelink+'")',1000);
return(true);
}
function RefreshCtrls( typelink )
{
if( typelink == 2 )
{
GetEl('tr').disabled = false;
GetEl('flights0origin').disabled = false;
GetEl('flights0destination').disabled = false;
}
GetEl('cld1').disabled = false;
GetEl('d_cld1').disabled = false;
GetEl('cld2').disabled = false;
GetEl('d_cld2').disabled = false;
GetEl('tr').disabled = false;
GetEl('addctrs').innerHTML = '';
}
oneDirection();