// javascript and jscript source copyright (c) 2003 Thomas H. Field
var bname = navigator.appName;
var poppic = null;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function chIm() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<chIm.arguments.length; i+=2) {
			document[chIm.arguments[i]].src = chIm.arguments[i+1];
		}
	}
}

function makeArray(len) {
	for (var i = 0; i < len; i++) this[i] = null;
	this.length = len;
}
 
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		pictureA1  = newImage("hdr/lincornt.jpg");
		pictureA2  = newImage("hdr/cathgroupt.jpg");
		pictureA3  = newImage("hdr/capitolt.jpg");
		pictureA4  = newImage("hdr/jeffmoont.jpg");
		pictureA5  = newImage("hdr/firesett.jpg");
		pictureA6  = newImage("hdr/palmsunset.jpg");
		pictureA7  = newImage("hdr/ospreyt.jpg");
		pictureA8  = newImage("hdr/linctwilight.jpg");

		pictureB1  = newImage("hdr/goldwatert.jpg");
		pictureB2  = newImage("hdr/iceneedlest.jpg");
		pictureB3  = newImage("hdr/mesaarcht.jpg");
		pictureB4  = newImage("hdr/dragont.jpg");
		pictureB5  = newImage("hdr/furnacet.jpg");
		pictureB6  = newImage("hdr/purplet.jpg");
		pictureB7  = newImage("hdr/royt2.jpg");
		pictureB8  = newImage("hdr/scullerst.jpg");

		pictureC1  = newImage("hdr/ds100t.jpg");
		pictureC2  = newImage("hdr/ds104t.jpg");
		pictureC3  = newImage("hdr/ds106t.jpg");
		pictureC4  = newImage("hdr/ds110t.jpg");
		pictureC5  = newImage("hdr/ds120t.jpg");
		pictureC6  = newImage("hdr/ds128t.jpg");
		pictureC7  = newImage("hdr/ds132t.jpg");
		pictureC8  = newImage("hdr/ds101t.jpg");

		preloadFlag = true;
		picture = new makeArray(28);
		picture[0] = "hdr/goldwatert.jpg";
		picture[1] = "hdr/lincornt.jpg";
		picture[2] = "hdr/ds100t.jpg";
		picture[3] = "hdr/iceneedlest.jpg";
		picture[4] = "hdr/ds128t.jpg";
		picture[5] = "hdr/cathgroupt.jpg";
		picture[6] = "hdr/capitolt.jpg";
		picture[7] = "hdr/ds132t.jpg";
		picture[8] = "hdr/mesaarcht.jpg";
		picture[9] = "hdr/dragont.jpg";
		picture[10] = "hdr/furnacet.jpg";
		picture[11] = "hdr/ds104t.jpg";
		picture[12] = "hdr/purplet.jpg";
		picture[13] = "hdr/ds110t.jpg";
		picture[14] = "hdr/royt2.jpg";
		picture[15] = "hdr/jeffmoont.jpg";
		picture[16] = "hdr/scullerst.jpg";
		picture[17] = "hdr/ds101t.jpg";
		picture[18] = "hdr/firesett.jpg";
		picture[19] = "hdr/palmsunset.jpg";
		picture[20] = "hdr/ds120t.jpg";
		picture[21] = "hdr/ospreyt.jpg";
		picture[22] = "hdr/linctwilight.jpg";
		picture[23] = "hdr/ds106t.jpg";
		picture[24] = "hdr/goldwatert.jpg";
		picture[25] = "hdr/lincornt.jpg";
		picture[26] = "hdr/ds100t.jpg";
		picture[27] = "hdr/iceneedlest.jpg";
		window.setTimeout("NextImage();",100);
	}
}

var runslideshow = true;
var randimg = true;
var first = 1;
function NextImage() {
	if (runslideshow) {
		if (randimg) first = Math.round(Math.random()*(picture.length-5));
		else {
			first -= 1;
			if (first < 0) first = picture.length - 5;
		}
		// test for filter-compatible browser (IE)
		if (document.images.slide0.filters) {
			document.images.slide0.style.filter="blendTrans(duration=1)";
			document.images.slide1.style.filter="blendTrans(duration=1)";
			document.images.slide2.style.filter="blendTrans(duration=1)";
			document.images.slide3.style.filter="blendTrans(duration=1)";
			document.images.slide4.style.filter="blendTrans(duration=1)";
			document.images.slide0.filters.blendTrans.Apply();
			document.images.slide1.filters.blendTrans.Apply();
			document.images.slide2.filters.blendTrans.Apply();
			document.images.slide3.filters.blendTrans.Apply();
			document.images.slide4.filters.blendTrans.Apply();
		}
		document.slide0.src = picture[first+0];
		document.slide1.src = picture[first+1];
		document.slide2.src = picture[first+2];
		document.slide3.src = picture[first+3];
		document.slide4.src = picture[first+4];
		// if this filter supported by browser:
		if (document.images.slide0.filters) {
			document.images.slide0.filters.blendTrans.Play();
			window.setTimeout("Play1();",500);
			window.setTimeout("Play2();",1000);
			window.setTimeout("Play3();",1500);
			window.setTimeout("Play4();",2000);
		}
	}
	window.setTimeout("NextImage();",9000);
}
function Play1() {document.images.slide1.filters.blendTrans.Play();}
function Play2() {document.images.slide2.filters.blendTrans.Play();}
function Play3() {document.images.slide3.filters.blendTrans.Play();}
function Play4() {document.images.slide4.filters.blendTrans.Play();}

function stopgo() {
	if (runslideshow) runslideshow = false;
	else runslideshow = true;
}

function randset() {
	if (randimg) randimg = false;
	else randimg = true;
}

var myHeight;
var myWidth;
function bigpic(xsize, WINTITLE, WIDTH, HEIGHT) {
//myHeight = HEIGHT + 12;
myHeight = HEIGHT + 16;
myWidth = WIDTH + 24;
if (bname == "Microsoft Internet Explorer") {
	myHeight += 28;
	myWidth += 12;
}

text = "<html><head><title>" + WINTITLE + "Enlargement - www.PhotoCentric.Net</title><s" + "cript type='text/javascript' src='pcn2.js'></s" + "cript></head>";
text += "<body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' bgcolor='#000000' onLoad='top.window.focus()'>";
text += "<center><img alt='www.PhotoCentric.net' src='" + xsize + "L.j";
text += "pg' border=0 GALLERYIMG='no'></a></center></body></html>";
poppic = window.open("","picwin","width=100,height=100,resizable=yes");
setTimeout("update()",50);
poppic.focus();
}

function enlarge(xsize, WIDTH, HEIGHT) {
myHeight = HEIGHT + 34;
myWidth = WIDTH + 24;
if (bname == "Microsoft Internet Explorer") {
	myHeight += 28;
	myWidth += 12;
}

text = "<html><head><title>Enlargement - www.PhotoCentric.Net</title><s" + "cript type='text/javascript' src='pcn2.js'></s" + "cript></head>";
text += "<body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' bgcolor='#000000' onLoad='top.window.focus()'>";
text += "<center><img alt='www.PhotoCentric.net' src='" + xsize + "L.j";
text += "pg' border=0 GALLERYIMG='no'></a></center></body></html>";
poppic = window.open("","picwin","width=100,height=100,resizable=yes,toolbar=no,menubar=no,status=no");
setTimeout("update()",50);
poppic.focus();
}

function enlargif(xsize, WIDTH, HEIGHT) {
myHeight = HEIGHT + 16;
myWidth = WIDTH + 24;
if (bname == "Microsoft Internet Explorer") {
	myHeight += 28;
	myWidth += 12;
}

text = "<html><head><title>Enlargement - www.PhotoCentric.Net</title><s" + "cript type='text/javascript' src='pcn2.js'></s" + "cript></head>";
text += "<body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' bgcolor='#000000' onLoad='top.window.focus()'>";
text += "<center><img alt='www.PhotoCentric.net' src='" + xsize + "L.g";
text += "if' border=0 GALLERYIMG='no'></a></center></body></html>";
poppic = window.open("","picwin","width=100,height=100,resizable=yes");
setTimeout("update()",50);
poppic.focus();
}

function biggif(xsize, WINTITLE, WIDTH, HEIGHT) {
//myHeight = HEIGHT + 12;
myHeight = HEIGHT + 16;
myWidth = WIDTH;
if (bname == "Microsoft Internet Explorer") {
	myHeight += 28;
	myWidth += 12;
}
myWidth += 24;

text = "<html><head><title>" + WINTITLE + " - PhotoCentric.Net</title><s" + "cript type='text/javascript' src='pcn2.js'></s" + "cript></head>";
text += "<body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' bgcolor='#000000' onLoad='top.window.focus()'>";
text += "<center><img alt='www.PhotoCentric.net' src='" + xsize + ".g";
text += "if' border=0 GALLERYIMG='no'></a></center></body></html>";
poppic = window.open("","picwin","width=100,height=100,resizable=yes");
setTimeout("update()",50);
poppic.focus();
}

function update() {
poppic.document.open();
poppic.document.write(text);
poppic.document.close();
poppic.resizeTo(myWidth, myHeight);
}

function eradic8() {
  if (poppic != null && poppic.open) poppic.close();
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0 
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 
	if (restore) selObj.selectedIndex=0; 
} 

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_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}


// suppress error messages to end user when development finished
function stopError() {
  return true;
}
window.onerror = stopError;

// anti-spambot addresses
function PhotoCentric_Net() {
  var contact1 = "PhotoCentric.Net"
  var id = "tfield"
  var host = "erols."
	if (document.all || document.getElementsByName)
	  document.write("<a href=" + "ma" + "il" + "to:" + id + "&#64" + host + "com>" + contact1 + "</a>")
}

function Roy_Sewall() {
  var contact1 = "Roy Sewall"
  var id = "roy"
  var host = "sewallinc."
	if (document.all || document.getElementsByName)
	  document.write("<a href=" + "ma" + "il" + "to:" + id + "&#64" + host + "com>" + contact1 + "</a>")
}

function Tom_Field() {
  var contact1 = "Tom Field"
  var id = "tfield"
  var host = "erols."
	if (document.all || document.getElementsByName)
	  document.write("<a href=" + "ma" + "il" + "to:" + id + "&#64" + host + "com>" + contact1 + "</a>")
}

function Kent_Mason() {
  var contact1 = "Kent Mason"
  var id = "kent.mason"
  var host = "att."
	if (document.all || document.getElementsByName)
	  document.write("<a href=" + "ma" + "il" + "to:" + id + "&#64" + host + "net>" + contact1 + "</a>")
}

function Carl_Root() {
  var contact1 = "Carl Root"
  var id = "carldroot"
  var host = "comcast."
	if (document.all || document.getElementsByName)
	  document.write("<a href=" + "ma" + "il" + "to:" + id + "&#64" + host + "net>" + contact1 + "</a>")
}

function Ted_Oberman() {
  var contact1 = "Ted Oberman"
  var id = "tober41"
  var host = "verizon."
	if (document.all || document.getElementsByName)
	  document.write("<a href=" + "ma" + "il" + "to:" + id + "&#64" + host + "net>" + contact1 + "</a>")
}

function e_mail() {
  var contact1 = "e-mail"
  var id = "tfield"
  var host = "erols."
	if (document.all || document.getElementsByName)
	  document.write("<a href=" + "ma" + "il" + "to:" + id + "&#64" + host + "com>" + contact1 + "</a>")
}

// provide a bookmark this site function, only for IE 4+ browsers
// script from http://www.dynamicdrive.com
var bookmarkurl="http://www.photocentric.net"
var bookmarktitle=".PhotoCentric.Net - Tips, Articles"
function addbookmark(){
	if (document.all)
		window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function linkie4() {
	//if the user is using IE 4+
	if (document.all)
		document.write('<a href="javascript:addbookmark()">Bookmark this site!</a>')
}