/*
	Javascript code written by PSLWeb.co.uk. Copyright ©2010 PSLWeb.co.uk - All Rights Reserved.
*/
function mphr(a){var b=new Array();b[1]='i'+'nfo';b[2]='gr'+'aham';b[3]='gr'+'aham';var c='optilead.c'+'o.uk';switch(a){case 1:document.write('<a href="mai'+'lto:'+b[a]+'@'+c+'">e-mail us</a>');break;case 2:document.write('<p>e-mail: <a href="mai'+'lto:'+b[a]+'@'+c+'">'+b[a]+'@'+c+'</a></p>');break;case 3:document.write(' or <a href="mai'+'lto:'+b[a]+'@'+c+'">'+b[a]+'@'+c+'</a>');break;default:break}};function runOnLoad(f){if(runOnLoad.loaded)f();else runOnLoad.funcs.push(f)};runOnLoad.funcs=[];runOnLoad.loaded=false;runOnLoad.run=function(){if(runOnLoad.loaded)return;for(var i=0;i<runOnLoad.funcs.length;i++){try{runOnLoad.funcs[i]()}catch(e){}}runOnLoad.loaded=true;delete runOnLoad.funcs;delete runOnLoad.run};if(window.addEventListener)window.addEventListener("load",runOnLoad.run,false);else if(window.attachEvent)window.attachEvent("onload",runOnLoad.run);else window.onload=runOnLoad.run;function Slideshow(d,e,f,g,h,j,k,l,m){if(!(document.getElementById(k)))return;this.frameRate=d;this.numImgs=j.length;this.nextImg=1;this.imgSwitch=false;this.fadeRate=d*e;this.fadeCount=this.fadeRate+1;this.cycleRate=1000/d;this.imgStatic=f*1000;this.imgList=new Array();this.loop=g;this.ssImgA=l;this.ssImgB=m;var n=this;var k=document.getElementById(k);var o=document.getElementById(this.ssImgA);var p=document.createElement("img");p.style.width=o.style.width;p.style.height=o.style.height;p.style.position="absolute";p.style.top="0px";p.style.left="0px";p.style.opacity=0;p.style.MozOpacity=0;p.style.KhtmlOpacity=0;p.style.filter='alpha(opacity=0)';p.id=this.ssImgB;k.appendChild(p);if(h==""){var q=o.src.lastIndexOf('/');h=(q>=0)?o.src.substr(0,q+1):'/'}function imageLoaded(){this.ready=true};for(i=0;i<this.numImgs;i++){this.imgList[i]=new Image;this.imgList[i].ready=false;this.imgList[i].onload=imageLoaded;this.imgList[i].src=h+j[i]}this.startFade=function(){n.timer=setInterval(n.fadeImage,n.cycleRate)};this.fadeImage=function(){if(n.fadeCount<=n.fadeRate){var a=(n.imgSwitch)?document.getElementById(n.ssImgA):document.getElementById(n.ssImgB);a.style.opacity=1-(n.fadeCount/n.fadeRate);a.style.MozOpacity=1-(n.fadeCount/n.fadeRate);a.style.KhtmlOpacity=1-(n.fadeCount/n.fadeRate);a.style.filter='alpha(opacity='+eval(100-(100*n.fadeCount/n.fadeRate))+')';var b=(n.imgSwitch)?document.getElementById(n.ssImgB):document.getElementById(n.ssImgA);b.style.opacity=n.fadeCount/n.fadeRate;b.style.MozOpacity=n.fadeCount/n.fadeRate;b.style.KhtmlOpacity=n.fadeCount/n.fadeRate;b.style.filter='alpha(opacity='+eval(100*n.fadeCount/n.fadeRate)+')';n.fadeCount++}else{if(n.imgList[n.nextImg].ready){var c=(n.imgSwitch)?document.getElementById(n.ssImgA):document.getElementById(n.ssImgB);c.src=n.imgList[n.nextImg].src;n.nextImg++;if(n.nextImg>=n.numImgs)n.nextImg=0;if((n.loop)||(n.nextImg!=1)){n.imgSwitch=!(n.imgSwitch);n.fadeCount=0;clearInterval(n.timer);setTimeout(n.startFade,n.imgStatic)}else clearInterval(n.timer)}else{clearInterval(n.timer);n.timer=setInterval(n.fadeImage,1000)}}};setTimeout(this.startFade,0)};function slideshowInit(){var a='';var b=new Array("aa.jpg","aviva.gif","churchill.jpg","confused_com.gif","direct_choice.gif","ecotricity.gif","energy_helpline.gif","esure.gif","footman_james.gif","home_insurer.gif","justyou.gif","mce.gif","norton_insurance.gif","page_and_moy.gif","premium_choice.gif","rbs_insurance.gif","saab.jpg","sheilas_wheels.jpg","sse.gif","tesco.gif","travelsphere.jpg","u_switch.gif");var c=new Slideshow(25,1,2.5,true,a,b,'slideShow','ssImg1','ssImg2')};runOnLoad(slideshowInit);

