function repTypeText2Password(oldElementID) {var oldEl = document.getElementById(oldElementID);var newEl = document.createElement("input");var attName = null;var attVal = null;for(var i=0; i<oldEl.attributes.length; i++) {attName = oldEl.attributes[i].name;attVal = oldEl.getAttribute(attName);if ((attName != "type") && (attName != "value") && (attName != "onfocus") &&(attName != "TYPE") && (attName != "VALUE") && (attName != "ONFOCUS")) {if (attVal != null && attVal != "") {try {newEl.setAttribute(attName,attVal);} catch(e) {// alert(e.description);}}} else if ((attName == "type") || (attName == "TYPE")) {newEl.setAttribute("type", "password"); //set required type}}// <-- fortry {oldEl.parentNode.replaceChild(newEl,oldEl);} catch (e){// alert(e.description);}setTimeout(function(){newEl.focus();}, 10);newEl.className = oldEl.className;}function ShowOrderBlock( id ) {	var id ;	var item ;		item = 'div#order-block-' + id ;		if ( $( item ).is( ":hidden" ) ) {		$( item ).slideDown() ;	}	else {		$( item ).slideUp() ;	}	}function getBrowserInfo() {    var t,v = undefined;        if (window.chrome) t = 'Chrome';    else if (window.opera) t = 'Opera';    else if (document.all) {        t = 'IE';        var nv = navigator.appVersion;        var s = nv.indexOf('MSIE')+5;        v = nv.substring(s,s+1);    }     else if (navigator.appName) t = 'Netscape';        return {type:t,version:v};}function bookmark(a){    var url = window.document.location;    var title = window.document.title;    var b = getBrowserInfo();        if (b.type == 'IE' && 8 >= b.version && b.version >= 4) window.external.AddFavorite(url,title);    else if (b.type == 'Opera') {        a.href = url;        a.rel = "sidebar";        a.title = url+','+title;        return true;    }    else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");    else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");    return false;}$(function(){	$(".contacts-links-clients").click(function(){		$("#header-auth").css("display", "block");	});	$("input[type='text']").focus(function(){		var value = $(this).val();		var title = $(this).attr("title");		var id = $(this).attr("id");		if (value == title) {			$(this).val("");		}		if (id == 'password') {			repTypeText2Password('password');		}	}).blur(function(){		var value = $(this).val();		var title = $(this).attr("title");		if (value == '') {			$(this).val(title);		}	});});
