// Copyright (c) 2011 SoftwareDr.com. All rights reserved. 
// Unauthorized duplication or use of this code is prohibited. 

var navBtns=new Array();
var i=0;
navBtns[i++]="clients";
navBtns[i++]="blog-@wp2";
navBtns[i++]="details";
navBtns[i++]="contact";
var nNavBtns=i;
var $e=60;
var $f=35;
function doResize(){
var h=window.innerHeight||document.body.clientHeight;
var w=window.innerWidth||document.body.clientWidth;
if(h<660)
h=660;
var tc=document.getElementById("tableContainer");
var sc=document.getElementById("scrollContent");
var pg=document.getElementById("page");
var $g=document.getElementById("logo");
if(pg)pg.style.height=h-2*80;
if(tc)tc.style.height=h-2*80-40;
if(sc)sc.style.height=h-2*80-40;
if($g)$g.style.top=h-2*80-40;
if(w<980){
var $h=document.getElementById("content");
w=w-220;
if(w<500)
w=500;
$h.style.width=w;}}
window.onresize=doResize;
function btnName($i){
if($i.indexOf(":")>0)
$i=$i.substr(0,$i.indexOf(":"));
if($i.indexOf("-")>0)
$i=$i.substr(0,$i.indexOf("-"));
return $i;}
function btnUrl($j,$i){
$k=btnName($i);
var $l=$j+$k+".html";
if($i.indexOf(":")>0)
$l=btnUrl($j+$k+"/",$i.split(":")[1].split(",")[0]);
else if($i.indexOf("-")>=0){
$l=$j+$i.split("-")[1];
if($l.indexOf("@")!=-1)
$l="http://www.bluepeachphotography.com/"+$l.substr($l.indexOf("@")+1);}
return $l;}
function initPage($j){
preventContextMenu();
doResize();}
var $m=0;
var $n=0;
function btnActive($j,$o,$p){
if(document.images){
document[$o].src=$j+"images/nav/"+$o+"2.png";
if($p)
return;
var $q=document.getElementById($o+"sub");
if($n&&$n!=$q)
$n.style.visibility="hidden";
if($q&&$q!=$n)
$q.style.visibility="visible";
$m=1;
$n=$q}}
function btnNormal($j,$o,$p){
if(document.images){
document[$o].src=$j+"images/nav/"+$o+".png";
$m=0;
if(!$p)
setTimeout("hideDiv('"+$o+"')",500);}}
function hideDiv(id){
if($m)
return;
if(showElement(id+"sub",0))
$n=0;}
function showElement(id,$r){
var $q=document.getElementById(id);
if($q){
$q.style.display=$r?"block":"none";
return 1;}
return 0;}
function writeNavigation($j,$s){
writeNavList($j,0,"main",$s,nNavBtns,navBtns);}
function writeSubNavigation($s){
if(document.getElementById("popup"))
return;
var $t="";
if($s=="gallery")
$t="gallery/";
else if($s=="blog"){
$t="/gallery/";
$s="gallery";}
var $u="newborn,family,teen,child";
var $v=$u.split(",");
writeNavList($t,"gallery","sub",$s,4,$v);}
function writeInfoNavigation(){
document.writeln("<ul>");
document.writeln("<li><a href='welcome'>Welcome</a></li>");
document.writeln("<li>Client Information");
document.writeln("<ul>");
document.writeln("<li>Newborns</li>");
document.writeln("<li>Children & Families</li>");
document.writeln("<li>Seniors</li>");
document.writeln("<li>What to wear</li>");
document.writeln("</ul></li>");
document.writeln("<li>Policies</li>");
document.writeln("<li><a href='contact.html'>Contact</a></li>");
document.writeln("</ul>");}
function writeNavList($j,$w,$x,$s,$y,$z){
document.writeln("<ul class='"+$x+"nav' id='"+$w+"'>");
var $A="";
if($w=="gallery")
document.writeln("<li id='mn0' class='active'><a href='#'> </a></li>");
for(var j=0;j<$y;j++){
var $i=btnName($z[j]);
var $B=($z[j].indexOf($s)>=0);
var $l=btnUrl($j,$z[j]);
$i="&nbsp;"
if($B)
document.writeln("<li id='mn"+(j+1)+"' class='active' "+$A+"><a href='#'>"+$i+"</a></li>");
else
document.writeln("<li id='mn"+(j+1)+"' "+$A+"><a href='"+$l+"' "+$A+">"+$i+"</a></li>");}
document.writeln("</ul>");}
function writeFooter(){
document.writeln("All content Copyright &copy; 2007-2012 Blue Peach Photography. All rights reserved.<br>Serving the Dexter, Chelsea, and Ann Arbor, Michigan areas.");}
function writeLogo($j){
if($j=="nolink")
document.writeln("<img border='0' src='images/logo_small.png' width='140' height='60'>");
else
document.writeln("<a href='"+$j+"index.html'><img border='0' src='"+$j+"images/logo_small.png' width='140' height='60'></a>");}
function focusGalleryId(){
document.gallery_form.gallery_id.value="";}
var $l="";
function submitGallery($C){
var $D="sample";
if(this.document.gallery_form&&!$C)
$D=this.document.gallery_form.gallery_id.value;
var $E="http://www.bluepeachphotography.com/client/"+$D;
$l=$E+"/slideshow.html";
var $F=new Image();
$F.onload=$a;
$F.onerror=$b;
$F.src=$E+"/2x2.gif";
return false;}
function $a(){
$G='width='+screen.width;
$G+=', height='+screen.height;
$G+=', top=0, left=0';
$G+=', fullscreen=yes, resizable=yes, scrollbars=yes';
$G+=', directories=no, toolbar=no, location=no, status=no, menubar=no, copyhistory=no';
var $H=window.open($l,'Gallery',$G);
if(!$H||!$H.top)
alert("Please disable the popup blocker for this site and try again.");}
function $b(){
alert("Invalid password.");
document.gallery_form.gallery_id.value="";
document.gallery_form.gallery_id.focus();}
var $I;
var $J=0;
var $K="";
function nextBtn($L){
if($L>=0){
if(btnName($I[$L])==$K)
document[$K].src="images/"+$K+"page.png";
else
btnNormal("",btnName($I[$L]),1);}
$L++;
if($L<$J){
btnActive("",btnName($I[$L]),1);
setTimeout("nextBtn("+$L+")",200);}}
function highlightButtons($z,$M,$s){
$I=$z;
$J=$M;
$K=$s;
setTimeout("nextBtn(-1)",1500);}
var sscurImg=0;
var $N=new Array();
var ssbase="";
var $O="blenddiv";
var $P="blendimage";
var $Q=0;
var imageClickCB=0;
var imageShownCB=0;
var ssCounterMode="index";
function setupSlideshow($R,$S){
$O=$R;
$P=$S;}
function changeOpac($T,id){
var $U=document.getElementById(id);
if(!$U)
return;
$U=$U.style;
$U.opacity=($T/100);
$U.MozOpacity=($T/100);
$U.KhtmlOpacity=($T/100);
$U.filter="alpha(opacity="+$T+")";
if($T==100)
document.getElementById($O).style.backgroundImage="url("+document.getElementById(id).src+")";}
var $V=0;
function updateImage($W){
if(imageShownCB)
imageShownCB(sscurImg);
var $X=ssbase+ssimgs[sscurImg];
var $Y=800;
if(!document.getElementById($O)){
$V=0;
return;}
document.getElementById($O).style.backgroundImage="url("+document.getElementById($P).src+")";
changeOpac(0,$P);
document.getElementById($P).src=$X;
var $Z=0;
var $00=Math.round($Y/100);
for(i=0;i<=100;i+=2){
setTimeout("changeOpac("+i+",'"+$P+"')",($Z*$00));
$Z++;}
if(document.getElementById("counter")){
if(ssCounterMode=="index")
document.getElementById("counter").innerHTML=(sscurImg+1)+"/"+ssnImg;
else if(ssCounterMode=="file"){
$X=ssimgs[sscurImg];
if($X.indexOf("/ss")==-1)
$X="";
else{
$X=$X.replace("Slideshow/ss","");
$X=$X.replace(".jpg","");
$X=$X.replace(".JPG","");}
document.getElementById("counter").innerHTML=$X;}}
if(sscurImg<ssnImg-2){
$N[sscurImg+1]=new Image();
$N[sscurImg+1].src=ssbase+ssimgs[sscurImg+1];
$N[sscurImg+2]=new Image();
$N[sscurImg+2].src=ssbase+ssimgs[sscurImg+2];}
if($W){
$Q=setTimeout("advanceAndUpdate()",sstimes[sscurImg]*1000);}}
function advanceCounter(d){
sscurImg+=d;
if(sscurImg>=ssnImg)sscurImg=0;
if(sscurImg<0)sscurImg=ssnImg-1;}
function advanceAndUpdate(){
advanceCounter(1);
updateImage(1);}
function nextImage($W){
advanceCounter(1);
stopSlideShow(1);
updateImage($W&&$V);
if(imageClickCB)
imageClickCB();}
function prevImage(){
advanceCounter(-1);
updateImage(0);
stopSlideShow();
if(imageClickCB)
imageClickCB();}
function startSlideShow($W){
if($V>0)
return;
$V=1;
if(!$W)
sscurImg=0;
updateImage(1);
preventContextMenu();}
function stopSlideShow($W){
if(!$W)
$V=0;
if($Q)clearTimeout($Q);
$Q=0;}
function writeSlideShowTable(w,h,$01){
if(!$01)
$01=ssbase+ssimgs[0];
document.writeln("<table border='0' cellspacing='0' id='SlideShowTable'>");
document.writeln("  <tr><td width='100%' align='center'>");
var i='"'+$01+'"';
document.writeln("<div align='center' style='background-image: url("+i+"); background-repeat: no-repeat; width: "+w+"px; height: "+h+"px' id='blenddiv'>");
document.writeln("<img border='0' onclick='javascript:nextImage(1)' src='"+$01+"' style='width: "+w+"px; height: "+h+"px; border: none; filter: alpha(opacity=0); -moz-opacity: 0; opacity: 0;' id='blendimage' alt=''/>");
document.writeln("</div></td></tr></table>");}
function preventContextMenu(){
if(document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=$d;}
else{
document.onmouseup=$d;
document.oncontextmenu=$c;}
document.oncontextmenu=new Function("return false");
var $l=window.location.href.toLowerCase();
if(!($l.indexOf("file://")==0||$l.search("galleries/photoprojects")!=-1)&&!($l.indexOf("http://www.bluepeachphotography")==0)){
alert("You are not authorized to use this code.");
self.location.href="http://www.bluepeachphotography.com";}}
var $02="";
function $c(){
if(document.all){($02);
return false;}}
function $d(e){
if(document.layers||(document.getElementById&&!document.all)){
if(e.which==2||e.which==3){($02);
return false;}}}


