Placeholder=function(){var b=navigator.userAgent.toLowerCase();var h=/msie/.test(b)&&!/opera/.test(b);if(("placeholder" in document.createElement("input"))||((!h)&&((!window.addEventListener)||(!window.getComputedStyle)))){return{attach:function(l){return l;}};}var c=["fontStyle","fontVariant","fontWeight","fontSize","fontFamily"];function k(l,p,n){var o=document.createElement("span");o.className="placeholder";o.innerHTML=p;a(l,o);if(!n){d(l,o);}l.__placeholder=o;g(o,"mousedown",function(q){var q=q||window.event;f(l);if(q.preventDefault){l.focus();q.preventDefault();}else{window.setTimeout(function(){l.focus();},50);q.returnValue=false;}});g(l,"focus",function(){f(l);});g(l,"blur",function(){j(l);});var m=function(){if(l.value!==""){f(l);}};if(h){g(document,"readystatechange",m);}else{g(document,"DOMContentLoaded",m);}}function f(l){if((l.__placeholder)&&(!l.__placeholder.__hidden)){l.__placeholder.style.display="none";l.__placeholder.__hidden=true;}}function j(l){if((l.__placeholder)&&(l.__placeholder.__hidden)&&(l.value==="")){l.__placeholder.innerHTML=l.getAttribute("placeholder");l.__placeholder.style.display="block";l.__placeholder.__hidden=false;}}function a(q,l){var m=document.createElement("span");m.style.position="relative";q.parentNode.insertBefore(m,q);m.appendChild(q);var o={left:q.offsetLeft,top:q.offsetTop,width:q.clientWidth,height:q.clientHeight,paddingTop:e(q,"borderTopWidth")+e(q,"paddingTop"),paddingRight:e(q,"borderRightWidth")+e(q,"paddingRight"),paddingBottom:e(q,"borderBottomWidth")+e(q,"paddingBottom"),paddingLeft:e(q,"borderLeftWidth")+e(q,"paddingLeft")};l.style.position="absolute";l.style.zIndex=e(q,"zIndex")+1;l.style.overflow="hidden";l.style.whiteSpace="nowrap";l.style.clip="rect(auto, "+(o.paddingLeft+o.width)+"px, "+(o.paddingTop+o.height)+"px, auto)";l.style.cursor=i(q,"cursor");l.style.lineHeight=i(q,"lineHeight");for(var n in o){l.style[n]=o[n]+"px";}m.appendChild(l);return l;}function d(o,l){var n=[];for(var m=0;m<c.length;m++){n.push(i(o,c[m]));}l.style.font=n.join(" ");return l;}function i(m,l){l=l.replace(/([A-Z])/g,"-$1").toLowerCase();return window.getComputedStyle(m,"").getPropertyValue(l);}function e(m,l){var n=i(m,l);return((n==null)||(n==="auto"))?0:parseInt(n);}function g(l,m,n){l.addEventListener(m,n,false);return l;}if(h){i=function(m,l){return m.currentStyle[l];};g=function(l,m,n){l.attachEvent("on"+m,n);return l;};}return{attach:function(l,m){if((l)&&(!l.__placeholder)&&(l.getAttribute("placeholder")!=undefined)){k(l,l.getAttribute("placeholder"),m);}return l;}};}();