<!--
function print_popup(url)
{ 
 window.open(url,'Print', 'width=650, height=300 ,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,top=10,left=100'); 
}

function help_popup(url)
{ 
 window.open(url,'Help', 'width=700, height=500,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,top=0,left=0'); 
}

function add_content(txt)
{
  document._form.text.value  += txt;
  document._form.text.focus();
}

function add_content_parent(txt)
{
  parent.document._form.text.value  += txt;
  parent.document._form.text.focus();
}

var selectedText = quoteAuthor = theSelection = '';
function quoteSelection()
{
    if(top.window.document._form) form = top.window.document._form; // Mozilla
	else if (parent._form) form = parent._form; // IE
	else if (document._form) form = document._form; // jak formularz nie jest w parencie
	
	theSelection = false;
	
	if (selectedText) theSelection = selectedText;
	else if (document.selection && document.selection.createRange) theSelection = document.selection.createRange().text; // Get text selection

	if (theSelection)
	{
		// Add tags around selection
		form.text.value += '[quote' + (quoteAuthor ? '=' + quoteAuthor + '' : '') + ']' + theSelection + '[/quote]\n';
		form.text.focus();
		selectedText = quoteAuthor = theSelection = '';
		return;
	}
}

function deselect_all()
{
  count = document._form.moderate.length;
  for (i=0; i < count; i++) 
  {
    document._form.moderate.options[i].selected = 0;
  }
}

function chngds(id)
{
  var style = document.getElementById(id).style;
  style.display = style.display == "none"? "block" : "none";
}

function mail (prefix, suffix)
{
  document.location.href='mailto:' + prefix + '@' + suffix;
}

var maxWidth = 500;
function scaleImage(im)
{
  if (typeof im.naturalWidth == 'undefined') im.naturalWidth = im.width;

  if (im.naturalWidth > maxWidth)
  {
    im.width = maxWidth;
    im.style.maxWidth = im.naturalWidth + 'px';
    im.className = 'resized';
    this.title = 'Click to Original Size';
    im.onclick = unscaleImage;
  }
}

function unscaleImage()
{
  if (this.width == maxWidth)
  {
    this.width = this.naturalWidth;
    this.style.borderWidth = '0px';
    this.title = 'Click to Small Size';
  }
  else
  {
    this.width = maxWidth;
    this.style.borderWidth = '1px';
    this.title = 'Click to Original Size';
  }
}
//-->
