function HapIsDefined(x)
{
	if (typeof(x) != "undefined")
		return true;
	else
		return false;
}

function SafeSendText(x)
{
if (!HapIsDefined(parent.lefttop))
	return;
if (!HapIsDefined(parent.lefttop.SendText))
	return;
parent.lefttop.SendText(x);
}


function SafeUseFile(x, mode)
{
if (typeof(parent.lefttop) == "undefined")
	return;
if (typeof(parent.lefttop.UseFile) == "undefined")
	return;

parent.lefttop.UseFile(x, mode);
}


function	SafeCharacterNoLookie()
{
if (!HapIsDefined(parent.lefttop))
	return;
if (!HapIsDefined(parent.lefttop.CharacterNoLookie))
	return;

parent.lefttop.CharacterNoLookie();
}


function SafeAddToInitQueue(x)
{
if (!HapIsDefined(parent.lefttop))
	return;
if (!HapIsDefined(parent.lefttop.AddToInitQueue))
	return;
parent.lefttop.AddToInitQueue(x);
}
