[Carradio\NISSAN\B  BP6345 no immo]
Size(310,460);  

Form {
    	HexDigit(Code,"Code ",70,15,100,4);
    	//CheckBox(ResetCounter,"Обнулить счётчик попыток",82,45);
	ComboBox(CodeRequest,"IMMO ",65,50,50,"Off","On");
	
	Group("Идентификация",5,75,300,40)	  
    {
        Label(part," ",40,20); 			
	
    }
    	Group("Информация",5,120,300,40)	 
    {
        Label(message," ",0,17);		 
    }
    	Group("Описание",5,165,300,220) 		 
    {
        Label(lb1,"Code calculator for NISSAN :",0,15);
    	Label(lb2,"Model:  B  BP6345",32,30);
    	Label(lb3,"Sec. Type:  IMMO",32,45);
	Label(lb4,"Manufacturen: BLAUPUNKT.",32,60);
	Label(lb5,"Partnumer:  7 646 345 318 ",32,75);
    	Label(lb6,"MCU:  MC68HC05B16 (8925901502)   SEC",32,90);
	Label(lb7,"EEPROM:  no",32,105);
	Label(lb8,"Sec.loc.: MCU",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,200);
    	Label(lb10,"Enter code:  MODE + TA and ON",32,135);
    }
	Picture(Logo,"nissan.bmp",210,10,0,0);
    {
        Label(msg," ",0,395);				 
    } 
}

OnShow {
        msg.Color = 0x0000FF;				 
        msg.Bold = 1;					 
	msg = "http://www.eeprom.lg.ua";		  
        
	message.Bold = 1;  
    	Var10 = 1;
    	if (@0x20 != @0xB0) { Var10 = 0;}	
    	if (Var10 = 0)
    {
        message.Color = 0x0000FF;
        Message = "Неверный дамп ! ";
        Code = 0;
    }
    else
    {  
	var0 = @0x20;
	var1 = @0x21;
        var0 = var0 << 8;
        Code = var0 | var1 ;

	if(@0x02 = 0x03) { CodeRequest = 1; }  
    	if(@0x02 = 0x01) { CodeRequest = 0; }
	
	message.Color = 0xFF0000;
    	message.Bold = 1;
    	message = "Дамп ОК.";
    }
}

OnApply {
	Var10 = 1;
    	if(@0x20 != @0xB0) { Var10 = 0;}	
    	if (Var10 = 0) { message.Color = 0x0000FF; message = "Неверный дамп !  Запись прекращена !"; Code = 0; }
    else
    	{
	if(CodeRequest = 1) { @0x02 = 0x03; @0x14 = 0x03; @0x1E = 0x03; }
	if(CodeRequest = 0) { @0x02 = 0x01; @0x14 = 0x01; @0x1E = 0x01; }
	message.Color = 0xFF0000;
        message.Bold = 1;
       	message = "Запрос IMMO успешно изменён.";
    }
}
