			function mouseover (what)
		{		
		if (document.getElementById(what).className != "selected")
		{
		    document.getElementById(what).style.cursor = 'hand';
			document.getElementById(what).className = "mouseover";
		}
		}
		
		function mouseout (what)
		{	
		if (document.getElementById(what).className != "selected")
		{	
			document.getElementById(what).className = "mouseout";
		}
		}
		
	function hyperover (what)
		{		
		    document.getElementById(what).style.cursor = 'hand';
			document.getElementById(what).style.textDecoration = "UnderLine";
		}
		
		function hyperout (what)
		{	
			document.getElementById(what).style.textDecoration = "none";
		}
		
		function showrestable(theid)
		{
		mywin = window.open("addcom.aspx?artID=" + theid ,"","width=550,height=320");
		mywin.moveTo(200,200);
         }
	
	function closetable(what)
		{
		document.getElementById(what).style.display = "none";
         }
         
	function getscreensize()
	{
	var screenW = 800;
	var screenH = 500;
	
	screenW = screen.width;
	screenH = screen.height;
	
	if (screenW < 801)
	{
	   var url;
	   var what;
	   var cut;
	   var id;
	   
	   var regexS = "[\\?&]" + "size" + "=([^&#]*)";
	   var regex = new RegExp(regexS);
       var tmpURL = window.location.href;
       var paramVal = regex.exec(tmpURL);

	   if (paramVal)
	   {
        url = paramVal[1];
	   }
		else
	   {
		url="";
	   }
	   
       if (url != "small")
			{
			    var newurl =  "main.aspx?size=small"
       			
       			regexS = "[\\?&]" + "what" + "=([^&#]*)";
				regex = new RegExp(regexS);
				var paramVal1 = regex.exec(tmpURL);

				if (paramVal1)
				{
				what = paramVal1[1];
				newurl = newurl + "&what=" + what;
				}
	 
				regexS = "[\\?&]" + "cut" + "=([^&#]*)";
				regex = new RegExp(regexS);
				var paramVal2 = regex.exec(tmpURL);

				if (paramVal2)
				{
				cut = paramVal2[1];
				newurl = newurl + "&cut=" + cut;
				}
	   
				regexS = "[\\?&]" + "siv" + "=([^&#]*)";
				regex = new RegExp(regexS);
				var paramVal4 = regex.exec(tmpURL);

				if (paramVal4)
				{
				newurl = newurl + "&siv=" + paramVal4[1];
				}
				
				regexS = "[\\?&]" + "page" + "=([^&#]*)";
				regex = new RegExp(regexS);
				var paramVal5 = regex.exec(tmpURL);

				if (paramVal5)
				{
				newurl = newurl + "&page=" + paramVal5[1];
				}
				
				regexS = "[\\?&]" + "id" + "=([^&#]*)";
				regex = new RegExp(regexS);
				var paramVal3 = regex.exec(tmpURL);

				if (paramVal3)
				{
				id = paramVal3[1];
				newurl = newurl + "&id=" + id;
				}
				else
				{
				regexS = "[\\?&]" + "ID" + "=([^&#]*)";
				regex = new RegExp(regexS);
				paramVal3 = regex.exec(tmpURL);
				
				if (paramVal3)
				{
				id = paramVal3[1];
				newurl = newurl + "&id=" + id;
				}
				}
				
				document.location.href = newurl; 
				}
				else
				{
	   			setsize();
				}
	}
}

function changetext(sh, sh1, sh2, size, i, what, cut, subject, image, subtext, theid)
{
 var str = "<IMG style='Border: #cccccc 3px double;' alt='אין תמונה' src='http://www.shoresh.org.il/usersfiles/articlesimages/" + image + "'>"
 document.getElementById("mainimage").innerHTML = str;
 document.getElementById("mainimage").style.width  = 110;
 document.getElementById("mainimage").style.height  = 110;
 
 str = "<p align=right><A HREF='http://www.shoresh.org.il/spages/articles/main.aspx?what=" + escape(what) + "&cut=" + escape(cut);
 
 if (size=="small")
 {
 str = str + "&size=small";
 }
 
 str = str + "' style='color:#003333'>" + sh + what + ", " + cut + "</A>"; 

 document.getElementById("headertext").innerHTML = str;

 str = "<p align=right><A HREF='http://www.shoresh.org.il/spages/articles/main.aspx?id=" + theid;
   
      if (size=="small")
        {
          str = str + "&size=small";
        }
  
        str = str + "' style='color:#003333;font-weight:bold;'>" + subject + "</A></p>";
        str = str + "<p style='font-size=11px; color:#003366'>" + subtext + "<br>";
        
  document.getElementById("maintext").innerHTML = str;
  
   str = "<p align=right class='mylinks'><A HREF='http://www.shoresh.org.il/spages/articles/main.aspx?id=" + theid;
        if (size=="small")
        {
            str = str + "&size=small";
        }
        
        str = str + "' class='mylinks' style='color:#003333'>" + sh1 + "</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF='http://www.shoresh.org.il/spages/articles/main.aspx?what=" + escape(what);
         if (size=="small")
        {
            str = str + "&size=small";
        }
        
        str = str + "' class='mylinks' style='color:#003333'>" + sh2 + what + "</A>";
        
        document.getElementById("linkstext").innerHTML = str;
          
   for (var o=0; o<4 ; o++ )
     {
       document.getElementById("cell" + o).style.border = "";
       document.getElementById("cell" + o).style.backgroundColor = "#ffffff";
     }
     
     document.getElementById("cell" + i).style.border = "#cccccc 1px solid";
     document.getElementById("cell" + i).style.backgroundColor = "#f5f5f5";
}  