<!--

function resizeIframe() 
{
  i = self.parent.document.getElementById('frameid');
  if (i != null) 
  {
      iHeight = document.body.scrollHeight;
      i.style.height = iHeight + 35 + "px";
      self.parent.document.body.scrollTop = 0;

      iWidth = document.body.scrollWidth;
      windowWidth = self.top.document.body.offsetWidth;
      i.style.width = windowWidth - 50 + "px";
      if (iWidth > (windowWidth - 50))
        i.style.width = iWidth + "px";
  } 
  else 
  {
//    try 
//    {
      i = self.top.document.getElementById('frameid');
      i.style.height = 0 + "px";
      for (j=0; j < self.parent.frames.length; j++) 
      {
        f = self.parent.frames[j];
        if (f.document.body != null)
        {
          iHeight = i.scrollHeight;
          fHeight = f.document.body.scrollHeight;
          if (fHeight > iHeight) i.style.height = fHeight + 35 + "px";
        }
      }

//    } 
//    catch(er) 
//    { 
//      alert(er);
//    }
  }
}

function parseUrl( aurl ) {
	var tresult = new Array();
	
	var idx = aurl.indexOf( ":" );
	var el = aurl.split( "//" );
	
	tresult[tresult.length] = el[0];
	var el2 = el[1].toString().split("/");
	
	for( i in el2 ) {
		tresult[tresult.length] = el2[i];
	}
	
	return tresult;
}

function getDocumentDomain( cnt ) {
	var ar = parseUrl( document.location.toString() );
	var domain = ar[1];
	var parts = domain.split( '.' );
	
	if( parts.length == 1 )
		return parts[0];
	else {
		var tmp = "";
		var delim = "";
		
		for( var i = 0; i < cnt; i++ ) {
			tmp = tmp + delim + parts[parts.length - cnt + i ];
			delim = ".";
			
		}
		
		return tmp;
	}
}

 if (top == self) self.location.href = "/nscorp/application?pageid=Legacy&page=" + escape(document.URL);
// document.domain = getDocumentDomain(2);
   document.domain = "nscorp.com";
// -->
