function ValidateForm(strForm)
{
	var x;
	var alertmsg;
	x=0;
	alertmsg = "The following fields are required: \n";
	if(strForm=="contactform")
	{
		if (document.getElementById("ename").value==""){alertmsg = alertmsg + "\nName";x = x + 1;}
		if (document.getElementById("eemail").value==""){alertmsg = alertmsg + "\nEmail";x = x + 1;}
		if (document.getElementById("esubject").value==""){alertmsg = alertmsg + "\nSubject";x = x + 1;}
		if (document.getElementById("ebody").value==""){alertmsg = alertmsg + "\nBody";x = x + 1;}
	}
	if(strForm=="searchform")
	{
		if (document.getElementById("search").value==""){alertmsg = alertmsg + "\nKeyword/Item";x = x + 1;}
	}
	if(x!=0){alert(alertmsg);return false;}
}

function popup(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus(); 
	}
}

function ShowPhoto()
{
	var pSrc = document.getElementById("photo").src;
	//alert(pSrc)
	popup('photo.asp?src='+pSrc,'','680','516','no');
}

function ShowHide(lnkObj,divObj)
{
	var dvObj = document.getElementById(divObj);
	var flag = dvObj.style.display;
	flag = (flag == "block") ? "none" : "block";
	dvObj.style.display = flag;
}

function ChangePhoto(strImage)
{
	document.getElementById("photo").src = "images/properties/"+strImage;
}