/*------------------------------------------------------------------------------
  --      Author: Allen Porter
  --        Date: 07/30/2009
  -- Description: (optional)
  --
  -- www.dataforge.com
  -------------------------------------------------------------------------------
  -- Changing History:
  -- Changed By    Date Changed     Reason    
  -------------------------------------------------------------------------------
  -- 
  -------------------------------------------------------------------------------*/
var m_blogajax = null;
var m_sServiceBlog = "Service/BlogService.asp";
var m_commandBlog = {
       get_newest_posts:"J188A154E123ldY2F227Dq24O189g192{153yR67JM89a220K]54I226}V42t204"
    };


function getPosts(){
getArt();
}

function getArt(){

if ( m_blogajax == null ){
        m_blogajax = new jsAJAX();
        }

   var sPara = "cmd=" + m_commandBlog.get_newest_posts.encode() +
               "&aid=9";
	   
	   m_blogajax.exec(
       m_sServiceBlog, sPara, null, null,
       function(str){
          try{
             eval("var oRet = " + str);
            
             if ( oRet.status == 0 ){
                showPosts("Art",oRet.data,"art-healan");
                getJackie();                
              }
          }catch(e){}
       }
       );
	}
	
function getJackie(){

if ( m_blogajax == null ){
        m_blogajax = new jsAJAX();
        }

   var sPara = "cmd=" + m_commandBlog.get_newest_posts.encode() +
               "&aid=3";
	   
	   m_blogajax.exec(
       m_sServiceBlog, sPara, null, null,
       function(str){
          try{
             eval("var oRet = " + str);
            
             if ( oRet.status == 0 ){
                showPosts("Jackie",oRet.data,"jackie-roberts");
                getChris();
                             }
          }catch(e){}
       }
       );
	}

function getChris(){

if ( m_blogajax == null ){
        m_blogajax = new jsAJAX();
        }

   var sPara = "cmd=" + m_commandBlog.get_newest_posts.encode() +
               "&aid=4";
	   
	   m_blogajax.exec(
       m_sServiceBlog, sPara, null, null,
       function(str){
          try{
             eval("var oRet = " + str);
            
             if ( oRet.status == 0 ){
                showPosts("Chris",oRet.data,"chris-roberts");
                getCarl();
                
                             }
          }catch(e){}
       }
       );
	}

function getCarl(){

if ( m_blogajax == null ){
        m_blogajax = new jsAJAX();
        }

   var sPara = "cmd=" + m_commandBlog.get_newest_posts.encode() +
               "&aid=10";
	   
	   m_blogajax.exec(
       m_sServiceBlog, sPara, null, null,
       function(str){
          try{
             eval("var oRet = " + str);
            
             if ( oRet.status == 0 ){
                showPosts("Carl",oRet.data,"carl-hamlett");
                getJosh();
                
                             }
          }catch(e){}
       }
       );
	}


function getJosh(){

if ( m_blogajax == null ){
        m_blogajax = new jsAJAX();
        }

   var sPara = "cmd=" + m_commandBlog.get_newest_posts.encode() +
               "&aid=5";
	   
	   m_blogajax.exec(
       m_sServiceBlog, sPara, null, null,
       function(str){
          try{
             eval("var oRet = " + str);
            
             if ( oRet.status == 0 ){
                showPosts("Josh",oRet.data,"josh-healan");
                getIndustry();
                
                             }
          }catch(e){}
       }
       );
	}
	
		
function getIndustry(){

    if ( m_blogajax == null ){
        m_blogajax = new jsAJAX();
        }

   var sPara = "cmd=" + m_commandBlog.get_newest_posts.encode() +
               "&aid=8";
	   
	   m_blogajax.exec(
       m_sServiceBlog, sPara, null, null,
       function(str){
          try{
             eval("var oRet = " + str);
            
             if ( oRet.status == 0 ){
                showPosts("industry_news",oRet.data,"industry-news");
                
                
                             }
          }catch(e){}
       }
       );
	}

function showPosts(user,arrData,wpUser){
var postDiv = document.getElementById(user+"_posts");

for ( var i = 0; i < arrData.length; i ++ ){
     postDiv.innerHTML += "<a href=http://www.dataforge.com/wpblog/index.php/" + wpUser + " style=\"font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; color: #0B4FA0\">" + arrData[i].title.decode() + "</a><br /><br />";
   }
  }

