
      //AJAX Section
       var xmlHttp=CreateAJAXObject();


        //scroller width
        var swidth=230;

        //scroller height
        var sheight=120;

        //background color
        var sbcolor='#aaaaaa';

        //scroller's speed
        var sspeed=1;



        //End of your messages
        // Begin the ticker code

        var resumesspeed=sspeed;
        function start() {
                                                    
                setTimeout("AdvertRequest()",5000);
                //setTimeout("LogoRequest()",2000);
                if (document.all) iemarquee(ticker);
                else if (document.getElementById)
                        ns6marquee(document.getElementById('ticker'));
        }
        
        function iemarquee(whichdiv){
                iediv=eval(whichdiv)
                sheight += 50;
                iediv.style.pixelTop=sheight;
                iediv.innerHTML=msg ;
                sizeup=iediv.offsetHeight;
                ieslide();
        }
        
        function ieslide(){
                if (iediv.style.pixelTop>=sizeup*(-1)){
                        iediv.style.pixelTop-=sspeed;
                        setTimeout("ieslide()",50);
                }
                else{
                        iediv.style.pixelTop=sheight;
                        ieslide();
                }
        }
        
        function ns6marquee(whichdiv){
                ns6div=eval(whichdiv);
                sheight += 50;
                ns6div.style.top=sheight + "px";
                ns6div.innerHTML=msg;
                sizeup=ns6div.offsetHeight;
                ns6slide();
        }
        function ns6slide(){
                if (parseInt(ns6div.style.top)>=sizeup*(-1)){
                        theTop = parseInt(ns6div.style.top)-sspeed;
                        ns6div.style.top = theTop + "px";
                        setTimeout("ns6slide()",50);
                }
                else {
                        ns6div.style.top = sheight + "px";
                        ns6slide();
                }
        }
        //advert section
        
function AdvertRequest()
{
  //alert(advertUrl);
  xmlHttp.open("GET",advertUrl+"?time=",true);
  xmlHttp.onreadystatechange=HandleRequest;
  xmlHttp.send(null);
}

 //////////////
function HandleRequest()
{
  //alert(xmlHttp.readyState);
  if(xmlHttp.readyState==4)
  {
      //alert("data: "+xmlHttp.responseText);
      if(xmlHttp.status==200)
      {
          try
          {
                  
              //alert("data: "+xmlHttp.responseText);
              var badgeImages=document.getElementById('advertContainer');
              var s=xmlHttp.responseText;
              s.replace(' ',"%20");
             // alert(s);
              badgeImages.innerHTML=s;
              //xmlHttp.responseText="is nothin";
              //alert("data: "+xmlHttp.responseText); 
                //setTimeout("LogoRequest()",2000);
                setTimeout("AdvertRequest()",2000);
          }
          catch(e)
          {
              //alert("error reading  the response: "+e.toString());
          }
      }
      else
      {                                                           
          //alert("problem retriving data: "+xmlHttp.statusText);
         //alert("problem data: "+xmlHttp.responseText);
      }
  }
}
/////////////////////////Logo request////////////////////////////////
        
function LogoRequest()
{
  //alert(advertUrl);
  xmlHttp.open("GET",logoUrl+"?time=",true);
  xmlHttp.onreadystatechange=HandleRequestLogo;
  xmlHttp.send(null);
}

 //////////////
function HandleRequestLogo()
{
  //alert(xmlHttp.readyState);
  if(xmlHttp.readyState==4)
  {
      
      //alert(xmlHttp.status);
      //alert("data: "+xmlHttp.responseText);
      if(xmlHttp.status==200)
      {
          try
          {
                  
              //alert("data: "+xmlHttp.responseText);
              var badgeImages=document.getElementById('logoContainer');
              var s=xmlHttp.responseText;
              s.replace(' ',"%20");
             // alert(s);
              badgeImages.innerHTML=s;
              //xmlHttp.responseText="is nothin";
              //alert("data: "+xmlHttp.responseText);
              setTimeout("AdvertRequest()",2000);
              //setTimeout("LogoRequest()",2000);
          }
          catch(e)
          {
              //alert("error reading  the response: "+e.toString());
          }
      }
      else
      {                                                           
          //alert("problem retriving data: "+xmlHttp.statusText);
         //alert("problem data: "+xmlHttp.responseText);
      }
  }
}
         
///////AJAX Object Creation/////////////

function CreateAJAXObject()
{
  //alert("creating xmlHttp object");
  var xmlHttp;
  try
  {
      xmlHttp=new XMLHttpRequest();
  }
  catch(e)
  {
      var xmlHttpVersions=new Array('MSXML2.XMLHTTP.7.0',
                                    'MSXML2.XMLHTTP.6.0',
                                      'MSXML2.XMLHTTP.5.0',
                                      'MSXML2.XMLHTTP.4.0',
                                      'MSXML2.XMLHTTP.3.0',
                                      'MSXML2.XMLHTTP',
                                      'Microsoft.XMLHTTP');
      for(var i=0;i<xmlHttpVersions.length && !xmlHttp;i++)
      {
          try
          {
              xmlHttp=new ActiveXObject(xmlHttpVersions[i]);
          }
          catch(e)
          {
              //alert(e.toString());
          }
      }
  }
  if(!xmlHttp)
     alert("error handling AJAXOBJECT. contact muktadir");
  else
  {
          //alert("return :"+xmlHttp);
          return xmlHttp;
  }


}