function toggleMoreText (oAnc,spanID) {
	if (oAnc.innerHTML == 'close') {
		document.getElementById(spanID).className = 'hid';
		oAnc.innerHTML = '...read more';
	} else {
		document.getElementById(spanID).className = 'visNoBr';
		oAnc.innerHTML = 'close';
	}
}

function toggleNearByPlaces (oAnc,linkText) {
	if (oAnc.innerHTML == 'close') {
		document.getElementById(linkText).style.display = "none";
		oAnc.innerHTML = 'see more nearby '+linkText+' &raquo;';
	} else {
		document.getElementById(linkText).style.display = "block";
		oAnc.innerHTML = 'close';
	}
}
//this works with image tags. If image is missing replace with the one provided as param
function replaceMissingImage(srcEle,newImage){
	srcEle.src=newImage;
}

function openPop (url, winName, width, height, scroll) {
	var left, top;
	left = (screen.availWidth-width)/2;
	top = (screen.availHeight-height)/2;
	if (scroll == null) scroll = "no";
	var oWnd = window.open(url, winName, 'menubar=no,location=no,directories=no,scrollbars=' + scroll + ',resizable=no,status=no,toolbar=no,'
				+ 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
	if (oWnd != null) 
		oWnd.focus();
	
}