﻿theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
	theObjects[i].outerHTML = theObjects[i].outerHTML;
}

function setDialogs() {
    $('#imgbtnSearch').click(function() {
        $('.dialog').fadeOut(0);
        $('#dialogsearch').fadeIn(0);
        //    $('#dialogsearch').fadeIn('medium');
       // $("#dialogsearch input[type='text']:first").focus();
    });
        $('#RyanLogin').click(function() {
    	$('.dialog').hide();
    	$('#dialogLogin').show();
    });
}

function closeDialog(dialogId) {
	 $('#' + dialogId).fadeOut(0);
   }

   function redirectLanding(o) {
   	if (o.selectedIndex == 0) return false;
   	window.location = o.value + '.aspx';
   }
   

        function locationSwitchSectionsDriving() {
            var curentText = $get("linkDrivingDirections").innerText;
            if (curentText == 'Driving Directions') {
                $get("linkDrivingDirections").innerText = "Parking Directions";
                $get("linkInclementWeather").innerText = "Inclement Weather";
                locationEnableSection("phDrivingDirections");
            } else {
                $get("linkDrivingDirections").innerText = "Driving Directions";
                locationEnableSection("phParkingDirections");
            }
        }

        function locationSwitchSectionsWeather() {
            var curentText = $get("linkInclementWeather").innerText;
            if (curentText == 'Inclement Weather') {
                $get("linkInclementWeather").innerText = "Parking Directions";
                $get("linkDrivingDirections").innerText = "Driving Directions";
                locationEnableSection("phInclementWeather");
            } else {
                $get("linkInclementWeather").innerText = "Inclement Weather";
                locationEnableSection("phParkingDirections");
            }
        }

        function locationEnableSection(phName) {
            $get("phDrivingDirections").style.display = 'none';
            $get("phParkingDirections").style.display = 'none';
            $get("phInclementWeather").style.display = 'none';
            $get(phName).style.display = '';
        }

        function searchFocus(o) {
        	if (o.value == "Search") o.value = "";
        }

        function searchBlur(o) {
        	if (o.value == "") o.value = "Search";
        }
