// JavaScript Document function middle_text(obj_id, type) { obj=document.getElementById(obj_id); extrascript=false; if(window.navigator.userAgent.indexOf("Gecko/")!=-1 && window.navigator.userAgent.indexOf("Firefox")==-1) { versionstart=window.navigator.userAgent.indexOf("rv:"); mainpart=parseInt(window.navigator.userAgent.substr(versionstart+3,1)); subpart=parseInt(window.navigator.userAgent.substr(versionstart+5,1)); if(mainpart<1 || (mainpart==1 && subpart<=3)) { extrascript=true; } } if(type == 'show') { if(extrascript==true) { obj.style.position = 'static'; obj.style.visibility = 'visible'; } obj.style.display = 'inline'; } else { obj.style.display = 'none'; if(extrascript==true) { obj.style.visibility = 'hidden'; obj.style.position = 'absolute'; } } } function fillList(selectbox, array, selected, key){ //Set an option counter to add options to the end of the list, this assumes a blank "select" option has been put in var optioncounter=1; selectbox.length=1; for(i in array){ //Make an empty option newoption = new Option(); //If we have a key if(key!=""){ //If the current value is equal to the key, make it an option if(array[i][2]==key){ newoption.value = array[i][0]; newoption.text = array[i][1]; } //Otherwise add the option anyway }else{ newoption.value = array[i][0]; newoption.text = array[i][1]; } //Add the new option to the list and increment the counter if(newoption.value!=""){ selectbox[optioncounter]=newoption; if(selectbox[optioncounter].value==selected) { selectbox[optioncounter].selected=true; } optioncounter++; } } } function bookmark() { if (navigator.appName == 'Microsoft Internet Explorer' && parseInt(navigator.appVersion) >= 4) { window.external.AddFavorite('http://www.skichalets.co.uk/', 'Ski Chalets Call +44 (0)1202 961300'); } }