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.ajmadventure.co.uk";
urlarray[3]="http://www.thisisthebiggerpicture.co.uk";
urlarray[4]="http://www.bobbishairandbeauty.co.uk";
urlarray[5]="http://www.altogethergreener.co.uk";
urlarray[6]="http://www.grandhotel-uk.com/";
urlarray[7]="http://www.industrysafetytraining.co.uk";
urlarray[8]="http://www.closecottage.co.uk";
urlarray[9]="http://www.marabinis.co.uk/";
urlarray[10]="http://www.nu-agemedicalspa.co.uk";
urlarray[11]="http://www.henandstagworld.co.uk";
urlarray[12]="http://www.nepalidental.co.uk";
urlarray[13]="http://www.yourweddingcar.com/";
urlarray[14]="http://www.tinsleyspecialproducts.com/";
urlarray[15]="http://www.posturestore.co.uk/";

var titlearray= new Array()
titlearray[1]="AC Firesafety - Leader In Fire Safety Training and fire Extinguishers";
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]="Altogether Greener - Environmental Grounds Maintenance Solutions";
titlearray[6]="The Grand Hotel in Tynemouth";
titlearray[7]="Industry Safety Training - Training in LPG, Manual Handeling, Health & Safety";
titlearray[8]="Close Cottage - Holiday Cottage to rent in Northumberland";
titlearray[9]="Marabinis - Italian Restaraunt";
titlearray[10]="Nu-Age Medical spa - Cosmetic Surgery Company, Newcastle";
titlearray[11]="Hen and Stag World - Hen & Stag Party Organisers";
titlearray[12]="Nepali Dental - Private & NHS dentist, specialising in dental implants, teeth whitening and teeth straightening, based Newcastle & Consett.";
titlearray[13]="G W Holmes - Wedding Car Specialists, based in the North East";
titlearray[14]="Tinsley Special Products - Crane and Trailer Manufacturers";
titlearray[15]="Posture Store - Ergonomic Furniture";


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= '<a href="' + document.getElementById('slidelink').href + '" border="0" target="_blank">' + titlearray[currentslide] + '</a>';
		} 
	} 
	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 = '<a href="' + document.getElementById('slidelink').href + '" border="0" target="_blank">' + titlearray[currentslide] + '</a>';
                } 
	} 




//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 == '');
} }

