//Firsco3 specific misc jascripts

  function openNewWindow (URL, windowName, windowOptions)
  {
      var window = getWindow (URL, windowName, windowOptions);
  }

  function getWindow(URL, windowName, windowOptions)
  {
      var newWindow = open (URL, windowName, windowOptions)
      newWindow.focus();
     // top.allOpenWindows[top.allOpenWindows.length] = newWindow;
      return window;
  }
  
  
//resize iframe based on content size
function autofitIframe(id){
	if (!window.opera && !document.mimeType && document.all && document.getElementById){
	parent.document.getElementById(id).style.height= (this.document.body.offsetHeight+10) + "px";
 	}
 	else if(document.getElementById) {
 	parent.document.getElementById(id).style.height=(this.document.body.scrollHeight+10) + "px";
 	}
 } 

  
 
 function launchHelp(url){
  openNewWindow(url, 'helpwindow', 'location=1,toolbar=1,WIDTH=700,HEIGHT=500,resizable=yes,scrollbars=1');
 }

 function launchDocument(url){
	  openNewWindow(url, 'docwindow', 'location=0,toolbar=0,WIDTH=750,HEIGHT=800,resizable=yes,scrollbars=1');
	 }
 
 
