function CMSSearchDisplay(xProduct,xPath,xUrl){var xInsertTable="";document.getElementById('CMSTitles').style.display='block';document.getElementById('CMSResults').innerHTML='';document.getElementById('CMSResults').style.display='block';document.getElementById('CMSSearchPopUp').style.display='block';document.getElementById('cms_search_displayed').value=document.getElementById('cms_search').value;if(xProduct=="myaccount"){xProduct=document.getElementById('hidProduct').value;xInsertTable="myaccount";for(i=0;i<document.getElementById('SelProduct').length;i++){if(document.getElementById('SelProduct').options[i].value==document.getElementById('hidProduct').value){document.getElementById('SelProduct').options[i].selected=true}}}if(xProduct=="airportparking"){if(xPath=="off"){xPath="http://parking.essentialtravel.co.uk/quote/"}else if(xPath=="on"){xPath="https://secure.essentialtravel.co.uk/parking/quote/"}else{xPath=xPath.toLowerCase();var bIsSecure=(xPath.indexOf('https',0)!=-1);if(document.location.protocol=='https:'){if(!(bIsSecure))xPath=xPath.replace('http://','https://')}else{if(bIsSecure)xPath=xPath.replace('https://','http://')}}}else{xPath=xPath.toLowerCase();var bIsSecure=(xPath.indexOf('https',0)!=-1);if(document.location.protocol=='https:'){if(!(bIsSecure))xPath=xPath.replace('http://','https://')}else{if(bIsSecure)xPath=xPath.replace('https://','http://')}}ajax_loadContent('CMSTitles',xPath+'cmssearch.asp?url='+xUrl+'&path='+xPath+'&product='+xProduct+'&letters='+document.getElementById('cms_search_displayed').value+'&insertTable='+xInsertTable);ajax_loadContent('CMSResults',xPath+'cmssearch.asp?window=results&path='+xPath+'&product='+xProduct+'&letters='+document.getElementById('cms_search_displayed').value);$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(TB_remove);TB_overlaySize();var IfrRef=document.getElementById('DivShim');var DivRef=document.getElementById('CMSSearchPopUp');IfrRef.style.width='720px';IfrRef.style.height='330px';IfrRef.style.marginLeft='20px';IfrRef.style.marginTop='70px';IfrRef.style.top=DivRef.style.top;IfrRef.style.left=DivRef.style.left;IfrRef.style.zIndex=DivRef.style.zIndex+1;IfrRef.style.display="block"}function CMSSearchDisplay_displayed(xProduct,xPath,xUrl,xCleanBox){var xInsertTable="";document.getElementById('CMSTitles').style.display='block';document.getElementById('CMSResults').innerHTML='';document.getElementById('CMSResults').style.display='block';document.getElementById('CMSSearchPopUp').style.display='block';document.getElementById('cms_search').value=document.getElementById('cms_search_displayed').value;if(xProduct=="myaccount"){xProduct=document.getElementById('hidProduct').value;xInsertTable="myaccount";for(i=0;i<document.getElementById('SelProduct').length;i++){if(document.getElementById('SelProduct').options[i].value==document.getElementById('hidProduct').value){document.getElementById('SelProduct').options[i].selected=true}}}if(xProduct=="airportparking"){if(xPath=="off"){xPath="http://parking.essentialtravel.co.uk/quote/"}else if(xPath=="on"){xPath="https://secure.essentialtravel.co.uk/parking/quote/"}else{xPath=xPath.toLowerCase();var bIsSecure=(xPath.indexOf('https',0)!=-1);if(document.location.protocol=='https:'){if(!(bIsSecure))xPath=xPath.replace('http://','https://')}else{if(bIsSecure)xPath=xPath.replace('https://','http://')}}}else{xPath=xPath.toLowerCase();var bIsSecure=(xPath.indexOf('https',0)!=-1);if(document.location.protocol=='https:'){if(!(bIsSecure))xPath=xPath.replace('http://','https://')}else{if(bIsSecure)xPath=xPath.replace('https://','http://')}}ajax_loadContent('CMSTitles',xPath+'cmssearch.asp?url='+xUrl+'&path='+xPath+'&product='+xProduct+'&letters='+document.getElementById('cms_search').value+'&cleanBox='+xCleanBox+'&insertTable='+xInsertTable);ajax_loadContent('CMSResults',xPath+'cmssearch.asp?window=results&path='+xPath+'&product='+xProduct+'&letters='+document.getElementById('cms_search').value)}function CMSSearchHide(){document.getElementById('CMSSearchPopUp').style.display='none';document.getElementById('CMSResults').style.display='none';document.getElementById('CMSTitles').style.display='none';var IfrRef=document.getElementById('DivShim');var DivRef=document.getElementById('CMSSearchPopUp');DivRef.style.display="none";IfrRef.style.display="none";TB_remove()}function CMSSearchEnterKey(xProduct,xPath,xUrl){if(window.event&&window.event.keyCode==13){CMSSearchDisplay(xProduct,xPath,xUrl)}else{return true}}function CMSSearchEnterKeyDisplayed(xProduct,xPath,xUrl){if(window.event&&window.event.keyCode==13){CMSSearchDisplay_displayed(xProduct,xPath,xUrl)}else{return true}}function cleanInput(){if(document.cms_search.value=='type help topic here'||document.cms_search_displayed.value=='type help topic here'){document.cms_search.value='';document.cms_search_displayed.value=''}}function FAQSearch(xProduct,xPath,xUrl){var xInsertTable="";if(xProduct=="myaccount"){xProduct=document.getElementById('hidProduct').value;xInsertTable="myaccount";for(i=0;i<document.getElementById('SelProduct').length;i++){if(document.getElementById('SelProduct').options[i].value==document.getElementById('hidProduct').value){document.getElementById('SelProduct').options[i].selected=true}}}ajax_loadContent('FAQResults',xPath+'cmssearch.asp?window=results&path='+xPath+'&product='+xProduct+'&letters='+document.getElementById('faq_search').value+'&frompage=faq',xUrl);return true}function FAQSearchEnterKey(xProduct,xPath,xUrl){var xInsertTable="";if(window.event&&window.event.keyCode==13){if(xProduct=="myaccount"){xProduct=document.getElementById('hidProduct').value;xInsertTable="myaccount";for(i=0;i<document.getElementById('SelProduct').length;i++){if(document.getElementById('SelProduct').options[i].value==document.getElementById('hidProduct').value){document.getElementById('SelProduct').options[i].selected=true}}}ajax_loadContent('FAQTitles',xPath+'cmssearch.asp?url='+xUrl+'&path='+xPath+'&product='+xProduct+'&letters='+document.getElementById('faq_search').value+'&frompage=faq&insertTable='+xInsertTable,xUrl);ajax_loadContent('FAQResults',xPath+'cmssearch.asp?window=results&path='+xPath+'&product='+xProduct+'&letters='+document.getElementById('faq_search').value+'&frompage=faq',xUrl)}else{return true}}function cleanBox(){document.getElementById('cms_search_displayed').value="Search"}function SelectProduct(xProduct){document.getElementById('hidProduct').value=xProduct}function showGrade(iGrade){for(var iInc=0;iInc<=5;iInc++){$('.grade'+iInc).css({'display':'none'})}$('.grade'+iGrade).css({'display':'block'});return false}
