function PopUpPhoto(mylink, windowname, WinWidth, WinHeight, WinLeft, WinTop)
{

	var href;
	var sProperties;
	
	WinWidth = 640;
	WinHeight = 500;

	if (! window.focus)
		return true;

	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;

	if(href == null)
		href=window.location.href;
		
	WinLeft=(screen.width  - WinWidth)/2;
	WinTop=(screen.height - WinHeight)/2;

	sProperties="width=" + WinWidth + ",height=" + WinHeight + ",scrollbars=Yes resizable=no,left=" + WinLeft + ",top =" + WinTop;

	//window.showModalDialog(href, windowname, sProperties);
	window.open(href, "PropertyPhotos", sProperties,false);

	return false;
}

function PopUpDelete(mylink, windowname, WinWidth, WinHeight, WinLeft, WinTop)
{

	var href;
	var sProperties;


	if (! window.focus)
		return true;

	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;

	if(href == null)
		href=window.location.href;
		
	WinLeft=(screen.width  - WinWidth)/2;
	WinTop=(screen.height - WinHeight)/2;

	sProperties="width=" + WinWidth + ",height=" + WinHeight + ",scrollbars=Yes resizable=no,left=" + WinLeft + ",top =" + WinTop;

	//window.showModalDialog(href, windowname, sProperties);
	window.open(href, "DeletePhotos", sProperties,false);

	return false;
}

function PopUpRent(mylink, windowname, WinWidth, WinHeight, WinLeft, WinTop)
{

	var href;
	var sProperties;


	if (! window.focus)
		return true;

	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;

	if(href == null)
	{
		temp = location.href;
		var thref=temp.split("?");
		href = "ApplyRent.php?" + thref[1];
	}		

	WinLeft=(screen.width  - WinWidth)/2;
	WinTop=(screen.height - WinHeight)/2;

	sProperties="width=" + WinWidth + ",height=" + WinHeight + ",scrollbars=Yes resizable=Yes,left=" + WinLeft + ",top =" + WinTop;

	//window.showModalDialog(href, windowname, sProperties);
	window.open(href, "RentApplication", sProperties,false);

	return false;
}

function PopUpInform(mylink, windowname, WinWidth, WinHeight, WinLeft, WinTop)
{

	var href;
	var sProperties;
	
	if (! window.focus)
		return true;

	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;
	
	if(href == null)
	{
		temp = location.href;
		var thref=temp.split("?");
		href = "InformFriend.php?" + thref[1];
	}
		
	WinLeft=(screen.width  - WinWidth)/2;
	WinTop=(screen.height - WinHeight)/2;

	sProperties="width=" + WinWidth + ",height=" + WinHeight + ",scrollbars=Yes resizable=No,left=" + WinLeft + ",top =" + WinTop;

	//window.showModalDialog(href, windowname, sProperties);
	window.open(href, "InformFriend", sProperties,false);

	return false;
}

function PopUpProfile(mylink, windowname, WinWidth, WinHeight, WinLeft, WinTop)
{

	var href;
	var sProperties;


	if (! window.focus)
		return true;

	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;

	if(href == null)
		href=window.location.href;
		
	WinLeft=(screen.width  - WinWidth)/2;
	WinTop=(screen.height - WinHeight)/2;

	sProperties="width=" + WinWidth + ",height=" + WinHeight + ",scrollbars=Yes resizable=No,left=" + WinLeft + ",top =" + WinTop;

	//window.showModalDialog(href, windowname, sProperties);
	window.open(href, "Landlord", sProperties,false);

	return false;
}
function PopUpTerms(mylink, windowname, WinWidth, WinHeight, WinLeft, WinTop)
{

	var href;
	var sProperties;
	
	if (! window.focus)
		return true;

	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;
	
	WinLeft=(screen.width  - WinWidth)/2;
	WinTop=(screen.height - WinHeight)/2;

	sProperties="width=" + WinWidth + ",height=" + WinHeight + ",scrollbars=Yes resizable=No,left=" + WinLeft + ",top =" + WinTop;

	//window.showModalDialog(href, windowname, sProperties);
	window.open(href, "Terms", sProperties,false);

	return false;
}

function PopUpInfo(mylink, windowname, WinWidth, WinHeight, WinLeft, WinTop)
{

	var href;
	var sProperties;
	
	if (! window.focus)
		return true;

	if (typeof(mylink) == 'string')
		href=mylink;
	else
		href=mylink.href;
	
	WinLeft=(screen.width  - WinWidth)/2;
	WinTop=(screen.height - WinHeight)/2;

	sProperties="width=" + WinWidth + ",height=" + WinHeight + ",scrollbars=Yes resizable=No,left=" + WinLeft + ",top =" + WinTop;

	//window.showModalDialog(href, windowname, sProperties);
	window.open(href, "PropertyInfo", sProperties,false);

	return false;
}
