function activatePlaceholders() {
	var detect = navigator.userAgent.toLowerCase(); 
	
		var textareas = document.getElementsByTagName("textarea");

	for (i=0; i< textareas.length; i++) {
		if(textareas[i].getAttribute("placeholder") && textareas[i].getAttribute("placeholder").length >0) {
			textareas[i].style.color='#AAAAAA';
			textareas[i].value = textareas[i].getAttribute("placeholder");
			textareas[i].onfocus = function() {
				if(this.value == this.getAttribute("placeholder")) {
					this.style.color='#000000';
					this.value="";
				}
				return false;
			}
			textareas[i].onblur = function() {
				if(this.value.length < 1) {
					this.style.color='#AAAAAA';
					this.value=this.getAttribute("placeholder");
				}
			}
		}
	}
	
	
	if (detect.indexOf("safari") > 0) return false;
	
	var inputs = document.getElementsByTagName("input");
	for (var i=0;i<inputs.length;i++) {
		if (inputs[i].getAttribute("type") == "text") {
			if (inputs[i].getAttribute("placeholder") && inputs[i].getAttribute("placeholder").length > 0) {
				inputs[i].value = inputs[i].getAttribute("placeholder");
				inputs[i].style.color='#AAAAAA';
				inputs[i].onfocus = function() {
					 if (this.value == this.getAttribute("placeholder")) {
					 	this.style.color='#000000';
						this.value = "";
 					}
 				return false;
			}
			inputs[i].onblur = function() {
 				if (this.value.length < 1) {
					this.style.color='#AAAAAA';
					this.value = this.getAttribute("placeholder");

				}
			}
 		}
	}
	}
	


}
window.onload=function() {
activatePlaceholders();
}
