function subcal(s) { addWindow = window.open('http://'+novurl+s,'calender','width=203,height=140,resizable=0,status=0,menubar=0,scrollbars=0,fullscreen=0'); addWindow.focus() } function subpop(s) { addWindow = window.open('http://'+novurl+s,"cal","width=275,height=175,resizable=0,status=0,menubar=0,scrollbars=0,fullscreen=0"); addWindow.focus() } function subwindow(s) { addWindow = window.open('http://'+novurl+s,"cal","width=540,height=400,resizable=1,status=0,menubar=0,scrollbars=1,fullscreen=0"); addWindow.focus() } function submap(s, house) { addWindow = window.open('http://'+novurl+s,"Map_"+house,"width=296,height=355,resizable=0,status=0,menubar=0,scrollbars=0,fullscreen=0"); addWindow.focus() } function validateStartDate( theform ) { var s1 = theform.FromDate.value.indexOf( '-' ); var s2 = theform.FromDate.value.lastIndexOf( '-' ); var e1 = theform.ToDate.value.indexOf( '-' ); var e2 = theform.ToDate.value.lastIndexOf( '-' ); var sy = Math.abs(theform.FromDate.value.substr(s2+1,s2+5)); var sm = Math.abs(theform.FromDate.value.substring(s1+1,s2)); var sd = Math.abs(theform.FromDate.value.substr(0,s1)); var ey = Math.abs(theform.ToDate.value.substr(e2+1,e2+5)); var em = Math.abs(theform.ToDate.value.substring(e1+1,e2)); var ed = Math.abs(theform.ToDate.value.substr(0,e1)); var s = new Date( sy, sm-1, sd ); if ( theform.ToDate.value != '' ) var e = new Date( ey, em-1, ed ); else var e = new Date(); var startmaaned = new Date(sy, sm-1, 1 ); var temp = new Date( sy, sm-1, sd+7); var zY = temp.getYear() < 1999 ? temp.getYear() + 1900 : temp.getYear(); document.NOV.ToDate.value = temp.getDate() + "-" + eval(temp.getMonth()+1) + "-" + zY; } function SetIndex( indextext ) { var index; var cgiString = document.location.href; var startofparam = cgiString.indexOf( "search" ); if ( startofparam != -1 ) { if ( navigator.appName == 'Netscape' ) { for ( var i = 0; i < document.NOV.Region.options.length; i++ ) { if ( indextext == document.NOV.Region.options[i].value ) { index = i } } document.NOV.Region.options[index].selected=true; } else { document.NOV.Region.value = indextext; } } } function newwin( housenumber, language, price, startdate, enddate, people, company, login, request) { var season = startdate.substr( startdate.lastIndexOf( '-' )+1 ); anotherwin = window.open( "http://"+novurl+"/" + company + "/" + language + ".nsf/x/house?opendocument&H="+housenumber+"&P="+price+"&SD="+startdate+"&ED="+enddate+"&PE="+people+"&"+ "&L=" + language +"&S=" + season + "&COM=" + company +"&F=1&A="+bureau+subid+"&B=" + request + "&"+login, housenumber, 'width=760,height=540,resizable=1,status=0,menubar=0,scrollbars=1,fullscreen=0'); anotherwin.focus; } function lastminute(language) { CValue = document.NOV.Country.value; if(CValue==null) {CValue = document.NOV.Country.options[document.NOV.Country.selectedIndex].value} location.href = 'http://'+novurl+'/web/partner.nsf/result/'+ bureau + '?opendocument&S=L&L='+document.NOV.L.value+'&C='+CValue+'&OF=0&Company=NOV' } function search(country, action) { location.href = 'http://'+novurl+'/web/partner.nsf/search/'+ bureau + '?opendocument&S='+action+'&C='+country } function info(s) { CValue = document.NOV.Country.value; if(CValue==null) {CValue = document.NOV.Country.options[document.NOV.Country.selectedIndex].value} //location.href = 'http://'+novurl+'/web/info.nsf/partner/'+document.NOV.L.value + CValue + s + '?opendocument&A=' + bureau; location.href = 'http://'+novurl+'/nov/'+document.NOV.L.value + '.nsf/0/' + s + '?opendocument&A=' + bureau +'&F=1'; } function infopop(s) { CValue = document.NOV.Country.value; if(CValue==null) {CValue = document.NOV.Country.options[document.NOV.Country.selectedIndex].value} addWindow = window.open('http://'+novurl+'/nov/'+document.NOV.L.value + '.nsf/X/' + s + '?opendocument&A=' + bureau +'&F=1',"cal","width=540,height=400,resizable=1,status=0,menubar=0,scrollbars=1,fullscreen=0"); addWindow.focus() } function infol(s) { location.href = 'http://'+novurl+'/web/info.nsf/partner/'+document.NOV.L.value + s + '?opendocument&A=' + bureau } function makeLink(dateType,language, agency) { if(dateType=='ToDate') { findValue = document.NOV.ToDate.value.split('-') } else { findValue = document.NOV.FromDate.value.split('-') } myMonth = findValue[1] myYear = findValue[2] if (document.NOV.country) { country = document.NOV.country.value } else { country = '' } subcal('/web/partner.nsf/calender?ReadForm&dateField='+dateType+'&m='+myMonth+'&y='+myYear+'&language='+language+'&agency='+agency+'&country='+country) // subpop('/web/partner.nsf/html/date?opendocument&dateField='+dateType+'&m='+myMonth+'&y='+myYear+'&language='+language+'&agency='+agency) } function SelectCountry(Country) { if (bureau == '2000100'){ switch (Country){ case '724': window.location.href="http://www.villa-life.co.uk"; break; case '380': window.location.href="http://www.italianlife.co.uk"; break; case '840': window.location.href="http://www.usa-villa-holidays.com"; break; case '826': window.location.href="http://www.cottages4you.co.uk/c4y_availability.html"; break; case '372': window.location.href="http://www.cottages4you.co.uk/c4y_availability.html"; break; case '250': window.location.href="http://www.cottages4you.co.uk/c4y_availability.html"; break; default: window.location.href = "http://"+novurl+"/web/partner.nsf/search/" + bureau + "?OpenDocument&S=S&C=" + Country; break; } }else{ window.location.href = "http://"+novurl+"/web/partner.nsf/search/" + bureau + "?OpenDocument&S=S&C=" + Country; } } function Specific( elm, per, housenumber, newurl, price, people, season, login, lang ) { var elementsBeforeCheckboxes = 0 var elementsAfterCheckboxes = 1 for (var i = elementsBeforeCheckboxes; i < elm.elements.length-elementsAfterCheckboxes; i++) { if (elm.elements[i].checked) { startDatoStr = elm.elements[i].value var start = i; break; } else { startDatoStr = null; } } for (var i = start; i < elm.elements.length-elementsAfterCheckboxes; i++) { if (!elm.elements[i+1].checked) { slutDatoStr = elm.elements[i+1].value break; } } if ( startDatoStr == null ) { var url = "/nov/" + document.NOV.L.value + ".nsf/x/house?opendocument&H="+housenumber+"&O=1&L=" + document.NOV.L.value +"&S=" + elm.defaultSeason.value + "&A=" + bureau + "&F=1"; anotherwin = window.open(url, housenumber, 'width=710,height=440,toolbar=no,scrollbars=yes,resizable=yes'); anotherwin.focus; } else {newwin( housenumber, document.NOV.L.value, price, startDatoStr, slutDatoStr, people, 'NOV', login)} } function aladdin(s) { aladdin = window.open("/web/aladdin.nsf/aladdin?readform&language="+s,"aladdin","width=800,height=600,resizable=0,status=0,menubar=0,scrollbars=1,fullscreen=0"); aladdin.focus() } function submiteval(){ var f = document.forms[1]; var error = 0; if (f.initial.value=="") { alert ("Please enter initial"); f.initial.focus(); error = 1; return false; } if (f.surname.value=="") { alert ("Please enter Surname/Lastname"); f.surname.focus(); error = 1; return false; } if (f.address1.value=="") { alert ("Please enter address"); f.address1.focus(); error = 1; return false; } if (f.city.value=="") { alert ("Please enter City"); f.city.focus(); error = 1; return false; } if (f.postcode.value=="") { alert ("Please enter postcode"); f.postcode.focus(); error = 1; return false; } if (f.countryId.value=="") { alert ("Please select country"); f.country.focus(); error = 1; return false; } if (f.beenBefore.value=="no value") { alert ("Please specify whether You have been on a cottage Holiday before?"); f.beenBefore.focus(); error = 1; return false; } if (f.otherReq.value=="no value") { alert ("Please specify number of brochure requests"); f.otherReq.focus(); error = 1; return false; } if(error==0){ f.submit(); } }