<!--

// These server variables capture the server that this site is located on for the benefit of user error capture
var loc=this.location + "";
var mySplit=loc.split('/'); // grabbing the server name... if needed
var servername=(mySplit[2] + "/" + mySplit[3]); // grabbing the current server name
var protocol=(mySplit[0]) + "//";  // grabbing the protocol... if needed
var server=protocol + servername + "/";

function lastUpdated() {
	datUpdated = new Date(document.lastModified) ;
	datMonth = datUpdated.getMonth() + 1 ;
	datDate = datUpdated.getDate() ;
	datYear = datUpdated.getYear() ;
	document.write("<font class=\"copyright\"><i>This document was last updated on " + datMonth + "/" + datDate + "/" + datYear + "</i></font>") ;
}

function sendAlert() {
	parent.variables.document.form1.alert_hidden_num.value=0;
}

var quoteMe=new Array(
'\"These are the good ol\' days too... live \'em!\" - PRB 2004'
,'\"...It is interesting though, when an Engineer designs a piece with pure function in mind, how the product is quite often an object of great beauty. Rarely does an Artist design a piece with pure beauty in mind, where the outcome is an object of great function.\" - PRB 2004'
,'\"I can never remember the meaning of mnemonic.\" - PRB 2004'
,'\"Eschew obfuscation.\" - Sheila\'s Dad'
,'\"People that don\'t think, aren\'t\" - PRB 2003, A variation on \"I think, therefore I am,\" René Descartes, 17th century.'
,'\"Good and evil, dumb and smart, beautiful and ugly... will (continue to) exist as long as the human race exists, or as long as any being that is capable of comprehending the difference.\" - PRB 2003'
,'\"Equality is the only fair way... total equality is unfair.\" - PRB 2003'
,'\"Survival of the fittest exists for all species on earth... except humans.\" - PRB 2003'
,'\"If words, if language didn\'t exist, what would you think about?\" - PRB 2003'
,'\"Who is happier, the smartest person or the most ignorant person on earth?\" - PRB 2003'
,'\"The more you learn, the more you find you need to learn.\" - PRB 2003'
,'\"Sight is sometimes best left unseen.\" - PRB 2003'
,'\"Patience rewards exponentially greater than instant gratification.\" - PRB 2003'
,'\"By choice or otherwise, eventually all life \'goes with the flow.\'\" - PRB 2003'
,'\"If a tree falls in the forest, or anywhere for that matter, Norma rejoices.\" - (inside joke) PRB 2003');

function forcedKnowledge(whichFool,whichQuote) {
	if (parent.variables.document.form1.alert_hidden_num.value==0) {
		var youSuck="";
		parent.variables.document.form1.IQ_hidden_num.value++;
		var total=parent.variables.document.form1.totalIQ_hidden_num.value++;
		var IQtest=parent.variables.document.form1.IQ_hidden_num.value;
		var youFool=new Array('Now why would you select an empty thumbnail image?! Please make a real selection.'
		,'Why did you abort my load?'
		,'Now why would you select an empty image preview?! Please make a real selection.');
		if (IQtest > quoteMe.length) {
			youSuck="You\'ve tapped my quote array - we\'re starting from square one with you!" + "\n\n";
			parent.variables.document.form1.IQ_hidden_num.value=0;
			nextQuote=0;
			nextQuote++;
			IQtest=0;
		}
		else {
			nextQuote=IQtest;
		}
		alert(
			(youFool[whichFool-1]) + "\n" +
			"That\'s " + (total+1) + " error(s) since you\'ve landed in my gallery!\n\n" +
			"\n\n\n" + (youSuck) + (quoteMe[nextQuote-1])
		);
		if (total==10) {
			alert("I don\'t allow ignorance in my gallery... if you havn\'t learned by now, it\'s likely that you never will.  This is your last warning!");
		}
		else if (total>10) {
			alert("Goodbye!");
			top.window.location="http://www.learnthenet.com/english/section/www.html";
		}
	}
}

function Mailme(MLS) {
	if (confirm('If you\'re not prompted to send an email note with experiment instructions, contact PETER BARTON at \"myagent@pocatellopeter.com\"... or call 208.201.2715 and I will quickly get you started with the experiment.')) {
		var myString="mailto:?cc=myagent@pocatellopeter.com&amp;subject=Experiment - CASH for 7 Degrees of Separation&amp;body=This RE/MAX Agent, Peter Barton, is putting up $200 of his own money if this experiment works! You could make some quick CASH - it\'s simple, just view this real estate listing (http://www.pocatellopeter.com/peterlistings.asp%23";
		myString=myString + MLS + ") and decide if you want to buy it. If not, forward this email to all your contacts and give them a chance to win some CASH too. If you are interested in purchasing this property, STOP and contact Peter now at 208-201-2715. YOU ARE DONE! Here is an explanation of how this works... Have you ever heard of the concept of 7 degrees of Separation? To recap the concept, this means that everyone in the world is inter-connected through just 7 other people... for instance: you (1)-your friend (2)-her friend (3)-his mom (4)-her uncle (5)-his friend (6)-your sister (7)-and back to you (1). Makes this planet seem a bit smaller doesn\'t it. So here is the idea... If that concept is true, the same concept should be true of selling real estate, or anything for that matter. If this experiment produces a buyer that purchases this listing or any real estate listed on this website, the REALTOR (Peter Barton) will personally reward, WITH CASH, each participant that made the direct connection from the buyer all the way back to you (including the buyer). This is how the $200 is rewarded - If the connection to the buyer is made in exactly 7 degrees, each person in that string will receive $28.57 in US dollars ($200/7). If the connection is made in just 2 degrees, each person in that string will receive $100 US dollars ($200/2).... You may participate in this experiment as many times as you wish. FOR COMPLETE INSTRUCTIONS AND RULES OF THE EXPERIMENT, or TO PARICIPATE AGAIN, GO TO http://www.pocatellopeter.com/7degrees.asp";
		this.location=myString;
	}
}

function Mailme_Remax() {
	if (confirm('Thanks for your interest, my new website is nearly finished!\nIn the meantime, feel free to drop me note to \"myagent@pocatellopeter.com\"... or call 208.201.2715 and ask for Peter.')) {
		this.location="mailto:myagent@pocatellopeter.com?subject=I am interested in your Real Estate Services&body=Dear Peter Barton,";
	}
}

function swapLink(linknumber,linkletter,gallery) {
	if (linknumber) {
		var myPath1="parent.variables.document.form1.gallery" + gallery + "_hidden_num";
		eval(myPath1).value = linknumber;
	}
	if (linkletter) {
		var myPath2="parent.variables.document.form1.gallery" + gallery + "_hidden_let";
		eval(myPath2).value = linkletter;
	}
}

function goWhere(gallery,hidden,image) {
	parent.variables.document.form1.alert_hidden_num.value = 1;
	var myPath="parent.variables.document.form1.gallery" + hidden + "_hidden_num.value";
	var goHere = (gallery) + eval(myPath) + '.html';
	var amIblank = eval("document." + image);
	// alert(amIblank.src + " and " + server + "images/blank_preview_passive.gif");
	if (amIblank.src == server + 'images/blank_preview_passive.gif') {
		sendAlert();
		forcedKnowledge(3,1);
	}
	else {
		this.location=goHere;
	}
}

function checkFrames() {
	if (parent.variables) {
		changePreviews();
		changeBak('','','freshLoad');
	}
	else {
		top.location="index.html";
	}
}

function changePreviews() {
	var oneNum=parent.variables.document.form1.gallery1_hidden_num.value;
	var oneLet=parent.variables.document.form1.gallery1_hidden_let.value;
	var twoNum=parent.variables.document.form1.gallery2_hidden_num.value;
	var twoLet=parent.variables.document.form1.gallery2_hidden_let.value;
	var threeNum=parent.variables.document.form1.gallery3_hidden_num.value;
	var threeLet=parent.variables.document.form1.gallery3_hidden_let.value;
	// three main images
	if (oneNum=='blank') {
		this.document.prb_r7_c2.src = "images/blank_preview_passive.gif"; // PAST - Loadin a blank preview
	}
	else {	
		this.document.prb_r7_c2.src = "images/past/" + oneNum + oneLet + "_preview_passive.jpg"; // PAST
	}		
	this.document.prb_r7_c12.src = "images/present/" + twoNum + twoLet + "_preview_passive.jpg"; // PRESENT
	if (threeNum=='blank') {
		this.document.prb_r7_c22.src = "images/blank_preview_passive.gif"; // FUTURE - Loadin a blank preview
	}
	else {
		this.document.prb_r7_c22.src = "images/future/" + threeNum + threeLet + "_preview_passive.jpg"; // FUTURE
	}	

	// preview angles thumbnails - PAST
	this.document.prb_r9_c03.src = "images/past/" + oneNum + "a_thumb_passive.gif";
	this.document.prb_r9_c05.src = "images/past/" + oneNum + "b_thumb_passive.gif";
	this.document.prb_r9_c07.src = "images/past/" + oneNum + "c_thumb_passive.gif";
	this.document.prb_r9_c09.src = "images/past/" + oneNum + "d_thumb_passive.gif";
	// preview angles thumbnails - PRESENT
	this.document.prb_r9_c13.src = "images/present/" + twoNum + "a_thumb_passive.gif";
	this.document.prb_r9_c15.src = "images/present/" + twoNum + "b_thumb_passive.gif";
	this.document.prb_r9_c17.src = "images/present/" + twoNum + "c_thumb_passive.gif";
	this.document.prb_r9_c19.src = "images/present/" + twoNum + "d_thumb_passive.gif";
	// preview angles thumbnails - PRESENT
	this.document.prb_r9_c23.src = "images/future/" + threeNum + "a_thumb_passive.gif";
	this.document.prb_r9_c25.src = "images/future/" + threeNum + "b_thumb_passive.gif";
	this.document.prb_r9_c27.src = "images/future/" + threeNum + "c_thumb_passive.gif";
	this.document.prb_r9_c29.src = "images/future/" + threeNum + "d_thumb_passive.gif";
}

function showHideLayer(which,doWhat) {
var x;
var past=parent.variables.document.form1.gallery1_hidden_num.value;
var present=parent.variables.document.form1.gallery2_hidden_num.value;
var future=parent.variables.document.form1.gallery3_hidden_num.value;
	if ((which=='past_hover' && past=='blank') || (which=='present_hover' && present=='blank') || (which=='future_hover' && future=='blank')) {
		// NOTHING FOR NOW
	}
	else {
	    if (navigator.appName == 'Netscape' && document.layers != null) {
	        // NOTHING FOR NOW
	    }
		else if (document.all != null) { //IE
			x=eval("this." + which + ".style");
			x.visibility = doWhat;
		}
	}
}

var arrayVal,passiveColor,activeColor // setting up global variables
function changeBak(whichThumb,whichGal,thumb) { // this currently only works in IE
    if (navigator.appName == 'Netscape') {
        // NOTHING FOR NOW
    }
	else {
		if (whichGal == 'Present') { // present color
			passiveColor="#C0C0C0";
		}
		else { // past and future color
			passiveColor="#AA9C84";
		}
		activeColor="#000000";
		if (thumb == 'top') { // this fires off onClick
			arrayVal = new Array('one','two','three','four','five','six','seven','eight'); // represents top thumbnails
			onClickLoop(whichThumb,whichGal,thumb);
		}
		else if (thumb == 'bottom') { // this fires off onClick
			arrayVal = new Array('a','b','c','d'); // represents lower thumbnails
			onClickLoop(whichThumb,whichGal,thumb);
		}
		else if (thumb == 'freshLoad') { // this fires off onLoad
			var oneNum=parent.variables.document.form1.gallery1_hidden_num.value;
			var twoNum=parent.variables.document.form1.gallery2_hidden_num.value;
			var threeNum=parent.variables.document.form1.gallery3_hidden_num.value;
			var galleries = new Array(oneNum,twoNum,threeNum);
			// alert("past=" + galleries[0] + " / present=" + galleries[1] +" / future=" + galleries[2]);
			var numbers = new Array(1,2,3,4,5,6,7,8); // represents top thumbnails
			var spellings = new Array('one','two','three','four','five','six','seven','eight'); // represents top thumbnails
			onLoadLoop();
		}
	}
}

function onClickLoop(whichThumb,whichGal,thumb) {
	for (z=0;z<arrayVal.length;z++) {
	myVar=arrayVal[z]+"";
	passMeA="this." + arrayVal[z] + "Bak" + whichGal;
	passMe=eval(passMeA);
		if (myVar==whichThumb) { // active color
			passMe.style.backgroundColor=activeColor;
			if (thumb == 'top') {
				acheck=eval("this.aBak" + whichGal);
				bcheck=eval("this.bBak" + whichGal);
				ccheck=eval("this.cBak" + whichGal);
				dcheck=eval("this.dBak" + whichGal);
				acheck.style.backgroundColor=activeColor;
				bcheck.style.backgroundColor=passiveColor;
				ccheck.style.backgroundColor=passiveColor;
				dcheck.style.backgroundColor=passiveColor;
			}
		}
		else { // passive color
			passMe.style.backgroundColor=passiveColor;
		}
	}
}

function onLoadLoop(whichThumb,whichGal,thumb) {
// do nothing
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

/* Functions that swaps images. */
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];}
}
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 FWOnLoad() {
    if (FwPrevHook) {
        FwPrevHook();
    }
    FWLoadInit();
}

function FWHookLoad() {
    var agent = navigator.userAgent;
    var hookPrev = true;
    if (agent.indexOf("MSIE") != -1 && agent.indexOf("Mac_") != -1) {
        hookPrev = false;
    }
    if (hookPrev) {
        FwPrevHook = window.onload;
    } else {
        FwPrevHook = false;
    }
    window.onload = FWOnLoad;
}