/* WRITTEN BY FERNANDO BARAJAS AKA FERNYB
	HTTP://FERNYB.NET
	AT TRIMARK ADVERTISING 
	HTTP://TRIMARKADVERTISING.COM
*/

var si;
var ih = 1;
var ih2 = 1;
var ih3 = 1;
var ih4 = 1;
function link1() {
		if(ih <= 1) {
			si = setInterval("show1()", 1);
		} else if (ih > 1) {
			clearInterval(si);
			si = setInterval("hide1()" , 1);	
		}
}
function hide1() {
	d = document.getElementById("links1");
	ih -= 10;
	if(ih < 160) {
		d.style.height = ih +"px";
	} 
	if (ih <= 1) {
		clearInterval(si);	
	}
}

function show1() {
	d = document.getElementById("links1");
	//window.alert(d.style.height);
	ih += 10;
	if(ih < 160) {
		d.style.height = ih +"px";
	} else {
		clearInterval(si);	
	}
}


function link2() {
	if(ih2 <= 1) {
		si = setInterval("show2()", 1);
	} else if (ih2 > 1) {
		clearInterval(si);
		si = setInterval("hide2()" , 1);	
	}
}
function hide2() {
	d = document.getElementById("links2");
	ih2 -= 10;
	if(ih2 < 175) {
		d.style.height = ih2 +"px";
	}
	if (ih2 <= 1) {
		clearInterval(si);	
	}
}
function show2() {
	d = document.getElementById("links2");
	ih2 += 10;
	if(ih2 < 175) {
		d.style.height = ih2 +"px";
	} else  {
		clearInterval(si);	
	}
}

function link3() {
	if(ih3 <= 1) {
		si = setInterval("show3()", 1);
	} else if (ih3 > 1) {
		clearInterval(si);
		si = setInterval("hide3()" , 1);	
	}
}
function hide3() {
	d = document.getElementById("links3");
	ih3 -= 10;
	if(ih3 < 320) {
		d.style.height = ih3 +"px";
	}
	if (ih3 <= 1) {
		clearInterval(si);	
	}
}
function show3() {
	d = document.getElementById("links3");
	ih3 += 10;
	if(ih3 < 320) {
		d.style.height = ih3 +"px";
	} else {
		clearInterval(si);
	}
}



function tanning() {
	if(ih4 <= 1) {
		si = setInterval("tanningShow()", 1);
	} else if (ih4 > 1) {
		clearInterval(si);
		si = setInterval("tanningHide()" , 1);	
	}
}
var tanHeight = new Number(575);

function tanningShow() {
	d = document.getElementById("tanningFormulas");
	ih4 += 10;
	if(ih4 < tanHeight) {
		d.style.height = ih4 +"px";
	} else {
		clearInterval(si);
	}
}

function tanningHide() {
	d = document.getElementById("tanningFormulas");
	ih4 -= 10;
	if(ih4 < tanHeight) {
		d.style.height = ih4 +"px";
	}
	if (ih4 <= 1) {
		clearInterval(si);	
	}
}

