var xmlhttp;

function fixthumbnailjpg()
                  {
                   //http://i.ytimg.com/vi/byG9zpPCa8I/0.jpg
                   var imgs,i;
                   var patt=new RegExp("byG9zpPCa8I");
                   imgs=document.getElementsByTagName('img');
                   for(i in imgs)
                   {
                    if(patt.test(imgs[i].src)==true)
                     {
                      imgs[i].src='http://i.ytimg.com/vi/byG9zpPCa8I/3.jpg';
                     }
                    }
                  }

function loadXMLDoc(url, tabimg)
{
xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {

  xmlhttp.onreadystatechange=state_Change;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);

  document.getElementById('tabTherapy').src="images/nav_therapy.jpg";
  document.getElementById('tabQiQong').src="images/nav_qiqong.jpg";
  document.getElementById('tabYoga').src="images/nav_fitness.jpg";
  document.getElementById('tabHippo').src="images/nav_hippo.jpg";

  switch(tabimg)
  {
  case 1:
    document.getElementById('tabTherapy').src="images/nav_therapy_active.jpg";
    break;
  case 2:
    document.getElementById('tabQiQong').src="images/nav_qiqong_active.jpg";
    break;
  case 3:
    document.getElementById('tabFitness').src="images/nav_fitness_active.jpg";
    break;
  case 4:
    document.getElementById('tabHippo').src="images/nav_hippo_active.jpg";
  }


  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}

function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = "OK"
    document.getElementById('pgVariableContent').innerHTML=xmlhttp.responseText;
    }
  else
    {
    alert("Problem retrieving data:" + xmlhttp.statusText);
    }
  }
}