﻿// JScript File
function mouseOn ( name, id )
{
    var img = document.getElementById ( id );
    img.src = "images/menu/"+name+"_1.gif";
    img.style.cursor = 'pointer';
}

function mouseOff ( name, id )
{
    var img = document.getElementById ( id );
    img.src = "images/menu/"+name+"_0.gif";
    img.style.cursor = 'default';
}

function resizeElectronic()
{
    window.document.body.scroll = 'no';
    var panel = document.getElementById("Panel1");
    var h = f_clientHeight();
    panel.style.height = (h-130) + "px";
    panel.style.display = "";
    
    var ads = document.getElementById("ads");
    ads.style.height = (h-130) + "px";    
}


function resize()
{
    window.document.body.scroll = 'no';
    var panel = document.getElementById("Panel1");
    var h = f_clientHeight();
    panel.style.height = (h-150) + "px";
    panel.style.display = "";
    
    var ads = document.getElementById("ads");
    ads.style.height = (h-130) + "px";    
}

function resize2()
{
    var panel = document.getElementById("Panel1");
    var h = f_clientHeight();
    panel.style.height = (h-120) + "px";
    panel.style.display = "";
    window.document.body.scroll = 'no';
    
    var ads = document.getElementById("ads");
    ads.style.height = (h-130) + "px"; 
}

function resizeMain()
{
    var panel = document.getElementById("Panel1");
    var h = f_clientHeight();
    panel.style.height = (h-320) + "px";
    panel.style.display = "";

    var NewsRow = document.getElementById("NewsRow");    
    NewsRow.style.display = "";
    window.document.body.scroll = 'no';
    
    var ads = document.getElementById("ads");
    ads.style.height = (h-130) + "px";  
}

function f_clientHeight() 
{
    return document.documentElement ? document.documentElement.clientHeight : 520;
}

function validate()
{
    return true;
}

function OnKeyPressForEmail(e)
{
    var keynum;
    var keychar;

    keynum = e.keyCode;
    if(window.event) // IE
        { keynum = e.keyCode ;        }
    else if(e.which) // Netscape/Firefox/Opera
        { keynum = e.which ;          }
    keychar = String.fromCharCode(keynum)
    
    if (!window.event && (keynum == 8 || keynum == 46 || keynum == 37 || keynum == 39 || keynum == 9))
        return true;

    return (keychar != "<" && keychar != ">" && keychar != "\"");
}

function Jump()
{
    var urllocation = location.href; //find url parameter
    if(urllocation.indexOf("#p") > -1)
    {
        setTimeout ( onJump, 500 );         
    }
}

function onJump()
{
    window.location.hash="#photos";
}


