window.focus();
var picArray = new Array;
var selectedPicIndex = 1;

function doNothing(){ window.focus();}

function switchPic(picIndex){
    selectedPicIndex = picIndex;
    mainPic.src = picArray[picIndex];
    for(i = 1; i < picArray.length; i++){
        eval("document.no" + i + ".src = 'talents/images/no" + i + "a.gif';");
    }
    eval("document.no" + picIndex + ".src = 'talents/images/no" + picIndex + "b.gif';");
}

function writeNumbers(totalPages, pageNumber, pageFile){
    var num = "";
    for(i = 1; i < totalPages+1; i++){
        if(i != pageNumber){
            num += "<a href=\"" + pageFile + i + ".html\" onMouseOver=\"document.no" + i + ".src='talents/images/no" + i + "b.gif';\" onMouseOut=\"document.no" + i + ".src='talents/images/no" + i + "a.gif';\">";
            num += "<img src=\"talents/images/no" + i + "a.gif\" border=0 name=no" + i + "></a>";
        }
        else{
            num += "<img src=\"talents/images/no" + i + "b.gif\" border=0 name=no" + i + ">";
        }
    }
    num += "<br>";
    document.write(num);
}

function topNavigation(actorName, portfolioLink, videoLink, contactLink, activeLink){
    //contactLink = "mailto:AltalaVistaFilms@attbi.com";
    var text = "";
    text += "<table cellpadding=0 cellspacing=0 border=0 width=695>";
    text += "<tr>";
    text += "    <td align=left valign=top>";
    text += "        <img src=\"" + actorName + "\" border=0><br>";
    text += "    </td>";
    text += "    <td align=left valign=top>";
    if(activeLink != "portfolio"){
        text += "        <a href=\"" + portfolioLink + "\" onMouseOver=\"document.portfolio.src='talents/images/nav_portfolio_b.gif';\" onMouseOut=\"document.portfolio.src='talents/images/nav_portfolio_a.gif';\">";
        text += "        <img src=\"talents/images/nav_portfolio_a.gif\" border=0 name=portfolio></a><br>";
    }
    else{
        text += "        <img src=\"talents/images/nav_portfolio_b.gif\" border=0 name=portfolio><br>";
    }
    text += "    </td>";
    text += "    <td align=left valign=top>";
    if(activeLink != "videos"){
        text += "        <a href=\"" + videoLink + "\" onMouseOver=\"document.videos.src='talents/images/nav_videos_b.gif';\" onMouseOut=\"document.videos.src='talents/images/nav_videos_a.gif';\">";
        text += "        <img src=\"talents/images/nav_videos_a.gif\" border=0 name=videos></a><br>";
    }
    else{
        text += "        <img src=\"talents/images/nav_videos_b.gif\" border=0 name=videos><br>";
    }
    text += "    </td>";
    text += "    <td align=left valign=top>";
    text += "        <a href=\"" + contactLink + "\" onMouseOver=\"document.contact.src='talents/images/nav_contact_b.gif';\" onMouseOut=\"document.contact.src='talents/images/nav_contact_a.gif';\">";
    text += "        <img src=\"talents/images/nav_contact_a.gif\" border=0 name=contact><br>";
    text += "    </td>";
    text += "</tr>";
    text += "</table>";

    document.write(text);
}

function bottomNavigation(talentLink, feedbackLink, magnifyLink, leftArrowLink, rightArrowLink, homeLink, backLink, nextLink, nextTarget){
    var home = location.pathname;
    var homeLength = home.length;
    var filename = home.substr(homeLength-10, homeLength);
    if(talentLink == "index.html") talentLink = "home.html";
    if(filename == "index.html") homeLink = talentLink;
    //alert(filename);
    var text = "";
    text += "<table cellpadding=0 cellspacing=0 border=0 width=695>";
    text += "<tr>";
    text += "    <td align=left valign=top width=131>";
    text += "        <a href=\"" + talentLink + "\" onMouseOver=\"document.talent.src='talents/images/nav_talent_search_b.gif';\" onMouseOut=\"document.talent.src='talents/images/nav_talent_search_a.gif';\">";
    text += "        <img src=\"talents/images/nav_talent_search_a.gif\" border=0 name=talent><br>";
    text += "    </td>";
    text += "    <td align=left valign=top width=99>";
    text += "        <a href=\"" + feedbackLink + "\" onMouseOver=\"document.feedback.src='talents/images/nav_feedback_b.gif';\" onMouseOut=\"document.feedback.src='talents/images/nav_feedback_a.gif';\">";
    text += "        <img src=\"talents/images/nav_feedback_a.gif\" border=0 name=feedback><br>";
    text += "    </td>";
    text += "    <td align=left valign=top width=133>";
    text += "        <a href=\"" + magnifyLink + "\" onMouseOver=\"document.magnify.src='talents/images/nav_magnify_b.gif';\" onMouseOut=\"document.magnify.src='talents/images/nav_magnify_a.gif';\">";
    text += "        <img src=\"talents/images/nav_magnify_a.gif\" border=0 name=magnify><br>";
    text += "    </td>";
    text += "    <td align=right valign=top width=33>";
    text += "        <a href=\"" + leftArrowLink + "\" onMouseOver=\"document.left.src='talents/images/nav_left_arrow_b.gif';\" onMouseOut=\"document.left.src='talents/images/nav_left_arrow_a.gif';\">";
    text += "        <img src=\"talents/images/nav_left_arrow_a.gif\" border=0 name=left><br>";
    text += "    </td>";
    text += "    <td align=left valign=top width=99>";
    text += "        <a href=\"" + rightArrowLink + "\" onMouseOver=\"document.right.src='talents/images/nav_right_arrow_b.gif';\" onMouseOut=\"document.right.src='talents/images/nav_right_arrow_a.gif';\">";
    text += "        <img src=\"talents/images/nav_right_arrow_a.gif\" border=0 name=right><br>";
    text += "    </td>";
    text += "	 <td width=31></td>";
    text += "    <td align=left valign=top width=60>";
    /*if(filename == "index.html"){
        text += "        <img src=\"talents/images/nav_home_b.gif\" border=0 name=home><br>";
    }
    else{*/
        text += "        <a href=\"" + homeLink + "\" onMouseOver=\"document.home.src='talents/images/nav_home_b.gif';\" onMouseOut=\"document.home.src='talents/images/nav_home_a.gif';\">";
        text += "        <img src=\"talents/images/nav_home_a.gif\" border=0 name=home></a><br>";
    //}
    text += "    </td>";
    text += "    <td align=left valign=top width=54>";
    text += "        <a href=\"" + backLink + "\" onMouseOver=\"document.back.src='talents/images/nav_back_b.gif';\" onMouseOut=\"document.back.src='talents/images/nav_back_a.gif';\">";
    text += "        <img src=\"talents/images/nav_back_a.gif\" border=0 name=back><br>";
    text += "    </td>";
    text += "    <td align=left valign=top width=55>";
    text += "        <a href=\"" + nextLink + "\" onMouseOver=\"document.next.src='talents/images/nav_next_b.gif';\" onMouseOut=\"document.next.src='talents/images/nav_next_a.gif';\"" + (nextTarget!=null?"target='" + nextTarget + "'":"") + ">";
    text += "        <img src=\"talents/images/nav_next_a.gif\" border=0 name=next><br>";
    text += "    </td>";
    text += "</tr>";
    text += "</table>";
    document.write(text);
}

function topLeft(zoom, stage){
    var text = "";
    text += "<table cellpadding=0 cellspacing=0 border=0 width=695>";
    text += "<tr>";
    text += "    <td align=center>";
    text += "        <img src=\"talents/images/line_horizontal.gif\" border=0><br>";
    text += "        <table cellpadding=0 cellspacing=0 border=0 width=695>";
    text += "        <tr>";
    text += "            <td align=right width=1>";
    text += "                <img src=\"talents/images/line_vertical" + (zoom?"_zoom":"") + (stage?"2":"") + ".gif\" background=\"talents/images/dot.gif\" border=0><br>";
    text += "            </td>";
    text += "            <td align=center width=693>";
    document.write(text);
}

function topLeft2(){
    var text = "";
    text += "<table cellpadding=0 cellspacing=0 border=0 width=695>";
    text += "<tr>";
    text += "    <td align=center>";
    text += "        <img src=\"talents/images/line_horizontal.gif\" border=0><br>";
    text += "        <table cellpadding=0 cellspacing=0 border=0 width=695>";
    text += "        <tr>";
    text += "            <td align=right width=1>";
    text += "                <img src=\"talents/images/line_vertical_z.gif\" background=\"talents/images/dot.gif\" border=0><br>";
    text += "            </td>";
    text += "            <td align=center width=693>";
    document.write(text);
}

function bottomRight(zoom, stage){
    var text = "";
    text += "            </td>";
    text += "            <td align=left width=1>";
    text += "                <img src=\"talents/images/line_vertical" + (zoom?"_zoom":"") + (stage?"2":"") + ".gif\" background=\"talents/images/dot.gif\" border=0><br>";
    text += "            </td>";
    text += "        </tr>";
    text += "        </table>";    
    text += "        <img src=\"talents/images/line_horizontal.gif\" border=0><br>";
    text += "    </td>";
    text += "</tr>";
    text += "</table>";
    document.write(text);
}

function bottomRight2(){
    var text = "";
    text += "            </td>";
    text += "            <td align=left width=1>";
    text += "                <img src=\"talents/images/line_vertical_z.gif\" background=\"talents/images/dot.gif\" border=0><br>";
    text += "            </td>";
    text += "        </tr>";
    text += "        </table>";    
    text += "        <img src=\"talents/images/line_horizontal.gif\" border=0><br>";
    text += "    </td>";
    text += "</tr>";
    text += "</table>";
    document.write(text);
}


function pop(movieFile, width, height, mvwid, mvhgt, text, pairWidth, pairHeight){
    sw = screen.width;
    sh = screen.height;
    if(pairWidth) width = pairWidth;
    if(pairHeight) height = pairHeight;
    wleft = sw/2 - width/2; // for centering across page
    wtop = sh/2 - height/2;

    var fileLength = 0;
    var fileExt = movieFile.substr(movieFile.length-3, movieFile.length);
    var filename = movieFile.substr(movieFile.length-7, 3);
    //alert(filename);
    //mvwid = width;
    //mvhgt = height;

    picWindow = open("", "mainSite"+filename, "width=" + (width) + ",height=" + (height) + ",toolbar=no,location=no,status=no,scrollbars=no,resizable=yes,left=" + wleft + ",top=" + wtop);
    picWindow.document.write("<html>");
    picWindow.document.write("<head>");

    picWindow.document.write("<title>Movie<\/title>");
    picWindow.document.write("<\/head>");
    picWindow.document.write("<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 bgcolor=black>"); // onBlur=self.close()>");
    picWindow.document.write("<table cellpadding=0 cellspacing=0 border=0 width=100% height=100% bgcolor=black>");
    picWindow.document.write("<tr>");
    picWindow.document.write("    <td align=center valign=middle width=100% height=100% bgcolor=black>");
    picWindow.document.write("      <table cellpadding=0 cellspacing=0 border=0 width=100% bgcolor=black>");
    picWindow.document.write("          <tr>");
    picWindow.document.write("              <td align=center valign=middle bgcolor=black>");

    if(fileExt == "jpg" || fileExt == "gif" || fileExt == "png"){
        picWindow.document.write("	                <a href=\"javascript:self.close();\">");
        picWindow.document.write("	                <img SRC=\"" + movieFile + "\" name=movie border=0><\/a>");
    }
    else{
        picWindow.document.write("	                <EMBED SRC=\"" + movieFile + "\" WIDTH=\"" + mvwid + "\" HEIGHT=\"" + mvhgt + "\" name=movie>");
        picWindow.document.write("	                <\/EMBED>");
    }

    picWindow.document.write("              <\/td>");
    picWindow.document.write("          <\/tr>");
    picWindow.document.write("      <\/table>");
    if(text)
        picWindow.document.write("      <br><span class=\"font-size: 12px; color: silver; font-family: verdana;\">" + text + "<\/span>");
    picWindow.document.write("    <\/td>");
    picWindow.document.write("<\/tr>");
    picWindow.document.write("<\/table>");
    picWindow.document.write("<\/body>");
    picWindow.document.write("<\/html>");
    picWindow.document.close();
    picWindow.focus();
}

function popFile(file, width, height){
    sw = screen.width;
    sh = screen.height;
    wleft = sw/2 - width/2; // for centering across page
    wtop = sh/2 - height/2;

    picWindow = open(file, "mainSite" + width + height, "width=" + (width) + ",height=" + (height) + ",toolbar=no,location=no,status=no,scrollbars=no,resizable=yes,left=" + wleft + ",top=" + wtop);
    picWindow.focus();
}

function popScrollableFile(file, width, height){
    sw = screen.width;
    sh = screen.height;
    wleft = sw/2 - width/2; // for centering across page
    wtop = sh/2 - height/2;

    picWindow = open(file, "scrollable", "width=" + (width) + ",height=" + (height) + ",toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,left=" + wleft + ",top=" + wtop);
    picWindow.focus();
}

function popFullScreenFile(file){
    sw = screen.width;
    sh = screen.height;
    wleft = 0; //sw/2 - width/2; // for centering across page
    wtop = 0; //sh/2 - height/2;

    picWindow = open(file, "scrollable", "width=" + (sw) + ",height=" + (sh-20) + ",toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,left=" + wleft + ",top=" + wtop);
    picWindow.focus();
}

function popScrollableImage(file, width, height){
    sw = screen.width;
    sh = screen.height;
    wleft = sw/2 - width/2; // for centering across page
    wtop = sh/2 - height/2;

    picWindow = open(file, "scrollable", "width=" + (width) + ",height=" + (height) + ",toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,left=" + wleft + ",top=" + wtop);
    picWindow.document.write("<html>");
    picWindow.document.write("<head>");

    picWindow.document.write("<title>Popup File<\/title>");
    picWindow.document.write("<\/head>");
    picWindow.document.write("<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 bgcolor=black>"); // onBlur=self.close()>");
    picWindow.document.write("<table cellpadding=0 cellspacing=0 border=0 width=100% height=100% bgcolor=black>");
    picWindow.document.write("<tr>");
    picWindow.document.write("    <td align=center valign=middle width=100% height=100% bgcolor=black>");
    picWindow.document.write("      <table cellpadding=0 cellspacing=0 border=0 width=100% bgcolor=black>");
    picWindow.document.write("          <tr>");
    picWindow.document.write("              <td align=center valign=middle bgcolor=black>");

    picWindow.document.write("	                <a href=\"javascript:self.close();\">");
    picWindow.document.write("	                <img SRC=\"" + file + "\" name=popfile border=0><\/a>");

    picWindow.document.write("              <\/td>");
    picWindow.document.write("          <\/tr>");
    picWindow.document.write("      <\/table>");
    picWindow.document.write("    <\/td>");
    picWindow.document.write("<\/tr>");
    picWindow.document.write("<\/table>");
    picWindow.document.write("<\/body>");
    picWindow.document.write("<\/html>");
    picWindow.document.close();
    picWindow.focus();
}


function popContact(){    
    // nothing yet...
    doNothing();
    
}

function changeInfo(imageName){
    document.images[14].src = imageName;
}

function jump(filename){
    window.location.href = filename;
}