function clock_my() { 
day=new Date();
hour_f=day.getHours();
if(hour_f < 10){
	hour_f = '0' + hour_f;
}
minS = day.getMinutes();
if(minS < 10){
	minS = '0' + minS;
}
secS = day.getSeconds();
if(secS < 10){
	secS = '0' + secS;
}


min_f=minS+":"+secS; 
document.getElementById("hour").innerHTML=hour_f; 
document.getElementById("min").innerHTML=min_f;
id=setTimeout("clock_my()",100) 
}
window.onload = clock_my;

function show(foto)
{
    if (foto != "")
    {
        wnd=window.open("/prog/pl_editor/img_popup.php?img_url="+encodeURIComponent(foto+"|"), "binn_popup_image", "width=200,height=200,scrollbars=no,toolbar=no,location=no,status=no,resizable=no,left=0,top=0");
        wnd.focus();
    }
    else
        void(0);
}

function chVal(arg1, arg2){
	document.getElementById(arg2).value = document.getElementById(arg1).value;
}

function reCalc(){
var d = document.getElementById('p_1_1_I').value;
if(d != ''){
d = d.replace(/\,/, ".");
if(isNaN(d) == true){
	alert('Поля могут содержать только цифры!');
	return false;
}
document.getElementById('p_1_1').value = d * document.getElementById('sel_1').value;
}

var d = document.getElementById('p_1_2_I').value;
if(d != ''){
d = d.replace(/\,/, ".");
if(isNaN(d) == true){
	alert('Поля могут содержать только цифры!');
	return false;
}
document.getElementById('p_1_2').value = d * document.getElementById('sel_1').value;
}


var d = document.getElementById('p_2_1_I').value;
if(d != ''){
d = d.replace(/\,/, ".");
if(isNaN(d) == true){
	alert('Поля могут содержать только цифры!');
	return false;
}
document.getElementById('p_2_1').value = d * document.getElementById('sel_2').value;
}

var d = document.getElementById('p_2_2_I').value;
if(d != ''){
d = d.replace(/\,/, ".");
if(isNaN(d) == true){
	alert('Поля могут содержать только цифры!');
	return false;
}
document.getElementById('p_2_2').value = d * document.getElementById('sel_2').value;
}


var d = document.getElementById('p_3_1_I').value;
if(d != ''){
d = d.replace(/\,/, ".");
if(isNaN(d) == true){
	alert('Поля могут содержать только цифры!');
	return false;
}
document.getElementById('p_3_1').value = d * document.getElementById('sel_3').value;
}

var d = document.getElementById('p_3_2_I').value;
if(d != ''){
d = d.replace(/\,/, ".");
if(isNaN(d) == true){
	alert('Поля могут содержать только цифры!');
	return false;
}
document.getElementById('p_3_2').value = d * document.getElementById('sel_3').value;
}


}