 var myvar = null;
 var pollBoxString = new String();
function openPDFPrinterFriendlyGuide(link) {
   myvar= window.open(link,"_blank","scrollbars=no,menubar=no,status=no,top=9000,left=9000,width=10,height=10");
	setInterval('closeWin()',4000);
   	//focus on parent window
}

   function closeWin() {
	  // alert("myvar : "+myvar);
	  //if(myvar!=null)
	 //  {
      myvar.close();
	//  myvar=null;
	//   }

      }  
	  
//********************************************************
//* FIT 34907 - bfuller 05/24/10
//*
//* Cloned a function from popup.js to create a popup 
//* for the print friendly pdf plans
//********************************************************
function popPageWithLoc(width, height, link, top, left) {
	var target = (arguments[3] != 'undefined' && arguments[3] != null) ? arguments[3] : '';
	myvar = window.open(link,target,"width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",location=no,toolbar=no,status=no,scrollbars=no,resizable=yes,menubar=no,directories=no");
	
	// If opening into a popup that's already open, the popup will not size to the width and height given if we don't force it to
	// Have to add the 12 to width and the 38 to height to get the overall window to match the dimensions given
	myvar.resizeTo(width + 12, height + 38);
	setTimeout('closeWin()', 4000);
}	  


$(document).ready(function() {
	if(document.getElementById('pollBox'))
	{
   pollBoxString = document.getElementById('pollBox').innerHTML;
   pollBoxString = pollBoxString.replace(/^\s+|\s+$/g, '');
	if(pollBoxString.length == 0)
	{
        document.getElementById('sub_section_1').style.display="none";
   }else{
      document.getElementById('sub_section_1').style.display="block";
	}
}
	});
