/* framechild.js: standard script for frame child */


// 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);
	}
		   
	
	// Keep in frame
	if (self.top.frames.length == 0)
	{
		self.top.location="../../index.html";
	}
	
	// Checks if browser is IE Mac

	var iemac = iemacCheck();
	
	function iemacCheck()
	{
		if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") != -1)
		{
			return true;
		}
		else
		{
			return false;
		}
	}