var ie4=(document.all && !document.getElementById)?1:0;
var ie5=(document.all && document.getElementById) ?1:0;
var ie=(ie4 || ie5) ?1:0;
var ns4=(document.layers) ?1:0;
var ns6=(!document.all && document.getElementById) ?1:0;
var ns=(ns4 || ns6) ?1:0;
var mac=(navigator.platform && navigator.platform.indexOf("Mac")!= -1)?1:0;
var macie4 = ((navigator.appVersion.indexOf('Macintosh')!=-1)&&(navigator.appVersion.indexOf('MSIE 4.')!=-1)) ?1:0;
var browserVersion = parseInt(navigator.appVersion);
var oldBrowser = (browserVersion < 4)?1:0;

function channel4() {
		Channel4 = null;				
		if ( window.opener && (!window.opener.closed))	{	
			Channel4= window.opener.location="http://www.channel4.com";
		} else	{
		 Channel4 = window.open("http://www.channel4.com");
		}
}

function magazine() {		
		magazine4 = null;				
		if ( window.opener && !window.opener.closed)	{
		 magazine4 = window.opener.location='http://www.channel4.com/health/microsites/H/health/magazine/drugs/index.html';
		} else	{
		 magazine4 = window.open('http://www.channel4.com/health/microsites/H/health/magazine/drugs/index.html');
		}
}

function justask() {		
		justask4 = null;				
		if ( window.opener && !window.opener.closed)	{
		 justask4 = window.opener.location='http://www.channel4.com/health/microsites/H/health/magazine/justask.html';
		} else	{
		 justask4 = window.open('http://www.channel4.com/health/microsites/H/health/magazine/justask.html');
		}
}

function newWindow(url) {
  var newWin = null;
  if ( window.opener && !window.opener.closed) {
   newWin = window.opener.location=url;
  } else {
   newWin = window.open(url);
  }
}
