

var divopen = null	
	
	//displays hidden div describing what tags are- homepage right side
	function DisplayDiv(id)
	{
	 if (divopen == null)
		{
		document.getElementById(id).style.display='block';
		divopen = 1;
		}
	else
		{
		document.getElementById(id).style.display='none';
		divopen = null ;
		}
	}
	



	//var lastdisplayed='div1';
	//var lastspan='span1'
	
	function DisplayItmTxt(id)
	{
		var state = document.getElementById(id).style.display;
		
		/*var imgid="img" + id;
		if (lastdisplayed != null)
		{
			//lastimgid = "img" + lastdisplayed;
			document.getElementById(lastdisplayed).style.display='none';
			//document.getElementById(lastspan).style.display='none';
			//document.getElementById(lastimgid).src='images/ques.jpg';
			//document.getElementById(lastimgid).alt='לחץ כאן להסבר';
		}
		*/
		
		if (state != 'block')
		{
			document.getElementById(id).style.display='block';
			//lastdisplayed = id;
			//document.getElementById(spanid).style.display='block';
			//lastspan= spanid;
			//document.getElementById(imgid).src='images/x.png';
			//document.getElementById(imgid).alt='לחץ כאן לסגור הסבר';
		}
		else
		{
			document.getElementById(id).style.display='none';
			//document.getElementById(spanid).style.display='none';
			//document.getElementById(imgid).src='images/ques.jpg';
			//document.getElementById(imgid).alt='לחץ כאן להסבר';
		}
	}

 

function printContent(id1){

      str=document.getElementById(id1).innerHTML + '<br>' //+ document.getElementById(id2).innerHTML

      newwin=window.open('','printwin','left=100,top=100,width=400,height=900')

      newwin.document.write('<HTML>\n<HEAD>\n')

      newwin.document.write('<TITLE>Print Page</TITLE>\n')

      newwin.document.write('<script>\n')

      newwin.document.write('function chkstate(){\n')

      newwin.document.write('if(document.readyState=="complete"){\n')

      newwin.document.write('window.close()\n')

      newwin.document.write('}\n')

      newwin.document.write('else{\n')

      newwin.document.write('setTimeout("chkstate()",3000)\n')

      newwin.document.write('}\n')

      newwin.document.write('}\n')

      newwin.document.write('function print_win(){\n')

      newwin.document.write('window.print();\n')

      newwin.document.write('chkstate();\n')

      newwin.document.write('}\n')

      newwin.document.write('<\/script>\n')

      newwin.document.write('</HEAD>\n')

      newwin.document.write('<BODY style=font-size:14px; dir=rtl onload="print_win()">\n')

      newwin.document.write(str)

      newwin.document.write('</BODY>\n')

      newwin.document.write('</HTML>\n')

      newwin.document.close()

}

