var IFrameLObj; // our IFrame object
function callLinquest(numero,lnk) {
  var responseMessage = document.getElementById('rspMes'+numero);
  responseMessage.style.display = 'inline';
  if (!document.createElement) {return true};
  var IFrameDoc;
  var URL = '/cgi-bin/l/quest.cgi?n='+numero+'&u='+encodeURI(lnk);
  responseMessage.innerHTML = 'Зачекайте...';
	
  if (!IFrameLObj && document.createElement) {
    try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','RSIFrame');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      IFrameLObj = document.body.appendChild(tempIFrame);
      if (document.frames) {
        // this is for IE5 Mac
        IFrameLObj = document.frames['RSIFrame'];
      }
    } catch(exception) {
      // This is for IE5 PC
      iframeHTML='';
      document.body.innerHTML+=iframeHTML;
      IFrameLObj = new Object();
      IFrameLObj.document = new Object();
      IFrameLObj.document.location = new Object();
      IFrameLObj.document.location.iframe = document.getElementById('RSIFrame');
      IFrameLObj.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }
  if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameLObj.contentDocument) {
    // we have to give NS6 a fraction of a second
    // to recognize the new IFrame
    setTimeout('callLinquest("'+numero+'","'+lnk+'")',10);
    return false;
  }
  if (IFrameLObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameLObj.contentDocument; 
  } else if (IFrameLObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameLObj.contentWindow.document;
  } else if (IFrameLObj.document) {
    // For IE5
    IFrameDoc = IFrameLObj.document;
  } else {
    return true;
  }
  IFrameDoc.location.replace(URL);
  return false;
}
function handleRe(doc,numero) {
  var responseMessage = document.getElementById('rspMes'+numero);
  responseMessage.innerHTML = doc.getElementById('sou').innerHTML;
}
