﻿<!--
function CreateXmlHttpRequestObject()
{
 var xmlHttpObj;
 if(window.XMLHttpRequest)
  xmlHttpObj = new XMLHttpRequest();
 else
  try
  {
   xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");
  } 
  catch (e)
  {
   xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP");
  } 
 return xmlHttpObj;  
}

function getpost( num )
{
 var doc = "<center><br><br>";
 doc += "<div style=\"border: dashed 2px red;padding:15px;width:150px;color:red;\">";
 doc += "<img src=\"css/loading.gif\" border = \"0\" /><br><br>";
 doc += "در حال بارگذاری . . .</div></center>";
 document.getElementById("jsbody").innerHTML = doc;
 xmlHttpObj = CreateXmlHttpRequestObject();
 if(xmlHttpObj)
 {
  xmlHttpObj.open("GET","getpost.aspx?no="+num,true);
  xmlHttpObj.onreadystatechange = function()
  {
   if(xmlHttpObj.readyState == 4)
   {
    doc = xmlHttpObj.responseText;
    document.getElementById("jsbody").innerHTML = doc;
   }
  }
  xmlHttpObj.send(null);
 }
 window.scroll(0,0);
}

function showhide( num )
{
 if( document.getElementById( "part" + num ).style.display == "none" )
 {
  document.getElementById( "part" + num ).style.display = "block";
  document.getElementById( "menu" + num ).src = "css/uparrow.png";
 }    
 else
 {
  document.getElementById( "part" + num ).style.display = "none";
  document.getElementById( "menu" + num ).src = "css/downarrow.png";
 }
}

// -->
