
function LoadPage() 
{
    if (document.getElementById) 
    {  // DOM3 = IE5, NS6
    document.getElementById('hidepage').style.visibility = 'hidden';
    }
    else 
    {
            if (document.layers) 
            {  // Netscape 4
            document.hidepage.visibility = 'hidden';
            }
            else 
            {  // IE 4
            document.all.hidepage.style.visibility = 'hidden';
            }
   }
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function changeImagesArray(array) {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<array.length; i+=2) {
			document[array[i]].src = array[i+1];
		}
	}
}

function changeImagesToggle() {
	changeImagesArray(changeImagesToggle.arguments);
}

function toggleImages() {
	for (var i=0; i<toggleImages.arguments.length; i+=2) {
		if (selected == toggleImages.arguments[i])      changeImagesArray(toggleImages.arguments[i+1]);
	}
}


var preloadFlag = false;
function preloadImages() 
{
	if (document.images) 
	{
		about_over = newImage("images/about-over.jpg");
		portfolio_over = newImage("images/portfolio-over.jpg");
		contact_over = newImage("images/contact-over.jpg");
		btnBranding_over = newImage("images/btnBranding-over.jpg");
		btnBranding_sel = newImage("images/btnBranding-sel.jpg");
		btnDesign_over = newImage("images/btnDesign-over.jpg");
		btnDesign_sel = newImage("images/btnDesign-sel.jpg");
		btnPhotography_over = newImage("images/btnPhotography-over.jpg");
		btnPhotography_sel = newImage("images/btnPhotography-sel.jpg");
		btnWriting_over = newImage("images/btnWriting-over.jpg");
		btnWriting_sel = newImage("images/btnWriting-sel.jpg");
		btnIndentity_over = newImage("images/btnIndentity-over.jpg");
		btnIndentity_sel = newImage("images/btnIndentity-sel.jpg");
		btnPrint_over = newImage("images/btnPrint-over.jpg");
		btnPrint_sel = newImage("images/btnPrint-sel.jpg");
		btnWeb_over = newImage("images/btnWeb-over.jpg");
		btnWeb_sel = newImage("images/btnWeb-sel.jpg");
		btnPhoto_sel = newImage("images/btnPhoto-sel.jpg");
		btnPhoto_over = newImage("images/btnPhoto-over.jpg");
		btnPhoto_overbtnPhPeoplesel = newImage("images/btnPhoto-overbtnPhPeoplesel.jpg");
		btnPhPeople_over = newImage("images/btnPhPeople-over.jpg");
		btnPhPlaces_over = newImage("images/btnPhPlaces-over.jpg");
		brnPhThings_over = newImage("images/brnPhThings-over.jpg");
		preloadFlag = true;
	}
}

function hs(divhs)
{ 

document.getElementById(divhs).style.display='';
switch(divhs)
{
    case 1:
    document.getElementById(2).style.display='none';
    document.getElementById(3).style.display='none';
    document.getElementById(4).style.display='none';
    break;
    
    case 2:
    document.getElementById(1).style.display='none';
    document.getElementById(3).style.display='none';
    document.getElementById(4).style.display='none';
    break;
    
    case 3:
    document.getElementById(1).style.display='none';
    document.getElementById(2).style.display='none';
    document.getElementById(4).style.display='none';
    break;
    
    case 4:
    document.getElementById(1).style.display='none';
    document.getElementById(2).style.display='none';
    document.getElementById(3).style.display='none';
    break;
    
}
		
}

var ImgNum = 0;
var lock = false;
var run;
//Time delay between Slides in milliseconds
var delay = 3000;
        
function chgImg(direction, selected) 
{

    if (document.images) 
    {
    
        switch(selected)
        {
            case "btnIndentity":
            NewImg = new Array 
            (
            "images/portfolio/logoa.jpg",
            "images/portfolio/logob.jpg",
            "images/portfolio/logoc.jpg",
            "images/portfolio/logod.jpg",
            "images/portfolio/logoe.jpg",
            "images/portfolio/logof.jpg",
            "images/portfolio/logog.jpg",
            "images/portfolio/logoh.jpg",
            "images/portfolio/logoi.jpg",
            "images/portfolio/logoj.jpg",
            "images/portfolio/logok.jpg",
            "images/portfolio/logol.jpg",
            "images/portfolio/logom.jpg",
            "images/portfolio/logon.jpg",
            "images/portfolio/logoo.jpg",
            "images/portfolio/logop.jpg"
            );
            
             NewCaption = new Array 
            (
            "Logo for IU School of Fine Arts",
            "Small high-end corporate law firm",
            "Swingline logo update",
            "Natural clothing line and store",
            "Logo for financial services firm",
            "ghSmart measures and predicts executive performance",
            "Private radiology practice",
            "Logo for medical training business",
            "Title insurance company identity",
            "Logo for investment services division",
            "Continuing education programs for attorneys",
            "IT products and services firm",
            "Cleaning services firm",
            "Corporate communications firm specializing in the health industry",
            "interior design practitioner",
            "Independant IT practitioner"
            );
            break;
            
            case "btnPrint":
            NewImg = new Array 
            (
            "images/portfolio/printaWHcover.jpg",
            "images/portfolio/printbWHcoverdetail.jpg",
            "images/portfolio/printcWHcontents.jpg",
            "images/portfolio/printdWH1.jpg",
            "images/portfolio/printeWH2.jpg",
            "images/portfolio/printfWH3.jpg",
            "images/portfolio/printgcard.jpg",
            "images/portfolio/printhcarddetail.jpg",
            "images/portfolio/printiTDRfolder.jpg",
            "images/portfolio/printjallegcover.jpg",
            "images/portfolio/printkantcover.jpg",
            "images/portfolio/printlant1.jpg",
            "images/portfolio/printmant2.jpg",
            "images/portfolio/printnant3.jpg",
            "images/portfolio/printoMFAcover.jpg",
            "images/portfolio/printpMFA1.jpg",
            "images/portfolio/printqMFA2.jpg",
            "images/portfolio/printrMFA3.jpg",
            "images/portfolio/printsMFA4.jpg",
            "images/portfolio/printtMFA5.jpg",
            "images/portfolio/printuMFA6.jpg",
            "images/portfolio/printvTrustcover.jpg",
            "images/portfolio/printwTrust1.jpg",
            "images/portfolio/printxTrust2.jpg",
            "images/portfolio/printyTrust3.jpg",
            "images/portfolio/printzaaBMKcover.jpg",
            "images/portfolio/printzabBMK1.jpg",
            "images/portfolio/printzaceh.jpg",
            "images/portfolio/printzadlawtercover.jpg",
            "images/portfolio/printzaeMFScover.jpg",
            "images/portfolio/printzafMFS1.jpg",
            "images/portfolio/printzagMFS2.jpg",
            "images/portfolio/printzahMFSzcover.jpg",
            "images/portfolio/printzaiMFSzs.jpg",
            "images/portfolio/printzajBP.jpg",
            "images/portfolio/printzakAllcover.jpg",
            "images/portfolio/printzalAlldet.jpg",
            "images/portfolio/printzamAll1.jpg",
            "images/portfolio/printzanAll2.jpg",
            "images/portfolio/printzaoSears.jpg"
            );
            
             NewCaption = new Array 
            (
            "Cover of Wildman Harrold corporate brochure. Assignment included market research and theme message",
            "Cover detail",
            "Table of contents for Wildman Harrold corporate brochure",
            "Spread from Wildman Harrold corporate brochure",
            "Spread from Wildman Harrold corporate brochure",
            "Spread from Wildman Harrold corporate brochure",
            "Holiday card utilizing multi-hit engraving",
            "Holiday card detail",
            "Photography and pocket folder for law firm",
            "Pocket folder and artwork for telecom business",
            "Brochure and theme concept for Antares capital investment firm",
            "Brochure spread for Antares",
            "Brochure spread for Antares",
            "Brochure spread for Antares",
            "Cover of 2008 MFA catalog for IU School of Art",
            "Inside cover spread from 2008 MFA catalog for IU School of Art",
            "Spread from 2008 MFA catalog for IU School of Art",
            "Spread from 2008 MFA catalog for IU School of Art",
            "Spread from 2008 MFA catalog for IU School of Art",
            "Spread from 2008 MFA catalog for IU School of Art",
            "Spread from 2008 MFA catalog for IU School of Art",
            "Brochure cover and theme concept for financial services firm",
            "Inside cover presentation for financial services firm brochure",
            "Inside cover presentation for financial services firm brochure",
            "Inside cover presentation for financial services firm brochure",
            "Brochure cover for Baker & McKenzie banking group",
            "Spread from Baker & McKenzie banking group brochure",
            "Clothing hang tag and logo design for organic dyes company",
            "Annual report cover for chemical products manufacturer",
            "Brochure cover for network infrastructure company",
            "Spread from brochure for network infrastructure company",
            "Spread from brochure for network infrastructure company",
            "Pocket folder for network infrastructure company",
            "Spread from brochure for network infrastructure company",
            "Cover for summary report on a study of bipolar disorder",
            "Cover of corporate brochure for telecom company",
            "Cover detail showing embossing",
            "Inside spread from corporate brochure for telecom company",
            "Inside spread from corporate brochure for telecom company",
            "POP display for Sears game tables. Piece shipped flat and assembled with two clips"
            );
            break;
            
            case "btnWeb":
            NewImg = new Array 
            (
            "images/portfolio/webb.jpg",
            "images/portfolio/weba.jpg",
            "images/portfolio/webc.jpg",
            "images/portfolio/webd.jpg",
            "images/portfolio/webe.jpg",
            "images/portfolio/webf.jpg",
            "images/portfolio/webg.jpg",
            "images/portfolio/webh.jpg",
            "images/portfolio/webi.jpg"
            );
            
             NewCaption = new Array 
            (
            "Home page for IU School of Art",
            "Departmental page for IU School of Art",
            "Home page for law firm",
            "Sample page from law firm site",
            "Art marketing site",
            "Art marketing site",
            "Home page for investment services firm",
            "Health services education firm",
            "Greenbery Radiology home page"
            );
            break;
        
            case "btnPhPeople":
            NewImg = new Array 
            (
            "images/portfolio/photopeopa.jpg",
            "images/portfolio/photopeopb.jpg",
            "images/portfolio/photopeopc.jpg",
            "images/portfolio/photopeopd.jpg",
            "images/portfolio/photopeope.jpg",
            "images/portfolio/photopeopf.jpg",
            "images/portfolio/photopeopg.jpg",
            "images/portfolio/photopeoph.jpg",
            "images/portfolio/photopeopi.jpg",
            "images/portfolio/photopeopj.jpg",
            "images/portfolio/photopeopk.jpg",
            "images/portfolio/photopeopl.jpg",
            "images/portfolio/photopeopm.jpg",
            "images/portfolio/photopeoph.jpg",
            "images/portfolio/photopeopo.jpg",
            "images/portfolio/photopeopp.jpg",
            "images/portfolio/photopeopq.jpg",
            "images/portfolio/photopeopr.jpg",
            "images/portfolio/photopeops.jpg",
            "images/portfolio/photopeopt.jpg",
            "images/portfolio/photopeopu.jpg",
            "images/portfolio/photopeopv.jpg",
            "images/portfolio/photopeopw.jpg",
            "images/portfolio/photopeopx.jpg",
            "images/portfolio/photopeopy.jpg",
            "images/portfolio/photopeopza.jpg",
            "images/portfolio/photopeopzb.jpg"   
            );
            
             NewCaption = new Array 
            (
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " "   
            );
            break;
            
            case "btnPhPlaces":
            NewImg = new Array 
            (
            "images/portfolio/photoplacea.jpg",
            "images/portfolio/photoplaceb.jpg",
            "images/portfolio/photoplacec.jpg",
            "images/portfolio/photoplaced.jpg",
            "images/portfolio/photoplacee.jpg",
            "images/portfolio/photoplacef.jpg",
            "images/portfolio/photoplaceg.jpg",
            "images/portfolio/photoplaceh.jpg",
            "images/portfolio/photoplacei.jpg",
            "images/portfolio/photoplacej.jpg",
            "images/portfolio/photoplacek.jpg",
            "images/portfolio/photoplacel.jpg",
            "images/portfolio/photoplacem.jpg",
            "images/portfolio/photoplacen.jpg",
            "images/portfolio/photoplaceo.jpg"  
            );
            
             NewCaption = new Array 
            (
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " "  
            );
            break;
            
            case "brnPhThings":
            NewImg = new Array 
            (
            "images/portfolio/photothinga.jpg",
            "images/portfolio/photothingb.jpg",
            "images/portfolio/photothingc.jpg",
            "images/portfolio/photothingd.jpg",
            "images/portfolio/photothinge.jpg",
            "images/portfolio/photothingf.jpg",
            "images/portfolio/photothingg.jpg" 
            );
            
             NewCaption = new Array 
            (
            " ",
            " ",
            " ",
            " ",
            " ",
            " ",
            " " 
            );
            break;
             
        }
        
        var ImgLength = NewImg.length - 1;
         
        ImgNum = ImgNum + direction;
        if (ImgNum > ImgLength) 
        {
        ImgNum = 0;
        
        }
        if (ImgNum < 0) 
        {
        ImgNum = ImgLength;
        } 
        
        document.slideshow.src = NewImg[ImgNum];
        document.getElementById("captionText").innerHTML = NewCaption[ImgNum]; 
        
   }
    
}









