/* shw_siteSettings.js (c)2007 SugarHill Works LLC - http://www.sugarhillworks.com */
var d = document;
var photographers = new Array();
var photographerNames = new Array();
var pi = 0;
var defaultTitle = "";
var titleSeparator = "";
var contactTitle = "";
var newsTitle = "";
var bioTitle = "";

// ********************************************************************************************************** //
// ********************************************************************************************************** //
// *********************************                                        ********************************* //
// *********************************      DO NOT EDIT ABOVE THIS LINE       ********************************* //
// *********************************                                        ********************************* //
// *********************************      SET PHOTOGRAPHER NAMES BELOW      ********************************* //
// *********************************                                        ********************************* //
// ********************************************************************************************************** //
// ********************************************************************************************************** //
//
// Note that the first variable below must start with zero.
// Note that these are case-sensitive strings. This is used for name highlighting in xfade.js
// Note that these variables should be used in xfade.js in lieu of typing the names there.
// They also auto-generate links to the photographers' galleries. Be sure to name the portfolio folders
// exactly as they are named here - case sensitive. Also, when creating portfolio folders, convert any spaces
// in the name to underscores. Do not use any other punctuation in names or foldersnames other than underscores
// and dashes. Not following these guidelines will result in broken links on the main menu.


// The photographer array is used to create the main menu, and the photogID presents the portfolios correctly
// *** NOTE: Remember to set the photographer's photogID in their photographerSettings.js file. Important! ***
//
//----------------------------------
photographers[pi++] = {
	firstName: "LORI",
	lastName: "ADAMSKI-PEEK",
	ID: 0
};
//----------------------------------
photographers[pi++] = {
	firstName: "ANDREW",
	lastName: "BRUSSO",
	ID: 1
};
//----------------------------------
photographers[pi++] = {
	firstName: "DAVID",
	lastName: "FIELD",
	ID: 4
};
//----------------------------------
photographers[pi++] = {
	firstName: "MONICA",
	lastName: "STEVENSON",
	ID: 8
};
//----------------------------------
photographers[pi++] = {
	firstName: "CHRIS",
	lastName: "GORDANEER",
	ID: 5
};
//----------------------------------
photographers[pi++] = {
	firstName: "RICHARD",
	lastName: "CORMAN",
	ID: 3
};
//----------------------------------
photographers[pi++] = {
	firstName: "VINCENT",
	lastName: "SOYEZ",
	ID: 7
};
//----------------------------------
photographers[pi++] = {
	firstName: "KATE",
	lastName: "TURNING",
	ID: 9
};
//----------------------------------
photographers[pi++] = {
	firstName: "MICHELLE",
	lastName: "PEDONE",
	ID: 6
};
//----------------------------------




// THE FOLLOWING LINES AFFECT THE TITLE THAT APPEARS IN THE BROWSER WINDOW'S TITLEBAR
defaultTitle = "Randy Cole Represents";
titleSeparator = " | ";
contactTitle = "CONTACT";
newsTitle = "NEW RELEASES";
bioTitle = "BIO / CLIENTS";


// THE FOLLOWING LINES AFFECT THE PORTFOLIO THUMBNAILS DISPLAY. Opacity values of < 1 are allowed.
var thmOpacityDefault = .65;
var thmOpacityActive = .99;
var thmOpacityOver = .99;
var thmOpacityPrev = .65;

//
//
//
//
//
// ********************************************************************************************************** //
// ********************************************************************************************************** //
// *********************************                                        ********************************* //
// *********************************      DO NOT EDIT BELOW THIS LINE       ********************************* //
// *********************************                                        ********************************* //
// ********************************************************************************************************** //
// ********************************************************************************************************** //
//
//
//
//
//
//
//

// for IE6+ so we can use appendChild, etc...
if (!window.Node) {
	var Node = {
		ELEMENT_NODE: 1,
		ATTRIBUTE_NODE: 2,
		TEXT_NODE: 3,
		COMMENT_NODE: 8,
		DOCUMENT_NODE: 9,
		DOCUMENT_FRAGMENT_NODE: 11
	};
}

function randOrd(){
	return (Math.round(Math.random())-0.5);
}


var maxvpW = 900; //for slideshow image centering: should be set to same as xfsoContianer width in shw_global.css
var maxvpH = 449; //for slideshow image centering
var ceibw_cntr;
var main_div_cntr;
var gPicsFolder, sPicsFolder;
var dbody = document.getElementsByTagName('body');
function loadNums() {
	ceibw_cntr = document.getElementById("ceibw");
	main_div_cntr = document.getElementById("main_div");
	if(!dbody[0].id.match(/news/)) {
		if(main_div_cntr){		
			if (screen.height <= 905) {
				gPicsFolder = "img/photos/medium";
				sPicsFolder = "shw_slideshow/images/medium/";
				ceibw_cntr.style.height = "655px";
				if(screen.height >= 855) {
					ceibw_cntr.style.margin = "39px auto 0px auto";
				}
				else if(screen.height < 855) {
					ceibw_cntr.style.margin = "24px auto 0px auto";
				} 
				maxvpH = 449;
				main_div_cntr.style.height = maxvpH + "px";
			}
			if (screen.height > 905) {
				gPicsFolder = "img/photos/large";
				sPicsFolder = "shw_slideshow/images/large/";
				ceibw_cntr.style.height = "755px";
				ceibw_cntr.style.margin = "24px auto 0px auto";
				maxvpH = 549;
				main_div_cntr.style.height = maxvpH +"px";
			}
		}
	}
	if(dbody[0].id.match(/splash/)) { 
		if(main_div_cntr){		
			if (screen.height <= 905) {
				gPicsFolder = "img/photos/medium";
				sPicsFolder = "shw_slideshow/images/medium/";
				ceibw_cntr.style.height = "655px";
				if(screen.height >= 855) {
					ceibw_cntr.style.margin = "24px auto 0px auto";
				}
				else if(screen.height < 855) {
					ceibw_cntr.style.margin = "24px auto 0px auto";
				} 
				maxvpH = 449;
				main_div_cntr.style.height = maxvpH + "px";
			}
			if (screen.height > 905) {
				gPicsFolder = "img/photos/large";
				sPicsFolder = "shw_slideshow/images/large/";
				ceibw_cntr.style.height = "755px";
				ceibw_cntr.style.margin = "24px auto 0px auto";
				maxvpH = 549;
				main_div_cntr.style.height = maxvpH +"px";
			}
		}
	}
	return ceibw_cntr, main_div_cntr, gPicsFolder, sPicsFolder;//, ldgGif;
}

var ftr;
function ctr_ftr() {
	//set the navigation position on the contact page to line up on both medium & large versions
	var pageBody = document.getElementsByTagName("body");
	if (pageBody[0].id == 'contact') {
		if (screen.height < 905) {
			document.getElementById('ftr').style.top = "109px";
		}
		if (screen.height > 905) {
			document.getElementById('ftr').style.top = "209px";
		}
	}
}

var isitIE = false;
// turn off 'image toolbar' in older versions of IE
if(navigator.appName == 'Microsoft Internet Explorer'){
	document.write("<meta HTTP-EQUIV=\"imagetoolbar\" content=\"no\">");
	isitIE = true;
}

// preload basic site images
var pld_01 = new Image();
pld_01.src = "img/logo.gif";
var pld001 = new Image();
var pld002 = new Image();
pld001.src = "img/ldgM.gif";
pld002.src = "img/ldgL.gif";

// global portfolio vars
var imgs = [];
var thms = [];
var gi = 0;
var imageFilenames = [];
var thumbFilenames = [];


var portfolioTitles = []; // used in each photographer's photographerSettings.js
var photogBio = "";
var photogWebsite = "";
var photogClients = [];
var pci = 0;

// sort the photographers array
function sortByLastName(a, b) {
    var x = a.lastName.toUpperCase();
    var y = b.lastName.toUpperCase();
    return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}
photographers.sort(sortByLastName);

// populate photographerNames for the main menu
for (var i = 0; i < photographers.length; i++) {
	photographerNames[i] = photographers[i].firstName + " " + photographers[i].lastName;
}
var thisPhotographer;
