// Contact Sheet scripts by Monicsoft
// Monicsoft (c)1994-2003
// t'be nice to send me a note if you manage to read and reuse any of this code :)
// NOTES: this code assumes that the thumbnails are [130x100|80x100] or [80x60|50x60]
//        separator is ¦180
// mailto:radu@monicsoft.net
mv="MonDoc v.0.46a";
function CBrowser(){this.ie4=(document.all)?true:false;this.ns4=(document.layers)?true:false;this.ns6=((document.getElementById)&&!this.ie4)?true:false;this.ie5=(this.ie4&&((navigator.userAgent.indexOf('MSIE 5')>0)||(navigator.userAgent.indexOf('MSIE 6')>0)))?true:false;return this}
CBrowser.prototype.init=function(){if(txt=document.location.search){a=unescape(txt).substring(1).split("&");for(i=0;i<a.length;i++){b=a[i].indexOf('=');eval("c.v['"+a[i].substring(0,b)+"']=c.filter('"+a[i].substring(b+1).replace(/\+/g,' ')+"')")}}up();c.mk();c.lst()}
CBrowser.prototype.w=function(txt){document.write(txt)}

var message="For more information please contact PhotoDocumentary:\n\nE-mail: info@photodocumentary.ca\n\nThank you.";function click(e){if(document.all){if(event.button==2){alert(message);return false}}
if(document.layers){if(e.which==3){alert(message);return false;}}}
if(document.layers){document.captureEvents(Event.MOUSEDOWN)}document.onmousedown=click;

function Pane(pName){this.name=pName;this.x=0;this.y=-1000;this.z=10;this.ww=0;this.hh=0;this.lay=null;return this}
Pane.prototype.init=function(){eval("this.lay=((b.ns4)?document."+this.name+":((b.ie4)?"+this.name+".style:((b.ns6)?document.getElementById('"+this.name+"'):null)));")}
Pane.prototype.w=function(txt){txt+="\n";if(b.ns4){eval("this.lay=document."+this.name+".document");this.lay.write(txt);this.lay.close()}if(b.ie4)document.all[this.name].innerHTML=txt;if(b.ns6){range=document.createRange();this.init();range.setStartBefore(this.lay);domfrag=range.createContextualFragment(txt);while(this.lay.hasChildNodes())this.lay.removeChild(this.lay.lastChild);this.lay.appendChild(domfrag)};this.init();return true}
Pane.prototype.s=function(){if(b.ns4)this.lay.visibility="show";if(b.ie4)this.lay.visibility="visible";if(b.ns6)this.lay.style.visibility="visible";return true}
Pane.prototype.h=function(){if(b.ns4)this.lay.visibility="hide";if(b.ie4)this.lay.visibility="hidden";if(b.ns6)this.lay.style.visibility="hidden";return true}
Pane.prototype.a=function(xs,ys,zs){xs=(xs=='X')?((b.ie4)?document.body.clientWidth-document.all[this.name].offsetWidth:((b.ns4)?innerWidth-this.lay.clip.width:0))/2:xs;this.x=xs;this.y=ys;if(typeof zs=='undefined'){var zs=this.z}else{this.z=zs}if(b.ns4||b.ie4){this.lay.left=xs;this.lay.top=ys;this.lay.zIndex=zs}else if(b.ns6){this.lay.style.left=xs+"px";this.lay.style.top=ys+"px";this.lay.style.zIndex=zs};return true}

var zWindow=null,ltw=130,ptw=80,th=30,sltw=80,sptw=50,sth=60,tab=false,links=new Array(
"Weddings¦weddings.html¦wedding.jpg¦port¦Weddings"
,"PhotoJournalism¦pj.html¦ceremony.jpg¦land¦Photo Journalism"
,"Portraits¦portrait.html¦portrait.jpg¦land¦Portraits"


,"Home¦index.html¦¦¦Go back to the home page"
,"Links¦links.html¦¦¦Links"
);
function show(set,i){eval("i=(("+i+"<0)?"+set+".length-1:(("+i+"=="+set+".length)?0:"+i+"))");eval("var a="+set+"["+i+"].split(\"¦\")");eval("zoom("+i+",'"+a[0]+"','jpg',"+a[2]+","+a[3]+","+a[5]+",'"+a[4]+"','"+a[6]+"','"+set+"')")}
function putUp(what,set,num,gal){if(!num)num=4;if(what.length)document.write("<h5 style='font: normal normal normal;'><br>Click on a picture to zoom in on it.</h5>\n<TABLE border=0 cellspacing=15 cellpadding=0>");for(txt='',i=j=0;i<what.length;i++){var a=what[i].split("¦");land=(a[7]=="land");sq=(a[7]=="sq");txt+=("<TD align=center>\n<A class='smaller' HREF=\"javascript:zoom("+i+",'"+a[0]+"','jpg',"+a[2]+","+a[3]+","+a[5]+",'"+a[4]+"','"+a[6]+"','"+set+"')\"><IMG SRC='i/"+a[0]+"_s."+a[1]+"' WIDTH="+(sq?30:(land)?ltw:ptw)+" HEIGHT="+th+" BORDER=0 ALT=\""+set+": "+a[4]+"\"><BR>"+a[4]+"</A></TD>\n");j++;if(j==num){j=0;txt+=("</TABLE>\n<TABLE border=0 cellspacing=15 cellpadding=0>")}}document.write(txt+"</TABLE>\n");for(i=0;i<links.length;i++){var a=links[i].split("¦");tabn=(a[2]!='');if((tab==true)&&(tabn==false)){document.write("</TR></TABLE>\n")}if((tab==false)&&(tabn==true)&&(typeof gal=='undefined')){document.write("<p><b>Gallery:</b><TABLE border=0 cellspacing=15 cellpadding=0><TR align=center>")}tab=tabn;if(typeof gal=='undefined')document.write(((set!=a[0])?(((tab)?"<TD>":"")+"<a class='smaller' href=\""+a[1]+"\""+((a[5])?" target='"+a[5]+"'":"")+">"+((tab)?"<img src='i/"+a[2]+"' border=0 width="+((a[3]!="land")?sptw:sltw)+" height="+sth+"><br>":"")+a[4]+"</a>"+((tab)?"</TD>\n":"\n<h5 style='font: normal normal normal;'>")):""))}if(typeof gal=='undefined')document.write((typeof(Form)=='undefined'?(what.length==0?"<h5 style='font: normal normal normal;'>":"")+/*"Tel: (613) 79-PHOTO<br>"+*/"<a href='mailto:info@photodocumentary.ca'>Email us</a> to request a <b>quote</b> for coverage of a wedding in the <a href='mailto:info@photodocumentary.ca?Subject=\"Inquiry: Wedding: Ottawa Region\"'>Ottawa region</a> and <a href='mailto:info@photodocumentary.ca?Subject=\"Inquiry: Wedding: Calgary\"'>Calgary</a><br><br>":"")+"\n<br>Pages optimized for InternetExplorer5 and screen areas of 800x600px or larger.<br>All images &copy; PhotoDocumentary</h5>")}
function zoom(no,pic,ext,ww,hh,ll,cap,txt,set){wm=ww+60;pict=pic+"."+ext;c.w("<TABLE width="+wm+" border=0 cellspacing=2 cellpadding=0 bgcolor=black align=center><TR valign=top><TD><b>&lt;&lt;&nbsp;<a style='text-decoration: none;' href=# onClick=\"show('"+set+"',"+(no-1)+");return false\">prev</a></b></TD><TD align=center><P><A style='text-decoration: none;' href=# onClick=\"c.w('');return false\">Back to the list</A></P></TD><TD align=right><b><a style='text-decoration: none;' href=# onClick=\"show('"+set+"',"+(no+1)+");return false\">next</a>&nbsp;&gt;&gt;</b></TD></TR><TR><TD colspan=3>\n<TABLE cellpadding=30 cellspacing=1 width="+wm+" bgcolor=#666666><TD align=center bgcolor=black>\n<IMG SRC=\"i/"+pict+"\" BORDER=\"0\" WIDTH="+ww+" HEIGHT="+hh+" ALT=\""+set+": "+cap+"\"><BR>"+txt+"\n</TD></TABLE></TD></TR></TABLE>");c.h();b.yof=(b.ie4)?document.body.scrollTop:pageYOffset;c.a('X',((b.yof<98)?98:b.yof));c.s()}

var c=new Pane('contact');
var b=new CBrowser();