// JavaScript Document
minus= new Image();
minus.src = "images/minus.gif";
function plus(id){
	if (document.getElementById("rastvor_"+id).style.display == 'none'){
		document.getElementById("plus_"+id).src = minus.src;
		document.getElementById("plus_"+id).height = 4;
		document.getElementById("plus_"+id).alt = '-';
		document.getElementById("rastvor_"+id).style.display = 'block';
	}
	else{
		document.getElementById("plus_"+id).src = "images/plus.gif";
		document.getElementById("plus_"+id).height = 11;
		document.getElementById("plus_"+id).alt = '+';
		document.getElementById("rastvor_"+id).style.display = 'none';
	}
}

function orphHook(evnt) {
  if (window.event) { evnt=window.event; }
  if ((evnt.ctrlKey && evnt.keyCode==32) || evnt==true) {
    txt='';
    if (document.getSelection) {
      txt=document.getSelection();
    } else if (document.selection) {
      txt=document.selection.createRange().text;
    } 
    if (txt.length>250) {
      alert('Выделенный фрагмент не должен превышать 250 символов');
      return false;
    }

    if (txt!='') {
      msg='Страница сайта:\n'+document.location.href+'\n\n'+
      'Орфографическая ошибка:\n'+txt;
      a=confirm(msg+'\n\nОтправить сообщение модератору?');
      if (a) {
        document.orphForm.orphMsg.value=msg;
        document.orphForm.orphOk.value='OK';
        document.orphForm.submit();
      }
    }
  }
}
document.onkeydown = orphHook;

function print_win(adress){
	window.open(adress,'printWin',"width=650,height=400,status=no,toolbar=no,menubar=no");
}

