var BLANK_URL = 'https://cdn4.forzagroup-cdn.co.uk/js/blank.html';
var SPINNER_IMG = 'https://cdn4.forzagroup-cdn.co.uk/js/lazierload/spinner.gif';
var BLANK_IMG = 'https://cdn4.forzagroup-cdn.co.uk/js/spacer.gif';


ForzaUtilityClass = Class.create();
ForzaUtilityClass.prototype = {
	
	lightboxClass: null,

	initialize: function(){
		this.lightboxClass = 'lightbox-';		
	},
	
	loadColorBox: function(myclass, parameters) {
		//Examples of how to assign the ColorBox event to elements
			
		// set the class of the items handling the lightbox
		document.getElementById(myclass).setAttribute("class", this.getLightBoxClass(myclass));

		// Create the lightbox
		$j('.' + this.lightboxClass + myclass).colorbox(parameters);
	},
	
	getLightBoxClass: function(myclass) {
		return this.lightboxClass + myclass;
		
	},
	
	categoryTabs : function(rootClass, selected) {
		$j(rootClass).click(function () {
			$j('div.tab-container > div').hide().filter(this.hash).show();		
			$j('div.tabs ul.tabNavigation a').removeClass('selected');
			
			if(selected)
				$j(selected).addClass('selected');
			else
				$j(this).addClass('selected');
			return false;
		}).filter(':first').click();
	},
	
	showTab : function(tab) {
		$j('div.tabs ul.tabNavigation a').removeClass('selected');
		$j(tab).addClass('selected');
		$j('div.tab-container > div').hide().filter(tab).show();		
	},
	
	scrollTo : function(id) {
		var obj = document.getElementById(id);
		//var currentPosition = int(obj.style.top)
		window.scrollTo(0,400);
	},
	
	
	sliderBar : function() {
		//SCRIPT TO CONTROL BANNER
		$j('#slider').nivoSlider({
			effect:'boxRain', // Specify sets like: 'fold,fade,sliceDown'
			slices:1, // For slice animations
			boxCols: 1, // For box animations
			boxRows: 1, // For box animations
			animSpeed:500, // Slide transition speed
			pauseTime:5000, // How long each slide will show
			startSlide:0, // Set starting Slide (0 index)
			directionNav:true, // Next & Prev navigation
			directionNavHide:false, // Only show on hover
			keyboardNav:true, // Use left & right arrows
			pauseOnHover:true, // Stop animation while hovering
			manualAdvance:false, // Force manual transitions
			captionOpacity:0.8, // Universal caption opacity
			prevText: 'Prev', // Prev directionNav text
			nextText: 'Next' // Next directionNav text
		});
	},

	alertMe: function() {
		alert("HERE I AM");
	}
	
	
	
	
}

ForzaUtility = new ForzaUtilityClass();


// EV SSL DECAL
var Ovr2='';if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";}else{cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";}if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){cot_t1_DOCtp2="_top:expression(document.documentElement.scrollTop-20+document.documentElement.clientHeight-this.clientHeight);}";}else{cot_t1_DOCtp2="_top:expression(document.body.scrollTop-20+document.body.clientHeight-this.clientHeight);}";}var cot_bgf0=(window.location.protocol.toLowerCase()=="https:")? "https://secure.comodo.com/trustlogo/images/cot_bgf0.gif" : "http://www.trustlogo.com/images/cot_bgf0.gif";
var cot_tl_bodyCSS='* html {background:url('+cot_bgf0+') fixed;background-repeat: repeat;background-position: right bottom;}';var cot_tl_fixedCSS='#cot_tl_fixed{position:fixed;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'_position:absolute;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'bottom:0px;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'right:0px;';var cot_tl_fixedCSS=cot_tl_fixedCSS;var cot_tl_fixedCSS=cot_tl_fixedCSS+cot_t1_DOCtp;var cot_tl_popCSS='#cot_tl_pop {background-color: transparent;';var cot_tl_popCSS=cot_tl_popCSS+'position:fixed;';var cot_tl_popCSS=cot_tl_popCSS+'_position:absolute;';var cot_tl_popCSS=cot_tl_popCSS+'height:194px;';var cot_tl_popCSS=cot_tl_popCSS+'width: 244px;';var cot_tl_popCSS=cot_tl_popCSS+'right: 120px;';var cot_tl_popCSS=cot_tl_popCSS+'bottom: 20px;';var cot_tl_popCSS=cot_tl_popCSS+'overflow: hidden;';var cot_tl_popCSS=cot_tl_popCSS+'visibility: hidden;';var cot_tl_popCSS=cot_tl_popCSS+'z-index: 100;';var cot_tl_popCSS=cot_tl_popCSS+cot_t1_DOCtp2;document.write('<style type="text/css">'+cot_tl_bodyCSS+cot_tl_fixedCSS+cot_tl_popCSS+'</style>');function cot_tl_bigPopup(url){newwindow=window.open(url,'name','WIDTH=450,HEIGHT=500,FRAMEBORDER=0,MARGINWIDTH=0,MARGINHEIGHT=0,SCROLLBARS=1,allowtransparency=true');if(window.focus){newwindow.focus()}return false;}function cot_tl_toggleMiniPOPUP_hide(){var cred_id='cot_tl_pop';var NNtype='hidden';var IEtype='hidden';var WC3type='hidden';if(document.getElementById){eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"");}else{if(document.layers){document.layers[cred_id].visibility=NNtype;}else{if(document.all){eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"");}}}document.getElementById('frame_pop').src =cot_tl_dummyMini;}function cot_tl_toggleMiniPOPUP_show(){cred_id='cot_tl_pop';var NNtype='show';var IEtype='visible';var WC3type='visible';if(document.getElementById){eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"");}else{if(document.layers){document.layers[cred_id].visibility=NNtype;}else{if(document.all){eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"");}}}document.getElementById('frame_pop').src =cot_tl_miniBaseURL;}function COT(cot_tl_theLogo,cot_tl_LogoType,LogoPosition,theAffiliate){if (document.getElementById('comodoTL')){document.getElementById('comodoTL').style.display="none";}host=location.host;if(window.location.protocol.toLowerCase()=="https:"){cot_tl_dummyMini='https://secure.comodo.com/trustlogo/images/cot_bgf0.gif';cot_tl_miniBaseURL='https://secure.comodo.com/ttb_searcher/trustlogo?v_querytype=C&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';cot_tl_bigBaseURL='https://secure.comodo.com/ttb_searcher/trustlogo?v_querytype=W&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';}else{cot_tl_dummyMini='http://www.trustlogo.com/images/cot_bgf0.gif';cot_tl_miniBaseURL='http://www.trustlogo.com/ttb_searcher/trustlogo?v_querytype=C&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';cot_tl_bigBaseURL='http://www.trustlogo.com/ttb_searcher/trustlogo?v_querytype=W&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';};document.write('<div id="cot_tl_pop">');document.write('<IFRAME id="frame_pop" name="frame_pop" src="'+cot_tl_dummyMini+'" WIDTH=244 HEIGHT=194 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no allowtransparency=true></IFRAME>');document.write('</div>');document.write('<div id="cot_tl_fixed">');document.write('<a href="http://www.instantssl.com" onClick="return cot_tl_bigPopup(\''+cot_tl_bigBaseURL+'\')"><img src='+cot_tl_theLogo+' alt="SSL Certificate" border="0" onMouseOver="Ovr=setTimeout(\'cot_tl_toggleMiniPOPUP_show()\',1000);clearTimeout(Ovr2)" onMouseOut="Ovr2=setTimeout(\'cot_tl_toggleMiniPOPUP_hide()\',3000);clearTimeout(Ovr)"></a>');document.write('</div>');}	

// WHO'S ON FOR www.desirablebody.co.uk
var sWOGateway   = "whoson.pureblue.co.uk:8080"; 
var sWOGatewaySSL= "whoson.pureblue.co.uk:8443";
var sWODomain    = "www.desirablebody.co.uk";
var sWOChatstart = "http://whoson.pureblue.co.uk/chat/chatstart.htm";
var sWODepartment="";
var sWOLanguage="";
var sWOBackgroundURL="";
var sWOResponse="Y";
var sWOInvite="Y";
var sWOPreselect="";
var sWOUser="";
var sWOPage="";
var sWOCost=0;var sWORevenue=0;
var sWOName="";var sWOCompany="";var sWOEmail="";var sWOTelephone="";
var sWOProtocol=window.location.protocol;
var sWOImage=document.createElement('img');
var sWOChatElement;var sWOSession;var sWOUrl;
sWOImage.border=0;
function sWOInit() {
if(sWOUser==""){
	var dt=new Date();var sWOCookie=document.cookie.toString();
	if(sWOCookie.indexOf("whoson")==-1){sWOSession=parseInt(Math.random()*1000)+"-"+dt.getTime();document.cookie="whoson="+sWOSession+";expires=Thu, 31-Dec-2020 00:00:00 GMT; path=/";}
	sWOCookie=document.cookie.toString();
	if(sWOCookie.indexOf('whoson')==-1){sWOSession="";} else {
		var s=sWOCookie.indexOf("whoson=")+"whoson=".length;var e=sWOCookie.indexOf(";",s);
		if(e==-1)e=sWOCookie.length;sWOSession=sWOCookie.substring(s,e);}}
if(sWOProtocol=="https:")sWOGateway=sWOGatewaySSL;if(sWOUser!="")sWOSession=sWOUser;if(sWOProtocol=="file:")sWOProtocol="http:";
}

function sWOStartChat(){window.open(sWOChatElement.href,"Chat","width=550,height=361");return false;}
function sWOImageLoaded(){sWOChatElement.href=sWOChatstart;sWOChatElement.target = "_blank";sWOChatElement.appendChild(sWOImage);sWOChatElement.onclick=sWOStartChat;}
function sWOTrackPage(){
	if(sWOPage=="")sWOPage=escape(window.location);
	sWOUrl=sWOProtocol+"//"+sWOGateway+"/stat.gif?u="+sWOSession+"&d="+sWODomain;
	if(sWODepartment.length>0)sWOUrl+="&t="+escape(sWODepartment);
	sWOUrl+="&p='"+sWOPage+"'&r='"+escape(document.referrer)+"'";
	if(sWOCost!=0)sWOUrl+="&c="+sWOCost;if(sWORevenue!=0)sWOUrl+="&v="+sWORevenue;
	if(sWOName!=""||sWOCompany!=""||sWOEmail!=""||sWOTelephone!="")sWOUrl+="&n="+sWOName+"|"+sWOCompany+"|"+sWOEmail+"|"+sWOTelephone;
	if(sWOResponse==""){
		if(document.layers)document.write("<layer name=\"WhosOn\" visibility=hide><img src=\""+sWOUrl+"\" height=1 width=1><\/layer>");
		else document.write("<div id=\"WhosOn\" STYLE=\"position:absolute;visibility:hidden;\"><img src=\""+sWOUrl+"\" height=1 width=1><\/div>");}
		else {
		sWOImage.onload=sWOImageLoaded;sWOChatElement=document.getElementById('whoson_chat_link');
		if(! sWOChatElement){document.write("<a id='whoson_chat_link'></a>");sWOChatElement = document.getElementById('whoson_chat_link');}
        sWOUrl+="&response=g";sWOChatstart+="?domain="+sWODomain;if(sWOLanguage.length>0)sWOChatstart+="&"+sWOLanguage;
		if(sWOBackgroundURL!="")sWOChatstart+="&bg="+sWOBackgroundURL;if(sWODepartment.length>0)sWOChatstart+="&dept="+escape(sWODepartment);if(sWOPreselect.length>0)sWOChatstart+="&select="+sWOPreselect;
		sWOUrl+='&timestamp='+(new Date()).getTime();
		if(sWOSession!=''){sWOChatstart+='&session='+sWOSession;}
		sWOImage.src = sWOUrl;	
	}
	sWOUrl=sWOProtocol+"//"+sWOGateway+"/invite.js?domain="+sWODomain;if(sWOInvite=="Y")document.write("<sc"+"ript src='"+sWOUrl+"'><\/scr"+"ipt>");
}
