// JavaScript Document

var xmlHttp;
var photoid;

function largePhoto(id)
{ 
	photoid = id;
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	alert ("Browser does not support HTTP Request");
	return;
	} 
	var url="/getphoto.cfm";
	url=url+"?photoid="+id;
	//alert(url)
	xmlHttp.onreadystatechange=stateChanged ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		//getImgSize(xmlHttp.responseText);
		var windowSpecs = "location=no, scrollbars=no, menubars=no, toolbars=no, resizeable=no, left=150, top=75, width=410, height=410"
		popup_window = window.open('/getPhoto.cfm' + '?photoid='+photoid, 'DSA', windowSpecs);
		popup_window.focus();
		//alert(xmlHttp.responseText);
	} 
} 

function getImgSize(imgSrc)
{
	alert('in here');
var newImg = new Image();
newImg.src = imgSrc;
var height = newImg.height;
var width = newImg.width;
alert(height + ' and ' + width);
}

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
	objXMLHttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
	objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return objXMLHttp;
}