﻿// JScript File

var xmlHttp;

function colorBorder(strId){

  document.getElementById(strId).style.border="solid 2px #ff6600";


}

function deColorBorder(strId){

  document.getElementById(strId).style.border="solid 2px #000000";

}


function expandPhoto(tempStr){ 

var str1 = "eugene";
var str2 = "";;

 
  str2 = tempStr;
  
  xmlHttp=GetXmlHttpObject();

  if (xmlHttp==null)
  {
    alert ("Browser does not support HTTP Request");
    return;
  }

  var url="../viewsOfPlanet/photoExpand.php";

  url=url+"?place="+str1+"&placeno="+str2;
  
  //url=url+"&sid="+Math.random();
  xmlHttp.open("GET", url, true);
 
  xmlHttp.onreadystatechange = stateChanged; 

  xmlHttp.send(null);

}


function stateChanged() 
{ 
  //if (xmlHttp.readyState==4 && xmlHttp.Status==200)
  if ((xmlHttp.readyState==4) || (xmlHttp.readyState=="complete"))
  { 
    document.getElementById("photoDisplay").innerHTML=xmlHttp.responseText; 
  } 
}


function GetXmlHttpObject()
{
var xmlHttp = null;

  try
  {
   // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
  }
  catch (exception)
  {
   //Internet Explorer
    try
    {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (exception)
    {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  
  
  return xmlHttp;
}

