//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Ajax~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//=====Initialize=====   var request = false;   try {     request = new XMLHttpRequest();   } catch (trymicrosoft) {     try {       request = new ActiveXObject("Msxml2.XMLHTTP");     } catch (othermicrosoft) {       try {         request = new ActiveXObject("Microsoft.XMLHTTP");       } catch (failed) {         request = false;       }     }   }   if (!request)     alert("Error initializing XMLHttpRequest!");//=====Initialize======\\//Отправка сообщения   function sendAlert(text) {     var link = document.location;     var url = "/orfo.php?link=" + window.location + "&text=" + text + "&fix=" + prompt("Write the correct version.");     request.open("GET", url, true);     request.onreadystatechange = updatePage;     request.send(null);   i=0;	document.getElementById("orfo_message").innerHTML="<center>There is a sending<br><img src='/all/bar.gif'></center>";	for (i=1;i<10;i++)		{   			setTimeout("optic("+i+");",80*i);		}   }//Сообщение об окончании отправления   function updatePage() {     if (request.readyState == 4 & request.status == 200){     	 var response = request.responseText.split("|");          if (response[0]=='1') {          document.getElementById('orfo_message').innerHTML='The message about this mistake is sent. Thanks for the help!';       	  setTimeout('clear();',3000);          }else{          document.getElementById('orfo_message').innerHTML='The sending has got a mistake. E-mail about it!';          setTimeout('clear();',3000);          }         }   }//Обработка нажатияfunction orfo(e){	//Нажатие клавиш	if ((e.keyCode==13 || e.keyCode==10) & (e.ctrlKey | e.shiftKey)){	if (document.getSelection) {R=document.getSelection();} else if (document.selection && document.selection.createRange) {Q=document.selection.createRange();var R=Q.text;}		//Выделен ли текст		if (R!==''){			//Да\\			sendAlert(R);		}else{			//Нет\\			show("Allocate, please a site of the text with a mistake!");		}	//Нажатие клавиш \\	}//func \\}//Чистим сообщениеfunction clear() {for (i=1;i<=10;i++){   setTimeout("optic("+(10-i)+");",80*i);}setTimeout("full_clear();",1000);}//Вывод сообщенийfunction show (str){i=0;	document.getElementById("orfo_message").innerHTML=str;	for (i=1;i<10;i++)		{   			setTimeout("optic("+i+");",80*i);		}	setTimeout('clear();',3000);}function optic (i){ 	document.getElementById("orfo_message").style.opacity=i/10; 	document.getElementById("orfo_message").style.filter="alpha(opacity="+i*10+")";}function full_clear(){	document.getElementById("orfo_message").innerHTML="";}
