function Random_Pic(category)
{
	
var leftpics=3
var rightpics=3
var dogpics=11
var hotelpics=3
var vehiclepics=4
var generalpics=14
var midpic2=0
var midpic3=0
var docpath="" //"http://home.btconnect.com/nppsecurity/"

// Left_security1-3.gif, 3 images based on category, right_security1-3.gif

// random left image
		document.write('<br /><br />');
		leftpic=Math.floor(Math.random() * leftpics)+1;
		document.write('<img src="'+docpath+'images/random/left_security'+leftpic+'.gif" width=110 height=110 alt="Security Services North West, Manchester Liverpool">');
	
	// Categories 1 = general, 2 = dogs, 3 = indoor, 4 = vehicles	
	if (category==1) {
		// General images
		midpic1=Math.floor(Math.random() * generalpics)+1;
		document.write('<img src="'+docpath+'images/random/general_security_guarding'+midpic1+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic2==midpic1 || midpic2==0)
		{
			midpic2=Math.floor(Math.random() * generalpics)+1;
		}
		document.write('<img src="'+docpath+'images/random/general_security_guarding'+midpic2+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic3==midpic1 || midpic3==midpic2 || midpic3==0)
		{
			midpic3=Math.floor(Math.random() * generalpics)+1;
		}
		document.write('<img src="'+docpath+'images/random/general_security_guarding'+midpic3+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
		
	}
	else if (category==2) {
		// dog images
		midpic1=Math.floor(Math.random() * dogpics)+1;
		document.write('<img src="'+docpath+'images/random/security_dog'+midpic1+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic2==midpic1 || midpic2==0)
		{	midpic2=Math.floor(Math.random() * dogpics)+1;	}
		document.write('<img src="'+docpath+'images/random/security_dog'+midpic2+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic3==midpic1 || midpic3==midpic2 || midpic3==0)
		{	midpic3=Math.floor(Math.random() * dogpics)+1;}
		document.write('<img src="'+docpath+'images/random/security_dog'+midpic3+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
	}
	else if (category==3) {
		// indoor images
		midpic1=Math.floor(Math.random() * hotelpics)+1;
		document.write('<img src="'+docpath+'images/random/hotel_security_staff'+midpic1+'.gif" width=110 height=110 alt="Hotel and conference Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic2==midpic1 || midpic2==0)
		{	midpic2=Math.floor(Math.random() * hotelpics)+1;	}
		document.write('<img src="'+docpath+'images/random/hotel_security_staff'+midpic2+'.gif" width=110 height=110 alt="Hotel, summit and conference Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic3==midpic1 || midpic3==midpic2 || midpic3==0)
		{	midpic3=Math.floor(Math.random() * hotelpics)+1;}
		document.write('<img src="'+docpath+'images/random/hotel_security_staff'+midpic3+'.gif" width=110 height=110 alt="Hotel, guest house, conference centre Security Guarding Services - dog patrols and CCTV">');

	}
	else {
		// vehicles images
		midpic1=Math.floor(Math.random() * vehiclepics)+1;
		document.write('<img src="'+docpath+'images/random/vehicle'+midpic1+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic2==midpic1 || midpic2==0)
		{	midpic2=Math.floor(Math.random() * vehiclepics)+1;	}
		document.write('<img src="'+docpath+'images/random/vehicle'+midpic2+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
		
		while (midpic3==midpic1 || midpic3==midpic2 || midpic3==0)
		{	midpic3=Math.floor(Math.random() * vehiclepics)+1;}
		document.write('<img src="'+docpath+'images/random/vehicle'+midpic3+'.gif" width=110 height=110 alt="Security Guarding Services - dog patrols and CCTV">');
	}
		// random right image
		rightpic=Math.floor(Math.random() * rightpics)+1;
		document.write('<img src="'+docpath+'images/random/right_security'+rightpic+'.gif" width=110 height=110 alt="SIA licenced security guards and dog handlers, wheel clampers">');
		document.write('<br /><br />');

}

	
	
	
