 document.oncontextmenu = new Function('event.returnValue = false;');
 document.onselectstart = new Function('event.returnValue = false;');
 document.ondragstart = new Function('event.returnValue = false;');

   function RNewWindow(WhereTo,wid,hig) { 
   LeftPosition = (screen.width-wid)/2 ;
   TopPosition = (screen.height-hig)/2 ;
   kw="" ;kh=""; kw=wid ; kh=hig ; s1="left="+LeftPosition+", top="+TopPosition+", width=" ; s2=", height=";
   s3=", menubar=no, toolbar=no, location=no, status=no, resizable=yes, scrollbars=yes";
   hc=s1+kw+s2+kh+s3; 
   //WhereTo='Shtml/Math/MathExe/Delphi/Teach/M1A01M.EXE'
   //WhereTo="http://192.168.0.3/"+WhereTo ;
   var newwin = window.open(WhereTo, "", hc);
   newwin.focus(); }

   function RNWindow(WhereTo,wid,hig) { 
   LeftPosition = (screen.width-wid)/2 ;
   TopPosition = (screen.height-hig)/2 ;
   kw="" ;kh=""; kw=wid ; kh=hig ; s1="left="+LeftPosition+", top="+TopPosition+", width=" ; s2=", height=";
   s3=", menubar=no, toolbar=no, location=no, status=no, resizable=Yes, scrollbars=yes";
   hc=s1+kw+s2+kh+s3; 
   var newwin = window.open(WhereTo, "", hc);
   newwin.focus(); }


  function ToMid() {
  Cux = document.all.Master.offsetWidth/2 - document.all.Slave.offsetWidth/2;
  if (Cux<0) { Cux=0}
  if ( document.all.Slave.style.left = Cux){ Cux = Cux } else {document.all.Slave.style.left = Cux}
  setTimeout("ToMid()", 1000); 
  }
  function Req_Sze(WhereTo,wid,hig) { 
   LeftPosition = (screen.width-wid)/2 ;
   TopPosition = (screen.height-hig)/2 ;
   kw="" ;kh=""; kw=wid ; kh=hig ; s1="left="+LeftPosition+", top="+TopPosition+", width=" ; s2=", height=";
   s3=", menubar=no, toolbar=no, location=no, status=no, resizable=no, scrollbars=no";
   hc=s1+kw+s2+kh+s3; 
   //WhereTo="http://192.168.0.3/"+WhereTo ;
   var newwin = window.open(WhereTo, "", hc);
   newwin.focus(); }

  function Rze(WhereTo,wid,hig) { 
   LeftPosition = (screen.width-wid)/2 ;
   TopPosition = (screen.height-hig)/2 ;
   kw="" ;kh=""; kw=wid ; kh=hig ; s1="left="+LeftPosition+", top="+TopPosition+", width=" ; s2=", height=";
   s3=", menubar=no, toolbar=no, location=no, status=no, resizable=no, scrollbars=yes";
   hc=s1+kw+s2+kh+s3; 
   //WhereTo="http://192.168.0.3/"+WhereTo ;
   var newwin = window.open(WhereTo, "", hc);
   newwin.focus(); }

  function Req_Sze01(WhereTo,wid,hig) { 
   LeftPosition = (screen.width-wid)/2 ;
   TopPosition = (screen.height-hig)/2 ;
   kw="" ;kh=""; kw=wid ; kh=hig ; s1="left="+LeftPosition+", top="+TopPosition+", width=" ; s2=", height=";
   s3=", menubar=no, toolbar=no, location=no, status=no, resizable=no, scrollbars=yes";
   hc=s1+kw+s2+kh+s3; 
   //WhereTo="http://192.168.0.3/"+WhereTo ;
   var newwin = window.open(WhereTo, "", hc);
   newwin.focus(); }

function Relca(WhereTo) { window.navigate(WhereTo) }

function Tostart() { 
    window.navigate('index1.asp') 
 }

function Tostart1() { 
   kw=screen.width-5 ; kh=screen.height-50 ;  s1="left=0, top=0, width=" ; s2=", height=";
   s3=", menubar=no, toolbar=no, location=no, status=no, resizable=no, scrollbars=yes";
   hc=s1+kw+s2+kh+s3;   
   var newwin = window.open('index1.asp', "", hc);
 }

function change_display() {
  if (document.all.MyDiv.style.display == "") { document.all.MyDiv.style.display = "none";}
 else{document.all.MyDiv.style.display= "";}
}

  function RpTxt(CId, Cv) {
    ChThis = document.getElementById(CId);
    ChThis.innerText=Cv; cnt=document.all.Qty.innerText ; s2="" ;
    for (i=1;i<=cnt;i++) {
      ChThis =document.getElementById("Q"+i) ; 
      s2=s2+ ChThis.innerText +"|" ; }
   // ChThis = document.getElementById("Rsp");
    document.all.Rsp.innerText=s2; 
   }

function X_disp(ThisNr) {
  if (document.all.PJ1) { document.all.PJ1.style.display = "none";}
  if (document.all.PJ2) { document.all.PJ2.style.display = "none";}
  if (document.all.PJ3) { document.all.PJ3.style.display = "none";}
  if (document.all.PJ4) { document.all.PJ4.style.display = "none";}
  if (document.all.PJ5) { document.all.PJ5.style.display = "none";}
  if (document.all.PJ6) { document.all.PJ6.style.display = "none";}
  if (document.all.PJ7) { document.all.PJ7.style.display = "none";}
  if (document.all.PJ8) { document.all.PJ8.style.display = "none";}
  if (document.all.PJ9) { document.all.PJ9.style.display = "none";}
  if (document.all.PJ10) { document.all.PJ10.style.display = "none";}
  if (document.all.PJ11) { document.all.PJ11.style.display = "none";}
  if (document.all.PJ12) { document.all.PJ12.style.display = "none";}
  if (document.all.PJ13) { document.all.PJ13.style.display = "none";}
  if (document.all.PJ14) { document.all.PJ14.style.display = "none";}
  if (document.all.PJ15) { document.all.PJ15.style.display = "none";}
  switch (ThisNr) {
   case 1: document.all.PJ1.style.display = "" ; break ; 
   case 2: document.all.PJ2.style.display = "" ; break ; 
   case 3: document.all.PJ3.style.display = "" ; break ; 
   case 4: document.all.PJ4.style.display = "" ; break ; 
   case 5: document.all.PJ5.style.display = "" ; break ; 
   case 6: document.all.PJ6.style.display = "" ; break ; 
   case 7: document.all.PJ7.style.display = "" ; break ; 
   case 8: document.all.PJ8.style.display = "" ; break ; 
   case 9: document.all.PJ9.style.display = "" ; break ; 
   case 10: document.all.PJ10.style.display = "" ; break ; 
   case 11: document.all.PJ11.style.display = "" ; break ; 
   case 12: document.all.PJ12.style.display = "" ; break ; 
   case 13: document.all.PJ13.style.display = "" ; break ; 
   case 14: document.all.PJ14.style.display = "" ; break ; 
   case 15: document.all.PJ15.style.display = "" ; break ; 
  }
}

