// JavaScript Document

if(document.images) {
pics = new Array();
pics[1] = new Image();
pics[1].src = "/images/header-nav/home.jpg";
pics[2] = new Image();
pics[2].src = "/images/header-nav/home_over.jpg";
pics[3] = new Image();
pics[3].src = "/images/header-nav/firm_overview.jpg";
pics[4] = new Image();
pics[4].src = "/images/header-nav/firm_overview_over.jpg";
pics[5] = new Image();
pics[5].src = "/images/header-nav/practice_areas.jpg";
pics[6] = new Image();
pics[6].src = "/images/header-nav/practice_areas_over.jpg";
pics[7] = new Image();
pics[7].src = "/images/header-nav/contact_us.jpg";
pics[8] = new Image();
pics[8].src = "/images/header-nav/contact_us_over.jpg";
}

function swap(from,to) {
if(document.images) {
document.images[from].src = pics[to].src;
}
}

var xmlHttp;

function playvideo(video)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support Ajax, please update!");
 return;
 }
var url="flashplayer.php";
url=url+"?video="+video;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function playvideoLarge(video)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support Ajax, please update!");
 return;
 }
var url="flashplayerlarge.php";
url=url+"?video="+video;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("flashvideo").innerHTML=xmlHttp.responseText; 
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}