	function trim( str, charlist ) {	// Strip whitespace (or other characters) from the beginning and end of a string
		charlist = !charlist ? ' \s\xA0' : charlist.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1');
		var re = new RegExp('^[' + charlist + ']+|[' + charlist + ']+$', 'g');
		return str.replace(re, '');
	}
	function f_focus(ono){ 
		if (ono.style.color == '#808080' || ono.style.color == 'rgb(128, 128, 128)' ) {
			ono.style.color = "#000000";
			try {ono.value = '';} catch (e){}
			try {ono.innerText = '';} catch (e){}
		} 
	}
	function f_change(ono,text){ 
			if (trim(ono.value) == '' || trim(ono.value) == text) {
			ono.value = text;
			ono.style.color = '#808080';
		}
	}
	function setCookie (name, value, expires, path, domain, secure) {
		  document.cookie = name + "=" + escape(value) +
			((expires) ? "; expires=" + expires : "") +
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			((secure) ? "; secure" : "");
	}
	function bookmarksite() {
		var url="http://www.auto-kasko-kazan.ru/";
		var title="Автострахование в Казани";
	if (document.all)
	window.external.AddFavorite(url, title);
	else if (window.sidebar)
	window.sidebar.addPanel(title, url, "");
	}
	function sentphone() {
	if(document.getElementById('clientphone').value!='оставьте ваш телефон')
	 document.getElementById('formphone').submit(); else alert('Оставьте ваш телефон');
}
