var data = "";
function getPrint(id)
{
    data = document.getElementById(id).innerHTML;
    window.open('/print.htm','_blank','height=700,width=800,status=0,toolbar=0,scrollbars=1,menubar=1');
}

var data = "";
function getReview(id)
{
    data = document.getElementById(id).innerHTML;
    window.open('/review.htm','_blank','height=500,width=600,status=0,toolbar=0,scrollbars=1,menubar=1');
}


if (document.selection || document.getSelection) Q = true; else Q = false; 
var copytxt = '';

function copy_text() 
{ 
	copytxt = '';
	if (document.getSelection && (document.getSelection() != '')) copytxt = '[quote]' + document.getSelection() + '[/quote]'; 
	  else if (document.selection && (document.selection.createRange().text != '')) copytxt = '[quote]' + document.selection.createRange().text + '[/quote]';
} 

function paste_text(elname) 
{
	var elm = document.getElementById(elname);
	elm.value += copytxt;
}

function count_simbols(obj, max)
{
  var s_count = obj.value.length;
  $('s_count').set('value', s_count);
}

function rand() {return Math.floor( Math.random() * (100000 - 1 + 1) ) + 1;}
