<!--

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 != 'seniors')       button_off('seniors');
    if(imageName != 'corporate')     button_off('corporate');
    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 writeCorporateLink() {

//if (getCookie('ellisphotog') == 'Animation_OFF')
//{document.write(
//'<a href="http://elliscorporatephotography.com/mainOFF.htm"' +
//'onMouseOver="showCircle(\'C200corporate\',\'cc\'); button_onOFF(\'corporate\');"' +
//'><img border="0" name="corporate"' +
//'src="images/main/corporate.gif" width="90" height="32"></a>');
//}
//else
//{document.write(
//'<a href="http://elliscorporatephotography.com/mainON.htm"' +
//'onMouseOver="showCircle(\'C200corporate\',\'cc\'); button_onOFF(\'corporate\');"' +
//'><img border="0" name="corporate"' +
//'src="images/main/corporate.gif" width="90" height="32"></a>');
//}

document.write(
'<a href="http://elliscorporatephotography.com/index.htm"' +
'onMouseOver="showCircle(\'C200corporate\',\'cc\'); button_onOFF(\'corporate\');"' +
'><img border="0" name="corporate"' +
'src="images/main/corporate.gif" width="90" height="32"></a>');

}

//======================================================================================

function writeKidsLink() {

//NOTE: IF WE DON'T NEED TO TEST FOR "Animation_OFF", THEN WE CAN PUT THE CODE
//      DIRECTLY IN THE main.htm PAGE.
//
//	HOWEVER, we may want to test in the future and go to a choice of
//	"intro_OFF.htm" or "intro_ON.htm" with flash movie that doesn't ask
//	about high speed or slow speed.  Thus, keeping these functions for now.
//

//if (getCookie('ellisphotog') == 'Animation_OFF')
//{document.write(
//'<a href="http://elliskidsphotography.com/mainOFF.htm"' +
//'onMouseOver="showCircle(\'C200children\',\'cc\'); button_onOFF(\'children\');"' +
//'><img border="0" name="children"' +
//'src="images/main/children.gif" width="90" height="32"></a>');
//}
//else
//{document.write(
//'<a href="http://elliskidsphotography.com/mainON.htm"' +
//'onMouseOver="showCircle(\'C200children\',\'cc\'); button_onOFF(\'children\');"' +
//'><img border="0" name="children"' +
//'src="images/main/children.gif" width="90" height="32"></a>');
//}

document.write(
'<a href="http://elliskidsphotography.com/index.htm"' +
'onMouseOver="showCircle(\'C200children\',\'cc\'); button_onOFF(\'children\');"' +
'><img border="0" name="children"' +
'src="images/main/children.gif" width="90" height="32"></a>');

}

//======================================================================================

function writeNavigation(lines) {

REmelan=/melancholy/;
REmela2=/melancholy2/;
REchild=/children/;
REchil2=/children2/;
REmitzv=/mitzvahs/;
REmitz2=/mitzvahs2/;
REwedB1=/weddingsBW/;
REwedB2=/weddingsBW2/;
REwedB3=/weddingsBW3/;
REwedB4=/weddingsBW4/;
REwedB5=/weddingsBW5/;
REengag=/engagements/;
REenga2=/engagements2/;
REwedC1=/weddingsColor/;
REwedC2=/weddingsColor2/;
REwedC3=/weddingsColor3/;
REwedC4=/weddingsColor4/;
REwedC5=/weddingsColor5/;
REwedC6=/weddingsColor6/;
REwedC7=/weddingsColor7/;
REwedC8=/weddingsColor8/;
REwedC9=/weddingsColor9/;
REwedCA=/weddingsColor10/;
REpregn=/pregnancy/;
REpreg2=/pregnancy2/;
REportr=/portraiture/;
REport2=/portraiture2/;
REport3=/portraiture3/;
REport4=/portraiture4/;
REfamil=/family/;
REreali=/reality/;
REmodel=/modeling/;
REmode2=/modeling2/;
REanima=/animals/;
REanim2=/animals2/;
REnatur=/nature/;

pPath='';  nPath='';

if(location.pathname.match(REwedC1)) {nPath='weddingsColor2/';  pPath='engagements/';    }
if(location.pathname.match(REwedC2)) {nPath='weddingsColor3/';  pPath='weddingsColor/';  }
if(location.pathname.match(REwedC3)) {nPath='weddingsColor4/';  pPath='weddingsColor2/'; }
if(location.pathname.match(REwedC4)) {nPath='weddingsColor5/';  pPath='weddingsColor3/'; }
if(location.pathname.match(REwedC5)) {nPath='weddingsColor6/';  pPath='weddingsColor4/'; }
if(location.pathname.match(REwedC6)) {nPath='weddingsColor7/';  pPath='weddingsColor5/'; }
if(location.pathname.match(REwedC7)) {nPath='weddingsColor8/';  pPath='weddingsColor6/'; }
if(location.pathname.match(REwedC8)) {nPath='weddingsColor9/';  pPath='weddingsColor7/'; }
if(location.pathname.match(REwedC9)) {nPath='weddingsColor10/'; pPath='weddingsColor8/'; }
if(location.pathname.match(REwedCA)) {nPath='mitzvahs/';        pPath='weddingsColor9/'; }
if(location.pathname.match(REmitzv)) {nPath='mitzvahs2/';       pPath='weddingsColor10/';}
if(location.pathname.match(REmitz2)) {nPath='weddingsBW/';      pPath='mitzvahs/';       }
if(location.pathname.match(REwedB1)) {nPath='weddingsBW2/';     pPath='mitzvahs2/';      }
if(location.pathname.match(REwedB2)) {nPath='weddingsBW3/';     pPath='weddingsBW/';     }
if(location.pathname.match(REwedB3)) {nPath='weddingsBW4/';     pPath='weddingsBW2/';    }
if(location.pathname.match(REwedB4)) {nPath='weddingsBW5/';     pPath='weddingsBW3/';    }
if(location.pathname.match(REwedB5)) {nPath='engagements/';     pPath='weddingsBW4/';    }
if(location.pathname.match(REengag)) {nPath='engagements2/';    pPath='weddingsBW5/';    }
if(location.pathname.match(REenga2)) {nPath='weddingsColor/';   pPath='engagements/';    }


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>');
  }
}

}

//======================================================================================

// -->

