/* framechild.js */

// Prevent being framed

	//if (top.frames.length!=0)
	//{
	//	top.location=self.document.location;
	//}

/**
* resize.js 0.3 970811
* by gary smith
* js component for "reloading page onResize"
*/

   if(!window.saveInnerWidth) 
   {
     window.onresize = resizeIt;
     window.saveInnerWidth = window.innerWidth;
     window.saveInnerHeight = window.innerHeight;
   }

   function resizeIt() 
   {
       if (saveInnerWidth < window.innerWidth || 
           saveInnerWidth > window.innerWidth || 
           saveInnerHeight > window.innerHeight || 
           saveInnerHeight < window.innerHeight ) 
       {
           window.history.go(0);
       }
   }
   
   
   // Prevent ugly IE Windows or NS6 Mac focus on <A> links
	function fixIE()
	{
	   for (a in document.links)
	  {
	       document.links[a].onfocus = document.links[a].blur;
	  }
	}
	document.onmousedown = fixIE;
	
	
		
// Open resizable popUp window (width w, height h) in centre of existing window

	function openSample(url, w, h) 
	{ 
		openSample(url, w, h, 0)
	}

// Variant allowing setting of toolbar for printing
	
	function openSample(url, w, h, t) 
	{ 
	   var args = 'width=' + w + ','
	   + 'height=' + h + ','
	   + 'toolbar=' + t + ','
	   + 'location=0,'
	   + 'directories=0,'
	   + 'status=yes,'
	   + 'menubar=0,'
	   + 'scrollbars=0,'
	   + 'resizable=yes';
	 
	   if (parseInt(navigator.appVersion) >= 4)
	   {
	      xposition = (screen.width - w)/2;
	      yposition = (screen.height - h)/2;
	  
	     args += ','
	              + 'screenx=' + xposition + ',' //NN
	              +  'screeny=' + yposition + ',' //NN
	              +  'left=' + xposition + ',' //IE
	              +  'top=' + yposition; //IE
	    }
	
	   window.open(url,"Sample", args);
	}
