/*************************************************************
     GIV3R x 8  
*************************************************************/
function giver() 
{ 	
	var movelimit = -10;  
	var howfastisdatbiatch = 59; // this is the rate that the div will move
	var menuz1 = document.getElementById("option1"); // this defines a variable so we can control the main sitemap containing div (the one that contains the button and the actual sitemap content div)
	var menuz2 = document.getElementById("option2"); 
	var menuz3 = document.getElementById("option3"); 
	//buttons
	var button1 = document.getElementById("button1"); // this defines a variable so we can control the button
	var button2 = document.getElementById("button2");
	var button3 = document.getElementById("button3");	
	var img1 = document.getElementById("img1"); // this defines a variable so we can control the button
	var img2 = document.getElementById("img2");
	var img3 = document.getElementById("img3");
	//current position
	var currentposition = -358; //  starting point
	var currentposition2 = -358; //  starting point for the second sucka
	var currentposition3 = -358; 
	/* I wouldn't edit below here if I was you. */
	button1.onclick = function() { intervalID = setInterval(out1, 50);}
	button2.onclick = function() { intervalID = setInterval(out2, 51);}
	button3.onclick = function() { intervalID = setInterval(out3, 52);}
	function out1() {if (currentposition < movelimit) {currentposition += howfastisdatbiatch; menuz1.style.left = currentposition + "px"; if (currentposition >= movelimit){button1.setAttribute('onclick', 'in1();');img1.setAttribute('alt', 'click to close');img1.setAttribute('title', 'click to close');button1.onclick = function() { intervalID = setInterval(in1, 50); }}}else clearInterval(intervalID);}
	function in1() {if (currentposition > -358){currentposition -= howfastisdatbiatch; menuz1.style.left = currentposition + "px";  if (currentposition <= 0){button1.setAttribute('onclick', 'out1();');img1.setAttribute('alt', 'click to open');img1.setAttribute('title', 'click to open');button1.onclick = function() { intervalID = setInterval(out1, 50); }}}else clearInterval(intervalID);}
	function out2() {if (currentposition2 < movelimit){currentposition2 += howfastisdatbiatch; menuz2.style.left = currentposition2 + "px"; if (currentposition2 >= movelimit){button2.setAttribute('onclick', 'in2();');img2.setAttribute('alt', 'click to close');img2.setAttribute('title', 'click to close');button2.onclick = function() { intervalID = setInterval(in2, 50); }}} else clearInterval(intervalID);}
	function in2() {if (currentposition2 > -358){currentposition2 -= howfastisdatbiatch; menuz2.style.left = currentposition2 + "px"; if (currentposition2 <= 0){button2.setAttribute('onclick', 'out2();');img2.setAttribute('alt', 'click to open');img2.setAttribute('title', 'click to open');button2.onclick = function() { intervalID = setInterval(out2, 50); }}} else clearInterval(intervalID);}	
	function out3() {if (currentposition3 < movelimit){currentposition3 += howfastisdatbiatch; menuz3.style.left = currentposition3 + "px"; if (currentposition3 >= movelimit){button3.setAttribute('onclick', 'in3();');img3.setAttribute('alt', 'click to close');img3.setAttribute('title', 'click to close');button3.onclick = function() { intervalID = setInterval(in3, 50); }}} else clearInterval(intervalID);}
	function in3() {if (currentposition3 > -358){currentposition3 -= howfastisdatbiatch;menuz3.style.left = currentposition3 + "px"; if (currentposition3 <= 0){button3.setAttribute('onclick', 'out3();');img3.setAttribute('alt', 'click to open');img3.setAttribute('title', 'click to open');button3.onclick = function() { intervalID = setInterval(out3, 50); }}} else clearInterval(intervalID);}
}
/**************************
     END GIV3R x 8 
**************************/
function compliantswap() {
if (!document.getElementById) return
var aPreLoad = new Array();;var sTempSrc;;var aImages = document.getElementsByTagName('img');
for (var i = 0; i < aImages.length; i++) {if (aImages[i].className == 'swap') {var src = aImages[i].getAttribute('src');;var ftype = src.substring(src.lastIndexOf('.'), src.length);	var hsrc = src.replace(ftype, '-o'+ftype);aImages[i].setAttribute('hsrc', hsrc);aPreLoad[i] = new Image();aPreLoad[i].src = hsrc;aImages[i].onmouseover = function() {sTempSrc = this.getAttribute('src');this.setAttribute('src', this.getAttribute('hsrc'));}				
aImages[i].onmouseout = function() {if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('-o'+ftype, ftype);this.setAttribute('src', sTempSrc);}}}} window.onload = compliantswap;
	
function addLoadEvent(func) { var oldonload = window.onload;  if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() {oldonload(); func(); } } } 
addLoadEvent(giver); 
addLoadEvent(compliantswap); 