var IFrameObj; 
function callToServer(URL,sname,svalue) {
  if (!document.createElement) {return true};

  var IFrameDoc;
  var sname_arr  = sname.split("|");	
  var svalue_arr = svalue.split("|");	
  var GoToURL    = '';

  if(URL.indexOf(".") < 0 ){URL=URL+'.asp'}

  for (i=0; i < sname_arr.length; i++){
  		if (i==0) {
			GoToURL=URL+'?'+sname_arr[i]+'='+svalue_arr[i];
		}	
		else{
			GoToURL=GoToURL+'&'+sname_arr[i]+'='+svalue_arr[i];		
		}	
  }
  GoToURL = '/XML/' + GoToURL

  if (!IFrameObj && document.createElement) {
   try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','RSIFrame');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      IFrameObj = document.body.appendChild(tempIFrame);
      
      if (document.frames) {
        IFrameObj = document.frames['RSIFrame'];
      }
    } catch(exception) {
      iframeHTML='\<iframe id="RSIFrame" style="';
      iframeHTML+='border:0px;';
      iframeHTML+='width:0px;';
      iframeHTML+='height:0px;';
      iframeHTML+='"><\/iframe>';
      document.body.innerHTML+=iframeHTML;
      IFrameObj = new Object();
      IFrameObj.document = new Object();
      IFrameObj.document.location = new Object();
      IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
      IFrameObj.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }

  if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
    setTimeout('callToServer(URL,sname,svalue)',10);
    return false;
  }


  if (IFrameObj.contentDocument) {
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    IFrameDoc = IFrameObj.document;
  } else {
    return true;
  }
  IFrameDoc.location.replace(GoToURL);
  return false;
}

function buildQueryString(theFormName) {
  theForm = document.forms[theFormName];
  var qs = ''
  for (e=0;e<theForm.elements.length;e++) {
    if (theForm.elements[e].name!='') {
      qs+=(qs=='')?'?':'&'
      qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value)
      }
    }
  return qs
}