function clearinput(f){if(f.value=='enter your email address'||f.value=='Enter your email address'||f.value=='Enter postal code'||f.value=='YEAR'||f.value=='Enter Postal Code or City'||f.value=='Toronto'||f.value=='Vancouver'||f.value=='Calgary'||f.value=='Ottawa'||f.value=='Halifax'||f.value=='Edmonton'||f.value=='Montreal'||f.value=='Winnipeg'||f.value=='Abbotsford'||f.value=='Bagotville'||f.value=='Charlottetown'||f.value=='Comox'||f.value=='Deer Lake'||f.value=='Fredericton'||f.value=='Hamilton'||f.value=='Kelowna'||f.value=='Kitchener'||f.value=='London'||f.value=='Moncton'||f.value=='Prince George'||f.value=='Quebec City'||f.value=='Regina'||f.value=='Saint John'||f.value=='St. Johns'||f.value=='Sudbury'||f.value=='Thunder Bay'||f.value=='Victoria'||f.value=='Windsor'||f.value=='0'||f.value=='1'||f.value=='2'||f.value=='3'||f.value=='4'||f.value=='5'||f.value=='6'||f.value=='7'||f.value=='8'||f.value=='9'||f.value=='10'||f.value=='11'||f.value=='35')
f.value="";}
function go(formObj){destination=formObj.options[formObj.selectedIndex].value;if(destination)location.href=destination;}
function goLink(link){destination=link;if(destination)location.href=destination;}
function setDepartureCityCookie(formObj){var date=new Date();date.setDate(date.getDate()+14);destination=formObj.options[formObj.selectedIndex].value;if(destination)document.cookie="fcdepartcity=\""+destination+"\";path=/;expires="+date;}
function setDepartureCityCookieDrop(formObj){var date = new Date();date.setDate(date.getDate()+14);destination = formObj.options[formObj.selectedIndex].id;if (destination) document.cookie = "fcdepartcity=\""+destination+"\";path=/;expires="+date;}
function setDepartureCityCookieLink(city){var date=new Date();date.setDate(date.getDate()+14);destination=city;if(destination)document.cookie="fcdepartcity=\""+destination+"\";path=/;expires="+date;}
function setDepartureCityCookieLinkDirect(city, section){var date = new Date();date.setDate(date.getDate()+14);var destination = city;var page = section;if (destination) document.cookie = "fcdepartcity=\""+destination+"\";path=/;expires="+date;if (page == 'vacations')location.href= '/' + page + '/cheap-holiday-packages-departing-from-' + destination;else if (page == 'flights')location.href= '/' + page + '/flights-departing-from-' + destination;else location.href = '/';}
function storeLocator(){location.href='/stores/'+document.store.stores_postalcode.value;}
function storeLocatorForm(){location.href='/stores/'+document.storeForm.stores_postalcodeForm.value;}
function storeLocatorQuicklinks(){location.href='/stores/'+document.storeFormQuicklinks.stores_postalcodeFormQuicklinks.value;}
function storeLocatorAbout(){location.href='/stores/'+document.storeFormAbout.stores_postalcodeFormAbout.value;}
function ResetScrollPosition(){setTimeout("window.scrollTo(0,0)",0);}
function getCurrentDate(){var curDate=new Date();var date=curDate.getMonth()+1+"/"+(curDate.getDate()+7)+"/"+curDate.getFullYear();date=date.replace("2009","09");return date;}
function getFutureDate(daysInFuture){var myDate=new Date();myDate.setDate(myDate.getDate()+daysInFuture);var date=myDate.getMonth()+1+"/"+myDate.getDate()+"/"+myDate.getFullYear();date=date.replace("2009","09");return date;}
function hotelEzresPrepopSearch(location){var date1string="";var date2string="";date1string=getCurrentDate();date2string=getFutureDate(14);return"http://ezrez.flightcentre.ca/travel/arc_waiting.cfm?nav=B2C&time1=0&time2=0&room1=true&origin=http://ezrez.flightcentre.ca/travel/arc.cfm%3Ftab%3Dr%26nav%3DB2C&area2="+location+"&num_rooms=1&date1="+date1string+"&date2="+date2string+"&adults=2&numchildren=0&x=0&y=0&child_age1=-1&child_age2=-1&child_age3=-1";}
function carsEzresPrepopSearch(location,cartype){var date1string="";var date2string="";date1string=getCurrentDate();date2string=getFutureDate(14);return"http://ezrez.flightcentre.ca/travel/arc_waiting.cfm?nav=B2C&origin=/travel/arc.cfm%3Ftab%3Dc&car1=true&area2="+location+"&date1="+date1string+"&time1=8&date2="+date2string+"&time2=8&car_type="+cartype;}
function refresh(){var sURL=unescape(window.location.pathname);window.location.href=sURL;}
function dojoPublishThings(id){dojo.event.topic.publish(id);}
function toggle_between_two(show,hide){var e=document.getElementById(show);if(e.style.display=='none'){document.getElementById(hide).style.display='none';e.style.display='inline';}else{e.style.display='inline';}}
function hide_div(hide){var e=document.getElementById(hide);e.style.display='none';}
function baskette_uncheck(checkboxId){var e=document.getElementById(checkboxId);e.checked=false;}
function missing109x76(param){document.getElementById(param).src="/images/missing109x76.png";}
function missing250x205(param){document.getElementById(param).src="/images/missing250x205.png";}
function missing135x95(param){document.getElementById(param).src="/images/missing135x95.png";}
function missing75x46(param){document.getElementById(param).src="/images/missing75x46.png";}
function missingImagehidediv(param){document.getElementById(param).style.display='none';}
AjaxLoad = function($PATH) { $("QuickLinksEnquiryDiv").load($PATH);};
AjaxPagingLoad = function($PATH) { $("ProductListDiv").load($PATH);};
function popWinS(url,w,h,scroll){window.open(url,'win','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=' + scroll+ ',resizable=0,width=' + w + ',height=' + h + ',top=100,left=100')}
