var pages = 4;
var i = 1;    //Start page from initial
var timeOut;
var time = 15000; //milliseconds   '1 sec real time = 1000 milliseconds
//var time = 4000;


//Delete Previous Content 'Screen'
function deleteQCContent() {
myPara = document.getElementById("stuff");
myform = document.getElementById("main");
myPara.removeChild(myform);

myPara = document.getElementById("homePixMenu");
myform = document.getElementById("menu");
myPara.removeChild(myform);

}

function scrollPixInitial() {
	mypara = document.getElementById("stuff");
	newdiv = document.createElement('form');
	newdiv.setAttribute("id","main");
	newdiv.setAttribute("name","main");
	
	
	newdiv.innerHTML = "<div id='header1'><h1>Introducing the</h1></div><div style='width: 588px; height: 360px; padding-bottom: 20px; color: #272727; float: left'><p style='margin-top: 29px; font-size: 2em; padding: 10px; background-color: #272727; text-align: center; color: #FFFFFF; width: 365px;'>135 Gallon Peterbilt Style</p><ul style='margin: 25px 0 15px 30px; font-size: 1.3em'><li class='space'>All tanks and parts are Made In America</li></ul><p><img src='assets/img/Peterbilt135.gif' width='588' height='200' /></p></div><div style='width: 316px; height: 380; margin: 29px 0 0 30px; color: #272727; float: left'><p style='font-size: 1.3em; color: #0079BA'>FMCSA approved</p><p>The tanks manufactured in our facility adhere to the industry standards prescribed by the Federal Motor Carrier Safety Administration. Part of these standards include the <a style='color: #0079BA' href='video.php'>drop test</a> to certify the structural worthiness of our tanks.</p><ul style='margin: 30px 0 0 30px; font-size: 1.3em'><li class='space'>Tanks are pressure tested</li><li class='space'>Fittings are fully customizable</li><li class='space'>Full 1/8\" aluminum material</li><li class='space'>Peterbilt style domed endcaps</li></ul></div>";
	
	document.getElementById("stuff").appendChild(newdiv);
	
	
	mypara = document.getElementById("homePixMenu");
	newdiv = document.createElement('form');
	newdiv.setAttribute("id","menu");
	newdiv.setAttribute("name","menu");
	
	
	newdiv.innerHTML = "<li style='padding-left: 15px' onClick='scrollPixPage(\"previous\")' ><<</li><li style='color: #797C80' >Cylindrical</li><li onClick='scrollPixPage(2)'>Rectangular</li><li onClick='scrollPixPage(3)'>'D' Shape</li><li onClick='scrollPixPage(4)'>Tapered Bottom</li><li style='padding-right: 15px' onClick='scrollPixPage(\"next\")'>>></li>";
	
	document.getElementById("homePixMenu").appendChild(newdiv);
	
	timeOut = setTimeout("scrollPixPage('next')",time);
	
}

function scrollPix() {
	
	if (i == 0) { i = 4; }
	if (i == 5) { i = 1; }
	
	switch(true) {
		case (i==1):
		
		deleteQCContent()	
		
		mypara = document.getElementById("stuff");
		newdiv = document.createElement('form');
		newdiv.setAttribute("id","main");
		newdiv.setAttribute("name","main");
		
		
		newdiv.innerHTML = "<div id='header1'><h1>Introducing the</h1></div><div style='width: 588px; height: 360px; margin-bottom: 20px; color: #272727; float: left'><p style='margin-top: 29px; font-size: 2em; padding: 10px; background-color: #272727; text-align: center; color: #FFFFFF; width: 365px;'>135 Gallon Peterbilt Style</p><ul style='margin: 25px 0 15px 30px; font-size: 1.3em'><li class='space'>All tanks and parts are Made In America</li></ul><p><img src='assets/img/Peterbilt135.gif' width='588' height='200' /></p></div><div style='width: 316px; height: 380; margin: 29px 0 0 30px; color: #272727; float: left'><p style='font-size: 1.3em; color: #0079BA'>FMCSA approved</p><p>The tanks manufactured in our facility adhere to the industry standards prescribed by the Federal Motor Carrier Safety Administration. Part of these standards include the <a style='color: #0079BA' href='video.php'>drop test</a> to certify the structural worthiness of our tanks.</p><ul style='margin: 30px 0 0 30px; font-size: 1.3em'><li class='space'>Tanks are pressure tested</li><li class='space'>Fittings are fully customizable</li><li class='space'>Full 1/8\" aluminum material</li><li class='space'>Peterbilt style domed endcaps</li></ul></div>";
		
		document.getElementById("stuff").appendChild(newdiv);
		
		mypara = document.getElementById("homePixMenu");
		newdiv = document.createElement('form');
		newdiv.setAttribute("id","menu");
		newdiv.setAttribute("name","menu");
		
		
		newdiv.innerHTML = "<li style='padding-left: 15px' onClick='scrollPixPage(\"previous\")' ><<</li><li style='color: #797C80' >Cylindrical</li><li onClick='scrollPixPage(2)'>Rectangular</li><li onClick='scrollPixPage(3)'>'D' Shape</li><li onClick='scrollPixPage(4)'>Tapered Bottom</li><li style='padding-right: 15px' onClick='scrollPixPage(\"next\")'>>></li>";
		
		document.getElementById("homePixMenu").appendChild(newdiv);
			
			
		
		break
		case (i==2):
			
			deleteQCContent()	
		
			mypara = document.getElementById("stuff");
			newdiv = document.createElement('form');
			newdiv.setAttribute("id","main");
			newdiv.setAttribute("name","main");
			
			
			newdiv.innerHTML = "<div id='header1'><h1>Introducing the</h1></div><div style='height: 380px; width: 443px; float:left; font-family: Arial, Helvetica, sans-serif; color: #272727; margin-right: 20px;'><p style='margin-top: 29px; font-size: 2em; padding: 10px; background-color: #0079BA; text-align: center; color: #FFFFFF; width: 340px;'>International 4700 Style</p><ul style='margin: 30px 0 0 30px; font-size: 1.3em'><li class='space'>Order wholesale factory direct</li><li class='space'>Repair services available</li><li class='space'>Each tank comes with a 1 year warranty</li></ul><br /><p style='line-height: 20px'>With over 50 years of experience in the transportation industry, the owners of Alumitank bring with them a high level of expertise in the field of manufacturing and repair of aluminum tanks. Alumitank produces diesel fuel tanks comparable to manufacturers, at significant savings, while refusing to sacrifice quality.</p></div><div style='height: 380px; width: 471px; float:left'><img style='margin-top: 29px; float: right' src='assets/img/International4700fueltank.gif' width='468' height='330' /></div><br clear='all' />";
	
			
			document.getElementById("stuff").appendChild(newdiv);
			
			mypara = document.getElementById("homePixMenu");
			newdiv = document.createElement('form');
			newdiv.setAttribute("id","menu");
			newdiv.setAttribute("name","menu");
			
			
			newdiv.innerHTML = "<li style='padding-left: 15px' onClick='scrollPixPage(\"previous\")' ><<</li><li onClick='scrollPixPage(1)' >Cylindrical</li><li style='color: #797C80'>Rectangular</li><li onClick='scrollPixPage(3)'>'D' Shape</li><li onClick='scrollPixPage(4)'>Tapered Bottom</li><li style='padding-right: 15px' onClick='scrollPixPage(\"next\")'>>></li>";
			
			document.getElementById("homePixMenu").appendChild(newdiv);
				
	
		break
		case (i==3):
		
			deleteQCContent()	
		
			mypara = document.getElementById("stuff");
			newdiv = document.createElement('form');
			newdiv.setAttribute("id","main");
			newdiv.setAttribute("name","main");
					
			newdiv.innerHTML = "<div id='header1'><h1>Introducing the</h1></div><div style='height: 380px; width: 463px; float:left'><img style='margin-top: 29px; float: left' src='assets/img/International4300fueltank.gif' width='438' height='330' /></div><div style='height: 380px; width: 471px; float:left; font-family: Arial, Helvetica, sans-serif; color: #272727;'><p style='margin-top: 29px; font-size: 2em; padding: 10px; background-color: #272727; text-align: center; color: #FFFFFF; width: 340px'>International 4300 Style</p><ul style='margin: 30px 0 0 30px; font-size: 1.3em'><li class='space'>Quick turnaround times</li><li class='space'>International style adapter plate</li><li class='space'>OEM replacements for most makes and models</li></ul><br /><p style='line-height: 20px'></p></div><br clear='all' />";
	
			
			document.getElementById("stuff").appendChild(newdiv);
			
			mypara = document.getElementById("homePixMenu");
			newdiv = document.createElement('form');
			newdiv.setAttribute("id","menu");
			newdiv.setAttribute("name","menu");
			
			
			newdiv.innerHTML = "<li style='padding-left: 15px' onClick='scrollPixPage(\"previous\")' ><<</li><li onClick='scrollPixPage(1)' >Cylindrical</li><li onClick='scrollPixPage(2)'>Rectangular</li><li style='color: #797C80' >'D' Shape</li><li onClick='scrollPixPage(4)'>Tapered Bottom</li><li style='padding-right: 15px' onClick='scrollPixPage(\"next\")'>>></li>";
			
			document.getElementById("homePixMenu").appendChild(newdiv);
		
			
		break
		case (i==4):
		
			deleteQCContent()	
		
			mypara = document.getElementById("stuff");
			newdiv = document.createElement('form');
			newdiv.setAttribute("id","main");
			newdiv.setAttribute("name","main");
			
			
			newdiv.innerHTML = "<div id='header1'><h1>Introducing the</h1></div><div style='height: 380px; width: 471px; float:left; font-family: Arial, Helvetica, sans-serif; color: #272727;'><p style='margin-top: 29px; font-size: 2em; padding: 10px; background-color: #0079BA; text-align: center; color: #FFFFFF; width: 280px'>GMC C7500 Style</p><ul style='margin: 30px 0 0 30px; font-size: 1.3em'><li class='space'>Brushed aluminum finish</li><li class='space'>OEM style tapered-bottom</li><li class='space'>Works with OEM fuel pump assembly</li></ul><br /><p style='line-height: 20px'>Our knowledgeable sales staff and first hand experience provide the understanding of the unique demands of the trucking industry. With its focus on trucking, Alumitank has become the premier manufacturer of specialized aluminum tanks.</p></div><div style='height: 380px; width: 463px; float:left'><img style='margin-top: 29px; margin-left: 25px; float: left' src='assets/img/GMC15x24.gif' width='438' height='330' /></div><br clear='all' />";
	
			
			document.getElementById("stuff").appendChild(newdiv);
			
			mypara = document.getElementById("homePixMenu");
			newdiv = document.createElement('form');
			newdiv.setAttribute("id","menu");
			newdiv.setAttribute("name","menu");
			
			
			newdiv.innerHTML = "<li style='padding-left: 15px' onClick='scrollPixPage(\"previous\")' ><<</li><li onClick='scrollPixPage(1)' >Cylindrical</li><li onClick='scrollPixPage(2)'>Rectangular</li><li onClick='scrollPixPage(3)'>'D' Shape</li><li style='color: #797C80' >Tapered Bottom</li><li style='padding-right: 15px' onClick='scrollPixPage(\"next\")'>>></li>";
			
			document.getElementById("homePixMenu").appendChild(newdiv);
			
			
		break
		
		
		
	}
	
	timeOut = setTimeout("scrollPixPage('next')",time);

}

function scrollPixPage(input) {
	
	clearTimeout(timeOut);
	
	switch(true) {
		case (input=="previous"):
				
		i=i-1
		scrollPix()
		
		break
		case (input==1):

		i=1

		scrollPix()
		
		break
		case (input==2):

		i=2

		scrollPix()
		
		break
		case (input==3):

		i=3

		scrollPix()
		
		break
		case (input==4):

		i=4

		scrollPix()
		
		break
		case (input=="next"):
		
		i=i+1
		scrollPix()
		
		break
	
	
	}
}
