///javascript functions used on the index.html page// var URL= "http://members.travelguides.com"; var Name = "PropertyLogIn"; var WiHi = "width=720,height=600"; var formWindow; function PopUpWindow() { Features = WiHi + ",left=20,top=20,scrollbars"; formWindow = window.open(URL,Name,Features); formWindow.focus(); } function init() { //alert("curvy corners is loaded"); settings = { tl: { radius: 20 }, tr: { radius: 20 }, bl: { radius: 20 }, br: { radius: 20 }, antiAlias: true, autoPad: false } var divObj = document.getElementById("pageBody"); //alert(divObj); var cornersObj = new curvyCorners(settings, divObj); cornersObj.applyCornersToAll(); //the following code resets the text box in the top Five panel and the MainSearch for Safari var isSafari3 = false; if(window.devicePixelRatio) { var top5 = document.getElementById("topFive"); //alert(top5.id); top5.style.float = "right"; top5.style.marginTop ="-13em"; top5.style.marginRight = ".8em"; var mainSearchPanel = document.getElementById("mainSearch"); mainSearchPanel.style.marginLeft = "3.0em"; mainSearchPanel.style.marginTop = "8.45em"; var worldInput = document.getElementById("world"); worldInput.style.width = "8.0em"; } } /* function validate() { if((document.mainSearch.usa.value == "" && document.mainSearch.world.value == "INTERNATIONAL") || (document.mainSearch.world.value == "" && document.mainSearch.usa.value == "USA/CANADA")) { alert("You need to enter a search destination."); return false; } searchCriteria(); return true; } function searchCriteria() { if(document.mainSearch.usa.value == "USA/CANADA") { searchCriteria = document.mainSearch.world.value; } else { searchCriteria = document.mainSearch.usa.value; } alert("You are searching for - " +searchCriteria + "."); } */ function validate() { if((document.mainSearch.q.value == "" )) { alert("You need to enter a search destination."); document.mainSearch.q.focus(); return false; } return true; } /*********************************************** * Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for this script and 100s more. ***********************************************/ var fadeimages=new Array() //SET IMAGE PATHS. Extend or contract array as needed fadeimages[0]=["images/slide_show/1.jpg", "http://www.familytravelguides.com/family_lodging.html", ""] //image with link syntax fadeimages[1]=["images/slide_show/2.jpg", "http://www.familytravelguides.com/food.html", ""] //image with link syntax fadeimages[2]=["images/slide_show/3.jpg", "http://www.familytravelguides.com/destinations.html", ""] //image with link syntax /* fadeimages[3]=["images/slide_show/lodging_train_station2.jpg", "", ""] //plain image syntax fadeimages[4]=["images/slide_show/lodging_walking2.jpg", "", ""] //plain image syntax fadeimages[5]=["images/slide_show/food_burger2.jpg", "", ""] //plain image syntax fadeimages[6]=["images/slide_show/food_hotdog2.jpg", "", ""] //plain image syntax fadeimages[7]=["images/slide_show/food_little_girl2.jpg", "", ""] //plain image syntax fadeimages[8]=["images/slide_show/food_picnic2.jpg", "", ""] //plain image syntax fadeimages[9]=["images/slide_show/destinations_grand_canyon2.jpg", "", ""] //plain image syntax fadeimages[10]=["images/slide_show/destinations_rafting2.jpg", "", ""] //plain image syntax fadeimages[11]=["images/slide_show/destinations_roller-coaster.jpg", "", ""] //plain image syntax fadeimages[12]=["images/slide_show/destinations_running2.jpg", "", ""] //plain image syntax fadeimages[13]=["images/slide_show/destinations_sking2.jpg", "", ""] //plain image syntax */ //fadeimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax //var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed. //SET IMAGE PATHS. Extend or contract array as needed //fadeimages2[0]=["images/rotation.jpg", "", ""] //plain image syntax //fadeimages2[1]=["images/pet-friendly.jpg", "http://www.familytravelguides.com", ""] //image with link syntax //fadeimages2[2]=["images/weddings.jpg", "http://www.familytravelguides.com", ""] //image with link and target syntax // SET IMAGE MAP. Coordinates on image for links fademap = ''; fademap += 'Father and Son Deciding Where to go.'; fademap += 'Family Fun Recipes'; fademap += 'Kids enjoying the swimming pool at a family friendly resort.'; fademap += ''; var fadebgcolor="white" ////NO need to edit beyond here///////////// var fadearray=new Array() //array to cache fadeshow instances var fadeclear=new Array() //array to cache corresponding clearinterval pointers var dom=(document.getElementById) //modern dom browsers var iebrowser=document.all function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){ this.pausecheck=pause this.mouseovercheck=0 this.delay=delay this.degree=10 //initial opacity degree (10%) this.curimageindex=0 this.nextimageindex=1 fadearray[fadearray.length]=this this.slideshowid=fadearray.length-1 this.canvasbase="canvas"+this.slideshowid this.curcanvas=this.canvasbase+"_0" if (typeof displayorder!="undefined") theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :) this.theimages=theimages this.imageborder=parseInt(borderwidth) this.postimages=new Array() //preload images for (p=0;p
'+fademap); else document.write('
'+fademap); if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox this.startit() else{ this.curimageindex++ setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay) } } function fadepic(obj){ if (obj.degree<100){ obj.degree+=10 if (obj.tempobj.filters&&obj.tempobj.filters[0]){ if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+ obj.tempobj.filters[0].opacity=obj.degree else //else if IE5.5- obj.tempobj.style.filter="alpha(opacity="+obj.degree+")" } else if (obj.tempobj.style.MozOpacity) obj.tempobj.style.MozOpacity=obj.degree/101 else if (obj.tempobj.style.KhtmlOpacity) obj.tempobj.style.KhtmlOpacity=obj.degree/100 else if (obj.tempobj.style.opacity&&!obj.tempobj.filters) obj.tempobj.style.opacity=obj.degree/101 } else{ clearInterval(fadeclear[obj.slideshowid]) obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1" obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas) obj.populateslide(obj.tempobj, obj.nextimageindex) obj.nextimageindex=(obj.nextimageindex' slideHTML+=''; if (this.theimages[picindex][1]!="") //if associated link exists for image slideHTML+='' picobj.innerHTML=slideHTML } fadeshow.prototype.rotateimage=function(){ if (this.pausecheck==1) //if pause onMouseover enabled, cache object var cacheobj=this if (this.mouseovercheck==1) setTimeout(function(){cacheobj.rotateimage()}, 100) else if (iebrowser&&dom||dom){ this.resetit() var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas) crossobj.style.zIndex++ fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50) this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0" } else{ var ns4imgobj=document.images['defaultslide'+this.slideshowid] ns4imgobj.src=this.postimages[this.curimageindex].src } this.curimageindex=(this.curimageindex