function WebId_Search() {
  if (document.WebIdSearch.WebId.value == ""){
    alert("You need to enter Web Id")
    document.WebIdSearch.WebId.focus();
  } else {
  	document.WebIdSearch.submit();
  }
}
//---------------------------------------------------------------------------------------------

function openMail(baseURL) {
	window.open(baseURL, "Contact", "width=400,height=500,left=0,top=0,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollbars=0");
}
//---------------------------------------------------------------------------------------------
function ContactInfo(loc)
{
 	var Email = 'test@test.com';
  	URL = "+ComShare/User_Info.asp?Email="+Email+"&CompId=350&HomePath=&strTitle=JoyceRealty.com&loc="+loc;
   	window.open(URL,"myPortFolio","width=330,height=382,resizable=yes,scrollbars=no");
}

//---------------------------------------------------------------------------------------------
function ChangeUser(loc)
{
	URL = "+ComShare/GetEmail.asp?CompId=350&HomePath=&strTitle=JoyceRealty.com&loc="+loc;
			var x = 315;
			var y = 135;
			
			var thisWidth = x; // your window's width 
			var thisHeight = y; // your window's height 
			
			 if (document.all) {
        		var newScreenX = (screen.width - thisWidth) / 2;
				var newScreenY  = (screen.height - thisHeight) / 2;
    		} else {
        		if (document.layers) {
        			var newScreenX = (window.outerWidth - thisWidth) / 2;
					var newScreenY  = (window.outerHeight - thisHeight) / 2;
				} else {
        			var newScreenX = (800 - thisWidth) / 2;
					var newScreenY  = (600 - thisHeight) / 2;
				}
			}
	window.open(URL,"","width="+x+",height="+y+",top="+newScreenX+",left="+newScreenX+",resizable=yes");
}	
//---------------------------------------------------------------------------------------------
function Profile()
{
	if ('' == 'Y') {
  		var Email = '';
  		URL = "+ComShare/User_Info.asp?Email="+Email+"&CompId=350&HomePath=";
  		window.open(URL,"myPortFolio","width=330,height=382,resizable=yes,scrollbars=yes");
	}
}
//----------------------------------------------------------------------------------------------


function SelectSearch()
{
  if (document.ShowListing.SearchName.selectedIndex != 0)
  		document.ShowListing.submit();
}
//----------------------------------------------------------------------------------------------

function SelectSearchName()
{
    ElementVId = document.getElementById("View")
    ElementDId = document.getElementById("Delete")
    ElementLId = document.getElementById("Line")
   
    if ((ElementVId.style.visibility == "hidden") && (document.ShowListing.SearchName.selectedIndex != 0))
	{
	  ElementVId.style.visibility = "visible"
  	  ElementDId.style.visibility = "visible"
  	  ElementLId.style.visibility = "visible"
	}
    else
    {
      ElementVId.style.visibility = "hidden"
   	  ElementDId.style.visibility = "hidden"
   	  ElementLId.style.visibility = "hidden"

    }
}
//----------------------------------------------------------------------------------------------
function DeleteSearch()
{
  if (document.ShowListing.SearchName.selectedIndex != 0)
  {
    res = confirm("Are you sure you want to delete the Saved Search: "+document.ShowListing.SearchName.value)
    if (res == true)
    {  
      document.ShowListing.action = "+ComShare/DeleteSearch.asp"
	  document.ShowListing.submit();
	}
  }
}

//----------------------------------------------------------------------------------------------



//----------------------------------------------------------------------------------------------

function Next_FProperty()
{
  top.window.location = "home.asp"
}
//----------------------------------------------------------------------------------------------

function ImageLoadFailed() {
	window.event.srcElement.style.display = "None";
}
//----------------------------------------------------------------------------------------------
function CheckUser()
{
  if ('test@test.com' == '')
  {
    alert("Please sign in to MyPortFolio before creating alerts")
    return (false);
  }
}
//----------------------------------------------------------------------------------------------