﻿var a = 0
var x
function ScrollLeft() {
    a = a + 1
    x = setTimeout("ScrollLeft()", (1 / 1000));
    var left = document.getElementById("gridScroller").scrollLeft;
    document.getElementById("gridScroller").scrollLeft = left + a;

    if (a == 20) {
        stopCount()
        a = 0
    }
}

function ScrollRight() {
    a = a + 1
    x = setTimeout("ScrollRight()", (1 / 1000));
    var left = document.getElementById("gridScroller").scrollLeft;
    document.getElementById("gridScroller").scrollLeft = left - a;

    if (a == 20) {
        stopCount()
        a = 0
    }
}
function stopCount() {
    clearTimeout(x)
}

//Drop continer down function go
function loadMe(sitename) {
    document.getElementById("drop-dynamic-content").innerHTML = '<iframe id="dropcontent" frameborder="0" src="' + sitename + '" scrolling="auto"></iframe>'

 }

var b = -540
var c = 0
var theTimer
function dropMe(dir) {
    b = b + 20
    theTimer = setTimeout("dropMe()", (1 / 1000));
    document.getElementById("dropcontainer").style.top = b + "px";
    if (b == 0) {
        stopMe()
    b = -540
    }
}

function hideMe() {
   c = c - 20
   theTimer = setTimeout("hideMe()", (1 / 1000));
    document.getElementById("dropcontainer").style.top = c + "px";
    if (c == -540) {
        stopMe()
        c = 0
      
    }
}



function stopMe() {
    clearTimeout(theTimer)
 }

