﻿// JScript File

function TrackProfile(LoggedInProfileId, Hash, other, type)
{
	var answer = confirm("Are you sure? Please click OK to confirm.")
	if (answer)
	{
        AjaxWebService.TrackProfile(LoggedInProfileId, Hash, other, type, OnComplete, OnError, TimeOutHandler);
	}
}


function FlagProfile(profile)
{

	var answer = confirm("Are you sure you want to Flag " + profile + " for inappropriate content/spam?")
	if (answer)
	{
        AjaxWebService.FlagProfile(profile, OnComplete, OnError, TimeOutHandler);
	}
	
}

function FlagProfileMainPhoto(profile)
{

	var answer = confirm("Are you sure? Please click OK to confirm.")
	if (answer)
	{
        AjaxWebService.FlagProfileMainPhoto(profile, OnComplete, OnError, TimeOutHandler);
    }
}

function FlagProfilePhoto(profile, Id)
{

	var answer = confirm("Are you sure? Please click OK to confirm.")
	if (answer)
	{
        AjaxWebService.FlagProfilePhoto(profile, Id, OnComplete, OnError, TimeOutHandler);
    }
    
}

function echoNow(inStr)
{
    AjaxWebService.Echo(inStr, OnComplete, OnError, TimeOutHandler);
        
}

function OnComplete(result)
{           
    alert(result);
}
    
function OnError(error)
{
  alert("Sorry, an error occured, please try again a bit later.");
  //alert("Error: " + result.get_message());
}

function TimeOutHandler(result)
{
   alert("Timeout :" + result);
}

if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();
