
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
var EMailValidation = "[A-Za-z0-9_\.\-]+\@[A-Za-z0-9_\.\-]+\.[A-Za-z0-9_\.\-]+";
var EMailValidationRegExp = /[A-Za-z0-9_\.\-]+\@[A-Za-z0-9_\.\-]+\.[A-Za-z0-9_\.\-]+/;

var domOk = document.getElementById;
var IsIE = !window.innerWidth;
var textMenusMode = false;
var IEBody = (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;

var MaxSplashes = 20;
var DoNotShowRandomImage = false;

function GetRef(id) {
    return document.getElementById(id);
}

function PadWithZeros(i) {
    if (i<10) { return "0"+i; } else { return ""+i; }
}

function DoNothing() {}

function OpenLink(url) {
    window.open(url,null,'width=750,height=500,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
}

function ShowElement(id) { GetRef(id).style.display = "block"; }
function HideElement(id) { GetRef(id).style.display = "none"; }

function CurrentTime() { return (new Date().getTime()); }

function ToggleTextMenus() {
    textMenusMode = !textMenusMode;
    if (textMenusMode) {
        GetRef("Website").className = "Website TextScaleMode";
    } else {
        GetRef("Website").className = "Website";
    }
}

function ChangeSplash() {
    if (!DoNotShowRandomImage) {
        var index = Math.ceil(Math.random() * MaxSplashes);
        var SplashImage = GetRef("SplashImage");
        if (SplashImage) {
            SplashImage.style.background = "url(Images/Splash-2010/Splash-"+PadWithZeros(index)+".jpg) no-repeat";    
        }
    }
}


function SetCopyrightYear() {
    var year = (new Date()).getFullYear();
    GetRef("CopyrightYear").innerHTML= "2006 &ndash; " + year;
}

function ClearTimer(index) { }
function ShowDropdown(index) { }
function HideDropdown(index) { }


