function static_pages(action,static_page_id){
    xmlHttp=GetXmlHttpObject();
     if (xmlHttp==null)
      {
          alert ("Browser does not support HTTP Request");
          return;
      } 
     var url="controller_static_pages.php";

    var content = null; 
    var oEditor = FCKeditorAPI.GetInstance('content') ; 
    if(oEditor)  { 
        content = oEditor.GetXHTML(true); 
    } 
    var data="action="+action+"&static_page_id="+static_page_id+"&content="+encodeURIComponent(content);

   //  alert ("data is:"+data) ;
   //  alert ("content is: "+content);
    //alert(data);
     xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
            var response = xmlHttp.responseText;
      //alert(response);
      alert('The static page has been modified');
      location.reload(true);
            //document.getElementById("q_congratulation_title").innerHTML = '<img src="images/text_images/thank_u_question_first.gif" border="0" />';
         }        
    } 

    xmlHttp.open('POST', url, true);
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.setRequestHeader("Content-length", data.length);
    xmlHttp.setRequestHeader("Connection", "close");
     xmlHttp.send(data);        
}



