var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-7024866-2");
pageTracker._trackPageview();
} catch(err) {}



//Portfolio script to change title, image and URL //

var urlarray= new Array()
urlarray[1]="http://www.acfiresafety.com";
urlarray[2]="http://www.zinestudio.co.uk/ajmadventure/";
urlarray[3]="http://www.thisisthebiggerpicture.co.uk";
urlarray[4]="http://www.bobbishairandbeauty.co.uk";
urlarray[5]="http://www.brightpaws.co.uk";
urlarray[6]="http://www.easybedslimited.co.uk";
urlarray[7]="http://www.executiveselectionltd.co.uk";
urlarray[8]="http://www.industrysafetytraining.co.uk";
urlarray[9]="http://www.closecottage.co.uk";
urlarray[10]="http://www.marabinis.co.uk/";
urlarray[11]="http://www.nu-agemedicalspa.co.uk";
urlarray[12]="http://www.northeasteventslimited.co.uk";
urlarray[13]="http://www.transformationtraining.co,uk";
urlarray[14]="http://www.yourweddingcar.com/";
urlarray[15]="http://www.tinsleyspecialproducts.com/";

var titlearray= new Array()
titlearray[1]="AC Firesafety - Leader In Fire Safety Training and Equipment";
titlearray[2]="AJM Adventure - Advenure Training / Support for Teenagers";
titlearray[3]="This Is The Bigger Picture - Commercial, Wedding and Portrait Photographers";
titlearray[4]="Bobbis Hair & Beauty - Hair and Beauty Salon";
titlearray[5]="Bright Paws - Alternative therapy and grooming for your animals";
titlearray[6]="Easy Beds Limited - Online retailers of affordable beds and mattresses";
titlearray[7]="Executive Selection Ltd - Executive & Financial Recruitment";
titlearray[8]="Industry Safety Training - Training in LPG, Manual Handeling, Health & Safety";
titlearray[9]="Close Cottage - Holiday Cottage to rent in Northumberland";
titlearray[10]="Marabinis - Italian Restaraunt";
titlearray[11]="Nu-Age Medical spa - Cosmetic Surgery Company, Newcastle";
titlearray[12]="North East Events Limited - Hen & Stag Party Organisers";
titlearray[13]="Transformation Training - Bootcamp Instructor & Personal Trainer";
titlearray[14]="G W Holmes - Wedding Car Specialists, based in the North East";
titlearray[15]="Tinsley Special Products - Crane and Trailer Manufacturers";


if(document.images) { 
		currentslide=1; 
		maxslides=15; 
		slide = new Array(maxslides+1); 
		for(var n=1;n<=maxslides;n++) { 
			slide[n]=new Image(500,245); 
			slide[n].src='images/p'+n+'.jpg';
		} 
	} 
	function prevSlide() { 
		if(document.images) { 
			currentslide--; 
			if(currentslide<1) currentslide=maxslides; 
			document.images['slide'].src=slide[currentslide].src;
                        document.getElementById('slidelink').href = urlarray[currentslide];
                        document.getElementById('slidelabel').innerHTML= titlearray[currentslide];
		} 
	} 
	function nextSlide() { 
		if(document.images) { 
			currentslide++; 
			if(currentslide>maxslides) currentslide=1; 
			document.images['slide'].src=slide[currentslide].src; 
		        document.getElementById('slidelink').href = urlarray[currentslide];
                        document.getElementById('slidelabel').innerHTML= titlearray[currentslide];
                } 
	} 




//Form Validation
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.title; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
