
// Устанавливаем в элемент с ID нужное значение value при щелкании на чекбоксе checkid
function svchbox(id,value,checkid){
			d=document.getElementById(id);
			c=document.getElementById(checkid);
			if(c.checked==true){
				d.value=value;
			}
			else{
				d.value='';
			}	
}

// Выделяем нужный чекбокс если в инпуте находится цифра отличная от нуля
function chchkd(thisv,checkid){

		d=document.getElementById(checkid);
		if(thisv>0){
		
			if(d.checked==true) return;
			else d.checked=true;
		}else{d.checked=false;}

	//alert('hello');
}


function pfr_top_buttons_over(obj,thief)
{
var colors=document.getElementById(obj);
colors.style.cursor='pointer';
colors.style.background='#D8E1E2';
colors.style.Color='#D5F7E1';
cls=document.getElementById(thief);
cls.style.backgroundImage="url('/images/logo/top_button_thief_change.jpg')";
}

function pfr_top_buttons_down(obj,thief){
	var colors=document.getElementById(obj);
	colors.style.background='#ECF0F0';
	colors.style.border='1px inset #A6BBBF';
	colors=document.getElementById(thief);
	colors.style.backgroundImage='none';
}

function pfr_top_buttons_up(obj,thief,where){
var colors=document.getElementById(obj);
	colors.style.background='#DFFEDE';
	colors.style.border='1px outset #A6BBBF';
	colors=document.getElementById(thief);
	colors.style.backgroundImage="url('/images/logo/pfr_top_button_thief.jpg')";
    location.href=where;
}

function pfr_top_buttons_out(obj,thief){
var colors=document.getElementById(obj);
colors.style.background='#C4D1D5';
colors.style.border='1px outset #A6BBBF';
colors=document.getElementById(thief);
colors.style.backgroundImage="url('/images/logo/pfr_top_button_thief.jpg')";
}

//Сообщение о смене реквизитов
function HideMes(){
document.getElementById('pop_message').style.display='none';
}

function idover(idname){ idname.style.color='#A00101';}
function idout (idname){ idname.style.color='#003544';}
function iddown(idname){ idname.style.color='blue';}
function idup  (idname){ idname.style.color='#003544'; }
function mouseou(fil)
{

fll=document.getElementById(fil);
fll.style.borderTop='0px';

}



function mousedw(fil)
{
 fll=document.getElementById(fil);
 fll.style.borderTop='6px solid #004354';

}

function mouseups(fil)
{
fll=document.getElementById(fil);
fll.style.borderTop='0px';
}
//////////////////////////////////////////////////////////

//function setCookie(name, value) {
//      var valueEscaped = escape(value);
//      var expiresDate = new Date();
//      expiresDate.setTime(expiresDate.getTime() + 365 * 24 * 60 * 60 * 1000); // срок - 1 год, но его можно изменить
//      var expires = expiresDate.toGMTString();
//      var newCookie = name + "=" + valueEscaped + "; path=/; expires=" + expires;
//      if (valueEscaped.length <= 4000) document.cookie = newCookie + ";";
//}
//function getCookie(name) {
//      var prefix = name + "=";
//      var cookieStartIndex = document.cookie.indexOf(prefix);
//      if (cookieStartIndex == -1) return null;
//      var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
//      if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
 //     return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
//}



//visited_ = getCookie('visited');
//if (visited_<1){
//document.getElementById('pop_message').style.display='none';
//}
//setCookie('visited',1);
