function srh(el,st,text)
  {
    var value = document.getElementById(el).value;
    if ((value == '') || (value == st))
    {
    	document.getElementById(el).value = text;
    }
  }



function sel_date(dat,id,town){
/*
    if (pg > 1){
        pg--;
        process('/php/photorep.php?page='+pg);
	}
*/
//alert(dat);

process('/php/actions_date.php?date='+dat+'&id_action='+id+'&id_town='+town);
//document.getElementById('dtime').innerHTML='111';
return false;
}



function sel_date_all(dat,town){
/*
    if (pg > 1){
        pg--;
        process('/php/photorep.php?page='+pg);
	}
*/
//alert(dat);

//alert('/php/list_pl.php?date='+dat+'&id_town='+town);
process1('/php/list_pl.php?date='+dat+'&id_town='+town);
//process2('/php/list_ac.php?date='+dat);
return false;
}



function sel_date0(dat,town){
	$(document).ready(function(){
		$(".time li").easyTooltip();
		$(".name").easyTooltip();
	});

return false;
}


function sel_date_all2(dat,town){
process2('/php/list_ac.php?date='+dat+'&id_town='+town);
return false;
}


function set_ac(){

var ar = document.getElementsByTagName('input');
    for (var i=0; i < ar.length; i++){
	        if (ar[i].id == 'type_ac') ar[i].checked = true;
	    }

return false;
}

function reset_ac(){

var ar = document.getElementsByTagName('input');

    for (var i=0; i < ar.length; i++){
	        if (ar[i].id == 'type_ac') ar[i].checked = false;
	    }

return false;
}

function set_pl(){

var ar = document.getElementsByTagName('input');

    for (var i=0; i < ar.length; i++){
	        if (ar[i].id == 'type_pl') ar[i].checked = true;
	    }

return false;
}

function reset_pl(){

var ar = document.getElementsByTagName('input');

    for (var i=0; i < ar.length; i++){
	        if (ar[i].id == 'type_pl') ar[i].checked = false;
	    }

return false;
}


function hidep(id){

var s = document.getElementById('s'+id).style.display;
if (s=='none')
document.getElementById('s'+id).style.display='block';
else document.getElementById('s'+id).style.display='none';
return false;
}

function vis(id,n){
if (id==0)
{
document.getElementById('d1'+n).style.display='none';
document.getElementById('d0'+n).style.display='';

document.getElementById('l0'+n).className='active';
document.getElementById('l1'+n).className='';

}
else 
{
document.getElementById('d0'+n).style.display='none';
document.getElementById('d1'+n).style.display='';

document.getElementById('l1'+n).className='active';
document.getElementById('l0'+n).className='';

}

return false;
}


