
(function(){var global=this;global.Common=function(){var store={cookie_expiry:90};var init=function(){capabilities.test.ajax();ui.externalLinks();ui.resetTextInputs([{id:"ds-www",value:"Search for a domain name"},{id:"bb-tel",value:"BT telephone number"}]);};var capabilities={test:{ajax:function(){if(!cookie.get("ajaxCapable")){if(capabilities.basic()&&capabilities.ajax()){cookie.set("ajaxCapable","true",null,"/");}}}},basic:function(){return!!(document.getElementById);},ajax:function(){var ajax;try{ajax=new XMLHttpRequest();}catch(e){try{ajax=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{ajax=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){ajax=false;}}}
if(ajax){return true;}}};var cookie={set:function(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");},get:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!==0){return null;}}else{begin+=2;}
var end=document.cookie.indexOf(";",begin);if(end==-1){end=dc.length;}
return unescape(dc.substring(begin+prefix.length,end));},remove:function(name,path,domain){if(cookie.get(name)){document.cookie=name+"="+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}};var ccard={selectCard:function(){if((document.paymentForm.elements.ccid&&document.paymentForm.element.ccid.value)||(document.paymentForm.elements.card_id&&document.paymentForm.elements.card_id.value)){$card_colour='#FFFFFF';$fields_colour='#EFEFEF';}else{$card_colour='#EFEFEF';$fields_colour='#FFFFFF';}
for(i=0;i<document.paymentForm.elements.length;i++){if(document.paymentForm.elements[i].name=='ccid'||document.paymentForm.elements[i].name=='card_id'){document.paymentForm.elements[i].style.backgroundColor=$card_colour;}else{document.paymentForm.elements[i].style.backgroundColor=$fields_colour;document.paymentForm.elements[i].value='';}}},deselectCard:function(field){if(field.value&&(document.paymentForm.elements.ccid||document.paymentForm.elements.card_id)){if(document.paymentForm.elements.ccid){document.paymentForm.elements.ccid.value='';}
if(document.paymentForm.elements.card_id){document.paymentForm.elements.card_id.value='';}
for(i=0;i<document.paymentForm.elements.length;i++){if(document.paymentForm.elements[i].name=='ccid'||document.paymentForm.elements[i].name=='card_id'){document.paymentForm.elements[i].style.backgroundColor='#EFEFEF';}else{document.paymentForm.elements[i].style.backgroundColor='#FFFFFF';}}}}};var ui={resetTextInput:function(element,text){element.onfocus=element.onblur=function(){if(this.value==text){this.value='';}
else if(!this.value.replace(/\s+/,'')){this.value=text;}};},resetTextInputs:function(elements){for(i=0,len=elements.length;i<len;i++){if(document.getElementById(elements[i].id)){element=document.getElementById(elements[i].id);ui.resetTextInput(element,elements[i].value);}}},clickable:function(obj){var urls=obj.getElementsByTagName('a');for(var i=0;i<urls.length;i++){if(urls[i].className&&urls[i].className.match(/clickable/gi)){location.href=urls[i].getAttribute('href');}}},collapse:function(tagName){if(!tagName){tagName="h3";}
var dl;var objs=document.getElementsByTagName(tagName);for(var i=0;i<objs.length;i++){if(objs[i].className&&objs[i].className.match(/collapse/gi)){objs[i].nextSibling.setAttribute('class','hidden');objs[i].onclick=function(){this.setAttribute('style','cursor:pointer');dl=this.nextSibling;if(dl.className){dl.setAttribute('class','');}else{dl.setAttribute('class','hidden');}};}}},hideThenShow:function(trigger,hide,show){$(trigger).click(function(){$(hide).fadeOut("fast");$(show).fadeIn("fast");});},externalLinks:function(){if(!document.getElementsByTagName){return;}
var anchors=document.getElementsByTagName('a');for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.getAttribute('href')&&anchor.getAttribute('rel')=='external'){anchor.target='_blank';}}},enableAgency:function(obj){var agency=document.getElementById('agency');if(obj.checked){agency.disabled=false;agency.style.background='#fff';agency.style.color='#000';}else{agency.disabled=true;agency.style.background='#ddd';agency.style.color='#999';}},popup:function(url,vWidth,vHeight){window.open(url,"","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+vWidth+",height="+vHeight+",left=20,top=20");},popupRaw:function(url,name,features){window.open(url,name,features);},fadeInGreen:function(elem,callback){$(elem).css("background-color","#E4FFDF").fadeIn("slow",function(){$(elem).css("background-color","#fff");if($.isFunction(callback)){callback();}});},fadeOutPink:function(elem,callback){$(elem).css("background-color","#FFEFEF").fadeOut("slow",function(){$(elem).css("background-color","#fff");if($.isFunction(callback)){callback();}});},tabInit:function(){var _tmp;var layer;ui.tabHide();if(tabs){for(var i=0;i<tabs.length;i++){_tmp=tabs[i].split(',');layer=document.getElementById(_tmp[0]);if(layer){layer.tab=_tmp[1];layer.onclick=function(){ui.tabHide();this.className+=' on';if(document.getElementById(this.tab)){document.getElementById(this.tab).className='section show';}
return false;};}}
_tmp=tabs[0].split(',');if(document.getElementById(_tmp[0])){document.getElementById(_tmp[0]).className='image-block on';}
if(document.getElementById(_tmp[1])){document.getElementById(_tmp[1]).className='section show';}}},tabHide:function(){var _tmp;if(tabs){for(var i=0;i<tabs.length;i++){_tmp=tabs[i].split(',');if(document.getElementById(_tmp[1])){document.getElementById(_tmp[1]).className='section hide';}
if(document.getElementById(_tmp[0])){document.getElementById(_tmp[0]).className='image-block';}}}}};var utils={formSubmit:function(formId){var obj=document.getElementById(formId);if(obj){obj.submit();}},stripEmptyNodes:function(node){if(!node){node=document.body;}
for(var x=0;x<node.childNodes.length;x++){var child=node.childNodes[x];if((child.nodeType==3)&&(!(/\S/.test(child.nodeValue)))){node.removeChild(node.childNodes[x]);x--;}else if(child.nodeType==1){utils.stripEmptyNodes(child);}}},removeChildNodes:function(node){var len=node.childNodes.length;if(len){for(var i=len;i>=0;i--){if(node.childNodes[i]){utils.removeChildNodes(node.childNodes[i]);node.removeChild(node.childNodes[i]);}}}}};var validate={email:function(email){var filter=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(filter.test(email)){return true;}else{return false;}},emailStringent:function(email){var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;var check=/@[\w\-]+\./;var checkend=/\.[a-zA-Z]{2,4}$/;if(((email.search(exclude)!=-1)||(email=="")||(email.search(check))==-1)||(email.search(checkend)==-1)){return false;}else{return true;}},postcode:function(code){if(code){test=code;}else{test=document.form1.postcode.value;}
size=test.length;test=test.toUpperCase();while(test.slice(0,1)==" "){test=test.substr(1,size-1);size=test.length;}
while(test.slice(size-1,size)==" "){test=test.substr(0,size-1);size=test.length;}
document.form1.postcode.value=test;if(size<6||size>8){alert(test+" is not a valid postcode - wrong length");document.form1.postcode.focus();return false;}
if(!(isNaN(test.charAt(0)))){alert(test+" is not a valid postcode - cannot start with a number");document.form1.postcode.focus();return false;}
if(isNaN(test.charAt(size-3))){alert(test+" is not a valid postcode - alpha character in wrong position");document.form1.postcode.focus();return false;}
if(!(isNaN(test.charAt(size-2)))){alert(test+" is not a valid postcode - number in wrong position");document.form1.postcode.focus();return false;}
if(!(isNaN(test.charAt(size-1)))){alert(test+" is not a valid postcode - number in wrong position");document.form1.postcode.focus();return false;}
if(!(test.charAt(size-4)==" ")){alert(test+" is not a valid postcode - no space or space in wrong position");document.form1.postcode.focus();return false;}
count1=test.indexOf(" ");count2=test.lastIndexOf(" ");if(count1!=count2){alert(test+" is not a valid postcode - only one space allowed");document.form1.postcode.focus();return false;}
return true;},fields:function(obj){if(obj.fullName.value==''||obj.emailAddress.value==''||obj.telephoneNumber.value==''||obj.department.value==''||obj.message.value==''){alert('Please complete all required fields before submitting.');return false;}else{if(!validate.email(obj.emailAddress.value)){alert('Email address appears to be invalid.');return false;}else{return true;}}},fields_competition:function(){if(document.form1.answer.selectedIndex<1){alert("Please select your answer to the question");document.form1.answer.focus();return false;}
if(validate.emailStringent(document.form1.email.value)==false){alert("Incorrect email address,\nplease re-enter");document.form1.email.select();document.form1.email.focus();return false;}
if(document.form1.customer[0].checked==false&&document.form1.customer[1].checked==false){alert("Please indicate whether you are an existing customer.");return false;}
if(document.form1.country.value!="UK"){alert("The competition is only open to UK residents.");return false;}
return(validate.postcode());}};var event={attach:function(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true;}else if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r;}else{return false;}}};var deprecated={mvs:null,activeMv:null,timer:null,headstart:null,helperW:null,bookmark:function(){if(window.external&&!(navigator.userAgent.indexOf('Mac')!=-1)){window.external.AddFavorite(location.href,document.title);}else{str="Your browser does not support this action.\n";str+=(navigator.userAgent.indexOf('Mac')!=-1)?"Press Command (Apple-Key) + D to bookmark.":"Press Ctrl + D to bookmark.";alert(str);}
return false;},checkVal:function(obj){if(obj.value=='*'){obj.value='';}else if(!obj.value.replace(/\s+/,'')){obj.value='*';}},defaultVals:function(){var inputs=document.getElementsByTagName('input');var txtAreas=document.getElementsByTagName('textarea');for(var i=0;i<inputs.length;i++){if(/userinput/gi.test(inputs[i].className)){inputs[i].onfocus=inputs[i].onblur=function(){deprecated.checkVal(this);};}}
for(i=0;i<txtAreas.length;i++){if(/userinput/gi.test(txtAreas[i].className)){txtAreas[i].onfocus=txtAreas[i].onblur=function(){deprecated.checkVal(this);};}}},aLittleTime:function(mv,run){if(run){var obj=document.getElementById('ft');removeEmpty(obj);obj.childNodes[0].setAttribute('src','/cms_templates/images/'+mv);deprecated.activeMv=mv;clearTimeout(deprecated.timer);return true;}else{deprecated.timer=window.setTimeout('deprecated.aLittleTime("'+mv+'",1)',deprecated.headstart);return false;}},rotate:function(pos){if(deprecated.mvs){if(pos>=deprecated.mvs.length){pos=0;}
var fo=new FlashObject('/cms_templates/images/swf/'+deprecated.mvs[pos],"ft-product","606","167","5","#ffffff");fo.write("ft");deprecated.activeMv=deprecated.mvs[pos];deprecated.timer=setTimeout('deprecated.rotate('+(pos+=1)+')',15000);}},windowHelper:function(url){var sw=screen.availWidth;var sh=screen.availHeight;var mw=(sw*0.75);var hw=((sw-mw)-10);this.resizeTo(mw,sh);this.moveTo(0,0);if(deprecated.helperW&&!deprecated.helperW.closed){deprecated.helperW.close();}
deprecated.helperW=window.open(url,'helper','width='+hw+',height='+sh+',left='+(mw+10)+',top=no,resizable=yes,scrollbars=yes,modal=yes,location=no,titlebar=no,directories=no,status=no');},showMsg:function(obj,a,w){var helper=document.getElementById("helper");if(helper){helper.innerHTML=obj.innerHTML;helper.style.visibility="visible";document.getElementById('helperft').style.visibility="visible";}},hideMsg:function(obj,a){var helper=document.getElementById("helper");if(helper){helper.innerHTML="";helper.style.visibility="hidden";document.getElementById('helperft').style.visibility="hidden";}},fields_db9_competition:function(frm){var o1=document.getElementById('year');var o2=document.getElementById('spy');var o3=document.getElementById('service');var a1=o1.options[o1.selectedIndex].value;var a2=o2.options[o2.selectedIndex].value;var a3=o3.options[o3.selectedIndex].value;var a4=(document.getElementById('customer_y').checked)?'y':'n';var a5=(document.getElementById('newsletter').checked)?1:0;var a6=document.getElementById('__email').value;if(!a6.replace(/\s+/,'')){alert('Lost email address, please ensure cookies are enabled before proceeding');return false;}else if(!a1.replace(/\s+/,'')||!a2.replace(/\s+/,'')||!a3.replace(/\s+/,'')){alert('Please answer all questions before continuing');return false;}else{$.post("/competitions/db9-entry.php",{year:a1,spy:a2,service:a3,customer:a4,newsletter:a5,email:a6},function(rsp){if(rsp!='error'){location.href='/competition_thanks.html';}else{alert("Problem with submission.\nPlease make sure you complete all the questions.\nOnly one submission per email address per day.");}});return false;}},allAnswered:function(fieldId){var f=document.getElementById(fieldId);if(f){if(!f.value.replace(/\s+/,'')){return false;}else{if(fieldId=='DB9_email'){document.cookie="db9email="+f.value;}
return true;}}else{return false;}}};return{init:init,cookie:cookie,ccard:ccard,ui:ui,utils:utils,validate:validate,event:event,deprecated:deprecated};}();})();function deleteCookie(name,path,domain){Common.cookie.remove(name,path,domain);}
function getCookie(name){return Common.cookie.get(name);}
function setCookie(name,value,expires,path,domain,secure){Common.cookie.set(name,value,expires,path,domain,secure);}
function deselect_card(field){Common.ccard.deselectCard(field);}
function select_card(){Common.ccard.selectCard();}
function checkAgency(obj){Common.ui.enableAgency(obj);}
function clickable(obj){Common.ui.clickable(obj);}
function collapse(tagName){Common.ui.collapse(tagName);}
function externalLinks(){Common.ui.externalLinks();}
function hideLayers(){Common.ui.tabHide();}
function MM_openBrWindow(url,name,features){Common.ui.popupRaw(url,name,features);}
function prepTabs(){Common.ui.tabInit();}
function win(url,vWidth,vHeight){Common.ui.popup(url,vWidth,vHeight);}
function removeChildren(node){Common.utils.removeChildNodes(node);}
function removeEmpty(node){Common.utils.stripEmptyNodes(node);}
function submitForm(frm){Common.utils.formSubmit(frm);}
function checkFields(obj){return Common.validate.fields(obj);}
function checkMail(email){return Common.validate.email(email);}
function postit(){return Common.validate.postcode();}
function Required(){return Common.validate.fields_competition();}
function validate(email){return Common.validate.emailStringent(email);}
function alittletime(mv,run){return Common.deprecated.aLittleTime(mv,run);}
function allAnswered(fieldId){return Common.deprecated.allAnswered(fieldId);}
function bookmark(){return Common.deprecated.bookmark();}
function changeFeature(mv,obj){}
function checkVal(obj){Common.deprecated.checkVal(obj);}
function checkAnswers(frm){return Common.deprecated.fields_db9_competition(frm);}
function defaultVals(obj){Common.deprecated.defaultVals();}
function helper(url){Common.deprecated.windowHelper(url);}
function hidemsg(obj,a){Common.deprecated.hideMsg(obj,a);}
function rotate(pos){Common.deprecated.rotate(pos);}
function safariLoad(){}
function showmsg(obj,a,w){Common.deprecated.showMsg(obj,a,w);}
$(document).ready(function(){Common.init();});$(document).ready(function(){$("#smsitename").hover(function(){$("#tooltip_sitename").fadeIn(500);},function(){$("#tooltip_sitename").fadeOut(500);});$(".sitemap-button-first").click(function(){$("#sitemap-wrapper").fadeIn(250);return false;});$(".sitemap-button-second").click(function(){$("#sitemap-wrapper").fadeOut(250);return false;});$(".information").css({'display':'none'});$(".feat-info").click(function(){if($(this).parent().parent().find(".information").css("display")==='block'){$(".information").slideUp("fast");}else{$(".information").slideUp("fast");$(this).parent().parent().find(".information").slideToggle("fast");return false;}});$("#keyword-search, #multiple-search, #thesaurus-search").css({'display':'none'});$("#keyword").addClass("selected");$("#keyword-search").css({'display':'block'}).addClass("show");$("a.advanced-button").click(function(){var id=$(this).attr('id');var searchbox='#'+id+'-search';$("a.advanced-button").removeClass("selected");$(this).addClass("selected");$(".show").css({display:"none"});$("#keyword-search, #multiple-search, #thesaurus-search").removeClass("show");$(searchbox).css({display:"block"}).addClass("show");return false;});$("a#sort-price").toggle(function(){$("ul#ssl-prod-list>li").tsort("span.price",{order:"desc",attr:"rel"});$(this).removeClass("up").addClass("down");},function(){$("ul#ssl-prod-list>li").tsort("span.price",{attr:"rel"});$(this).removeClass("down").addClass("up");return false;});$("a#sort-setup").toggle(function(){$("ul#ssl-prod-list>li").tsort("strong.setup",{attr:"rel"});$(this).removeClass("down").addClass("up");},function(){$("ul#ssl-prod-list>li").tsort("strong.setup",{order:"desc",attr:"rel"});$(this).removeClass("up").addClass("down");return false;});$('a#sh-geotrust').click(function(){if($(this).text()=='Hide Geotrust'){$('li.geotrust').slideUp(400);$(this).text('Show Geotrust').removeClass("on").addClass("off");$('a#sh-all').removeClass("on").addClass("off");}else{if($(this).text()=='Show Geotrust'){$('li.geotrust').slideDown(400);$(this).text('Hide Geotrust').removeClass("off").addClass("on");$('a#sh-ov , a#sh-ov , a#sh-dv , a#sh-all').removeClass("on").addClass("off");}}
return false;});$('a#sh-thawte').click(function(){if($(this).text()=='Hide Thawte'){$('li.thawte').slideUp(400);$(this).text('Show Thawte').removeClass("on").addClass("off");$('a#sh-all').removeClass("on").addClass("off");}else{if($(this).text()=='Show Thawte'){$('li.thawte').slideDown(400);$(this).text('Hide Thawte').removeClass("off").addClass("on");$('a#sh-ov , a#sh-ov , a#sh-dv , a#sh-all').removeClass("on").addClass("off");}}
return false;});$('a#sh-verisign').click(function(){if($(this).text()=='Hide Verisign'){$('li.verisign').slideUp(400);$(this).text('Show Verisign').removeClass("on").addClass("off");$('a#sh-all').removeClass("on").addClass("off");}else{if($(this).text()=='Show Verisign'){$('li.verisign').slideDown(400);$(this).text('Hide Verisign').removeClass("off").addClass("on");$('a#sh-ov , a#sh-ov , a#sh-dv , a#sh-all').removeClass("on").addClass("off");}}
return false;});$('a#sh-ev').click(function(){$('li.ov , li.dv').slideUp(400);$('a#sh-ov , a#sh-dv , a#sh-all').removeClass("on").addClass("off");$('li.ev').slideDown(400);$('a#sh-ev').removeClass("off").addClass("on");return false;});$('a#sh-ov').click(function(){$('li.ev , li.dv').slideUp(400);$('a#sh-ev , a#sh-dv , a#sh-all').removeClass("on").addClass("off");$('li.ov').slideDown(400);$('a#sh-ov').removeClass("off").addClass("on");return false;});$('a#sh-dv').click(function(){$('li.ov , li.ev').slideUp(400);$('a#sh-ov , a#sh-ev , a#sh-all').removeClass("on").addClass("off");$('li.dv').slideDown(400);$('a#sh-dv').removeClass("off").addClass("on");return false;});$('a#sh-all').click(function(){$('ul#ssl-prod-list>li').slideDown(400);$(this).removeClass("off").addClass("on");$('a#sh-ov , a#sh-ev , a#sh-dv').removeClass("no").addClass("off");$('a#sh-geotrust').text('Hide Geotrust').removeClass("off").addClass("on");$('a#sh-thawte').text('Hide Thawte').removeClass("off").addClass("on");$('a#sh-verisign').text('Hide Verisign').removeClass("off").addClass("on");return false;});var colWidth=166;function doNextClick(){var numCols=$('#ssl-column-container').find('dl:visible').length;var totalCols=$('#ssl-column-container').children().length;if(parseInt($('#ssl-column-container').css('marginLeft'))>(-736+((totalCols-numCols)*colWidth))){unbindNextClick();$('#ssl-column-container').animate({marginLeft:'-=166'},500,'swing',bindNextClick);}
return false;}
function doBackClick(){var numCols=$('#ssl-column-container').find('dl:visible').length;if(parseInt($('#ssl-column-container').css('marginLeft'))<260){unbindBackClick();$('#ssl-column-container').animate({marginLeft:'+=166'},500,'swing',bindBackClick);}
return false;}
function bindNextClick(){$('a#slide-next').bind('click',doNextClick);}
function unbindNextClick(){$('a#slide-next').unbind('click');}
function bindBackClick(){$('a#slide-back').bind('click',doBackClick);}
function unbindBackClick(){$('a#slide-back').unbind('click');}
$('a.close-column').click(function(){var numCols=$('#ssl-column-container').find('dl:visible').length;var totalCols=$('#ssl-column-container').children().length;if(parseInt($('#ssl-column-container').css('marginLeft'))>=(-736+((totalCols-numCols)*colWidth)))doBackClick();$(this).parent().parent().fadeOut(500);return false;});$('a#show-all').click(function(){$('dl.ssl-compare-column').fadeIn(500);return false;});bindNextClick();bindBackClick();$(".archive").hide();$("h3.trigger").toggle(function(){$(this).addClass("active");},function(){$(this).removeClass("active");});$("h3.trigger").click(function(){$(this).next("div").slideToggle("fast");});});