// dropShadow javaScript file
// Ripple Effects Interactive - 2004

// -----------------------------------------------------------------
// -----------------------------------------------------------------


// get browser window height to stretch drop-shadow layout
// table the full height of the browser window.
// if for any reason this isn't working as expected,
// make sure the doctype of your html pages are correct:
// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
//        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

// Note: script does NOT work for: IE Mac, and IE 5/5.5 win.


var winH = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
   winH = window.innerHeight;
  } else {
    if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
      winH = document.documentElement.clientHeight;
    } else { if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible

        winH = document.body.clientHeight;
      }
    }
  }

// un-comment the alert below for testing browser height:
// alert(winH);

// -----------------------------------------------------------------
// -----------------------------------------------------------------

if(document.images) {

//winter home flash alt (2004)

//hm_alt_stay_WI = new Image()
//hm_alt_stay_WI.src = "http://www.visitpa.com/images/hm_alt_stay_WI.gif"
//hm_alt_stay_WI_o = new Image()
//hm_alt_stay_WI_o.src = "http://www.visitpa.com/images/hm_alt_stay_WI_o.gif"
//hm_alt_nightlife_WI = new Image()
//hm_alt_nightlife_WI.src = "http://www.visitpa.com/images/hm_alt_nightlife_WI.gif"
//hm_alt_nightlife_WI_o = new Image()
//hm_alt_nightlife_WI_o.src = "http://www.visitpa.com/images/hm_alt_nightlife_WI_o.gif"
//hm_alt_ski_WI = new Image()
//hm_alt_ski_WI.src = "http://www.visitpa.com/images/hm_alt_ski_WI.gif"
//hm_alt_ski_WI_o = new Image()
//hm_alt_ski_WI_o.src = "http://www.visitpa.com/images/hm_alt_ski_WI_o.gif"


//home nav (old footer nav)
//hm_nav1 = new Image()
//hm_nav1.src = "http://www.visitpa.com/images/hm_nav1.gif"
//hm_nav1_o = new Image()
//hm_nav1_o.src = "http://www.visitpa.com/images/hm_nav1_o.gif"
//hm_nav2 = new Image()
//hm_nav2.src = "http://www.visitpa.com/images/hm_nav2.gif"
//hm_nav2_o = new Image()
//hm_nav2_o.src = "http://www.visitpa.com/images/hm_nav2_o.gif"
//hm_nav3 = new Image()
//hm_nav3.src = "http://www.visitpa.com/images/hm_nav3.gif"
//hm_nav3_o = new Image()
//hm_nav3_o.src = "http://www.visitpa.com/images/hm_nav3_o.gif"
//hm_nav4 = new Image()
//hm_nav4.src = "http://www.visitpa.com/images/hm_nav4.gif"
//hm_nav4_o = new Image()
//hm_nav4_o.src = "http://www.visitpa.com/images/hm_nav4_o.gif"

//head nav
nav_regions = new Image()
nav_regions.src = "/images/nav_regions.gif"
nav_regions_o = new Image()
nav_regions_o.src = "/images/nav_regions_o.gif"
nav_regions_s = new Image()
nav_regions_s.src = "/images/nav_regions_s.gif"
nav_road = new Image()
nav_road.src = "/images/nav_road.gif"
nav_road_o = new Image()
nav_road_o.src = "/images/nav_road_o.gif"
nav_road_s = new Image()
nav_road_s.src = "/images/nav_road_s.gif"
nav_travel = new Image()
nav_travel.src = "/images/nav_travel.gif"
nav_travel_o = new Image()
nav_travel_o.src = "/images/nav_travel_o.gif"
nav_travel_s = new Image()
nav_travel_s.src = "/images/nav_travel_s.gif"
nav_coupons = new Image()
nav_coupons.src = "/images/nav_coupons.gif"
nav_coupons_o = new Image()
nav_coupons_o.src = "/images/nav_coupons_o.gif"
nav_coupons_s = new Image()
nav_coupons_s.src = "/images/nav_coupons_s.gif"
nav_places = new Image()
nav_places.src = "/images/nav_places.gif"
nav_places_o = new Image()
nav_places_o.src = "/images/nav_places_o.gif"
nav_places_s = new Image()
nav_places_s.src = "/images/nav_places_s.gif"
nav_things = new Image()
nav_things.src = "/images/nav_things.gif"
nav_things_o = new Image()
nav_things_o.src = "/images/nav_things_o.gif"
nav_things_s = new Image()
nav_things_s.src = "/images/nav_things_s.gif"

nav_getaways = new Image()
nav_getaways.src = "/images/nav_getaways.gif"
nav_getaways_o = new Image()
nav_getaways_o.src = "/images/nav_getaways_o.gif"
nav_getaways_s = new Image()
nav_getaways_s.src = "/images/nav_getaways_s.gif"

nav_discounts = new Image()
nav_discounts.src = "/images/nav_discounts.gif"
nav_discounts_o = new Image()
nav_discounts_o.src = "/images/nav_discounts_o.gif"
nav_discounts_s = new Image()
nav_discounts_s.src = "/images/nav_discounts_s.gif"

nav_playlists = new Image()
nav_playlists.src = "/images/nav_playlists.gif"
nav_playlists_o = new Image()
nav_playlists_o.src = "/images/nav_playlists_o.gif"
nav_playlists_s = new Image()
nav_playlists_s.src = "/images/nav_playlists_s.gif"

nav_pa_picks = new Image()
nav_pa_picks.src = "/images/nav_pa_picks.gif"
nav_pa_picks_o = new Image()
nav_pa_picks_o.src = "/images/nav_pa_picks_o.gif"
nav_pa_picks_s = new Image()
nav_pa_picks_s.src = "/images/nav_pa_picks_s.gif"


vpa_rgMap = new Image()
vpa_rgMap.src = "/images/vpa_rgMap.gif"
vpa_rgMap1 = new Image()
vpa_rgMap1.src = "/images/vpa_rgMap1.gif"
vpa_rgMap2 = new Image()
vpa_rgMap2.src = "/images/vpa_rgMap2.gif"
vpa_rgMap3 = new Image()
vpa_rgMap3.src = "/images/vpa_rgMap3.gif"
vpa_rgMap4 = new Image()
vpa_rgMap4.src = "/images/vpa_rgMap4.gif"
vpa_rgMap5 = new Image()
vpa_rgMap5.src = "/images/vpa_rgMap5.gif"
vpa_rgMap6 = new Image()
vpa_rgMap6.src = "/images/vpa_rgMap6.gif"
vpa_rgMap7 = new Image()
vpa_rgMap7.src = "/images/vpa_rgMap7.gif"


//new left nav

nav2_etiquette = new Image()
nav2_etiquette.src = "/images/nav2_etiquette.gif"
nav2_etiquette_o = new Image()
nav2_etiquette_o.src = "/images/nav2_etiquette_o.gif"

nav2_share_story = new Image()
nav2_share_story.src = "/images/nav2_share_story.gif"
nav2_share_story_o = new Image()
nav2_share_story_o.src = "/images/nav2_share_story_o.gif"

nav2_reg_road = new Image()
nav2_reg_road.src = "/images/nav2_reg_road.gif"
nav2_reg_road_o = new Image()
nav2_reg_road_o.src = "/images/nav2_reg_road_o.gif"

nav2_roadtrippers = new Image()
nav2_roadtrippers.src = "/images/nav2_roadtrippers.gif"
nav2_roadtrippers_o = new Image()
nav2_roadtrippers_o.src = "/images/nav2_roadtrippers_o.gif"

nav2_allroadtrips = new Image()
nav2_allroadtrips.src = "/images/nav2_allroadtrips.gif"
nav2_allroadtrips_o = new Image()
nav2_allroadtrips_o.src = "/images/nav2_allroadtrips_o.gif"

nav2_cabins = new Image()
nav2_cabins.src = "/images/nav2_cabins.gif"
nav2_cabins_o = new Image()
nav2_cabins_o.src = "/images/nav2_cabins_o.gif"

nav2_bbs = new Image()
nav2_bbs.src = "/images/nav2_bbs.gif"
nav2_bbs_o = new Image()
nav2_bbs_o.src = "/images/nav2_bbs_o.gif"
nav2_resorts = new Image()
nav2_resorts.src = "/images/nav2_resorts.gif"
nav2_resorts_o = new Image()
nav2_resorts_o.src = "/images/nav2_resorts_o.gif"
nav2_reserve = new Image()
nav2_reserve.src = "/images/nav2_reserv.gif"
nav2_reserve_o = new Image()
nav2_reserve_o.src = "/images/nav2_reserv_over.gif"
nav2_hotels = new Image()
nav2_hotels.src = "/images/nav2_hotels.gif"
nav2_hotels_o = new Image()
nav2_hotels_o.src = "/images/nav2_hotels_o.gif"
nav2_camp = new Image()
nav2_camp.src = "/images/nav2_camp.gif"
nav2_camp_o = new Image()
nav2_camp_o.src = "/images/nav2_camp_o.gif"

nav2_arts = new Image()
nav2_arts.src = "/images/nav2_arts.gif"
nav2_arts_o = new Image()
nav2_arts_o.src = "/images/nav2_arts_o.gif"
nav2_history = new Image()
nav2_history.src = "/images/nav2_history.gif"
nav2_history_o = new Image()
nav2_history_o.src = "/images/nav2_history_o.gif"
nav2_nature = new Image()
nav2_nature.src = "/images/nav2_nature.gif"
nav2_nature_o = new Image()
nav2_nature_o.src = "/images/nav2_nature_o.gif"
nav2_kids = new Image()
nav2_kids.src = "/images/nav2_kids.gif"
nav2_kids_o = new Image()
nav2_kids_o.src = "/images/nav2_kids_o.gif"
nav2_buget_rt = new Image()
nav2_buget_rt.src = "/images/nav2_buget_rt.gif"
nav2_buget_rt_o = new Image()
nav2_buget_rt_o.src = "/images/nav2_buget_rt_o.gif"

nav2_reunions = new Image()
nav2_reunions.src = "/images/nav2_reunions.gif"
nav2_reunions_o = new Image()
nav2_reunions_o.src = "/images/nav2_reunions_o.gif"

nav2_passages = new Image()
nav2_passages.src = "/images/nav2_passages.gif"
nav2_passages_o = new Image()
nav2_passages_o.src = "/images/nav2_passages_o.gif"

nav2_reg1 = new Image()
nav2_reg1.src = "/images/nav2_reg1.gif"
nav2_reg1_o = new Image()
nav2_reg1_o.src = "/images/nav2_reg1_o.gif"
nav2_reg2 = new Image()
nav2_reg2.src = "/images/nav2_reg2.gif"
nav2_reg2_o = new Image()
nav2_reg2_o.src = "/images/nav2_reg2_o.gif"
nav2_reg3 = new Image()
nav2_reg3.src = "/images/nav2_reg3.gif"
nav2_reg3_o = new Image()
nav2_reg3_o.src = "/images/nav2_reg3_o.gif"
nav2_reg4 = new Image()
nav2_reg4.src = "/images/nav2_reg4.gif"
nav2_reg4_o = new Image()
nav2_reg4_o.src = "/images/nav2_reg4_o.gif"
nav2_reg5 = new Image()
nav2_reg5.src = "/images/nav2_reg5.gif"
nav2_reg5_o = new Image()
nav2_reg5_o.src = "/images/nav2_reg5_o.gif"
nav2_reg6 = new Image()
nav2_reg6.src = "/images/nav2_reg6.gif"
nav2_reg6_o = new Image()
nav2_reg6_o.src = "/images/nav2_reg6_o.gif"
nav2_reg7 = new Image()
nav2_reg7.src = "/images/nav2_reg7.gif"
nav2_reg7_o = new Image()
nav2_reg7_o.src = "/images/nav2_reg7_o.gif"

nav2_newReg1 = new Image()
nav2_newReg1.src = "/images/nav2_newReg1.gif"
nav2_newReg1_o = new Image()
nav2_newReg1_o.src = "/images/nav2_newReg1_o.gif"
nav2_newReg2 = new Image()
nav2_newReg2.src = "/images/nav2_newReg2.gif"
nav2_newReg2_o = new Image()
nav2_newReg2_o.src = "/images/nav2_newReg2_o.gif"
nav2_newReg3 = new Image()
nav2_newReg3.src = "/images/nav2_newReg3.gif"
nav2_newReg3_o = new Image()
nav2_newReg3_o.src = "/images/nav2_newReg3_o.gif"
nav2_newReg4 = new Image()
nav2_newReg4.src = "/images/nav2_newReg4.gif"
nav2_newReg4_o = new Image()
nav2_newReg4_o.src = "/images/nav2_newReg4_o.gif"
nav2_newReg5 = new Image()
nav2_newReg5.src = "/images/nav2_newReg5.gif"
nav2_newReg5_o = new Image()
nav2_newReg5_o.src = "/images/nav2_newReg5_o.gif"
nav2_newReg6 = new Image()
nav2_newReg6.src = "/images/nav2_newReg6.gif"
nav2_newReg6_o = new Image()
nav2_newReg6_o.src = "/images/nav2_newReg6_o.gif"
nav2_newReg7 = new Image()
nav2_newReg7.src = "/images/nav2_newReg7.gif"
nav2_newReg7_o = new Image()
nav2_newReg7_o.src = "/images/nav2_newReg7_o.gif"


nav2_reg7page = new Image()
nav2_reg7page.src = "/images/nav2_reg7page.gif"
nav2_reg7page_o = new Image()
nav2_reg7page_o.src = "/images/nav2_reg7page_o.gif"

nav2_group = new Image()
nav2_group.src = "/images/nav2_group.gif"
nav2_group_o = new Image()
nav2_group_o.src = "/images/nav2_group_o.gif"
nav2_dining = new Image()
nav2_dining.src = "/images/nav2_dining.gif"
nav2_dining_o = new Image()
nav2_dining_o.src = "/images/nav2_dining_o.gif"

//Group Tours Navigation:
nav_join = new Image()
nav_join.src = "/images/nav_join.gif"
nav_join_o = new Image()
nav_join_o.src = "/images/nav_join_o.gif"

nav_contact = new Image()
nav_contact.src = "/images/nav_contact.gif"
nav_contact_o = new Image()
nav_contact_o.src = "/images/nav_contact_o.gif"

nav_resources = new Image()
nav_resources.src = "/images/nav_resources.gif"
nav_resources_o = new Image()
nav_resources_o.src = "/images/nav_resources_o.gif"

nav2_packages = new Image()
nav2_packages.src = "/images/nav2_packages.gif"
nav2_packages_o = new Image()
nav2_packages_o.src = "/images/nav2_packages_o.gif"

nav2_coupons = new Image()
nav2_coupons.src = "/images/nav2_coupons.gif"
nav2_coupons_o = new Image()
nav2_coupons_o.src = "/images/nav2_coupons_o.gif"

nav_submit = new Image()
nav_submit.src = "/images/nav_submit.gif"
nav_submit_o = new Image()
nav_submit_o.src = "/images/nav_submit_o.gif"

nav2_getaways = new Image()
nav2_getaways.src = "/images/nav2_getaways.gif"
nav2_getaways_o = new Image()
nav2_getaways_o.src = "/images/nav2_getaways_o.gif"

nav2_artisans = new Image()
nav2_artisans.src = "/images/nav2_artisans.gif"
nav2_artisans_o = new Image()
nav2_artisans_o.src = "/images/nav2_artisans_o.gif"

nav2_byways = new Image()
nav2_byways.src = "/images/nav2_byways.gif"
nav2_byways_o = new Image()
nav2_byways_o.src = "/images/nav2_byways_o.gif"

nav2_user = new Image()
nav2_user.src = "/images/nav2_user.gif"
nav2_user_o = new Image()
nav2_user_o.src = "/images/nav2_user_o.gif"

nav2b_arts = new Image()
nav2b_arts.src = "/images/nav2b_arts.gif"
nav2b_arts_o = new Image()
nav2b_arts_o.src = "/images/nav2b_arts_o.gif"
nav2b_history = new Image()
nav2b_history.src = "/images/nav2b_history.gif"
nav2b_history_o = new Image()
nav2b_history_o.src = "/images/nav2b_history_o.gif"
nav2b_nature = new Image()
nav2b_nature.src = "/images/nav2b_nature.gif"
nav2b_nature_o = new Image()
nav2b_nature_o.src = "/images/nav2b_nature_o.gif"


}



// -----------------------------------------------------------------
// -----------------------------------------------------------------
// rollover function
function rollOver(img1,ref1) {
    if (document.images) {
        document.images[img1].src = eval(ref1 + ".src")
    }
    }


// -----------------------------------------------------------------
// -----------------------------------------------------------------

 function popCoupon(coupon) {
    var url = "/visitpa/couponPrint.pa?print=y&id=" + coupon;
    window.open(url,"coupon","width=606,height=500,top=40,left=40,scrollbars=no,menubar=yes,toolbar=yes")
}

// -----------------------------------------------------------------
// -----------------------------------------------------------------


function styleSwap(id,newClass)  {

    theLink=document.getElementById(id);
    theLink.className=newClass;
    }
// -----------------------------------------------------------------
// -----------------------------------------------------------------
function goto_URL(object)
{
    window.location.href = object.options[object.selectedIndex].value;
}

// -----------------------------------------------------------------
// -----------------------------------------------------------------

//flash detection
// looks for version 6 or above

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
    x = navigator.plugins["Shockwave Flash"];
    if (x)
    {
        flashinstalled = 2;
        if (x.description)
        {
            y = x.description;
            flashversion = y.charAt(y.indexOf('.')-1);
            if(flashversion < 6)
            { // Set desired flash version here
                flashinstalled = 1;
            }
        }
    }
    else
        flashinstalled = 1;
    if (navigator.plugins["Shockwave Flash 6.0"])
    {
        flashinstalled = 2;
        flashversion = 2;
    }
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
    x = navigator.mimeTypes['application/x-shockwave-flash'];
    if (x && x.enabledPlugin)
        flashinstalled = 2;
    else
        flashinstalled = 1;
}
else
    MSDetect = "true";

// -----------------------------------------------------------------
// -----------------------------------------------------------------


function popMap(url) {
        window.open(url,"map","width=500,height=426,top=40,left=40,scrollbars=no,resizable=no")
                    }
                    
// -----------------------------------------------------------------
// -----------------------------------------------------------------


function fishTale(url) {
        window.open(url,"fishtale","width=702,height=527,scrollbars=no,resizable=no,toolbar=no,location=no,menubar=no,")
                    }
                    
// -----------------------------------------------------------------
// -----------------------------------------------------------------


function popDncr(url) {
        window.open(url,"dncr","width=520,height=550,top=40,left=40,scrollbars=yes,resizable=no")
                    }
                    
// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popReunionMap(url) {
        window.open(url,"map","width=460,height=281,top=40,left=40,scrollbars=no,resizable=yes,toolbar=no")
                    }
                    
// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popWomenMapPit (url) {
        window.open(url,"map2","width=740,height=603,top=40,left=40,scrollbars=no,resizable=no")
                    }
                    
// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popWomenMapPhil (url) {
        window.open(url,"map2","width=710,height=660,top=40,left=40,scrollbars=no,resizable=no")
                    }
                    
// -----------------------------------------------------------------
// -----------------------------------------------------------------


function popPhillyMap(url) {
        window.open(url,"phillyMap","width=702,height=515,top=5,left=5,scrollbars=no,resizable=no,status=no")
                    }
                    
// -----------------------------------------------------------------
// -----------------------------------------------------------------



function popNewMap(url) {
        window.open(url,"newMap","width=493,height=319,top=40,left=40,scrollbars=no,resizable=no")
                    }                    

// -----------------------------------------------------------------
// -----------------------------------------------------------------


function popMapTall1(url) {
        window.open(url,"79nMap","width=321,height=670,top=40,left=40,scrollbars=no,resizable=no")
                    }                    

// -----------------------------------------------------------------
// -----------------------------------------------------------------


function popMapTall2(url) {
        window.open(url,"79sMap","width=321,height=680,top=40,left=40,scrollbars=no,resizable=no")
                    }                    


// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popMapWide(url) {
        window.open(url,"78Map","width=654,height=285,top=40,left=40,scrollbars=no,resizable=no")
                    }                    

// -----------------------------------------------------------------
// -----------------------------------------------------------------



function popEmail(url) {
        window.open(url,"email","width=635,height=600,top=40,left=40,scrollbars=yes,resizable=no")
                    }                    

// -----------------------------------------------------------------
// -----------------------------------------------------------------


function openLeafReport(url) {
	window.open(url, 'foliageReportWindow', 'width=512,height=408,screenX=50,screenY=50,top=50,left=50,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=no');
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------


function popSled(url) {
        window.open(url,"sled","width=550,height=675,top=40,left=40,scrollbars=no,resizable=no")
                    }                    

// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popPlow(url) {
        window.open(url,"plow","width=425,height=595,top=40,left=40,scrollbars=no,resizable=no")
                    }                    

// -----------------------------------------------------------------
// -----------------------------------------------------------------



function disableInput(disableElement,fieldToDisable) {
    if( disableElement.checked == true )
    {
        fieldToDisable.value = "";
        fieldToDisable.disabled = true;
    } else {
        fieldToDisable.disabled = false;
    }
}

// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popPhoto(url) {
    window.open(url,"photo","width=398,height=480,top=40,left=40,scrollbars=no,resizable=no")
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------


function popEmailUpdates(url) {
    window.open(url,"photo","width=398,height=220,top=40,left=40,scrollbars=no,resizable=no")
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------

function popEmailUpdatesTripper(url) {
    window.open(url,"photo","width=398,height=290,top=40,left=40,scrollbars=no,resizable=no")
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------



//field=form field to count characters from: use form.fieldName in form
//cntField=form field to put current char count to
//maxLength=max characters to allow
function countChars(field,countField,maxLength){
    var val = field.value;
    if (val.length > maxLength) {
      alert("Sorry, you are over the limit of " + maxLength + " characters for this field");
      field.value = val.substring(0,maxLength);
      field.focus();
    }
    countField.value = parseInt(field.value.length);
}

// -----------------------------------------------------------------
// -----------------------------------------------------------------


//advanced search: hiding options



function expandCollapse() {
for (var i=0; i<expandCollapse.arguments.length; i++) {
var element = document.getElementById(expandCollapse.arguments[i]);
element.style.display = (element.style.display == "none") ? "block" : "none";
	}
}








