var tile = null;function write_ad(zone,source){var m3_u=(location.protocol=='https:'?'https://files.list.co.uk/oa/www/delivery/ajs.php':'http://files.list.co.uk/oa/www/delivery/ajs.php'); var m3_r=Math.floor(Math.random()*99999999999); if (!document.MAX_used) document.MAX_used=','; if(tile) source = source + '/'+tile; document.write('<scr'+'ipt type="text/javascript" src="'+m3_u+'?zoneid='+zone+'&amp;source=/'+source+'/&amp;cb='+m3_r); if (document.MAX_used != ',') document.write('&amp;exclude='+document.MAX_used); document.write('&amp;loc='+escape(window.location)); if (document.referrer) document.write('&amp;referer='+escape(document.referrer)); if (document.context) document.write('&amp;context='+escape(document.context)); if (document.mmm_fo) document.write('&amp;mmm_fo=1'); document.write('"></scr'+'ipt>');}function showHide(id,prefix,list_of_ids,list_of_ads){if (document.getElementById(prefix+'Tab'+id).className!='selected'){var id_list=list_of_ids.split(','); for(var loopIndex=0;loopIndex<id_list.length;loopIndex++){document.getElementById(prefix+'Tab'+id_list[loopIndex]).className=''; document.getElementById(prefix+'List'+id_list[loopIndex]).className='listHide ' + prefix + 'LS';}document.getElementById(prefix+'Tab'+id).className='selected'; document.getElementById(prefix+'List'+id).className='listShow ' + prefix + 'LS'; position_ads(list_of_ads);}return false;}function load_map(latitude,longitude){if (GBrowserIsCompatible()){var map=new GMap2(document.getElementById('googleMap')); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(latitude,longitude),15); var point = new GPoint(longitude,latitude); var marker = new GMarker(point);map.addOverlay(marker);}}function position_ads(listOfSlots){var slotList=listOfSlots.split(','); var containerOffset=findPos(document.getElementById('outerContainer')); for(var loopIndex=0;loopIndex<slotList.length;loopIndex++){if(document.getElementById(slotList[loopIndex])){var coords=findPos(document.getElementById(slotList[loopIndex]+'Holder')); document.getElementById(slotList[loopIndex]).style.left=coords[0]-containerOffset[0]+'px'; document.getElementById(slotList[loopIndex]).style.top=coords[1]-containerOffset[1]+'px'; document.getElementById(slotList[loopIndex]).className='';}}}function doublempu(size){var i; var l; if(size && size>0){document.getElementById('mpuHolder').style.height = size+"px"; postition_ads('mpu'); return 1;}document.getElementById('mpuHolder').className = ''; l = document.getElementById('mpu').getElementsByTagName('iframe'); if(!l.length) l = document.getElementById('mpu').getElementsByTagName('embed'); if(!l.length) l = document.getElementById('mpu').getElementsByTagName('img'); if(l.length){for(var ii=0;ii<l.length;ii++){i = l[ii]; var h = document.getElementById('mpuHolder'); if(i && (i.height || i.style.height) && (i.width == 300 || i.style.width == "300px")){if(i.style.height){h.style.height = i.style.height;}else{h.height = i.height; h.style.height = (i.height)+"px";}position_ads('mpu'); return true;}}}position_ads('mpu');}function findPos(obj){var curleft=curtop=0; if (obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop; while (obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}}return [curleft,curtop];}function subnavTags(tags,formID){document.getElementById('section').value=tags; callSearchTidier(); document.getElementById(formID).submit();}/* facebook */function fbs_click(){u=location.href; t=document.title; window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436'); return false;}/* del.icio.us */function dlcs_click(){u=location.href; t=document.title; window.open('http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t),'delicious','toolbar=no,width=700,height=400'); return false;}/* google reader */function grdr_click(){var b=document.body; window.GR________bookmarklet_domain='http://www.google.com'; if (window.location.hash=='#shareLinks'){window.location.hash='#'}if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}}/* clean form field input */function searchFieldTidier(){var i=0; for (i=0;i<=(arguments.length/2)-1;i++){if (document.getElementById(arguments[2*i])){if (document.getElementById(arguments[2*i]).value==arguments[2*i+1]){document.getElementById(arguments[2*i]).value=''}else{document.getElementById(arguments[2*i]).value=document.getElementById(arguments[2*i]).value.replace(/[?]/g,'')}}}}function selectedTag(tag){createCookie('selectedTag',tag)}function createCookie(name,value,days){if(days){var date=new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires="; expires="+date.toGMTString();}else expires=""; document.cookie = name+"="+value+expires+"; path=/";}/* share links */var shareState=0;function share(){var coords=findPos(document.getElementById('shareButton')); var containerOffset=findPos(document.getElementById('container')); if (shareState==0){document.getElementById('shareLinks').display='block'; document.getElementById('shareLinks').style.left=coords[0]-containerOffset[0]-163+'px'; document.getElementById('shareLinks').style.top=coords[1]-containerOffset[1]+20+'px'; document.getElementById('shareLinks').className=''; shareState=1;}else{document.getElementById('shareLinks').className='none'; shareState=0;}}function shareHide(){/* var urlString = location.href; var lastCharPosition = urlString.length; var anchorStartPosition = urlString.search('#'); var anchorValue = urlString.substring(anchorStartPosition,lastCharPosition); */ if (window.location.hash!='#shareLinks'){document.getElementById('shareLinks').className='none';}}/* star ratings */function starsOn(newStarsClassName){document.getElementById('stars').className=newStarsClassName;}function starsOff(){document.getElementById('stars').className=currentStarsClassName;}function starsRate(rating,newStarsClassName){currentStarsClassName=newStarsClassName; document.getElementById('star_rating').value=rating; commentForm('review');}/* comment form */function commentForm(mode){if (mode=='comment'){if (document.getElementById('starRating')){starsOn(''); starsRate(0,'star0');}document.getElementById('review').value='0'; document.getElementById('commentForm').className=''; /* document.getElementById('starsContainer').className='none'; */ document.getElementById('commentLabel').innerHTML='Comment';}else if (mode=='review'){document.getElementById('review').value='1'; document.getElementById('commentForm').className='reviewForm'; /* document.getElementById('starsContainer').className=''; */ document.getElementById('commentLabel').innerHTML='Review';}if (document.getElementById('largeRectangleHolder')){position_ads('largeRectangle');}}/* show/hide address on offer entry form */function offer_address_hider(onoff){if (onoff==true){document.getElementById('address_details').className='none';}else{document.getElementById('address_details').className='';}if (document.getElementById('largeRectangleHolder')){position_ads('largeRectangle');}}
