function featurePageTitle(cap1,cap2,cap3){
var fpTitle='<div class="titleBox">';
fpTitle+='<div class="titlecaption1">'+cap1+'<'+'/div>';
fpTitle+='<div class="titlecaption2">'+cap2+'<'+'/div>';
fpTitle+='<div class="titlecaption3">'+cap3+'<'+'/div>';
fpTitle+='<'+'/div>';
document.write(fpTitle);
}

function featurePagePic(thePic,theName,wantCap,theCap,picWt,picHt,isLinked,theLinkURL,thethumbPath,imgClass,capClass){
var fpPic='<div class="sidePicBox" align="right">';
if (isLinked>0){fpPic+='<a href="'+theLinkURL+'">';}
fpPic+='<img src="'+thethumbPath+thePic+'" alt="'+theName+'" width="'+picWt+'" height="'+picHt+'" hspace="0" vspace="0" border="0" title="'+theName+'" class="'+imgClass+'">';
if (isLinked>0){fpPic+='<'+'/a>';}
fpPic+='<'+'/div>';
if (wantCap>0){
fpPic+='<div class="'+capClass+'">'+theCap+'<'+'/div>';}
document.write(fpPic);
}

function featurePagePopupPic(theThumb,thumbPath,thumbW,thumbH,altTagCap,isPageCap,pageCap,pageCapSolo,picLaunch,thePic,picPath,thePicW,thePicH,winName,isWinCap,winCap,isWinCredit,winCredit,iFPth,imgClass,capClass,xtraHt,isXtraCap,xtraCap){
var fpPopPic='<div class="sidePicBox">';
if (picLaunch==0){
fpPopPic+='<img src="'+thumbPath+theThumb+'" alt="'+altTagCap+'" title="'+altTagCap+'" width="'+thumbW+'" height="'+thumbH+'" border="0" hspace="0" vspace="0" class="'+imgClass+'">';
}
else {
fpPopPic+='<a href="javas'+'cript:launchPic(\''+thePic+'\','+eval(thePicW)+','+eval(thePicH)+',\''+picPath+'\',\''+altTagCap+'\','+eval(isWinCap)+',\''+altTagCap+'\','+eval(isWinCredit)+',\''+winCredit+'\',\''+winName+'\',\''+iFPth+'\','+eval(xtraHt)+','+eval(isXtraCap)+',\''+xtraCap+'\')">';
fpPopPic+='<img src="'+thumbPath+theThumb+'" alt="'+altTagCap+'" title="Click to see a larger version" width="'+thumbW+'" height="'+thumbH+'" border="0" hspace="0" vspace="0" class="'+imgClass+'"><'+'/a>';
}
if (isPageCap>0){
fpPopPic+='<'+'/div>';
//pageCapSolo is > 0 when there's a need to put a Photographer credit
 if (pageCapSolo>0){fpPopPic+='<div class="'+capClass+'">'+pageCap+'<'+'/div>';}
 else {fpPopPic+='<div class="'+capClass+'">'+pageCap+'<'+'/div>';}
}
else{fpPopPic+='<'+'/div>'};
document.write(fpPopPic);
}

function writeTabHead(lineHt,isTab,theText,tabClass,iFPth,preText,preTextClass,fullLine){
//if (preLine!="0"){preLine="1";}
if (fullLine!="1"){fullLine="0";}
var wTabH='<table border="1" cellspacing="0" cellpadding="0" width="100%">';
wTabH+='<tr>';
if (fullLine=="1"){
wTabH+='<td colspan="5" valign="top" class="'+tabClass+'">';
wTabH+='&nbsp;'+theText+'<'+'/td>';
}
else{
wTabH+='<td align="right" valign="top" class="'+preTextClass+'">'+preText+'&nbsp;&nbsp;<'+'/td>';
wTabH+='<td>&nbsp;<'+'/td>';
wTabH+='<td valign="top">';
if (isTab>0){
wTabH+='<table border="0" cellspacing="0" cellpadding="0"><tr><td class="'+tabClass+'">';
wTabH+='&nbsp;'+theText+'&nbsp;<'+'/td><'+'/tr><'+'/table>';
}
wTabH+='<'+'/td>';
wTabH+='<td>&nbsp;<'+'/td>';
wTabH+='<td>&nbsp;<'+'/td>';
}
wTabH+='<'+'/tr>';
wTabH+='<tr>';
wTabH+='<td colspan="5" class="tabLineColor">';
wTabH+='<img src="'+iFPth+'spacer.gif" alt="" width="10" height="'+lineHt+'" hspace="0" vspace="0"><'+'/td><'+'/tr>';
wTabH+='<tr><td><img src="'+iFPth+'spacer.gif" alt="" width="135" height="12" hspace="0" vspace="0"><'+'/td>';
wTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="5" height="12" hspace="0" vspace="0"><'+'/td>';
wTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="472" height="12" hspace="0" vspace="0"><'+'/td>';
wTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="12" height="12" hspace="0" vspace="0"><'+'/td>';
wTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="146" height="12" hspace="0" vspace="0"><'+'/td>';
wTabH+='<'+'/tr><'+'/table>';
document.write(wTabH);
}

function writeSubTabHead(lineHt,lineColor,isTab,theText,tabClass,iFPth,preText,preTextClass,postText,postTextClass){
var wSubTabH='<div align="center"><table border="0" cellspacing="0" cellpadding="0" width="100%">';
wSubTabH+='<tr>';
wSubTabH+='<td align="right" valign="top" class="'+preTextClass+'">'+preText+'&nbsp;&nbsp;<'+'/td>';
wSubTabH+='<td>&nbsp;<'+'/td>';
wSubTabH+='<td valign="top">';
if (isTab>0){
wSubTabH+='<table border="0" cellspacing="0" cellpadding="0"><tr><td class="'+tabClass+'">';
wSubTabH+='&nbsp;'+theText+'&nbsp;<'+'/td><'+'/tr><'+'/table>';
}
wSubTabH+='<'+'/td>';
wSubTabH+='<td>&nbsp;<'+'/td>';
wSubTabH+='<td align="left" valign="top" class="'+postTextClass+'">'+postText+'<'+'/td>';
wSubTabH+='<'+'/tr>';
wSubTabH+='<tr><td><img src="'+iFPth+'spacer.gif" alt="" width="146" height="12" hspace="0" vspace="0"><'+'/td>';
wSubTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="14" height="12" hspace="0" vspace="0"><'+'/td>';
wSubTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="421" height="12" hspace="0" vspace="0"><'+'/td>';
wSubTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="12" height="12" hspace="0" vspace="0"><'+'/td>';
wSubTabH+='<td><img src="'+iFPth+'spacer.gif" alt="" width="146" height="12" hspace="0" vspace="0"><'+'/td>';
wSubTabH+='<'+'/tr><'+'/table><'+'/div>';
document.write(wSubTabH);
}

function launchPic(pic,width,height,path,winTitle,isCap,cap,isCredit,photographer,winName,iFPth,xtraHt,isXtraCap,xtraCap) {
if (isCap>0){
if (xtraHt>0){
var newHt=eval(xtraHt);
var newHt2=newHt+height;
var winFeatures='width='+(width+26)+',height='+(height+newHt)+',dependent,left=0,top=0';
}
else {
if (navigator.appVersion.lastIndexOf('Mac')!=-1) {var winFeatures='width='+(width+26)+',height='+(height+38)+',dependent,left=0,top=0';}
else {var winFeatures='width='+(width+26)+',height='+(height+42)+',dependent,left=0,top=0';}
}
}
else{
if (navigator.appVersion.lastIndexOf('Mac')!=-1) {var winFeatures='width='+(width+26)+',height='+(height+18)+',dependent,left=0,top=0';}
//PC needs more height
else {var winFeatures='width='+(width+26)+',height='+(height+30)+',dependent,left=0,top=0';}
}

newwin=window.open('',winName,winFeatures);
setTimeout('newwin.focus();',250);
var doc=newwin.document; 
doc.open('text/html','replace');
var sMarkup='<html lang="en"><head><title>'+winTitle+'<'+'/title>';

sMarkup+='<style type="text/css">';
sMarkup+='.picBorderCol {border:1px solid #777777;}';
sMarkup+='td {font-family:Arial, Helvetica, sans-serif;font-size:11px;}';
sMarkup+='td.theCap {background-color:#000000;color:#ffffff;padding-left:4px;}';
sMarkup+='td.theCredit {background-color:#000000;color:#ffffff;text-align:right;}';
if (isCap=="2"){
sMarkup+='td.theCap {background-color:#ffffff;color:#000000;padding-left:4px;}';
sMarkup+='td.theCredit {background-color:#ffffff;color:#000000;text-align:right;}';
}
sMarkup+='//--><'+'/style><'+'/head>';
sMarkup+='<body bgcolor="#ffffff" topmargin="12" leftmargin="0" marginheight="12" marginwidth="0">';
sMarkup+='<div align="center"><table cellspacing="0" cellpadding="1" border="0" bgcolor="#ffffff"><tr><td align="center" valign="middle">';
sMarkup+='<div align="center"><table cellspacing="0" cellpadding="0" border="0" width="'+width+'"><tr><td align="center" valign="middle" colspan="2">';
sMarkup+='<img src="'+path+pic+'" width="'+width+'" height="'+height+'" vspace="0"><'+'/td><'+'/tr>';

var theColspan=2;
if (isCap>0){
if (isCredit>0){theColspan=1};
sMarkup+='<tr><td colspan="2"><img src="'+iFPth+'spacer.gif" width="10" height="2" vspace="0"><'+'/td><'+'/tr>';
//sMarkup+='<tr><td colspan="2" class="popUpCap"><img src="'+iFPth+'spacer.gif" width="10" height="2" vspace="0"><'+'/td><'+'/tr>';
sMarkup+='<tr><td valign="top" class="popUpCap" nowrap colspan="'+theColspan+'"';
if (isCredit==0){sMarkup+=' align="center" ';}
sMarkup+='>&nbsp;'+cap+'<'+'/td>';
if (isCredit>0){sMarkup+='<td valign="top" class="popUpCredit" nowrap align="right">Photo: '+photographer+'&nbsp;<'+'/td>';}
sMarkup+='<'+'/tr>';
}

if (isXtraCap>0){
sMarkup+='<tr><td colspan="2" class="popUpCap"><img src="'+iFPth+'spacer.gif" width="10" height="2" vspace="0"><'+'/td><'+'/tr>';
if (xtraHt>0){
sMarkup+='<tr><td colspan="2"><img src="'+iFPth+'spacer.gif" width="10" height="1"><'+'/td><'+'/tr>';
sMarkup+='<tr><td colspan="2"><img src="'+iFPth+'spacer.gif" width="10" height="4"><'+'/td><'+'/tr>';
sMarkup+='<tr><td valign="top" class="popUpCap" colspan="2">'+xtraCap+'<'+'/td><'+'/tr>';
sMarkup+='<tr><td colspan="2"><img src="'+iFPth+'spacer.gif" width="10" height="4"><'+'/td><'+'/tr>';
}
}

sMarkup+='<'+'/table><'+'/div>';
//sMarkup+='<'+'/td><'+'/tr><'+'/table>';
sMarkup+='<'+'/div><'+'/body><'+'/html>';
doc.write(sMarkup);
doc.close();
}

