function FullScreen()
{
    window.moveTo(0,0);
    if (window.width != screen.availWidth && window.height != screen.availHeight)
    {
        window.resizeTo(screen.availWidth, screen.availHeight);
    }
}
function ShowDiv(a) {
	var id_number = a.id.substr((a.id.length-3));
	var d = document.getElementById('d_' + id_number);
	if (d.style.display=='none')
		{d.style.display='';}
	else
		{d.style.display='none';}
}
function GoTo(url)
{
    location.href = url;
}
var isMouseOver = 0;
function gMouseOver(sender, img)
{
    img = 'url('+img+')';
    if (sender.style.backgroundImage != img) sender.style.backgroundImage = img;
    isMouseOver = 1;
}
function gMouseOut2(id, img)
{
    var obj = document.getElementById(id);
    img = 'url('+img+')';
    if (obj.style.backgroundImage != img && isMouseOver == 0) obj.style.backgroundImage = img;
}
function gMouseOut(id, img)
{
    if (isMouseOver == 1) setTimeout('gMouseOut2("'+id+'","'+img+'")',10);
    isMouseOver = 0;
}
function CheckEmail(s)
{
    if(!s.match(/^[\w]{1}[\w\.\-_]*@[\w]{1}[\w\-_\.]*\.[\w]{2,4}$/i)) { return false; } 
    else { return true; }
}
function trim(string) {
    return string.replace(/(^\s+)|(\s+$)/g, "");
}
