	function openWindow(path) {
         self.name="opener";
         window.open(path, 'siteplan', 'toolbar=no,scrollbars=no,resizable=yes,width=1054,height=544');
}


// #############################################################################
// lets define the browser we have instead of multiple calls throughout the file
var userAgent = navigator.userAgent.toLowerCase();
var is_opera  = (userAgent.indexOf('opera') != -1);
var is_saf    = ((userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == "Apple Computer, Inc."));
var is_webtv  = (userAgent.indexOf('webtv') != -1);
var is_ie     = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv));
var is_ie4    = ((is_ie) && (userAgent.indexOf("msie 4.") != -1));
var is_moz    = ((navigator.product == 'Gecko') && (!is_saf));
var is_kon    = (userAgent.indexOf('konqueror') != -1);
var is_ns     = ((userAgent.indexOf('compatible') == -1) && (userAgent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_saf));
var is_ns4    = ((is_ns) && (parseInt(navigator.appVersion) == 4));

// catch possible bugs with WebTV and other older browsers
var is_regexp = (window.RegExp) ? true : false;

// #############################################################################
// let's find out what DOM functions we can use
var vbDOMtype = '';
if (document.getElementById)
{
    vbDOMtype = "std";
}
else if (document.all)
{
    vbDOMtype = "ie4";
}
else if (document.layers)
{
    vbDOMtype = "ns4";
}

// make an array to store cached locations of objects called by fetch_object
var vBobjects = new Array();

function fetch_object(idname, forcefetch)
{
    if (forcefetch || typeof(vBobjects[idname]) == "undefined")
    {
        switch (vbDOMtype)
        {
            case "std":
            {
                vBobjects[idname] = document.getElementById(idname);
            }
            break;

            case "ie4":
            {
                vBobjects[idname] = document.all[idname];
            }
            break;

            case "ns4":
            {
                vBobjects[idname] = document.layers[idname];
            }
            break;
        }
    }
    return vBobjects[idname];
}
    function show_box(id)
    {
		var markerDiv = fetch_object("marker_" + id);
        var boxDiv = fetch_object("capBox_" + id);
        var titleDiv = fetch_object("title_" + id);

		markerDiv.style.cursor = "pointer";
        boxDiv.style.visibility = "visible";
		titleDiv.style.visibility = "visible";
		titleDiv.style.zIndex = "100";
		boxDiv.style.zIndex = "100";
		//boxDiv.style.zIndex = parseInt(boxDiv.style.zIndex) + 5;

    }

    function hide_box(id)
    {
		var markerDiv = fetch_object("marker_" + id);
        var boxDiv = fetch_object("capBox_" + id);
        var titleDiv = fetch_object("title_" + id);

		markerDiv.style.cursor = "default";
        boxDiv.style.visibility = "hidden";
		titleDiv.style.visibility = "hidden";
		titleDiv.style.zIndex = "1";
		boxDiv.style.zIndex = "1";
    }

    function show_menu(menu)
    {
		var menuDiv = fetch_object(menu);

		menuDiv.style.cursor = "pointer";
        menuDiv.style.visibility = "visible";
		menuDiv.style.zIndex = "1000";

    }

    function hide_menu(menu)
    {
		var menuDiv = fetch_object(menu);

		menuDiv.style.cursor = "default";
        menuDiv.style.visibility = "hidden";
		menuDiv.style.zIndex = "1";
    }

    function show_box2(id)
    {
        var boxDiv = fetch_object("capBox_" + id);
        var titleDiv = fetch_object("title_" + id);

        if (boxDiv.style.display == "none")
        {
            show_hide_id(id, true);
        }
        else
        {
            show_hide_id(id, false);
            //document.getElementById("ShrinkAll").style.display = "none";
        }

    }

function doZoom(intZoomLevel)
{

		switch (intZoomLevel)
		{

		case 1:
				var zoom_1 = fetch_object("zoom_1");
				var zoom_2 = fetch_object("zoom_2");
				var zoom_3 = fetch_object("zoom_3");
				var zoom_1_marker_1 = fetch_object("zoom_1_marker_1");
				var zoom_2_marker_2 = fetch_object("zoom_2_marker_2");
				var zoom_3_marker_3 = fetch_object("zoom_3_marker_3");
				var zoom_image = fetch_object("slider");
				var zoomInLink = fetch_object("zoomInLink");
				var zoomOutLink = fetch_object("zoomOutLink");

				zoom_1.style.visibility = "visible";
				zoom_2.style.visibility = "hidden";
				zoom_3.style.visibility = "hidden";

				zoom_1_marker_1.style.visibility = "visible";
				zoom_2_marker_2.style.visibility = "hidden";
				zoom_3_marker_3.style.visibility = "hidden";

				zoom_1.style.zIndex = "100";
				zoom_2.style.zIndex = "1";
				zoom_3.style.zIndex = "1";

				zoom_image.src = "img/slider_bar_3.png";
				zoomInLink.href = "javascript:doZoom(2);";
				zoomOutLink.href = "javascript:doZoom(1);";


			break;

		case 2:
				var zoom_1 = fetch_object("zoom_1");
				var zoom_2 = fetch_object("zoom_2");
				var zoom_3 = fetch_object("zoom_3");
				var zoom_1_marker_1 = fetch_object("zoom_1_marker_1");
				var zoom_2_marker_2 = fetch_object("zoom_2_marker_2");
				var zoom_3_marker_3 = fetch_object("zoom_3_marker_3");
				var zoom_image = fetch_object("slider");
				var zoomInLink = fetch_object("zoomInLink");
				var zoomOutLink = fetch_object("zoomOutLink");

				zoom_1.style.visibility = "hidden";
				zoom_2.style.visibility = "visible";
				zoom_3.style.visibility = "hidden";

				zoom_1_marker_1.style.visibility = "hidden";
				zoom_2_marker_2.style.visibility = "visible";
				zoom_3_marker_3.style.visibility = "hidden";

				zoom_1.style.zIndex = "1";
				zoom_2.style.zIndex = "100";
				zoom_3.style.zIndex = "1";
				zoom_2_marker_2.style.zIndex = "101";

				zoom_image.src = "img/slider_bar_2.png";

				zoomInLink.href = "javascript:doZoom(3);";
				zoomOutLink.href = "javascript:doZoom(1);";

				break;

		case 3:
				var zoom_1 = fetch_object("zoom_1");
				var zoom_2 = fetch_object("zoom_2");
				var zoom_3 = fetch_object("zoom_3");
				var zoom_1_marker_1 = fetch_object("zoom_1_marker_1");
				var zoom_2_marker_2 = fetch_object("zoom_2_marker_2");
				var zoom_3_marker_3 = fetch_object("zoom_3_marker_3");
				var zoom_image = fetch_object("slider");
				var zoomInLink = fetch_object("zoomInLink");
				var zoomOutLink = fetch_object("zoomOutLink");

				zoom_1.style.visibility = "hidden";
				zoom_2.style.visibility = "hidden";
				zoom_3.style.visibility = "visible";
				zoom_1_marker_1.style.visibility = "hidden";
				zoom_2_marker_2.style.visibility = "hidden";
				zoom_3_marker_3.style.visibility = "visible";

				zoom_1.style.zIndex = "1";
				zoom_2.style.zIndex = "1";
				zoom_3.style.zIndex = "100";
				zoom_3_marker_3.style.zIndex = "101";

				zoom_image.src = "img/slider_bar_1.png";

				zoomInLink.href = "javascript:doZoom(3);";
				zoomOutLink.href = "javascript:doZoom(2);";

				break;

		}

}

// for photo gallery


function changePhoto(direction){
if(direction == 'next' && current_pic < total_pics-1){
current_pic++;
if ((current_pic + 1) >= total_pics){
//document.nextphoto.src = 'img/next_photo_inactive.gif';
document.nextphoto.src = 'img/photo_next_off.png';
}
changepic = true;
//document.previousphoto.src = 'img/prev_photo_withnext.gif';
document.previousphoto.src = 'img/photo_prev_on.png';
var p_output = "Photo&nbsp;" + (current_pic +1) + "&nbsp;of&nbsp;" + total_pics;
writeText(p_output);
}else if (direction == 'previous' && current_pic > 0){
current_pic--;
if ((current_pic) == 0){
//document.previousphoto.src = 'img/prev_photo_inactive.gif';
document.previousphoto.src = 'img/photo_prev_off.png';
}
changepic = true;
//document.nextphoto.src = 'img/next_photo.gif';
document.nextphoto.src = 'img/photo_next_on.png';
var p_output = "Photo&nbsp;" + (current_pic+1) + "&nbsp;of&nbsp;" + total_pics;
writeText(p_output);
}else{
changepic = false;
}
if (changepic){document.photo.src = large_photos[current_pic];}
}

function writeText(p_output){
if (document.getElementById){ // NN6 & IE5+
document.getElementById("outof").innerHTML = p_output;
} else if (document.all){ // IE4
document.all["outof"].innerHTML = p_output;
}else if (document.layers){ // NN4
x = document.layers["outofdiv"];
p_output2 = '<p>' + p_output + '</p>';
x.document.open();
x.document.write(p_output2);
x.document.close();
}
}


function verifyMapInput() {

var themessage = "The following fields are required:\n";
var zip = true;
var city = true;
var state = true;

var invalid = false;

	if (document.directionsForm.zip.value=="") {
		zip = false;
	}
	if(document.directionsForm.city.value=="") {
		city = false;
	}
	if(document.directionsForm.state.value=="") {
		state = false;
	}

document.directionsForm.city.className='form_new';
document.directionsForm.state.className='form_new2';
document.directionsForm.zip.className='form_new';


	if((city==false) && (state==false) && (zip==false)) {
	themessage = themessage + "City & State or Zip\n";

				if(city==false) {
					document.directionsForm.city.className='form_error';

							if(invalid==false) {
							setTimeout("document.directionsForm.city.focus()", 1000)
							}

				invalid = true;
				} else {
					document.directionsForm.city.className='form_new';
				}


				if(state==false) {
					document.directionsForm.state.className='form_error';

							if(invalid==false) {
							setTimeout("document.directionsForm.state.focus()", 1000)
							}

				invalid = true;
				} else {
					document.directionsForm.state.className='form_new2';
				}



				if(zip==false) {
					document.directionsForm.zip.className='form_error';

							if(invalid==false) {
							setTimeout("document.directionsForm.zip.focus()", 1000)
							}

				invalid = true;
				} else {
					document.directionsForm.zip.className='form_new';
				}

	} else if ((city==true) && (state==false) && (zip==false)) {
		themessage = themessage + "State\n";


				if(state==false) {
				document.directionsForm.state.className='form_error';

							if(invalid==false) {
							setTimeout("document.directionsForm.state.focus()", 1000)
							}

				invalid = true;
				} else {
				document.directionsForm.state.className='form_new2';
				}


				/*if(zip==false) {
				document.directionsForm.zip.className='form_error';

							if(invalid==false) {
							setTimeout("document.directionsForm.zip.focus()", 1000)
							}

				invalid = true;
				} else {
				document.directionsForm.zip.className='form_new';
				}
				*/


	} else if ((city==false) && (state==true) && (zip==false)) {
	themessage = themessage + "City\n";

		document.directionsForm.city.className='form_error';

			if(invalid==false) {
			setTimeout("document.directionsForm.city.focus()", 1000)
			}

			invalid = true;

	}


//alert if fields are empty and cancel form submit
	if (themessage == "The following fields are required:\n") {
	//document.directionsForm.submit();
	return true;
	} else {
	alert(themessage);
	return false;
	}
}


function verifyContactFormInput() {

var themessage = "The following fields are required:\n";
var invalid = false;
var fname = true;
var lname = true;
var comments = true;
var email = true;
var address = true;
var city = true;
var state = true;
var zip = true;
var phone = true;
var method = true;

	if (document.contactForm.first_name.value=="") {
		themessage = themessage + "- First Name\n";
		document.contactForm.first_name.className='form_error';
		invalid = true;
		setTimeout("document.contactForm.first_name.focus()", 1000)
	} else {
		document.contactForm.first_name.className='form_new';
	}

	if(document.contactForm.last_name.value=="") {
		themessage = themessage + "- Last Name\n";
		document.contactForm.last_name.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.last_name.focus()", 1000)
		}

		invalid = true;
	} else {
		document.contactForm.last_name.className='form_new';
	}


	if(document.contactForm.method.value=="") {
		themessage = themessage + "- Contact Method\n";
		document.contactForm.method.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.method.focus()", 1000)
		}

		invalid = true;

	} else {
		document.contactForm.method.className='form_new2';
	}


	if(document.contactForm.comments.value=="") {
		themessage = themessage + "- Comments\n";
		document.contactForm.comments.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.comments.focus()", 1000)
		}

		invalid = true;

	} else {
		document.contactForm.comments.className='form_new';
	}


	if((document.contactForm.method.value=="email") && (document.contactForm.email.value=="")) {
		themessage = themessage + "- Email Address\n";
		document.contactForm.email.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.email.focus()", 1000)
		}

		invalid = true;

	} else {
		document.contactForm.email.className='form_new';
	}


	if((document.contactForm.method.value=="snailmail")&& ((document.contactForm.address.value=="") || (document.contactForm.city.value=="") || (document.contactForm.state.value=="") || (document.contactForm.zip.value==""))) {

		if(document.contactForm.address.value=="") {
		themessage = themessage + "- Street Address\n";
		document.contactForm.address.className='form_error';

			if(invalid==false) {
			setTimeout("document.contactForm.address.focus()", 1000)
			}

		invalid = true;
		}

		if(document.contactForm.city.value=="") {
		themessage = themessage + "- City\n";
		document.contactForm.city.className='form_error';

			if(invalid==false) {
			setTimeout("document.contactForm.city.focus()", 1000)
			}

		invalid = true;

		}

		if(document.contactForm.state.value=="") {
		themessage = themessage + "- State\n";
		document.contactForm.state.className='form_error';

			if(invalid==false) {
			setTimeout("document.contactForm.state.focus()", 1000)
			}

		invalid = true;

		}

		if(document.contactForm.zip.value=="") {
		themessage = themessage + "- Zip Code\n";
		document.contactForm.zip.className='form_error';

			if(invalid==false) {
			setTimeout("document.contactForm.zip.focus()", 1000)
			}
		invalid = true;

		}


	} 	else {
		document.contactForm.address.className='form_new';
		document.contactForm.city.className='form_new';
		document.contactForm.state.className='form_new2';
		document.contactForm.zip.className='form_new';
	}

	if((document.contactForm.method.value=="phone") && (document.contactForm.phone.value=="")) {
		themessage = themessage + "- Phone Number\n";
		document.contactForm.phone.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.phone.focus()", 1000)
		}

		invalid = true;

	} 	else {
		document.contactForm.phone.className='form_new';
	}

//alert if fields are empty and cancel form submit
	if (themessage == "The following fields are required:\n") {
	//document.contactForm.submit();
	return true;
	} else {
	alert(themessage);
	return false;
	}
}

function verifyTechInquiryFormInput() {

var themessage = "The following fields are required:\n";
var invalid = false;
var fname = true;
var lname = true;
var comments = true;
var email = true;
var address = true;
var city = true;
var state = true;
var zip = true;
var phone = true;
var method = true;

	if (document.contactForm.first_name.value=="") {
		themessage = themessage + "- First Name\n";
		document.contactForm.first_name.className='form_error';
		invalid = true;
		setTimeout("document.contactForm.first_name.focus()", 1000)
	} else {
		document.contactForm.first_name.className='form_new';
	}

	if(document.contactForm.last_name.value=="") {
		themessage = themessage + "- Last Name\n";
		document.contactForm.last_name.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.last_name.focus()", 1000)
		}

		invalid = true;
	} else {
		document.contactForm.last_name.className='form_new';
	}

	if(document.contactForm.email.value=="") {
		themessage = themessage + "- Email Address\n";
		document.contactForm.email.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.email.focus()", 1000)
		}

		invalid = true;

	} else {
		document.contactForm.email.className='form_new';
	}

	if(document.contactForm.comments.value=="") {
		themessage = themessage + "- Comments\n";
		document.contactForm.comments.className='form_error';

		if(invalid==false) {
		setTimeout("document.contactForm.comments.focus()", 1000)
		}

		invalid = true;

	} else {
		document.contactForm.comments.className='form_new';
	}


//alert if fields are empty and cancel form submit
	if (themessage == "The following fields are required:\n") {
	//document.contactForm.submit();
	return true;
	} else {
	alert(themessage);
	return false;
	}
}

function printIconOn() {
document.printListing.src = 'img/print_listing_sheet_on.png';
}

function printIconOff() {
document.printListing.src = 'img/print_listing_sheet.png';
}

// ************************************************

function toggleFaq(id){
var faq = fetch_object("faq_" + id);
var showFaqQ = fetch_object("showFaq_" + id);
var hideFaqQ = fetch_object("hideFaq_" + id);
var faqIcon = fetch_object("plus_minus_" + id);


	if(faq.style.visibility == "visible") {
	//hid
	faq.style.visibility = "hidden";
	faq.style.display = "none";
	faqIcon.src = 'img/plus.png';
	} else if(faq.style.visibility == "hidden") {
	//sho
	faq.style.visibility = "visible";
	faq.style.display = "";
	faqIcon.src = 'img/minus.png';
	}

}

//**********************************************************


    function toggle_all(count, action)

    {
       for (var i = 1; i < count+1; i++)
       {
       var faq = fetch_object("faq_" + i);
       //	alert(i);
	       if(action==1) {
		   	if(faq.style.visibility=="hidden") {
		   	toggleFaq(i);
			}
	       } else if(action==0) {
		   	if (faq.style.visibility=="visible") {
		   	toggleFaq(i);
		   	}
		   }


       }
       var btnExpand = fetch_object("showAll");
       var btnHide = fetch_object("hideAll");

     /*  	if (action==1) {
       		btnExpand.style.visibility = "hidden";
       		btnExpand.style.display = "none";
       		btnHide.style.visibility = "visible";
       		btnHide.style.display = "";
    	}

       	if (action==0) {
       		btnExpand.style.visibility = "visible";
       		btnExpand.style.display = "";
       		btnHide.style.visibility = "hidden";
       		btnHide.style.display = "none";
    	}
    */
    }

