// - - - - - - - - - - - -
// CUSTOM TO THIS SITE
// - - - - - - - - - - - -

function bookmarkSEG() {
    var isMac=(navigator.userAgent.toLowerCase().indexOf('mac')!=-1);

	title = "Steven E. Gross & Associates Photography";
	url = "http://www.stevenegross.com/";
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
    } else if(!window.print || isMac) { // IE5/Mac and Safari 1.0
      alert('Please press Command + D to bookmark our site.');    
	} else if( window.opera && window.print ) {
		return false;
	}
	return false;
}

function ans(s) {
	highlight(s);
}

function showOther (slct) {
	if (slct.options[slct.selectedIndex].value == "other")
		turnOn ("otherdiv");
	else
		turnOff ("otherdiv");
}

var nextKid = 2;
function addKid () {
	if (nextKid <= 11) {
		turnOn ("kidsDiv"+nextKid);
		nextKid++;
	}
}

// - - - - - - - - - - - -
// HIGHLIGHT ROWS
// - - - - - - - - - - - -

function highlight(j) {
	var n = null;
	if (j.parentNode && j.parentNode.parentNode) {
		n = j.parentNode.parentNode;
	}
	else if (j.parentElement && j.parentElement.parentElement) {
		n = j.parentElement.parentElement;
	}
	if (n) {
		n.className = n.className.replace("unlit","lit");
	}
}

// - - - - - - - - - - - -
// HIDE AND SHOW
// - - - - - - - - - - - -

function turnOff (id) {
	setProp(id,'display','none');
}

function turnOn (id) {
	setProp(id,'display','block');
}

function setProp (id,prop,val) {
	el = document.getElementById(id);
	eval("el.style."+prop+" = '"+val+"';");
}

// - - - - - - - - - - - -
// GENERAL FUNCTIONS
// - - - - - - - - - - - -

function nostatus () {
	window.status=" ";
	return true;
}

function randomize (total,pre,post) {
	var num = Math.random();
	num = Math.round((total*num)+.5);
	return pre+num+post;
}

// - - - - - - - - - - - -
// INIT FUNCTIONS
// - - - - - - - - - - - -

function pageInit () {
}

function init () {
	pageInit ();
}

window.onload = init;