function LoadGallery(pictureName, imageFile) { var preload = document.getElementById('preload_'+current_preload); if(document.all) { document.getElementById('preloaded_img_'+current_preload).style.filter="blendTrans(duration=1)"; document.getElementById('preloaded_img_'+current_preload).filters.blendTrans.Apply(); document.getElementById('preloaded_img_'+current_preload).filters.blendTrans.Play(); } sty = preload.style; sty.display = 'none'; var new_preload = document.getElementById('preload_'+imageFile); if (document.all) { document.getElementById('preloaded_img_'+imageFile).style.filter="blendTrans(duration=1)"; document.getElementById('preloaded_img_'+imageFile).filters.blendTrans.Apply(); document.getElementById('preloaded_img_'+imageFile).filters.blendTrans.Play(); } sty = new_preload.style; sty.display = 'block'; current_preload = imageFile; } function popup2(topic) { aPopUp= window.open(topic,'PopupViewer','scrollbars=yes,location=no,status=no,menubar=0,directories=no,top=0,left=0,width=390,height=360,titlebar=no'); self.aNoteWin = aPopUp; return false; } function popup(topic, width, height) { aPopUp= window.open(topic,'PopupViewer','scrollbars=yes,location=no,status=no,menubar=0,directories=no,top=0,left=0,width='+width+',height='+height+',titlebar=no'); self.aNoteWin = aPopUp; return false; } function popupWindow(image_id, product_id) { LeftPosition = (screen.width) ? (screen.width-500)/2 : 0; TopPosition = (screen.height) ? (screen.height-500)/2 : 0; settings = 'height=505,width=543,top='+TopPosition+',left='+LeftPosition+',toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1'; win = window.open("/view_image.html?image_id=" + image_id+ "&product_id="+product_id,null,settings); } function confirmAction(strMsg) { var bAnswer = confirm (strMsg); if (bAnswer) { return true; } else { return false; } } /* Generic Form Validation */ window.onload = attachFormHandlers; function attachFormHandlers() { if (document.getElementsByTagName) { var objForm = document.getElementsByTagName('form'); for (var iCounter=0; iCounter= 0 ? i : false; } function isName(strValue) { return (typeof strValue == 'string' && strpos(strValue,' ',0) !== false && strValue != '' && isNaN(strValue)); } function isString(strValue) { return (typeof strValue == 'string' && strValue != '' && isNaN(strValue)); } function isNumber(strValue) { return (!isNaN(strValue) && strValue != ''); } function isChecked(blnChecked) { return blnChecked; } function isTelephone(strValue) { return (strValue != ''); } function isPostcode(strValue) { if(document.getElementById('postcode_mandatory')) { if(document.getElementById('postcode_mandatory').style.visibility == 'hidden') { return true; } else { return (strValue.length >= 3); } } else { return (strValue.length >= 3); } } function isPassword(strValue) { return (strValue != ''); } function isEmail(strValue) { var objRE = /^[\w-\.\']{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,}$/; return (strValue != '' && objRE.test(strValue)); } function centralisedpopup(mypage, myname, w, h, scroll, status) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',menubar=no,location=no,resize=yes,status='+status+''; win = window.open(mypage, myname, winprops); if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function doChangeImage(img) { document.getElementById('image_left').innerHTML = ''; } function changeBestSellerImg(src,href) { //alert(src); document.getElementById("top_product_img").src=src; document.getElementById("top_product_link").href=href; //document['sim2'].src=src; return; } function bookmark(url,title) { if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) { window.external.AddFavorite(url,title); } else if (navigator.appName == "Netscape" && window.sidebar && window.sidebar.addPanel) { window.sidebar.addPanel(title,url,""); } else { alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark"); } } function toggleHomepageTab(iTabId) { $(".homepage_tab_content").hide(); $('.homepage_tab').removeClass('current'); $("#homepage_tab_content_"+iTabId).show(); $('#homepage_tab_'+iTabId).addClass('current'); return false; } var objJCarousel; var blnAutoSlider = 1; var iAutoTimer = 5; function getFlashMovieObject(movieName) { if (window.document[movieName]) return window.document[movieName]; if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]; } else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) { return document.getElementById(movieName); } } function showNextSlide() { if(blnAutoSlider) objJCarousel.startAuto(iAutoTimer); } var iSlideCount = 0; function initSlideshow(src, control_src) { $(function(){ $(src).jcarousel({ wrap: 'last', auto: iAutoTimer, scroll: 1, visible: 1, animation: 800, buttonNextHTML: null, buttonPrevHTML: null, initCallback: function(carousel) { objJCarousel = carousel; $(control_src+' a').click(function(){ iSlideCount = 0; carousel.startAuto(0); blnAutoSlider = 0; gotoSlide = $(this).attr('rel'); if(gotoSlide == 'back') { carousel.prev(); } else if(gotoSlide == 'next') { carousel.next(); } else { carousel.scroll(parseInt(gotoSlide), 0); } return false; }); }, itemVisibleInCallback: { onAfterAnimation: function(carousel, item, i, act) { var itemIndex = i-1; if($(item).hasClass('flash')) { carousel.startAuto(0); setTimeout(function(){getFlashMovieObject('flashswf'+itemIndex).sendDataToFlash();}, 500); } $(control_src+' .button').removeClass('current'); $(control_src+' .button:eq('+itemIndex+')').addClass('current'); if((i % $(control_src+' .button').size()) == 0) { iSlideCount++; } } } }); }); } function runHHAU(elm) { if($(elm).val()=='Other') { $('#hhau_title').html('Other (please state where)'); $('#hhau_other').show().attr('disabled',''); } else if($(elm).val()=='Magazine') { $('#hhau_title').html('Magazine Title'); $('#hhau_other').show().attr('disabled',''); } else { $('#hhau_title').html(''); $('#hhau_other').hide().attr('disabled','disabled'); } } $(function(){ runHHAU($('#how_heard_about_us')); });