<!--

function getCookie(cookiename) {
  var myexpression = eval("/" + cookiename + "=([^;]*)/");
  myexpression.exec(document.cookie);
  return RegExp.$1;
}
function setCookie(name, value, expires) {
  document.cookie=name + "=" + escape(value) + "; path=/" + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString());
}
function delCookie(name) {
  document.cookie=name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/";
}

//======================================================================================

function button_reload(imageName) {if (document.images) 
   {imageReload = eval(imageName + ".src"); document[imageName].src = imageReload;}}
   
function button_on(imageName) {if (document.images) 
   {imageOn = eval(imageName + "_on.src"); document[imageName].src = imageOn;}}
   
function button_off(imageName) {if (document.images) 
   {imageOff = eval(imageName + ".src"); document[imageName].src = imageOff;}}

function button_off_blink(imageName) {if (document.images) 
   {imageOff = eval(imageName + ".src"); document[imageName].src = imageOff;
    button_reload('click4galleryLeft'); button_reload('click4galleryRight'); }}
      
function button_onOFF(imageName) {if (document.images) {

    if(imageName != 'scott')         button_on(imageName);

    if(imageName != 'mitzvahs')      button_off('mitzvahs');
    if(imageName != 'children')      button_off('children');
    if(imageName != 'weddingsBW')    button_off('weddingsBW');
    if(imageName != 'engagements')   button_off('engagements');
    if(imageName != 'weddingsColor') button_off('weddingsColor');
    if(imageName != 'pregnancy')     button_off('pregnancy');
    if(imageName != 'portraiture')   button_off('portraiture');
    if(imageName != 'modeling')      button_off('modeling');
    if(imageName != 'animals')       button_off('animals');
    if(imageName != 'nature')        button_off('nature');
    if(imageName != 'reality')       button_off('reality');
    if(imageName != 'melancholy')    button_off('melancholy');
    if(imageName != 'about' &&
       imageName != 'contact' &&
       imageName != 'photoOfMonth' &&
       imageName != 'onlineProofing' &&
       imageName != 'testimonials' &&
       imageName != 'weddingLinks' &&
       imageName != 'scott')
                                   { button_reload('click4galleryLeft');
                                     button_reload('click4galleryRight'); }
   }  
}
   
function showCircle(imageSrc,imageName) {if (document.images) 
   {imageNew = eval(imageSrc + ".src"); document[imageName].src = imageNew;}}

//======================================================================================

function ce() {window.status='Click to enlarge';return true;}

function ep() {window.status='Ellis Photography'; return true;}

//======================================================================================

function writeMorePerspectivesLink() {

if (getCookie('ellisphotog') == 'Animation_OFF')
{document.write(
'<a href="http://ellisphotog.com/mainOFF.htm">' +
'<img border="0" src="images/main/C200scott.jpg" width="200" height="200">' +
'<br>More Perspectives from<br>Ellis Photography</a>');
}
else
{document.write(
'<a href="http://ellisphotog.com/mainON.htm">' +
'<img border="0" src="images/main/C200scott.jpg" width="200" height="200">' +
'<br>More Perspectives from<br>Ellis Photography</a>');
}

}

//======================================================================================

function writeNavigation(lines) {


REchild=/children/;
REchil2=/children2/;
REbabie=/babies/;
REbabi2=/babies2/;
REbabi3=/babies3/;

pPath='';  nPath='';

if(location.pathname.match(REchild)) {nPath='babies/';     pPath='babies3/'; }
if(location.pathname.match(REbabie)) {nPath='babies2/';    pPath='children/'; }
if(location.pathname.match(REbabi2)) {nPath='babies3/';    pPath='babies/'; }
if(location.pathname.match(REbabi3)) {nPath='children/';   pPath='babies2/'; }


document.write(
'<table border="0" cellpadding="0" cellspacing="0">' +
'  <tr>' +
'    <td align="center" nowrap>');

if(lines=='all') document.write(
  '<a href="../main.htm" target="_top">Home</a> ' +
'| <a href="../' +pPath+ 'index.htm" target="_top">Prev</a> ' +
'| <a href="../' +nPath+ 'index.htm" target="_top">Next</a></td>' +
  '</tr><tr><td align="center" valign="bottom" nowrap height="18">' +
'  <a href="../about.htm" target="_top">About&nbsp;Us</a> ' +
'| <a href="../contact_main.htm" target="_top">Contact&nbsp;Us</a>');

if(lines=='all-on-one-line') document.write(
  '<a href="../main.htm" target="_top">Home</a> ' +
'| <a href="../about.htm" target="_top">About&nbsp;Us</a> ' +
'| <a href="../contact_main.htm" target="_top">Contact&nbsp;Us</a> ' +
'| <a href="../' +pPath+ 'index.htm" target="_top">Prev</a> ' +
'| <a href="../' +nPath+ 'index.htm" target="_top">Next</a>');

if(lines=='homeOnly') document.write(
  '<a href="../main.htm" target="_top">Home</a>');

if(lines=='line1') document.write(
  '<a href="../main.htm" target="_top">Home</a> ' +
'| <a href="../' +pPath+ 'index.htm" target="_top">Prev</a> ' +
'| <a href="../' +nPath+ 'index.htm" target="_top">Next</a>');

if(lines=='line2') document.write(
  '<a href="../about.htm" target="_top">About&nbsp;Us</a> ' +
'| <a href="../contact_main.htm" target="_top">Contact&nbsp;Us</a>');

document.write(
'    </td>' +
'  </tr>' +
'</table>');
}

//=========================================================================================

function writeMainImage(category,animation,altFileName) {

// animation = 'check' means to check the cookie for "Animation_OFF"
// animation = 'noFlash' means to use the category+'NoFlash.gif' regardless of the
//              cookie value.  'noFlash' is used for the 2nd, 3rd, etc. galleries for
//              a large category, such as weddingsBW2, weddingsBW3, etc.  The 'category'
//              argument to this function in these cases would be 'weddingsBW' (no 2 or 3)

if(!altFileName) {altFileName = category;}
else {
  if(altFileName=='' || altFileName==' ') {altFileName = category;}
}
extraSpace = '';
arg = location.search.slice(1);
if(arg) {
   argSplit = arg.split('&');
   fpic = argSplit[0];
   wpic = argSplit[1];
   hpic = argSplit[2];
   zref = 'index.htm';
   if( argSplit.length > 3 ) extraSpace=argSplit[3];
   document.write('<a href="' +zref+ '"><img border="0" src="' +fpic+ 
   '" width="' +wpic+ '" height="' +hpic+ '"></a>');
   if(extraSpace != '' && extraSpace != 'HolidayMsg') {
     document.write('<br><table border="0"><tr><td height="' +extraSpace+ '"></td></tr></table>');
     }
   if(extraSpace == 'HolidayMsg') {
     document.write('<br><img border="0" src="HappyHolidaysMessage.gif" width="360" height="60">');
     }
}
else {
  if (getCookie('ellisphotog') == 'Animation_OFF' || (animation == 'noFlash') ) {
    if (animation != 'noFlash') {
      document.write('<img border="0" src="'+altFileName+'NoFlash.gif" width="280" height="360">'); }
    else {
      document.write('<img border="0" src="../'+category+'/'+altFileName+'NoFlash.gif" width="280" height="360">'); }
  }
  else {
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
+' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '
+' WIDTH=280 HEIGHT=360> <PARAM NAME=movie VALUE="'+category+'.swf"> <PARAM NAME=loop VALUE=false> '
+' <PARAM NAME=quality VALUE=high> '
+' <PARAM NAME=bgcolor VALUE=#000000> <EMBED src="'+category+'.swf" loop=false quality=high bgcolor=#000000  '
+' WIDTH=280 HEIGHT=360 TYPE="application/x-shockwave-flash" '
+' PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
+' </EMBED></OBJECT>');
  }
}

}

//======================================================================================

// -->

