// JavaScript Document

function ajaxReplaceElement(url,id)
  {
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
	

	  
//   var url="weekly2.php";
//	url=url+"?week="+week;
//	url=url+"&sid="+Math.random();
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
		document.getElementById(id).innerHTML = xmlHttp.responseText;
        }
      }    

  }


function PrintContent(id)
	{
	var DocumentContainer = document.getElementById(id);
	var WindowObject = window.open("", "PrintWindow","width=900,height=900,top=80,left=80,toolbars=no,scrollbars=yes,status=no,resizable=yes");
	WindowObject.document.writeln(DocumentContainer.innerHTML);
	WindowObject.document.writeln("</div>");
	WindowObject.document.close();
	WindowObject.focus();
	WindowObject.print();
	WindowObject.close();
}

