/*-------------------------------------------------------------------------------------------------------------------------------------------------------------
		Creates 2D array of teaser info
			teasers[i](section,item_title,href,pic_src,pic_title,description)
		
			sections so far
				Nova Scotia
				People
				Places
				Fun Things
				Updates
				Stupidity	
				Opinions
		
			functions
				random_teasers(num,omit)				write (num) random teasers - no repeats
				
	
																					
------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

/* create and load arrays */

var teasers = new Array()
	teasers[0] = new Array("Fun Things","Wrecking the House","wrecking.html","images/thumbs/wrecking.jpg","I love my recip saw.","There is nothing quite as much fun as wrecking the house.")	
	teasers[1] = new Array("People","Kids","kids.html","images/thumbs/kids.jpg","The Kids are Alright","We are proud of the whole batch, and rightly so. They are smart, independent, opinionated and confident. Must be genetic.")
	teasers[2] = new Array("Nova Scotia","Nova Scotia","novascotia.html","images/thumbs/novascotia.jpg","Excellent! Come Visit!","Okay, so you don't have to move here. But be sure to visit. There are a million things to see and do.")
	teasers[3] = new Array("Nova Scotia","This Old House","house.html","images/thumbs/house.jpg","Why? Because it's Fun, of course.","Everywhere we go we like to buy a house that needs a bit of TLC. Nova Scotia is no exception.")
	teasers[4] = new Array("People","Us","us.html","images/thumbs/us.jpg","Ain't We Sweet?","Aren't we cute? Come see some more pics of the two old freaks.")
	teasers[5] = new Array("Fun Things","Cats","pussy1.html","images/thumbs/cats.jpg","Dogs have Owners, Cats have Staff - I know because I am the Doorman","Cats have been an endless source of amusement to me my whole life, and I am happy to be able to serve them as they deserve.")
	teasers[6] = new Array("People","Them","them.html","images/thumbs/them.jpg","Yes, all our friends are freaks, too.","Friends and relations who didn't know better than to duck my camera.")
	teasers[7] = new Array("Places","East Coulee","coulee.html","images/thumbs/eastcoulee.jpg","The true depth of my weirdness becomes evident...","The best gardens so far, and some more weird vernacular architecture...")
	teasers[8] = new Array("Places","Mexico","mexico.html","images/thumbs/mexico.jpg","A tropical paridise - and still pretty cheap.","Sun, sand, and cerveza. The people are friendly, the food is tasty and the pace is relaxed. I love it.")
	teasers[9] = new Array("Places","Ferintosh","ferintosh.html","images/thumbs/ferintosh.jpg","Hanging out by the Beach","The best kept secret in Alberta, and one of the friendliest communities I know. There is something to be said for keeping things small.")
	teasers[10] = new Array("Places","Shantytown","shantytown.html","images/thumbs/shantytown.jpg","Totally Freakville","An accidental experiment in alternative housing. Seasonal dwelling in six sheds.")
	teasers[11] = new Array("Places","China","china1.html","images/thumbs/china.jpg","May you live in interesting times","China is a fascinating place. Everything is so different that you might as well be visiting aliens. What fun!")
	teasers[12] = new Array("Fun Things","Squeaky","squeaky.html","images/thumbs/squeaky.jpg","Far Freaking Out Man","Now this is one styling ride! Squeaky the magic bus took us to Mexico in time for my 40th birthday.")
	teasers[13] = new Array("Fun Things","Fire","fire.html","images/thumbs/fire.jpg","Burn baby burn","There is nothing like sitting there by the fire with some meat on a stick and a cold beer. That's the life.")
	teasers[14] = new Array("Fun Things","Taz","taz.html","images/thumbs/taz.jpg","One Really Freaking Smart Dog","This is Taz. He sure was one hell of a nice dog.")
	teasers[15] = new Array("Nova Scotia","Fun Times","fun.html","images/thumbs/fun.jpg","Nova Scotia is a Fun Place","We love Nova Scotia because we love to have fun, and Nova Scotia is Canada's Ocean Playground.")
	teasers[16] = new Array("Fun Things","Ballet","ballet.html","images/thumbs/ballet.jpg","Still Lots of Fun and All","Wow, you call this a job? Well I guess the sixteen hour days qualify... Hmmm...")
	teasers[17] = new Array("Nova Scotia","Bear River","bearriver.html","images/thumbs/bearriver.jpg","Very styling, and really cheap!","Someone is going to buy this house, and then Herself is going to kick herself around the block for ever after.")
	teasers[18] = new Array("Stupidity","Crazy Step","crazystep.html","images/thumbs/crazystep.jpg","Do Not Use this Product","You don't need this. Nobody does. But I use mine all day everyday. Get yours now.")
	teasers[19] = new Array("Stupidity","Stupid Products","stupid.html","images/thumbs/stupid.jpg","Just Stupid Shit","What a lot of crap. Who thinks of this stuff anyway?.")


	
function random_teasers(num){
	document.write("<h3>More Ways to Waste Your Time:</h3>")
	var flags = new Array()
	for(i=0; i<teasers.length; i++){ flags[i]=0 }
	j = 0
	str1 = document.URL
	str2 = str1.substr(str1.lastIndexOf("/")+1)
	
	while(j<num){
		k = Math.floor((Math.random()*teasers.length))
		if((teasers[k][2]!=str2)&&(flags[k]==0)){
			document.write("<dl class='teaser'><dt><a href='"+teasers[k][2]+"'>"+teasers[k][1]+"</a></dt><dd class='pic'><a href='"+teasers[k][2]+"'><img src='"+teasers[k][3]+"' alt='' title='"+teasers[k][4]+"' /></a></dd><dd>"+teasers[k][5]+"</dd></dl>")
			flags[k] = 1
			j = j+1
			}
		}
	}
	
/*- the TimeMachine -*/

var timemachine = new Array()
	timemachine[0] = new Array("Updates","Nov 2008","updatenov08.html","images/thumbs/update0.jpg","All work and no play makes Jack a dull boy.","Some housewrecking here, but actually looks like a lot of slacking off, too.")
	timemachine[1] = new Array("Updates","Jan 2009","updatejan09.html","images/thumbs/update1.jpg","Come see the new kitchen","She went away for two weeks, and when she got back there was a whole new kitchen")
	timemachine[2] = new Array("Updates","Feb 2009","updatefeb09.html","images/thumbs/update2.jpg","Blah blah blah","The housewrecking continues, and the website gets a whole new look.")
	timemachine[3] = new Array("Updates","Apr 2009","updateapr09.html","images/thumbs/update3.jpg","The Latest Project","Introducing the next project, a great old farmhouse in need of some TLC - our speciality.")
	timemachine[4] = new Array("Updates","May 2009","updatemay09.html","images/thumbs/update4.jpg","House for Sale","Spring has sprung, the house is finished, and work begins on the new place.")
	timemachine[5] = new Array("Updates","May 2009 - II","updatemay092.html","images/thumbs/update5.jpg","Sold","Holy Crap! The house sold right away! Now we have to get the new place ready in a month!")
	timemachine[6] = new Array("Updates","May 2009 - III","updatemay093.html","images/thumbs/update6.jpg","The New Place","Mostly pictures of the new place, which is an absolute wreck right now!")
	timemachine[7] = new Array("Updates","July 2009","updatejul09.html","images/thumbs/update7.jpg","White Trash Idiot","The house is better than it was, Las Vegas is fabulous, and the kids got married!")
	timemachine[8] = new Array("Updates","Sept 2009","updatesep09.html","images/thumbs/update8.jpg","Whalewatching","Went whalewatching, had a few beers, had a few fires, had some company, had some fun.")
	timemachine[9] = new Array("Updates","Nov 2009","updatenov09.html","images/thumbs/update9.jpg","Nothing to Report","Just up to our usual tricks.")
	timemachine[10] = new Array("Updates","Dec 2009","updatedec09.html","images/thumbs/update10.jpg","Wrecking the House Again!","Just when you thought it was safe to go back in the kitchen...")
	timemachine[11] = new Array("Updates","Dec 2009- II","updatedec092.html","images/thumbs/update11.jpg","Return to Ferintosh","Next up - a cute little house in a cute little village.")
	timemachine[12] = new Array("Updates","Jan 2010","updatejan10.html","images/thumbs/update12.jpg","Snow Holiday","Just hanging out on a snowy day. And then, of course, we wreck the house!")
	timemachine[13] = new Array("Updates","Feb 2010","updatefeb10.html","images/thumbs/update13.jpg","Deluxe Accommodations","Enough with the work already, time to eat some lobster!")
	timemachine[14]= new Array("Updates","Mar 2010","updatemar10.html","images/thumbs/update14.jpg","Here we go again...","Another Sold sign, and just in time - I'm sick of eating lobster!")
	timemachine[15]= new Array("Updates","","#","images/thumbs/updateindex.jpg","","")
	
function writetimemachine(start){
	document.write("<h3>The Time Machine:</h3><div id='scrollbox'>")
	i=start
	str1 = document.URL
	str2 = str1.substr(str1.lastIndexOf("/")+1)
	for ( j=0; j<timemachine.length; j++ ) {
		timemachinestring = "<dl class='timeteaser'><dt><a href='"+timemachine[i][2]+"'>"+timemachine[i][1]+"</a></dt><dd class='pic'><a href='"+timemachine[i][2]+"'><img src='"+timemachine[i][3]+"' alt='' title='"+timemachine[i][4]+"' /></a></dd><dd>"+timemachine[i][5]+"</dd></dl>"
		if(timemachine[i][2]==str2)	{
			timemachinestring = "<dl class='timeteaser'><dt><a class='red' href='"+timemachine[i][2]+"'>"+timemachine[i][1]+"</a></dt><dd class='pic'><a href='"+timemachine[i][2]+"'><img src='"+timemachine[i][3]+"' alt='' title='"+timemachine[i][4]+"' /></a></dd><dd>"+timemachine[i][5]+"</dd></dl>"
		}
			document.write(timemachinestring)
			i++
			if(i>=timemachine.length){
			i=0
			}
	}
	document.write("</div>")
}


function writetimemachine_old_backup(start){
	document.write("<h3>The Time Machine:</h3><div id='scrollbox'>")
	i=start
	str1 = document.URL
	str2 = str1.substr(str1.lastIndexOf("/")+1)
	for ( j=0; j<timemachine.length; j++ ) {
		timemachinestring = "<dl class='timeteaser'><dt><a href='"+timemachine[i][2]+"'>"+timemachine[i][1]+"</a></dt><dd class='pic'><a href='"+timemachine[i][2]+"'><img src='"+timemachine[i][3]+"' alt='' title='"+timemachine[i][4]+"' /></a></dd><dd>"+timemachine[i][5]+"</dd></dl>"
		if(timemachine[i][2]==str2)	{
			timemachinestring = "<dl class='timeteaser'><dt><a class='red' href='"+timemachine[i][2]+"'>"+timemachine[i][1]+"</a></dt><dd class='pic'><a href='"+timemachine[i][2]+"'><img src='"+timemachine[i][3]+"' alt='' title='"+timemachine[i][4]+"' /></a></dd><dd>"+timemachine[i][5]+"</dd></dl>"
		}
			document.write(timemachinestring)
			i++
			if(i>=timemachine.length){
			i=0
			}
	}
	document.write("</div>")
}
