/********************* getEl *******************/
function getEl(o){ //get elements
	if(document.getElementById) //dom
		return document.getElementById(o);
	else if (document.all) //M$	
		return document.all[o];
	else
		return false;	
}
//
// popLayer()
// Preloads images. Pleaces new image in lightbox then centers and displays.
//
function popLayer(o)
{
	o = getEl(o);
	//alert('Hello from popLayer');
	var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	
	o.height = o.style.height.replace(/([0-9])px/, "$1");
	o.width = o.style.width.replace(/([0-9])px/, "$1");	
	
	o.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - o.height) / 2) + 'px');
	o.style.left = (((arrayPageSize[0] - o.width) / 2) + 'px');
	//alert(arrayPageSize[0] + " , " + o.width);
	
	o.style.display = 'block';

	// Hide select boxes as they will 'peek' through the image in IE
	//selects = document.getElementsByTagName("select");
       //for (i = 0; i != selects.length; i++) {
               //selects[i].style.visibility = "hidden";
       //}
	return false;   
}

//
// hideLayer()
//
function hideLayer(o)
{
	// get objects
	o = getEl(o);

	// hide layer
	o.style.display = 'none';

	// make select boxes visible
	//selects = document.getElementsByTagName("select");
    //for (i = 0; i != selects.length; i++) {
		//selects[i].style.visibility = "visible";
	//}
	return false;	
}
function popWin(x,y,item,w,h){
	var urlstring="/includes/"+item+".cfm";
	window.open(urlstring,'popup','menubar=0,toolbar=0,location=0,directories=0,status=0,scrollbars=0,width='+w+',height='+h+',screenX='+x+',screenY='+y+',left='+x+',top='+y);
}

