document.write(""); document.write(""); document.write(""); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write("
"); document.write("
"); document.write(" City: "); document.write(" State:"); document.write(" "); document.write("     "); document.write(" Search Radius:"); document.write(" "); document.write(" miles"); document.write("    State Cities: "); document.write(" "); document.write(" "); document.write("
"); var months = [ 'January','Feburary','March','April','May','June','July','August','September','October','November','December']; document.write("
"); document.write("Select your Dates: "); document.write(""); document.write("  Adults: "); document.write("  Children: "); document.write("  Nights: "); document.write(""); document.write("
"); d = new Date(); document.forms['book'].elements['booking_month'].selectedIndex = d.getMonth(); document.forms['book'].elements['booking_day'].selectedIndex = d.getDate() - 1; document.forms['book'].elements['booking_adults'].selectedIndex = 1; document.forms['book'].elements['booking_children'].selectedIndex = 0; document.forms['book'].elements['booking_nights'].selectedIndex = 1;document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write("

Loading Map...

"); document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write("
"); var dataRequest; var query; var domain = 'www.pckaz.net'; var city = 'state college'; var state = 'PA'; var wait = ""; var distance = '15'; var marker = ""; var listener = ""; var gmap = ""; wait = ""; wait += "Searching..."; wait += ""; wait += ""; wait += ""; wait += ""; var checking = ""; checking = ""; checking += ""; checking += "
"; checking += ""; checking += ""; checking += ""; checking += ""; checking += ""; checking += "
Searching {count} properties for rates and availability.
"; checking += "
"; checking += ""; /****************************************************************************************/ function search() { frm = document.forms['citysearch']; city = frm.elements['city'].value; state = frm.elements['state'].value; distance = frm.elements['distance'].value; msg_box_open(wait,320,150); request("http://"+domain+"/work/wizard/property_list_table.php?StateProvince="+state+"&City="+city+"&distance="+distance); return false; } /****************************************************************************************/ function set_region(items) { if(items != "") { msg_box_open(wait,320,150); values = items.split("|"); city = values[0]; state = values[1]; distance = values[2]; zoom = values.length == 4 ? "&zoom="+values[3] : ""; request("http://www.appletonsbest.com/wizard/scripts/property_list.php?StateProvince="+state+"&City="+city+"&distance="+distance+zoom); } } /****************************************************************************************/ function search_hotels() { term = document.forms['property_list'].elements['search_words'].value; term = term.replace(/^\s+|\s+$/g, ''); if(document.forms['property_list'].elements['property_listbox'].options.length < 1) alert("No properties to search\r\nPlease enter a City/State, or Click the Map."); else if(term == "") alert("Please enter search terms.\r\ni.e. pool, pets, breakfast, etc."); else { msg_box_open(wait,320,150); r = "http://www.appletonsbest.com/wizard/scripts/properties_search.php?q="+escape(query)+"&s="+escape(term); request(r); } return false; } /****************************************************************************************/ function geosearch(latitude,longitude,distance) { msg_box_open(wait,320,150); request("http://"+domain+"/work/wizard/property_list_table.php?latitude="+latitude+"&longitude="+longitude+"&distance="+distance); return false; } /****************************************************************************************/ function request(provider) { try { if (window.XMLHttpRequest) { dataRequest = new XMLHttpRequest(); dataRequest.onreadystatechange=response_handler; dataRequest.open("POST",provider,true); //dataRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); dataRequest.send(null) } else if (window.ActiveXObject) { dataRequest = new ActiveXObject("Microsoft.XMLHTTP") if (dataRequest) { dataRequest.onreadystatechange=response_handler; dataRequest.open("POST",provider,true); //dataRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); dataRequest.send(null); } } } catch(err) { alert("Javascript Error(submit_form):\r\n"+err.description+"\r\nProvider: "+provider); } } /****************************************************************************************/ function response_handler() { if (dataRequest.readyState == 4) { strData = dataRequest.responseText; try { eval(dataRequest.responseText); } catch(err) { alert("Error(response_handler): \r\n"+strData+"\r\n".err); msg_window_close(); } dataRequest = null; } } /****************************************************************************************/ function moveto(longitude,latitude,zoom_level) { if(gmap == "") { alert('cant find it'); create_map(); if(listener == "") listener = GEvent.addListener(gmap, 'click', select_location); } if(marker != "") gmap.removeOverlay(marker); gmap.panTo(new GLatLng(latitude,longitude)); marker = new GMarker(new GPoint(longitude,latitude)); gmap.addOverlay(marker); } /****************************************************************************************/ function addMarker(longitude,latitude) { // if(marker != "") gmap.removeOverlay(marker); // gmap.panTo(new GLatLng(latitude,longitude)); m = new GMarker(new GPoint(longitude,latitude)); gmap.addOverlay(m); } /****************************************************************************************/ function create_map() { var obj = parent.document.getElementById("rmap"); gmap = new GMap2(obj,{size: new GSize(500,300)} ); listener = GEvent.addListener(gmap, 'click', select_location); gmap.addControl(new GMapTypeControl(),new GControlPosition(G_ANCHOR_BOTTOM_RIGHT,new GSize(2,3))); gmap.setCenter(new GLatLng(40.95,-77.88),6); //moveto(-77.8820,40.95501,6); } /****************************************************************************************/ function locate_property() { i = document.forms['property_list'].elements['property_listbox'].selectedIndex; ht = document.forms['property_list'].elements['search_words'].value; hotelid = document.forms['property_list'].elements['property_listbox'].options[i].value; longitude = points[i][0]; latitude = points[i][1]; moveto(longitude,latitude,gmap.getZoom()); request('http://www.appletonsbest.com/wizard/scripts/property_data.php?HotelID='+hotelid+'&ht='+ht); } /****************************************************************************************/ function property_info(hotelid) { request('http://'+domain+'/wizard/property_info.php?HotelID='+hotelid+'&w=1'); } /****************************************************************************************/ function larger(url) { frames['hotel_info'].document.images['large'].src = url; } /****************************************************************************************/ function select_location(obj,latlong) { longitude = latlong.lng(); latitude = latlong.lat(); moveto(longitude,latitude,gmap.getZoom()); if(document.forms['citysearch'].elements['distance'].selectedIndex == 0) { document.forms['citysearch'].elements['distance'].selectedIndex = 2; distance = 10; } geosearch(latitude,longitude,distance); } /****************************************************************************************/ function zoomend(oldLevel,newLevel) { gmap.panTo(new GLatLng(latitude,longitude)); } /****************************************************************************************/ function plotit(latitude,longitude) { if(marker == '') { marker = new GMarker(new GPoint(longitude,latitude,marker)); } else { gmap.clearOverlays(); marker = new GMarker(new GPoint(longitude,latitude,marker)); } gmap.addOverlay(marker); gmap.panTo(new GLatLng(latitude,longitude)); } /****************************************************************************************/ function zoomin() { gmap.zoomIn(); if(gmap != "") moveto(marker.getPoint().lng(),marker.getPoint().lat(),gmap.getZoom()+1); } /****************************************************************************************/ function zoomout() { gmap.zoomOut(); if(gmap != "") gmap.panTo(new GLatLng(marker.getPoint().lat(),marker.getPoint().lng())); } /****************************************************************************************/ function pannorth() { if(gmap != "") gmap.panDirection(0,1); } /****************************************************************************************/ function pansouth() { if(gmap != "") gmap.panDirection(0,-1); } /****************************************************************************************/ function paneast() { if(gmap != "") gmap.panDirection(-1,0); } /****************************************************************************************/ function panwest() { if(gmap != "") gmap.panDirection(1,0); } /****************************************************************************************/ function availability() { if(hotels.length > 225) { msg = "Your search contains over 200 hotels.\r\nPlease Zoom-In and define your location "; msg += "more precisely.\r\nYou may also change the radius of your search to a\r\nsmaller area "; msg += "by changing the SEARCH RADUS above."; alert(msg); return false; } frm = document.forms['book']; link = "availability.php?"; month = frm.elements['booking_month'].options[frm.elements['booking_month'].selectedIndex].value; day = frm.elements['booking_day'].options[frm.elements['booking_day'].selectedIndex].value; adults = frm.elements['booking_adults'].options[frm.elements['booking_adults'].selectedIndex].value; children= frm.elements['booking_children'].options[frm.elements['booking_children'].selectedIndex].value; nights = frm.elements['booking_nights'].options[frm.elements['booking_nights'].selectedIndex].value; link += "month="+month; link += "&day="+day; link += "&nights="+nights; link += "&adults="+adults; link += "&children="+children; link += "&id="; for(i = 0; i < hotels.length; i++) { link += hotels[i]; if(i < hotels.length -1) link += ","; } alert("Sorry, the booking feature has been disabled.\r\nIf you would like to check rates and/or availability\r\nfor any of these properties, please dial\r\n(toll free)1-877-465-3368"); return false; msg_box_open(checking.replace("{count}", hotels.length),320,150); request(link); return false; } /****************************************************************************************/ function setDate() { var frm = parent.document.forms['book']; var today = new Date(); frm.elements['booking_month'].selectedIndex = today.getMonth(); frm.elements['booking_day'].selectedIndex = today.getDate() - 1; } /****************************************************************************************/ function msg_box_open(str,w,h) { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( window.document.body && ( window.document.body.clientWidth || window.document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } obj1 = document.getElementById('msg_window'); obj1.style.height = h; obj1.style.width = w; width = parseInt(obj1.style.width,10); height = parseInt(obj1.style.height,10); otop = ((myHeight/2) + (window.pageYOffset ? window.pageYOffset : document.getElementsByTagName("body")[0].scrollTop)) - (height/2); oleft = ((myWidth/2) + (window.pageXOffset ? window.pageXOffset : document.getElementsByTagName("body")[0].scrollLeft)) - (width/2); if(str != "") { var doc = null; doc = frames['msg_window'].document; doc.open(); doc.write(str); doc.close(); } obj1.style.visibility = 'visible'; obj1.style.display='block' obj1.style.left = oleft; obj1.style.top = otop; obj1.style.width = width; obj1.style.height = height; return 1; } /****************************************************************************************/ function msg_box_close() { try { obj = document.getElementById('msg_window'); obj.style.visibility = 'hidden'; } catch(e) {alert('closing window'); window.close(); } return false; } /****************************************************************************************/ function insert_msg_box() { document.write(""); return false; } insert_msg_box(); create_map(); request("http://"+domain+"/work/wizard/property_list_table.php?StateProvince="+state+"&City="+city+"&distance="+distance);