//layer hiddener
function shSec(id)
{
	if(!document.getElementById) return;
	var o=document.getElementById(id);
	if(o)
	{
		if(o.style.display=="block")
			o.style.display="none";
		else
			o.style.display="block";
	}
}

//text area size changer
function emTSize(id)
{
	if(!document.getElementById) return;
	var o=document.getElementsByName(id)[0];
	if(o)
	{
		if(o.style.width!="350px")
		{
			o.style.width="350px";
			o.style.height="200px";
		}
		else
		{
			o.style.width="200px";
			o.style.height="120px";
		}
	}
}

//popup opener
function go(wintype,w,h,command)
{
  st=new String("toolbar=no,directories=no,status=no,scrollbars=no,menubar=no,width="+w+",height="+h);
  picture=window.open(wintype+command,"picture",st);
  picture.window.focus();
}

//printfunction
function printpage()
{
window.print();
}

//article meretezes
function set_item_size( id, incr, limit )
{
   var the_elem = document.getElementById( id );
   var font_size = "";
   
   if( the_elem != null) {
	   if( the_elem.currentStyle != undefined )
	   {
		 font_size = the_elem.currentStyle.fontSize;
	   }
	   else
	   {
		   var the_style = window.getComputedStyle( the_elem, "" );
		   font_size = the_style.getPropertyValue( 'font-size' );
	   }
	   /*alert(font_size);*/
	   font_metric = font_size.substring( font_size.length - 2, font_size.length );
	   font_size = font_size.substring( 0, font_size.length - 2 );
	   /*alert(font_size);
	   alert(font_metric);*/
	   if( incr == true && font_size < limit )
	   {
		   font_size = parseInt(font_size) + 2;
	   }
	   //else
	   if( incr != true &&  font_size > limit )
	   {
		   font_size = parseInt(font_size) - 2;
	   }
	   /*alert(font_size);*/
	/* the_elem.style.fontSize = font_size + 'pt';*/
	   the_elem.style.fontSize = font_size + font_metric;
	   /*alert(the_elem.style.fontSize);*/
   }
}

function big()
{
	set_item_size( 'rtf', true, 20 );
	/*set_item_size( 'rtf', true, 1.6 );*/
}

function small()
{
   set_item_size( 'rtf', false, 8 );
   /*set_item_size( 'rtf', false, 17 );*/
}

/* popup */
	function doPopup2(oid, printpage, artpage)
			{
        window.open(printpage + "?artid=" + oid + "&page=" + artpage, "", "width=465, height=372, top=100, left=150, scrollbars");
			}
