function push_td(id,num){	for(var i=1; i<5; i++)	{		if(elem = document.getElementById('push_td_'+i))		{			elem.className='normal';		}	}	id.className='active';		for(var i=1; i<5; i++)	{		if(elem = document.getElementById('category_content_'+i))		{			elem.style.display='none';		}	}	document.getElementById('category_content_'+num).style.display='block';}function changeImage(pic,num){	for(var i=1; i<16; i++){		if(document.getElementById('lil_pic_'+i) != null){			document.getElementById('lil_pic_'+i).style.border='1px solid #AFAFAF';		}	}	document.getElementById('lil_pic_'+num).style.border='1px solid #E56C2A';		document.getElementById('big_pic').src = pic;}function ret2digit_post(elem){	elem.value = elem.value.replace(/\D+/, "").substr(0,4);}function checkdigitalfield(ev){	var Code = (ev.keyCode || ev.which);	//Фильтрация запрещенных символов	if ((Code < 48 || Code > 57) && (Code < 37 || Code > 40 ) && (Code != 8 && Code != 13 && Code !=46)) return false;	return true;}function getDateFromCalendar(){	if(document.getElementById('radio_1').checked==0){		document.getElementById('radio_2').checked=0	}	ShowOrderInfo();}function hideDate(el){	if(el.checked==1){		document.getElementById('public_date').disabled=1;		document.getElementById('radio_2').checked=0;		document.getElementById('radio_2').disabled=1;		document.getElementById('public_date').value=' ';		document.getElementById('public_date').style.backgroundColor='#EFEFEF';		document.getElementById('public_date').style.cursor='auto';	}	else{		document.getElementById('radio_2').disabled=0;		document.getElementById('public_date').style.backgroundColor='white';		document.getElementById('public_date').style.cursor='pointer';		document.getElementById('public_date').disabled=0;	}}function changeColorPhoto(id, counter){	for (var i = 1; i < 5 ; i++)	{		if (id == i)		{			document.getElementById('clicked_photo_'+id+'_'+counter).style.display = 'block';			document.getElementById('color_photo_'+id+'_'+counter).className = 'activephotocolor';			document.getElementById('color_signature_'+id+'_'+counter).className = 'activecolorsignature';		}		else		{			document.getElementById('clicked_photo_'+i+'_'+counter).style.display = 'none';			document.getElementById('color_photo_'+i+'_'+counter).className = 'color_photo';			document.getElementById('color_signature_'+i+'_'+counter).className = 'color_signature';		}			}}function showVideo(link){	var video = link.parentNode.getElementsByTagName('div')[0].innerHTML;	var shade = document.createElement('div');	shade.id = 'body_shade';	document.body.appendChild(shade);		var flashBlock = document.createElement('div');	flashBlock.id = 'flash_popup';	flashBlock.innerHTML = video;	document.body.appendChild(flashBlock);	flashBlock.style.marginLeft = '-' + Math.round(flashBlock.offsetWidth/2) + 'px';		var close = document.createElement('a');	close.id = 'close_btn';	close.href = "javascript:hideVideo()";	close.alt = "Закрыть";	close.title = "Закрыть";	close.style.marginLeft = Math.round(flashBlock.offsetWidth/2) + 'px';	document.body.appendChild(close);		if (!/MSIE ([\d\.]+).+Win/.test(navigator.userAgent))	{		flashBlock.style.marginTop = '-' + Math.round(flashBlock.offsetHeight/2) + 'px';		close.style.marginTop = '-' + Math.round(flashBlock.offsetHeight/2 + 24) + 'px';	}}function hideVideo(){	document.body.removeChild(document.getElementById('close_btn'));	document.body.removeChild(document.getElementById('flash_popup'));	document.body.removeChild(document.getElementById('body_shade'));}function help_tool_show() {	setCookie("help_tool_state", 'show' ,86400*365);	$("#help_tool_small").hide();	$("#help_tool").show();}	function help_tool_hide() {	setCookie("help_tool_state", 'hide' ,86400*365);	$("#help_tool_small").show();	$("#help_tool").hide();}	function setCookie(name,value,days) {	if (days) {		var date = new Date();		date.setTime(date.getTime()+(days*24*60*60*1000));		var expires = "; expires="+date.toGMTString();	}	else var expires = "";	document.cookie = name+"="+value+expires+"; path=/";}function select_city(select) {	var values = select.options[select.selectedIndex].value;	var splited = values.split("|");	$("#consult_phone").text(splited[0]);	if (splited[1] != '') splited[2] = splited[2] + ', ';	$("#consult_address").html("<br />Адрес: г. " + splited[2] + splited[1]);}
