window.onload = function(){ //Wait for the page to load.
	
	//var sForm = document.getElementById('ChronoContact_contact');
    var inputs = document.getElementsByTagName('input'), input;
	var textareas = document.getElementsByTagName("textarea"), textarea;
	
    for(var i=0,l=inputs.length;i<l;i++){ 
        input = inputs[i];
        if(input.name && input.name=='fullname'){ 
            input.onfocus = function(){ 
                if(this.value=='Your Name') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='Your Name';}
			}	
        }
		if(input.name && input.name=='telephone'){ 
            input.onfocus = function(){ 
                if(this.value=='Telephone*') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='Telephone*';}
			}	
        }
		if(input.name && input.name=='email'){ 
            input.onfocus = function(){ 
                if(this.value=='Email') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='Email';}
			}	
        }
		if(input.name && input.name=='firstname'){ 
            input.onfocus = function(){ 
                if(this.value=='First name*') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='First name*';}
			}	
        }
		if(input.name && input.name=='lastname'){ 
            input.onfocus = function(){ 
                if(this.value=='Surname*') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='Surname*';}
			}	
        }
		if(input.name && input.name=='address_1'){ 
            input.onfocus = function(){ 
                if(this.value=='Postal Address 1*') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='Postal Address 1*';}
			}	
        }
		if(input.name && input.name=='address_2'){ 
            input.onfocus = function(){ 
                if(this.value=='Postal Address 2*') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='Postal Address 2*';}
			}	
        }
		if(input.name && input.name=='city'){ 
            input.onfocus = function(){ 
                if(this.value=='City*') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='City*';}
			}	
        }
		if(input.name && input.name=='postcode'){ 
            input.onfocus = function(){ 
                if(this.value=='Postcode*') { this.value='';}
            }
			input.onblur = function(){
				if(this.value=='') { this.value='Postcode*';}
			}	
        }
		if(input.name && input.name=='submit'){
				
		}	
    }
	
	for(var i=0,l=textareas.length;i<l;i++){ 
        textarea = textareas[i];
		if(textarea.name && textarea.name=='enquiry'){ 
            textarea.onfocus = function(){ 
                if(this.value=='Enter your enquiry here*') { this.value='';}
            }
			textarea.onblur = function(){
				if(this.value=='') { this.value='Enter your enquiry here*';}
			}	
        }
	}

};


  