function link_a(id){
  document.getElementById(id+'_top').style.display = 'inline';
  document.getElementById(id+'_bottom').style.display = 'inline';	
}

function link_i(id){
  document.getElementById(id+'_top').style.display = 'none';
  document.getElementById(id+'_bottom').style.display = 'none';	
}
function blurSearchString(elem, textv){
  search = document.getElementById(elem);
  if (search.value==''){
   search.value = textv; 
  }
}

function focusSearchString(elem, textv){
  search = document.getElementById(elem);
  if (search.value==textv){
   search.value = ''; 
  }
}

function check_other(){
  select = document.getElementById('regdelivery');
  if (select.options[select.selectedIndex].value == 'other'){
    document.getElementById('regotherdelivery').style.display = 'inline';
  } else {
    document.getElementById('regotherdelivery').style.display = 'none';
  }
}

function menuOver(mid){
    menuItem = document.getElementById(mid);
		menuTd   = document.getElementById('td'+mid);
		menuItem.src = '/img/'+mid+'_a.jpg';
		menuTd.style.backgroundColor = '#535353';
}
function menuOut(mid){
    menuItem = document.getElementById(mid);
		menuTd   = document.getElementById('td'+mid);
		menuItem.src = '/img/'+mid+'.jpg';
		menuTd.style.backgroundColor = '';
}

function printBusket(_ac_, _id_, _type_, _num_, _siteurl_){
	var request=null;
	// пытаемся создать объект для MSXML 2 и старше
	if(!request) try {
		request=new ActiveXObject('Msxml2.XMLHTTP');
	} catch (e){}
	// не вышло... попробуем для MSXML 1
	if(!request) try {
		request=new ActiveXObject('Microsoft.XMLHTTP');
	} catch (e){}
	// не вышло... попробуем для Mozilla
	if(!request) try {
		request=new XMLHttpRequest();
	} catch (e){}
	if(!request){
		// ничего не получилось...
		alert('Не удалось открыть данные. Воспользуйтесь более новой версией браузера.');
		return "";
	}
	d = new Date();
	// делаем запрос
	request.open('GET', "http://"+_siteurl_+"/inc/busk.inc.php?ac="+_ac_+"&id="+_id_+"&type="+_type_+"&num="+_num_+"&rndtime="+d.getTime(), false);
	request.send(null);
	document.getElementById('busket').innerHTML=request.responseText;

}
