/*--------------------------------------------*/
// Delete post
/*--------------------------------------------*/

function delete_confirm(theURL)
{
	if (confirm( "Действительно удалить?" ))
	{
		window.location.href=theURL;
	}
}

/*--------------------------------------------*/
// Validate vacancy
/*--------------------------------------------*/

function validate_confir(theURL)
{
	if (confirm( "Подтвердить?" ))
	{
		window.location.href=theURL;
	}
	else
	{
		alert ( "Как хотите" );
	} 
}

/*--------------------------------------------*/
// Open new windows
/*--------------------------------------------*/

function op_win(theURL)
{
    window.open (burl, "", "width=350, height=80")
}

/*--------------------------------------------*/
// Validate universal
/*--------------------------------------------*/

function univ_confirm(theURL, text)
{
	if (confirm(text))
	{
		window.location.href=theURL;
	}
}

/*--------------------------------------------*/
// Search universal
/*--------------------------------------------*/
function type_search(type, cl)
{
    var f = document.forms['search'];
    f.type.value = type;
    if (type == 'internet')
    {
        document.getElementById('bm_sh_internet').className='cont_act act_im';
        document.getElementById('a_sh_internet').className='white';
        document.getElementById('bm_sh_office').className='cont';
        document.getElementById('a_sh_office').className=cl;
        document.getElementById('bm_sh_market').className='cont';
        document.getElementById('a_sh_market').className=cl;
        document.getElementById('bm_sh_region').className='cont';
        document.getElementById('a_sh_region').className=cl;
    }
    if (type == 'office')
    {
        document.getElementById('bm_sh_internet').className='cont';
        document.getElementById('a_sh_internet').className=cl;
        document.getElementById('bm_sh_office').className='cont_act act_im';
        document.getElementById('a_sh_office').className='white';
        document.getElementById('bm_sh_market').className='cont';
        document.getElementById('a_sh_market').className=cl;
        document.getElementById('bm_sh_region').className='cont';
        document.getElementById('a_sh_region').className=cl;
    }
    if (type == 'market')
    {
        document.getElementById('bm_sh_internet').className='cont';
        document.getElementById('a_sh_internet').className=cl;
        document.getElementById('bm_sh_office').className='cont';
        document.getElementById('a_sh_office').className=cl;
        document.getElementById('bm_sh_market').className='cont_act act_im';
        document.getElementById('a_sh_market').className='white';
        document.getElementById('bm_sh_region').className='cont';
        document.getElementById('a_sh_region').className=cl;
    }
    if (type == 'region')
    {
        document.getElementById('bm_sh_internet').className='cont';
        document.getElementById('a_sh_internet').className=cl;
        document.getElementById('bm_sh_office').className='cont';
        document.getElementById('a_sh_office').className=cl;
        document.getElementById('bm_sh_market').className='cont';
        document.getElementById('a_sh_market').className=cl;
        document.getElementById('bm_sh_region').className='cont_act act_im';
        document.getElementById('a_sh_region').className='white';
    }

    f.q.blur();
    //document.getElementById('bm_sh_market').className='blue u';
}