﻿//This sets the blueswitch link's mouseover
window.onload = function () {
    $('#blue').mouseover(ChangeLink);
    $('#switch').mouseover(ChangeLink);

    $('#blue').mouseout(ChangeLinkOut);
    $('#switch').mouseout(ChangeLinkOut);
}

function ChangeLink() {
    $('#blue').addClass('over');
    $('#switch').addClass('over');
}

function ChangeLinkOut() {
    $('#blue').removeClass('over');
    $('#switch').removeClass('over');
}

function GetWidth() {
    var x = 0;
    if (self.innerHeight) {
        x = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientHeight) {
        x = document.documentElement.clientWidth;
    }
    else if (document.body) {
        x = document.body.clientWidth;
    }
    return x;
}

function GetHeight() {
    var y = 0;
    if (self.innerHeight) {
        y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) {
        y = document.documentElement.clientHeight;
    }
    else if (document.body) {
        y = document.body.clientHeight;
    }
    return y;
}

var rightTimeout;
var leftTimeout;

function scrollLeft(id) {
    flexcrollTo(id, "-40px", "0px", true);
}

function scrollRight(id) {
    flexcrollTo(id, "40px", "0px", true);
}

function startLeft(id) {
    leftTimeout = setInterval("scrollLeft('" + id + "')", 100);
}

function startRight(id) {
    rightTimeout = setInterval("scrollRight('" + id + "')", 100);
}

function stopLeft() {
    clearTimeout(leftTimeout);
}

function stopRight() {
    clearTimeout(rightTimeout);
}
