﻿var addthis_config = {
	username: "atuostomasonry",
	ui_click: true,
	ui_offset_left: -91,
	ui_offset_top: -15,
	ui_header_color: "#038a02",
	ui_hover_direction: 1,
	services_compact: "facebook,twitter,myspace,delicious,digg,reddit,email,favorites",
	services_expanded: "facebook,twitter,myspace,delicious,digg,reddit,email,favorites",
	ui_508_compliant: true
}

function rollover(whichImage, status) {
	if (status) {
		document.getElementById('ctl00_' + whichImage).setAttribute("src","images/" + whichImage + "_on.gif");
	} else {
		document.getElementById('ctl00_' + whichImage).setAttribute("src","images/" + whichImage + "_off.gif");
	}
}

function showGalleryMenu(status) {
	if (status) {
		document.getElementById('divGalleryMenu').style.display = 'block';
		document.getElementById('divGalleryMenu').style.visibility = 'visible';
		document.getElementById('ctl00_img_nav_gallery').setAttribute("src","images/img_nav_gallery_on.gif");
	} else {
		document.getElementById('divGalleryMenu').style.display = 'none';
		document.getElementById('divGalleryMenu').style.visibility = 'hidden';
		
		if (uri.page != "photo_gallery")
			document.getElementById('ctl00_img_nav_gallery').setAttribute("src","images/img_nav_gallery_off.gif");
	}
}

function rolloverGallery(whichImage, status) {
	if (status) {
		document.getElementById(whichImage).setAttribute("src","images/" + whichImage + "_on.png");
	} else {
		document.getElementById(whichImage).setAttribute("src","images/" + whichImage + "_off.png");
	}
}

function getURL(uri) {
	uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
	uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
	uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
	uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
	pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
	uri.file = uri.page;
	if (uri.ext != '') uri.file += '.' + uri.ext;
	if (uri.file == '') uri.page = 'index';
	uri.args = location.search.substr(1).split("?");
	return uri;
}

var uri = new Object();
getURL(uri);
