﻿function MyTip(string)
{
    var HTML;
    if (string.toString().indexOf('}') > 0)
    {
        var HelpTextLabel = string.toString().replace('{', '').replace('}', '');
        HTML = GetHelpText(HelpTextLabel);
    }
    else
    {
        HTML = string;
    }
    Tip(HTML, WIDTH, 200, CENTERMOUSE, true);
}

function MyUnTip()
{
    UnTip();
}

function GetHelpText(HelpTextLabel)
{
    switch(HelpTextLabel)
    {
    case "SHIPPINGHELP":
        return "We're glad to accept orders to destinations outside the US!  If you are shipping to a non-US destination, such as an APO or another country, shipping costs will be calculated and displayed at the last step of the checkout process, before placing your order.";
        break;
    default:
        return "";
        break;
    }
}

function showPopWin(page, width, height, returnFunc)
{
    var ReturnVal = window.open(page, "", "modal=yes,width=" + width + ",height=" + height);
	if (returnFunc != null) 
	{
        returnFunc(ReturnVal);
    }
}