// image preloader and swap


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}




// check browser

bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
    if ((bName == "Netscape" && bVer >= 3) || 
        (bName == "Microsoft Internet Explorer" && bVer >= 4)) br = "n3"; 
    else br = "n2";
    
// force screen redraw in Navigator

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);





//mailer_script.js



function mailme(name,text,subject,body){
	d="timothysutton";
	e=".com";
	str='<a href="mailto:' + name + '@' + d + e  
	if(subject != ""){
		str+='?subject=' + subject
		if(body!="")str+="&body=" + body
	}
	str+= '">'
	if(text==""){
		str+= name + '@' + d + e
	}else{
		str+= text
	}
	str+='</a>'


	document.write(str);
};


//gallery pop up pages

function gallerypopup(theurl)
{
 // set the width and height
 var the_width=520;
 var the_height=550;
 // set other attributes
 var has_toolbar='no';
 var has_location='no';
 var has_directories='no';
 var has_status='no';
 var has_menubar='no';
 var has_scrollbars='no';
 var is_resizable='no';
 // attributes put together
 var the_atts='width='+the_width+',height='+the_height;
 the_atts+=',toolbar='+has_toolbar+',location='+has_location+',directories='+has_directories+',status='+has_status;
 the_atts+=',menubar='+has_menubar+',scrollbars='+has_scrollbars+',resizable='+is_resizable;
 // open window
 window.open(theurl,'',the_atts);
	if (window.focus) {newwindow.focus()}
}


//image preloader

function pageloader()
{
MM_preloadImages('../timothysuttondir/images/tim_on.jpg')
}


function petloader()
{
MM_preloadImages('../timothysuttondir/images/pets/hebe01aa.jpg','../timothysuttondir/images/pets/cleo01aa.jpg','../timothysuttondir/images/pets/blossom01aa.jpg','../timothysuttondir/images/pets/polly01aa.jpg','../timothysuttondir/images/pets/bill01aa.jpg','../timothysuttondir/images/pets/oscar01aa.jpg','../timothysuttondir/images/pets/laura01aa.jpg','../timothysuttondir/images/pets/boingy01aa.jpg','../timothysuttondir/images/pets/stella01aa.jpg','../timothysuttondir/images/pets/rubyt01aa.jpg','../timothysuttondir/images/pets/monty01aa.jpg','../timothysuttondir/images/pets/jazz01aa.jpg','../timothysuttondir/images/pets/douglas01aa.jpg','../timothysuttondir/images/pets/louis01aa.jpg','../timothysuttondir/images/pets/otto01aa.jpg','../timothysuttondir/images/pets/buster01aa.jpg','../timothysuttondir/images/pets/chelsea01aa.jpg','../timothysuttondir/images/pets/amber01aa.jpg','../timothysuttondir/images/pets/ned01aa.jpg','../timothysuttondir/images/pets/chloe01aa.jpg','../timothysuttondir/images/pets/oliver01aa.jpg','../timothysuttondir/images/pets/fauna01aa.jpg','../timothysuttondir/images/pets/kaija01aa.jpg','../timothysuttondir/images/pets/olly02aa.jpg','../timothysuttondir/images/pets/boris01aa.jpg','../timothysuttondir/images/pets/tilly01aa.jpg','../timothysuttondir/images/pets/breet01aa.jpg','../timothysuttondir/images/pets/poppy01aa.jpg','../timothysuttondir/images/pets/florence01aa.jpg','../timothysuttondir/images/pets/george01aa.jpg')
}

function peopleloader()
{
MM_preloadImages('../timothysuttondir/images/people/amelia01aa.jpg','../timothysuttondir/images/people/cherie01aa.jpg','../timothysuttondir/images/people/kai01aa.jpg','../timothysuttondir/images/people/livia01aa.jpg','../timothysuttondir/images/people/jeremy01aa.jpg','../timothysuttondir/images/people/sylvia01aa.jpg','../timothysuttondir/images/people/ayleen01aa.jpg','../timothysuttondir/images/people/bertie02aa.jpg')
}