function showform(obj) {
  with(document.getElementById(obj).style){      
	if(display=='none'){      
	  display='block'; 
	}else{ 
	  display='none'; 
	}; 
  };
}

function cor(){
if (document.getElementById('pole_1').value==''){
        alert('Введите ширину двери');
        document.getElementById('pole_1').focus();
        return false;
    }
    else if (document.getElementById('pole_2').value==''){
        alert('Введите высоту двери');
        document.getElementById('pole_2').focus();
        return false;
    }
//      дублируй сколько хочешь раз и проставляй соответствующие ИД и сообщения
//	else if (document.getElementById('pole_n').value==''){
//        alert('Ааа ёб твою мать n');
//        document.getElementById('pole_n').focus();
//        return false;
//       }
    
    else{
        return true;
    };
};
function OpenWindow1 ()
	{
		window.status="";
		strFeatures="top=0,left=0,width=380,height=640"+"toolbar=no,menubar=no,location=no,derictories=no";
		objNewWindow=
		window.open("doors3.php","NewWindow",strFeatures);
		window.status="1";
		window.event.cancelBubble=true;
		window.event.returnValue=false;
	}
function OpenWindow2 ()
	{
		window.status="";
		strFeatures="top=0,left=0,width=380,height=640"+"toolbar=no,menubar=no,location=no,derictories=no";
		objNewWindow=
		window.open("germ7.jpg","NewWindow",strFeatures);
		window.status="1";
		window.event.cancelBubble=true;
		window.event.returnValue=false;
	}
function OpenWindow3 ()
	{
		window.status="";
		strFeatures="top=0,left=0,width=380,height=640"+"toolbar=no,menubar=no,location=no,derictories=no";
		objNewWindow=
		window.open("image020.jpg","NewWindow",strFeatures);
		window.status="1";
		window.event.cancelBubble=true;
		window.event.returnValue=false;
	}
function OpenWindow4 ()
	{
		window.status="";
		strFeatures="top=0,left=0,width=380,height=640"+"toolbar=no,menubar=no,location=no,derictories=no";
		objNewWindow=
		window.open("dv1.jpg","NewWindow",strFeatures);
		window.status="1";
		window.event.cancelBubble=true;
		window.event.returnValue=false;
	}
function OpenWindow5 ()
	{
		window.status="";
		strFeatures="top=0,left=0,width=380,height=640"+"toolbar=no,menubar=no,location=no,derictories=no";
		objNewWindow=
		window.open("a2.jpg","NewWindow",strFeatures);
		window.status="1";
		window.event.cancelBubble=true;
		window.event.returnValue=false;
	}
function OpenWindow6 ()
	{
		window.status="";
		strFeatures="top=0,left=0,width=380,height=640"+"toolbar=no,menubar=no,location=no,derictories=no";
		objNewWindow=
		window.open("mdf_p.jpg","NewWindow",strFeatures);
		window.status="1";
		window.event.cancelBubble=true;
		window.event.returnValue=false;
	}
	     	   
function Ral(setClr,setCode){
	document.all.RalColor.style.background=setClr;
	document.all.RalCode.innerHTML=setCode;
}
function printPage() 
{ 
var n=navigator 
if ((n.appName.indexOf('Explorer')> -1)&&(parseInt(n.appVersion))==4) 
{IEControl.ExecWB(6,1)} 
else 
{window.print()} 
}	     	   
function OpenRezult ()
	{
		window.status="";
		strFeatures="top=0,left=0,width=600,height=850"+"toolbar=no,menubar=no,location=no,derictories=no";
		objNewWindow=
		window.open("session.php","NewWindow",strFeatures);
		window.status="1";
		window.event.cancelBubble=true;
		window.event.returnValue=false;
	}
function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}


