// Copyright 2000-2005, DataCom of Duluth

// Setups
var header = new Array ();
header[0]="header1.jpg";
header[1]="header2.jpg";
header[2]="header3.jpg";
header[3]="header4.jpg";
header[4]="header5.jpg";

var iPic = new Array();
iPic[0]="HomeLeftTug.jpg";
iPic[1]="ServPile1.jpg";
iPic[2]="ServDredge4.jpg";
iPic[3]="ServDock2.jpg";
iPic[4]="ServStone7.jpg";
iPic[5]="ServConstruction3.jpg";
iPic[6]="ServSalvage1.jpg";
iPic[7]="ServConstruction4.jpg";
iPic[8]="ServAssist3.jpg";
iPic[9]="ServLightering3.jpg";
iPic[10]="ServCapping6.jpg";
iPic[11]="ServWetland1.jpg";
iPic[12]="ServDredge6.jpg";

var iPicText = new Array();
iPicText[0]="Marine Tech's fleet of tugs and barges allow for multiple applications in transportation around the Great Lakes.";
iPicText[1]="In harbors, offshore and inland, we can drive H-pile, pipe pile, steel sheet pile, round woodpile in any application.";
iPicText[2]="Experience coupled with state-of-the-art equipment and technology make Marine Tech the choice for all dredging and survey applications.";
iPicText[3]="Design, construction and repair of docks for commercial vessels as small as 100' to vessels as large as 1000' bulk carriers.";
iPicText[4]="Stone breakwater construction for commercial ports or recreational harbors - we have the equipment and experience to build structures for any application.";
iPicText[5]="From small boat harbors to commercial lake access facilities, from floating to pile supported docks, our work is seen all over the region.";
iPicText[6]="With a crane barge able to lift loads up to 100 tons teamed with our divers and engineers, we provide the experience to re-float any vessel from any depth.";
iPicText[7]="Marine Tech's installations have varied from concrete, steel coated and HDPE pipe in sand, rock filter beds, even attached to lake bottom structures.";
iPicText[8]="Our tugs varies from 400 hp to 2000 hp to assist, tow or clear way for any vessel that requires assistance.";
iPicText[9]="The transferring of cargo to reduce a vessel's draft is a process that Marine Tech has performed for decades around the Lake Superior ports.";
iPicText[10]="Uniformly covering over a contaminated area in 6 inch layers with heavy equipment and tons of sand.";
iPicText[11]="Sometimes when helping nature regain a foothold in a given aquatic setting, the equipment and experience of mankind is required.";
iPicText[12]="Marine Tech didn't invent it, but they did perfect the process of recycling dredge materials for use in land-based construction.";

var coat = new Array();
coat[0]="Coatings1.jpg";
coat[1]="Coatings2.jpg";
coat[2]="Coatings3.jpg";
coat[3]="Coatings4.jpg";
coat[4]="Coatings5.jpg";
coat[5]="Coatings6.jpg";
coat[6]="Coatings7.jpg";
coat[7]="Coatings8.jpg";

var coatText = new Array();
coatText[0]="In the past few years underwater species have been identified that threaten to disrupt marine commerce everywhere - and especially in the Great Lakes.";
coatText[1]="Micro-organisms have attached to steel sheet pilings below the water's surface and are creating new problems for marine-related industries.";
coatText[2]="Marine Coating engineers have designed coffer dams that hug steel sheet pilings and allow for work in a dry environment.";
coatText[3]="Experienced Marine Coating personnel can sandblast and coat steel sheet pilings with Aquapure in place below the water's surface.";
coatText[4]="Sandblasting removes all micro-organisms and leaves a clean surface ready for coating.";
coatText[5]="Once coated with Aquapure, steel sheet pilings life expectancy is extended by 20 years. Aquapure dries in 10 minutes and is so durable, a torch can't cut through it.";
coatText[6]="Sandblasting and coating steel sheet pilings is easier done before installation.";
coatText[7]="With Marine Coating's experience and product, you can double the life of your dock, potentially saving millions of dollars years later.";

var assist = new Array();
assist[0]="ServAssist1.jpg";
assist[1]="ServAssist2.jpg";
assist[2]="ServAssist3.jpg";
assist[0]="ServLightering1.jpg";
assist[1]="ServLightering2.jpg";
assist[2]="ServLightering3.jpg";

var cap = new Array();
cap[0]="ServCapping-3.jpg";
cap[1]="ServCapping-2.jpg";
cap[2]="ServCapping-1.jpg";
cap[3]="ServCapping1.jpg";
cap[4]="ServCapping2.jpg";
cap[5]="ServCapping3.jpg";
cap[6]="ServCapping4.jpg";
cap[7]="ServCapping5.jpg";
cap[8]="ServCapping6.jpg";
cap[9]="ServCapping7.jpg";

var con = new Array ();
con[0]="ServConstruction1.jpg";
con[1]="ServConstruction2.jpg";
con[2]="ServConstruction3.jpg";
con[3]="ServConstruction4.jpg";
con[4]="ServConstruction5.jpg";
con[5]="ServConstruction6.jpg";

var dock = new Array();
dock[0]="ServDock1.jpg";
dock[1]="ServDock2.jpg";
dock[2]="ServDock3.jpg";
dock[3]="ServDock4.jpg";

var dredge = new Array();
dredge[0]="ServDredge1.jpg";
dredge[1]="ServDredge2.jpg";
dredge[2]="ServDredge3.jpg";
dredge[3]="ServDredge4.jpg";
dredge[4]="ServDredge5.jpg";
dredge[5]="ServDredge6.jpg";
dredge[6]="ServDredge7.jpg";
dredge[7]="ServDredge8.jpg";

var pile = new Array();
pile[0]="ServPile1.jpg";
pile[1]="ServPile2.jpg";
pile[2]="ServPile3.jpg";
pile[3]="ServPile4.jpg";

var salvage = new Array();
salvage[0]="ServSalvage1.jpg";
salvage[1]="ServSalvage2.jpg";
salvage[2]="ServSalvage3.jpg";
salvage[3]="ServSalvage4.jpg";

var stone = new Array();
stone[0]="ServStone1.jpg";
stone[1]="ServStone2.jpg";
stone[2]="ServStone3.jpg";
stone[3]="ServStone4.jpg";
stone[4]="ServStone5.jpg";
stone[5]="ServStone6.jpg";
stone[6]="ServStone7.jpg";
stone[7]="ServStone8.jpg";

var wet = new Array();
wet[0]="ServWetland-3.jpg";
wet[1]="ServWetland-2.jpg";
wet[2]="ServWetland-1.jpg";
wet[3]="ServWetland1.jpg";
wet[4]="ServWetland2.jpg";
wet[5]="ServWetland3.jpg";
wet[6]="ServWetland4.jpg";
wet[7]="ServWetland5.jpg";
wet[8]="ServWetland6.jpg";
wet[9]="ServWetland7.jpg";

var headers = 0;
var mrtPics = 0;

ArrowDown_on=new Image(278,33);
ArrowDown_on.src="/images/ArrowDown_on.jpg";
ArrowDown_off=new Image(278,33);
ArrowDown_off.src="/images/ArrowDown_off.jpg";

ArrowUp_on=new Image(278,35);
ArrowUp_on.src="/images/ArrowUp_on.jpg";
ArrowUp_off=new Image(278,35);
ArrowUp_off.src="/images/ArrowUp_off.jpg";

// Header Images
function iImages() {
	if (headers < header.length) {
		document.getElementById('headimg').src = "/images/"+header[headers];
	headers++;
	} else {
	headers = 0;
		document.getElementById('headimg').src = "/images/"+header[headers];
	headers++;
	}
	setTimeout ("iImages()", 10000);
}


// Index Slide Show
function mrtbPics(images) {
	var sshow = eval(images);
	try { var sshowText = eval(images+"Text"); } catch (e) {}
	if (mrtPics > 0) {
	mrtPics--;
	document.getElementById('slides').src = "/images/slides/"+sshow[mrtPics];
	try { document.getElementById('copy').innerHTML = sshowText[mrtPics]; } catch (e) {}
	}
	setArrow(images);
}

function mrtnPics(images) {
	var sshow = eval(images);
	try { var sshowText = eval(images+"Text"); } catch (e) {}
	if (mrtPics < (sshow.length-1)) {
	mrtPics++;
	document.getElementById('slides').src = "/images/slides/"+sshow[mrtPics];
	try { document.getElementById('copy').innerHTML = sshowText[mrtPics]; } catch (e) {}
	}
	setArrow(images);
}


// Roll Over Buttons
function setArrow(images) {
	var sshow = eval(images);
	if (mrtPics==0) {
		document['ArrowUp'].src=eval("ArrowUp_off.src");
		document['ArrowDown'].src=eval("ArrowDown_on.src");
	} else if (mrtPics == (sshow.length-1)) {
		document['ArrowUp'].src=eval("ArrowUp_on.src");
		document['ArrowDown'].src=eval("ArrowDown_off.src");
	} else {
		document['ArrowUp'].src=eval("ArrowUp_on.src");
		document['ArrowDown'].src=eval("ArrowDown_on.src");
	}
}

//Open Files
function openFile(theFile) {
    window.open (theFile);
}

//Process Forms
function postFile(theCGI, theQuery, theDiv) {
	var pageReq = false;
	
    if (window.XMLHttpRequest) {
        pageReq = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
		try {
			pageReq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				pageReq = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				pageReq = false;
			}
		}
	}
	
    pageReq.open('POST', theCGI, true);
    pageReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    pageReq.onreadystatechange = function() {
        if (pageReq.readyState == 4) {
			document.getElementById(theDiv).innerHTML = pageReq.responseText;
            //updatepage(pageReq.responseText);
        }
    }
    pageReq.send(eval(theQuery)());
	document.getElementById(theDiv).innerHTML = "<h1>Sending . . . </h1>";
}

//  /contact.shtml form
function cu() {
    var form = document.forms['contact'];
    var fn = form.Name.value;
    var em = form.Email.value;
	var ph = form.Phone.value;
    var cm = form.Comments.value;
    qstr = 'Name=' + escape(fn) + '&Email=' + escape(em) + '&Phone=' + escape(ph) + '&Comments=' + escape(cm);
    return qstr;
}
