function checking_weekend(i_this,i_type)
{ var w_first_tdElement = i_this.parentNode;
  var w_previousSibling = w_first_tdElement.previousSibling;
  var w_color;
  if (i_type == 1) {w_color = "lightyellow";} else {w_color = "silver";}
  try {  
  if (w_previousSibling != "undefined")
  {w_previousSibling.style.backgroundColor=w_color;}
 
  while (w_previousSibling.previousSibling != "undefined" && w_previousSibling.previousSibling.getAttribute("name") == "weekend_box") 
 {w_previousSibling = w_previousSibling.previousSibling;
  w_previousSibling.style.backgroundColor=w_color;
 }} catch(e) {} 
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function checking_fullWeek(i_this,i_type)
{
  var w_first_tdElement = i_this.parentNode;
  var w_nextSibling = w_first_tdElement.nextSibling;
  
  if (i_type == 1) {w_color = "white";} else {w_color = "silver";}
  
  if (w_nextSibling != "undefined" && w_nextSibling.getAttribute("name") != null)
  {w_nextSibling.style.backgroundColor=w_color;}
  
  try {  
  while (w_nextSibling != "undefined") 
  {
    w_nextSibling = w_nextSibling.nextSibling;
//alert(w_nextSibling.getAttribute("name"));
    if (w_nextSibling.getAttribute("name") != null)
    {
      try {
      if (w_nextSibling.getAttribute("name") == "weekend_box" && i_type==1)
      {w_nextSibling.style.backgroundColor="lightyellow";}
      else if (w_nextSibling.getAttribute("name") == "today_box" && i_type==1)
      {w_nextSibling.style.backgroundColor="#FFCF86";}
      else
      {w_nextSibling.style.backgroundColor=w_color;}

      if (w_nextSibling.nextSibling.childNodes[0].getAttribute("name") == "weekend_link")
      {break;}
      }catch (e) {}
    }
  }}catch (e) {}
}
