﻿function g_TrimValue(valueToTrim)
{
    var len;
    while(true)
    {
        len = valueToTrim.length;
        if (valueToTrim.charAt(0) == ' ')
            valueToTrim = valueToTrim.substr(1);
        if (valueToTrim.charAt(valueToTrim.length - 1) == ' ')
            valueToTrim = valueToTrim.substr(0, valueToTrim.length - 1);
        if (len == valueToTrim.length)
            break;
    }
    return valueToTrim;
}
function g_HideDebugMessage()
{
    document.getElementById(g_prefixOfNames + 'debugMessages').style.display = "none";
}
function SearchClick()
{
    var criteria = document.getElementById("ctl00_GoogleSearchCriteria");
    window.location.href = "http://www.google.com/search?q=" + criteria.value + "+site%3Awww.sabt-usa.org";
}
//var flashCounts = 0;
//var intervalID;
//window.setInterval(AnimateShow, 3000);
//function AnimateShow()
//{
//    intervalID = window.setInterval(HideShow, 70);
//}
//function HideShow()
//{
//    var theLink = document.getElementById("ShowLink");
//    if (theLink == null)
//        return;
//    if (flashCounts > 15)
//    {
//        theLink.style.visibility = "visible";
//        window.clearInterval(intervalID);
//        flashCounts = 0;
//        return;
//    }
//    flashCounts++;
//    if (theLink.style.visibility == "visible")
//    {
//        theLink.style.visibility = "hidden";
//    }
//    else
//    {
//        theLink.style.visibility = "visible";
//    }
//}