// JavaScript Document

window.onload = function () {
		
			// detect input placeholder support
			function placeholder_support() {
			  var i = document.createElement("input");
			  return "placeholder" in i;
			}
			
			var fieldsWrapper = document.getElementById("fieldsWrapper");
			
			if (!placeholder_support() && fieldsWrapper) {
				
				// create NodeList of fields in the document
				var fields = fieldsWrapper.getElementsByTagName("input");
				
				var newClass = "no-placeholder";
				
				// cycle through fields NodeList
				// set value of input "value" attribute to input "placeholder" attribute
				for (var i=0;i<fields.length;i++) {
					var pholder = fields[i].getAttribute("placeholder",2);
					fields[i].setAttribute("value", pholder);
					fields[i].setAttribute("class", newClass);
					fields[i].setAttribute("className", newClass); //IE
				}
				
			}
			
		}

