function PhotoTableSwap(imgName)
{
	// turn every image off first
	ImageOff("corporateImg");
	ImageOff("claimsImg");
	ImageOff("lawfirmsImg");
	
	// switch on the specified image
	ImageSwap(imgName);

	// swap out the message and link images
	var imageMessage = (browser.IsDOM)
		? document.getElementById("messageImg")
		: document["messageImg"];

	var imageLink = (browser.IsDOM)
		? document.getElementById("linkImg")
		: document["linkImg"];

	var imagePhoto = (browser.IsDOM)
		? document.getElementById("photoImg")
		: document["photoImg"];

	if (imageMessage && 
		imageMessage.src && 
		imageLink && 
		imageLink.src &&
		imagePhoto &&
		imagePhoto.src)
	{
		imageMessage.src = window["img_" + imgName + "MessageLink"] 
			? window["img_" + imgName + "MessageLink"].src
			: imageMessage.src;
		imageLink.src = window["imgOn_" + imgName + "MessageLink"] 
			? window["imgOn_" + imgName + "MessageLink"].src 
			: imageLink.src;
		imagePhoto.src = window["img_" + imgName + "Photo"] 
			? window["img_" + imgName + "Photo"].src
			: imagePhoto.src;
	}
	
	var linkMessage = (browser.IsDOM)
		? document.getElementById("messageLink")
		: document.anchors["messageLink"];

	var linkLink = (browser.IsDOM)
		? document.getElementById("linkLink")
		: document.anchors["linkLink"];
		
	if (linkMessage != null &&
		linkLink != null)
	{
		linkMessage.href = window[imgName + "Link"];
		linkLink.href = window[imgName + "Link"];
	}
}

function ImageOff(imgName)
{
	if (!window["img_" + imgName])
	{
		return;
	}
	
	var image = (browser.IsDOM)
		? document.getElementById(imgName)
		: document[imgName];

	if (image && image.src)
	{
		image.src = window["img_" + imgName].src;
	}
}

function TourPopUp()
{
    var height = 768;
    var width = 1024;
    var top = (screen.availHeight - height) / 2;
	var left = (screen.availWidth - width) / 2;
	popUpManager.WindowOpen("TourPopUp", "/Tour.htm", "TourPopUpWin", "scrollbars=no,resizable=no,status=no,toolbar=no,menubar=no,titlebar=no,location=no,top=" + top + ",left=" + left + ",width=" + width + ",height=" + height, false);
}

function PopUpWindow(url, height, width, attributes)
{
	
		var attList;
		
		if (typeof(popUpManager) != "undefined")
		{
		   if(attributes!= "")
		   {
			  attList = attributes + ",width=" + width + ",height=" + height;
			  popUpManager.WindowOpen('NewWin', url, 'newWin', attList);
		   }
		   else			   
		   {	
			   attList = "status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=no,left=10,top=10" + ",width=" + width + ",height=" + height;	   
			   popUpManager.WindowOpen('NewWin', url, 'newWin', attList);
		   }
		}
}
//If the below functions are not referenced AS IS here, then the Plus and Minus images won't toggle
function $(id) {
	return document.getElementById(id);
}

function show(id)
{
	
	im = $("s" + id) ;

	imsrc = new String(im.src);  
	
	if (imsrc.indexOf("/images/li_callout.gif") > -1 )
	{
		im.src="/images/li_callout_open.gif" ;
	}
	else
	{
		im.src="/images/li_callout.gif" ;
	}
	
}

