function enableSignatureEffect(gallery) 
	{
	    var object = document.getElementById('imageholder').style;
		object.opacity = (0.2);
		object.filter = "alpha(opacity=" + 20 + ")"; 
				
		if (gallery == "wedding")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_wedding.png' width='267' height='50'></img><p>They say that your Wedding day is your 'Big Day'... they're not kidding! With so much going on, the last thing you want to be worrying about, is whether your photos are going to turn out well.</p><p>Photography makes up an essential part of the Wedding Day experience and can be tailored especially to suit your needs... whatever the style, whether that be reportage, choreographed or traditional.</p><p>Professional photographs which capture the essence and the full spectrum of emotions from your 'Big Day’ are yours to cherish and keep forever more. Such vividly-realised imagery offers you, the client, a 'window' back in time, through which you can re-visit those timeless memories over and over again with both friends and loved-ones alike.</p><p>Planning a Civil Ceremony? Why not have Tempus capture the day forever in stunning professional photos?</p>";
			object.style.display = "block"; 		
		}
		
		if (gallery == "portrait")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_portrait.png' width='365' height='50'><p>Looking to add to an established modelling portfolio? New to the industry and looking for professional studio shots to showcase your modelling skills? Want some professional photos to celebrate a special occasion such as a Silver Anniversary or graduation from University?</p><p>There are hundreds of reasons why you might want to get some professional photographs taken. Whatever the reason… make Tempus Photographical your first port of call.</p>";
			object.style.display = "block"; 
		}
				
		if (gallery == "landscape")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_landscape.png' width='275' height='50'><p>From lakes to rivers, dales, peaks, cliffs, shores and much, much more besides... Landscape photography is all about finding a great location, timing… i.e. being there at the right moment to perfectly catch the light, giving a photographic work a mood of its own and of course... composition, thus ensuring the right mix of elements to perfectly frame each and every shot.</p><p>Take a leisurely jaunt through our sample gallery and feel free to contact us with any questions or enquiries.</p>";
			object.style.display = "block"; 
		}
			
		if (gallery == "wildlife")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_nature.png' width='375' height='50'><p>Whether a grand Orchid, vibrant Hibiscus, the common-a-day buttercup catching the golden glow of a long summer day or the eternally enchanting image of cherry blossom upon a gentle breeze, Tempus delivers stunning and emotive images which add dynamic quality to your work, projects and publications.</p><p>We are particularly proud of the crisp and detailed imagery we take of Wildlife subjects, ever mindful to ensure that all our photographic pieces capture the essence of their singular natures.</p><p>Please take the time to explore this gallery and afterwards feel free to contact so that we might discuss your requirements free from obligation.</p>";
			object.style.display = "block"; 
		}
			
		
		if (gallery == "urban")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_urban.png' width='350' height='50'><p>A new addition to the site; as trends shift and new fields of photographical work come to the fore, Tempus likes to acknowledge emerging areas of photographic work within the industry and expand its services to meet the needs of an ever changing market and client base.</p><p>Moody, edgy and contemporary urban / ‘street’ imagery, is on the rise and so we have created an initial, condensed gallery, to showcase sample imagery that have been captured over the past few months.</p><p>Let us know your thoughts and feelings and please feel free to leave feedback for us on our contact page.</p>";
			object.style.display = "block"; 
		}
			
		if (gallery == "bandw")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_bandw.png' width='350' height='50'><p>Classic and timeless, Black and White photography/Monochrome, has long been a popular branch of photographic work.</p><p>Black and White photography lends a dramatic quality to landscape and urban pieces and in portraiture / studio work, has a pleasing, flattering effect on photographic imagery.</p><p>Black and White is a fantastic way to produce strong, powerful imagery and is often incorporated in Wedding Shoots.</p><p>Please feel free to explore our gallery and see for yourself the effects that can be achieved.</p>";
			object.style.display = "block"; 
		}
		
		if (gallery == "corp")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_corp.png' width='350' height='50'><p>At Tempus, we specialise in beautiful wedding photography that provides a true record</p><p>of what happened on your special day.</p>";
			object.style.display = "block"; 
		}

		if (gallery == "misc")
		{
			var object = document.getElementById('imagecaption');
			object.innerHTML = "<img src='images/caption_misc.png' width='350' height='50'><p>Recently added, the Miscellaneous Gallery speaks for itself.</p><p>There will always be occasions where the classification of a photograph or indeed, collective photographic works are hard to define.</p><p>This additional gallery has been created to house all those ‘in-between’ and unusual photographic shots that we have been itching to showcase to our client base but previously unable to, due to the restrictions of the other photographic sub-categories in the gallery menu.</p><p>Please explore and enjoy!</p>";
			object.style.display = "block"; 
		}		
				
	}
	
function disableSignatureEffect() 
	{
	    var object = document.getElementById('imagecaption').style;
		object.display = "none";
		
		var object = document.getElementById('imageholder').style;
		object.opacity = (1);
		object.filter = "alpha(opacity=" + 100 + ")"; 
	}
	
function openWindow()
	{
		window.open("camera.html","Camera Choices", "menubar=no,width=430,height=200,toolbar=no");
	}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    return false
		 }

 		 return true					
	}	
	
	
	
function validate_form ()
	{
		valid = true;

		if ( document.contactform.name.value == "" )
		{
			alert ( "Please enter your Name" );
			valid = false;
		}
		
		else 
		{
			if ( document.contactform.email.value == "" || echeck(document.contactform.email.value) == false )
			{
				alert ( "Please check you are entering a valid Email Address" );
				valid = false;
			}
				
			else
			{
			
				if ( document.contactform.message.value == "" )
				{
					alert ( "Please Enter a Message" );
					valid = false;
				}
			}			
		
		}
		
		return valid;
	}
	
function addAttachBox()
	{
		a = parseInt(document.contactform.counter.value);
		name = "div" + (a);
		
		if(a < 4) {
			var newdiv = document.createElement('div');
			newdiv.setAttribute("id",name);
			newdiv.innerHTML = "<input type='file' name='filename" + a + "'> <a href=\"javascript:;\" onclick=\"removeEvent(\'"+name+"\')\">Remove";
			document.getElementById('boxcontainer').appendChild(newdiv);			
			a++;
	    }
			
		document.contactform.counter.value = a; 
	}

function removeEvent(divNum)
	{
		var d = document.getElementById('boxcontainer');
		var olddiv = document.getElementById(divNum);
		d.removeChild(olddiv);
		a = parseInt(document.contactform.counter.value);
		document.contactform.counter.value = (a-1);
	}
