

function opendet2(IID,PART)
{
 win=window.open("/cgi-bin/MV/mv?what=details&item_id="+IID+"&part_id="+PART,"kard","width=1014, height=800, toolbar=0, top=10, left=10, directories=0, status=0, resizable=1, scrollbars=1");
 win.focus();
}

function correctfield(imname)
{
 win.location=imname;
}


function loadim(imname,smallname,width, normalwidth, normalname)
{


win=open("/cgi-bin/cms/just_load_image?what=selectimage&newwidth="+width+"&nameext="+smallname+"&imnamepropos="+imname+"&normalwidth="+normalwidth+"&normalname="+normalname, "displayWindow", 
    "width=400,height=300,status=no,toolbar=no,menubar=no");
win.focus();
}



   function selarrows(fid)
   {
    if (document.getElementById("top-"+fid))  document.getElementById("top-"+fid).src="/templ_images/ord_top_over.gif"   
    if (document.getElementById("bot-"+fid))  document.getElementById("bot-"+fid).src="/templ_images/ord_bot_over.gif"   
   }
   
   function unselarrows(fid)
   {
    if (document.getElementById("top-"+fid))  document.getElementById("top-"+fid).src="/templ_images/ord_top.gif"   
    if (document.getElementById("bot-"+fid))  document.getElementById("bot-"+fid).src="/templ_images/ord_bot.gif"   

   }
   
   
   
    onMouseOut="unselarrows('{acceptor.field_id}');"


  function selectcol(hnum)
  {
  if (document.getElementById("hcol-"+hnum))
   document.getElementById("hcol-"+hnum).className="mainth-back-bor-s";
  }


  function unselectcol(hnum)
  {
  if (document.getElementById("hcol-"+hnum))
   document.getElementById("hcol-"+hnum).className="mainth-back-bor";
  }


  function selectme(row,count)
  {

  
 
   document.getElementById(row+"-0").className="maintd arrow-s";   

 if(isMSIE) return;

   for (var i=1;i<=count;i++)
   {
     document.getElementById(row+"-"+i).className="maintd maintd-back-s";   
   }
  
  }
  

  function unselectme(row,count,old)
  {

  

   zback="arrow"; back="maintd-back";
  
   if (old=="1")   { zback="arrow-2"; back="maintd-back-2"}
   
   document.getElementById(row+"-0").className="maintd "+zback;   

   if(isMSIE) return;  

   for (var i=1;i<=count;i++)
   {
     document.getElementById(row+"-"+i).className="maintd "+back;   
   }
   
  }

  // helptms=new Array();

   

   helpc=new Array();
   helpc[1]=0;
   helpc[2]=0;
   helpc[3]=0;
   helpc[4]=0;
   helpc[5]=0;
   helpc[6]=0;
   helpc[7]=0;
   helpc[8]=0;
   helpc[9]=0;
   helpc[10]=0;
   helpc[11]=0;
   helpc[12]=0;
   helpc[13]=0;
   helpc[14]=0;
   helpc[15]=0;

   helps=1;   
   
  var htp_op=0;
  var htp_cl=0;
  var htp_cl_r=0;

  var lasth="";
  var lasth2="";

   function showhelp(obi,help, helpn)
   {
    if ((lasth==help)&&(lasth2==help)) return;
    lasth2=help;lasth="";
    if (htp_op) clearTimeout(htp_op);
    htp_op=setTimeout("_showhelp('"+obi+"','"+help+"', '"+helpn+"');",1000);
    htp_cl_r=setTimeout("_closehelp('"+help+"');",30000);

    
   }
   
   function _showhelp(obi,help, helpn)
   {
   lasth=help;
   helpc[helpn]++;
   if (helpc[helpn]>5) return;
   var oA,oB;
   oA=layer(help);
   oB=layer(obi);
  
   if ((helpn>7)&&(isMSIE))
   oA.moveTo(oB.getAbsoluteLeft(), oB.getAbsoluteTop()+oB.getHeight()+1);
   else
   oA.moveTo(oB.getAbsoluteLeft()-oA.getWidth(), oB.getAbsoluteTop()+oB.getHeight()+1);

   if (oA.getAbsoluteLeft()<0) oA.moveTo(0,oA.getAbsoluteTop());
   oA.show();
 
  }


  var onhelp=0;

  function readhelp(help)
  {
   onhelp=1;
  // if (htp_cl) clearTimeout(htp_cl);   
  // if (htp_cl) clearTimeout(htp_cl);   
   document.getElementById(help).className="";   
  }

  function noreadhelp(help)
  {
   onhelp=0;
   closehelp(help);
   document.getElementById(help).className="alp";   
  }

  function closehelp(help)
  {
   if (htp_cl_r) clearTimeout(htp_cl_r);   
   if (htp_op) clearTimeout(htp_op);   
   htp_cl=setTimeout("_closehelp('"+help+"');",500);
  }

   function _closehelp(help)
   {
   if (onhelp) return;
    var oA=layer(help);   
    oA.hide();
    closinghelp="";
   }
  
    function check_f()
    {
 

 if (document.getElementById("nmi").value.length<1)
     {
     alert("Заполните, пожалуйста, поля формы..."); 
     document.getElementById("nmi").focus();
     return;
     }


 if (document.getElementById("emi").value.length<1)
     {
     alert("Заполните, пожалуйста, поля формы..."); 
     document.getElementById("emi").focus();
     return;
     }
  
 if (document.getElementById("txi").value.length<1)
     {
     alert("Заполните, пожалуйста, поля формы..."); 
     document.getElementById("txi").focus();
     return;
     }

      document.getElementById("qform").submit();
  
  }
    
    
    nm=1;
    em=1;
    tx=1;
    ct=1;
    
    function cle(n, o)
    {
     
     if (o==1){
     n.value='';
     n.focus(); 
    }
    
    }


function selpart(num)
{

 //document.getElementById("go-"+num).className="det-h det-hhover"; 
 document.getElementById("pname-"+num).className="mainba mainbahover"; 
 document.getElementById("pimage-"+num).src="/templ_images/main-ba-right-s.gif"; 
 //document.getElementById("parrow-"+num).src="/templ_images/det1-s.gif"; 



}
 
function unselpart(num)
{

 //document.getElementById("go-"+num).className="det-h"; 
 document.getElementById("pname-"+num).className="mainba"; 
 document.getElementById("pimage-"+num).src="/templ_images/main-ba-right.gif"; 
 //document.getElementById("parrow-"+num).src="/templ_images/det1.gif"; 
}

