window.document.onkeydown=checkyap;

function checkyap(evt)
{
	var evt=(evt)?evt:((window.event)?event:null);
	if (evt.type=='keydown')
	{
		var charCode=(evt.charCode)?evt.charCode:evt.keyCode;
		if(evt.shiftKey&&(charCode==90))
		{
			sel=document.selection.createRange();
			if(sel.text.length>0)
			{
				domain1=window.location.host;
				search=window.location.search.replace("&","&amp;");
				
				if(domain1.substr(0,4)=="www.")
				{
					domain2=domain1.substr(4);
				}
				else
				{
					domain2="www."+domain1;
				}
				
				yapwindow=window.open('http://www.yandex.ru/yandsearch?text="'+sel.text+'" << (url="'+domain1+window.location.pathname+search+'" || url="'+domain2+window.location.pathname+search+'")', '_blank','');
				if (window.focus) {yapwindow.focus()}
			}
		}
	}
}