// fontsizer
    function setFontSize(sizename){
        var element = document.getElementById("mainContainer");
        if(element){

            var csize = 16;

            if (window.getComputedStyle) {
                var styledeclaration = window.getComputedStyle(element, null);
                csize = styledeclaration.getPropertyValue("font-size");
            } else if (element.currentStyle) {
                csize = element.currentStyle.fontSize;
            }
            
        	//alert(csize);   
            
            csize=csize.replace(/px/g, "");
            csize=parseInt(csize);
            if(sizename=='') sizename=16;
            if(csize=='') csize=16;
            if(sizename=='up'){
                csize = csize +1;
            } else if(sizename=='down')  {
                csize = csize -1;
            } else {
                csize = sizename;
            }

            element.style.fontSize = csize +"px";
            setCookie( 'GSKFONTSIZE', csize);
        }
        return false;
    }

    function initFontSize(){
        var FONTSIZE = getCookie( 'GSKFONTSIZE' );
        if(FONTSIZE){
            setFontSize(FONTSIZE);
        }
    }

    function getCookie( name ) {
        var start = document.cookie.indexOf( name + "=" );
        var len = start + name.length + 1;
        if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
            return null;
        }
        if ( start == -1 ) return null;
        var end = document.cookie.indexOf( ';', len );
        if ( end == -1 ) end = document.cookie.length;
        return unescape( document.cookie.substring( len, end ) );
    }

    function setCookie( name, value, expires, path, domain, secure ) {
        var today = new Date();
        today.setTime( today.getTime() );
        if ( expires ) {
            expires = expires * 1000 * 60 * 60 * 24;
        }
        var expires_date = new Date( today.getTime() + (expires) );
        document.cookie = name+'='+escape( value ) +
            ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString()
            ( ( path ) ? ';path=' + path : ';path=/' ) +
            ( ( domain ) ? ';domain=' + domain : '' ) +
            ( ( secure ) ? ';secure' : '' );
    }

    function deleteCookie( name, path, domain ) {
        if ( getCookie( name ) ) document.cookie = name + '=' +
                ( ( path ) ? ';path=' + path : '') +
                ( ( domain ) ? ';domain=' + domain : '' ) +
                ';expires=Thu, 01-Jan-1970 00:00:01 GMT';
    }

window.addEventListener?window.addEventListener("load",init,false):window.attachEvent("onload",init);

function init() {
    initFontSize();
}


// Flash Version Detector  v1.2.1
// documentation: http://www.dithered.com/javascript/flash_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)
// with VBScript code from Alastair Hamilton (now somewhat modified)

function isDefined(property) {
  return (typeof property != 'undefined');
  
}

var flashVersion = 0;
function getFlashVersion() {
var latestFlashVersion = 8;
   var agent = navigator.userAgent.toLowerCase(); 
	
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }
   
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			for (var i = latestFlashVersion; i >= 3; i--) {
            if (flashPlugin.description.indexOf(i + '.') != -1) {
               flashVersion = i;
               break;
            }
         }
		}
	}

	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   var doc = '<scr' + 'ipt language="VBScript"\> \n';
      doc += 'On Error Resume Next \n';
      doc += 'Dim obFlash \n';
      doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
      doc += '   Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
      doc += '   If IsObject(obFlash) Then \n';
      doc += '      flashVersion = i \n';
      doc += '      Exit For \n';
      doc += '   End If \n';
      doc += 'Next \n';
      doc += '</scr' + 'ipt\> \n';
      document.write(doc);
   }
		
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;

	// Can't detect in all other cases
	else {
		flashVersion = flashVersion_DONTKNOW;
	}

	return flashVersion;
}

flashVersion_DONTKNOW = -1;


var agt= navigator.userAgent.toLowerCase();

var noflashText=new Array() //Heading and text for non flash banners
noflashText[0]="<h1>AIDS at 25</h1>	<p>5 June 2006 marked 25 years since <br />the first cases of AIDS were reported. <br />But what does the future hold?</p>"
noflashText[1]="<h1>Every breath you take</h1>	<p>Asthma is a growing problem in developed <br />countries with 100-150 million people affected <br />by this breathing disorder.</p>"
noflashText[2]="<h1>Eliminating lymphatic filariasis</h1>	<p>Through partnership and donation of <br />albendazole, GSK is working to help <br />eliminate this terrible disease.</p>"
noflashText[3]="<h1>Kicking the habit</h1>	<p>Over a billion people worldwide smoke tobacco, <br />yet it is the leading preventable cause of death globally. <br />So what is the fascination with this lethal leaf?</p>"
noflashText[4]="<h1>The menace of malaria</h1>	<p>Feared since the days of the<br />Roman Empire, malaria remains<br />a major health problem.</p>"
noflashText[5]="<h1>The white plague</h1>	<p>Tuberculosis (TB) was once thought<br />to be a disease of the past, but it <br />has returned in a big way.</p>"

var noflashLink=new Array() //Links for non flash banners
noflashLink[0]="infocus/aidsat25.html"
noflashLink[1]="infocus/asthma.html"
noflashLink[2]="infocus/eliminating.html"
noflashLink[3]="infocus/tobacco.html"
noflashLink[4]="infocus/malaria.html"
noflashLink[5]="infocus/whiteplague.html"


function FlashTag(p_Section, p_flash, p_height, p_txtsize, p_txtalt,p_link,p_Newimg){
	
	if (!p_flash || getFlashVersion() < 6){
			
			if (p_Newimg !=""){
				if (p_height =="257"){
					
					document.write('<div id="txt-top-noflash">'+ noflashText[flashBg-1] +'</div>');
					document.write('<div id="'+ p_txtsize +'"><a href="'+ noflashLink[flashBg-1] +'" class="white"><img src="../images/arrow-find.gif" alt=""> Find out more</a></div>');
					document.write('<img src="../images/banner/0' + flashBg + '_01.jpg" border="0" alt="' + noflashText[flashBg-1] + '" width="760" height="'+ p_height+'">'); 
				}
				else{
					document.write('<div id="'+ p_txtsize +'"><a href="'+ p_link +'"><img src="/common/img/'+ p_Section +'/txt-'+ p_Section +'-small.gif" border="0" alt="'+ p_txtalt +'"></a></div>'); 
					document.write('<img src="/common/img/'+ p_Section +'/v-'+ p_Newimg +'-small.jpg" border="0" alt="" width="760" height="'+ p_height+'">'); 
				}
			}
			else {
				if (p_height =="257" ){
			
					document.write('<img src="/common/img/banner/0' + flashBg + '_01.jpg" border="0" alt="" width="760" height="'+ p_height+'">');  
				}
				else{
					document.write('<img src="/common/img/'+ p_Section +'/v-'+ p_Section +'-small.jpg" border="0" alt="" width="760" height="'+ p_height+'">'); 
				}
			}
	}
	else {
		if(agt.indexOf("safari")!=-1)  {
		 
			if (p_height =="257"){
				document.write('<div id="txt-top-noflash">'+ noflashText[flashBg-1] +'</div>');
				document.write('<div id="'+ p_txtsize +'"><a href="'+ noflashLink[flashBg-1] +'" class="white"><img src="/common/img/arrow-find.gif" alt=""> Find out more</a></div>');
				document.write('<img src="/common/img/banner/0' + flashBg + '_01.jpg" border="0" alt="' + noflashText[flashBg-1] + '" width="760" height="'+ p_height+'">'); 
			}
			else{
			document.write('<img src="/common/img/'+ p_Section +'/v-'+ p_Section +'-small.jpg" border="0" alt="" width="760" height="'+ p_height+'">'); 
			}
		}
		else if((agt.indexOf("msie")!=-1) && (navigator.userAgent.indexOf("Mac") != -1)) {
			if (p_height =="257"){
			document.write('<div id="txt-top-noflash">'+ noflashText[flashBg-1] +'</div>');
			document.write('<div id="'+ p_txtsize +'"><a href="'+ noflashLink[flashBg-1] +'" class="white"><img src="/common/img/arrow-find.gif" alt=""> Find out more</a></div>');  
			document.write('<img src="/common/img/banner/0' + flashBg + '_01.jpg" border="0" alt="' + noflashText[flashBg-1] + '" width="760" height="'+ p_height+'">'); 
			}
			else{
			document.write('<img src="/common/img/'+ p_Section +'/v-'+ p_Section +'-small.jpg" border="0" alt="" width="760" height="'+ p_height+'">'); 
			}
		}
		else {
			var el=document.getElementById('flash-pict-home'); 
			el.className ="flashBack"+flashBg;
			document.write('<object type="application/x-shockwave-flash" data="/common/flash/home/homePage.swf?Id='+ (flashBg - 1) +'" width="760" height="'+ p_height+'">');
			document.write('<param name="movie" value="/common/flash/home/homePage.swf?Id='+ (flashBg - 1) +'" />');
			document.write('<param name="allowScriptAccess" value="sameDomain" />');
			document.write('<param name="wmode" value="transparent" />');
			document.write('<embed src="/common/flash/home/homePage.swf?Id='+ (flashBg - 1) +'" quality="high" wmode="transparent" bgcolor="#ffffff" width="760" height="280" name="homePage" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
			document.write(' </object>');			

		   }
			
	   } 
	 
}



	
/*  TABLE     display: block;*/

var height;
var Category;
function displaySwapShow(p_id, p_class){
	if(document.getElementById(p_id)!='undefined'&&document.getElementById(p_id)!=null){
		document.getElementById(p_id).style.display = 'block'
	
		
		if (height =="280"){
		document.getElementById(p_class).className ="hmenu-table-off";
		}
		else{
			document.getElementById(p_class).className ="menu-table-off";
	
		
		}

		if (Category =="utilities") {
		 document.getElementById(p_class).className ="menu-contact-table-off";
		}
		

	}
}	

function displaySwapHidden(p_id, p_class)
{
	if(document.getElementById(p_id)!='undefined'&&document.getElementById(p_id)!=null)
	{
		document.getElementById(p_id).style.display = 'none' 
		if (height =="280"){
		document.getElementById(p_class).className ="hmenu-table";
		}
		else{
		document.getElementById(p_class).className ="menu-table";
		}
		if (Category =="utilities") {
		 document.getElementById(p_class).className ="menu-contact-table";
		}	
		
	}
}

function displayShow(p_id) {

		 document.getElementById(p_id).style.display = 'block';
}
function displayHidden(p_id) {

			document.getElementById(p_id).style.display = 'none';
}


				
function swapIt(hide,show) {
    show.style.display = "";
    hide.style.display = "none";
  }


/* END TABLE     display: block;*/	

/*

				Drop down

*/

function dropdown(mySel){
var myWin, myVal;
myVal = mySel.options[mySel.selectedIndex].value;
	if(myVal){
			if(mySel.form.target)myWin = parent[mySel.form.target];
			
			else myWin = window;
			
			if (! myWin) return true;
			myWin.location = myVal;
	   }
return false;
}
function dropdownTarget(mySel){
var myWin, myVal;

myVal = mySel.options[mySel.selectedIndex].value;
	if(myVal){
			if(mySel.form.target)myWin = parent[mySel.form.target];
			
			else myWin = window;
			if (! myWin) return true;
		 	if (myVal.charAt(0)=="index.html")
				{
					 myWin.location = myVal;
				}
				else
				{

					myWin.open(myVal);
				}
			
			
	   }
return false;
}


/*

				OPEN WINDOW

*/

function DW1(dwURL) {
popupWin = window.open(dwURL, 'DW1', 'scrollbars,resizable=yes,width=700,height=600,left=25,top=25');
window.top.name = 'opener';
}
function DW(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=517,height=400,left=25,top=25');
window.top.name = 'opener';
}
function DW2(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=433,height=400,left=25,top=25');
window.top.name = 'opener';
}
function DW4(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=560,height=370,left=25,top=25');
window.top.name = 'opener';
}
function DW5(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=587,height=370,left=25,top=25');
window.top.name = 'opener';
}
function DW6(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=587,height=570,left=25,top=25');
window.top.name = 'opener';
}
function DW8(dwURL) {
popupWin = window.open(dwURL, 'DW8', 'resizable=no,width=400,height=590,left=25,top=25');
window.top.name = 'opener';
}


function Present(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=805,height=450,left=25,top=25');
window.top.name = 'opener';
}
function Present2(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=790,height=593,left=25,top=25');
window.top.name = 'opener';
}
function External(dwURL) {
popupWin = window.open(dwURL, 'DW1', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=600,left=25,top=25');
window.top.name = 'opener';
}



//legacy script - used everywhere except careers
function DW1(dwURL) {
popupWin = window.open(dwURL, 'DW1', 'scrollbars,resizable=yes,width=700,height=600,left=25,top=25');
window.top.name = 'opener';
}
//used in careers - updated as it clashed with earlier version of DW1 used in the about section
function DWjoin(dwURL) {
popupWin = window.open(dwURL, 'DWjoin', 'scrollbars,resizable=yes,width=600,height=550,left=25,top=25');
window.top.name = 'opener';
}

function DWUS(dwURL) {
popupWin = window.open(dwURL, 'DWUS', 'scrollbars,resizable=yes,width=575,height=500,left=25,top=25');
window.top.name = 'opener';
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
var loc = "http://"+selObj.options[selObj.selectedIndex].value;
if(loc.length > 9)
	window.location=loc;
}

function Profile(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=667,height=450,left=25,top=25');
window.top.name = 'opener';
}

function Hemscott(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=667,height=450,left=25,top=25');
window.top.name = 'opener';
}
//used in the products section mainly
function openProducts(dwURL) {
  products = window.open(dwURL, 'products', 'scrollbars,resizable=yes,width=520,height=400,left=25,top=25');
  window.top.name = 'opener';
}

function Profilebig(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=800,height=700,left=25,top=25');
window.top.name = 'opener';
}

function PCbig(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=882,height=600,left=25,top=25');
window.top.name = 'opener';
}

function chartinfo(dwURL) {
popupWin = window.open(dwURL, 'DW', 'scrollbars,resizable=yes,width=300,height=200');
window.top.name = 'opener';
}
//Used for flash content in Your Health
function healthflash(dwURL) {
popupWin = window.open(dwURL, 'DW', 'resizable=yes,width=585,height=445,left=25,top=25');
window.top.name = 'opener';
}

function doSearch() {
  document.forms[1].submit();
}
function display_search() {
  if (navigator.appName == "Netscape") { 
    document.write("<input type=text name=Search size=8 maxlength=50>");
  }
  else { 
    document.write("<input type=text name=Search size=14 maxlength=50>");
  }
}

//About us/background/history flash file/ Function written for calling from the flash movie. It turns all divs off besides the one requested.
function displayHideOthers(p_id) {

		 document.getElementById('1700').style.display = 'none';
		 document.getElementById('1800').style.display = 'none';
		 document.getElementById('1850').style.display = 'none';
 		 document.getElementById('1900').style.display = 'none';				 		 
 		 document.getElementById('1950').style.display = 'none';
		 document.getElementById('2000').style.display = 'none';		 
		 document.getElementById(p_id).style.display = 'block';
}


//Community/default page/Function written for calling from the flash movie. It turns all divs off besides the one requested.
function displayPartnership(p_id) {

		 document.getElementById('prog0').style.display = 'none';
		 document.getElementById('prog1').style.display = 'none';
		 document.getElementById('prog2').style.display = 'none';
		 document.getElementById('prog3').style.display = 'none';
 		 document.getElementById('prog4').style.display = 'none';				 		 
 		 document.getElementById('prog5').style.display = 'none';
		 document.getElementById('prog6').style.display = 'none';
		 document.getElementById('prog7').style.display = 'none';
		 document.getElementById('prog8').style.display = 'none';
		 document.getElementById('prog9').style.display = 'none';
 		 document.getElementById('prog10').style.display = 'none';				 		 
 		 document.getElementById('prog11').style.display = 'none';
		 document.getElementById('prog12').style.display = 'none';	
		 document.getElementById(p_id).style.display = 'block';		 

}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*Added by Wipro for Primary Navigation Links*/
function activePrmLink() {
	var winLoc = window.location.href;
	var folderName = "html/"; // word appears before section folder name in URL
	var folderLgt = folderName.length;
	var index = winLoc.indexOf(folderName);
	var lastIndex = winLoc.lastIndexOf("/");
	var getVal = winLoc.slice(index+folderLgt, lastIndex);
	var docElement = document.getElementById(getVal).firstChild;
	docElement.style.backgroundImage = "url(../../images/activeLink-arrow.gif)";
	docElement.style.backgroundRepeat = "no-repeat";
	docElement.style.backgroundPosition = "left center";
	docElement.style.color = "#f55a1c";
}
/*Added by Wipro for Left Navigation Links*/
function activeLeftLink(param, menuID1, menuID2, menuID3 ) {
	var linkID = param;
	if (linkID.length == "9") {
		// for Second level
		var docElemtLink = document.getElementById(linkID);
		docElemtLink.className = "inActive";
		var subMenu = document.getElementById(menuID1);
		subMenu.className = "displayON";
	}
	
	if (linkID.length == "12") {
		// for second level link
		var docPrntID = param.slice("0", param.lastIndexOf("-"));
		var docPrntLink = document.getElementById(docPrntID);
		docPrntLink.className = "inActive";
		var subMenu = document.getElementById(menuID1);
		subMenu.className = "displayON";
		// for Third level link
		var docElemtLink = document.getElementById(linkID);
		docElemtLink.className = "inActive";
		var subMenu2 = document.getElementById(menuID2);
		subMenu2.className = "displayON";		
	}
	
	else if (linkID.length == "15") {
		// for second level link
		var docPrntID1 = param.slice("0", param.indexOf("-"));
		var docPrntLink1 = document.getElementById(docPrntID1);
		docPrntLink1.className = "inActive";
		var subMenu = document.getElementById(menuID1);
		subMenu.className = "displayON";
		// for Third level link
		var docPrntID = param.slice("0", param.lastIndexOf("-"));
		var docPrntLink = document.getElementById(docPrntID);
		docPrntLink.className = "inActive";
		var subMenu = document.getElementById(menuID2);
		subMenu.className = "displayON";
		// for Fourth level link
		var docElemtLink = document.getElementById(linkID);
		docElemtLink.className = "inActive";
		
	}
	else if (linkID.length == "18") {
		// for second level link
		var docPrntID1 = param.slice("0", param.indexOf("-"));
		var docPrntLink1 = document.getElementById(docPrntID1);
		docPrntLink1.className = "inActive";
		var subMenu = document.getElementById(menuID1);
		subMenu.className = "displayON";
		// for Third level link
		var docPrntID = param.slice("0", param.lastIndexOf("-")-3);
		var docPrntLink = document.getElementById(docPrntID);
		docPrntLink.className = "inActive";
		var subMenu = document.getElementById(menuID2);
		subMenu.className = "displayON";
		// for Fourth level link
		var docPrntID = param.slice("0", param.lastIndexOf("-"));
		var docPrntLink = document.getElementById(docPrntID);
		docPrntLink.className = "inActive";
		var subMenu = document.getElementById(menuID3);
		subMenu.className = "displayON";
		// for Fifth level link
		var docElemtLink = document.getElementById(linkID);
		docElemtLink.className = "inActive";
		
	}
	
}

// Added by Wipro to refocus the page on click of browser back button. 
// This funtion is to support navigation functions defined above
onload=function(){ 
	window.focus();
}

// Added by Wipro to refocus the page on click of browser back button. 
// This funtion is to support navigation functions defined above
onload=function(){ 
	window.focus();
	if (navigator.platform.indexOf("MacPPC")!=-1) {
		document.write('<link rel="stylesheet" type="text/css" href="css/gsk-mac.css" />');
	}
}

<!-- Start Function to Print window-->
function printWin()
{
	window.print();	
}
<!-- End Function to Print window-->

function nwr(x,w,h,t,l,n){
	if (h == "") h = 100;
       if (w == "") w = 100;
       if (t == "") t = 10;
       if (l == "") l = 10;
       if (n == "") n = "login";
       	var xx = "top="+t+",left="+l+",width="+w+ ",height="+h+", directories=0, status=1, scrollbars=1, resizable=1, toolbar=0,menubar=0";
		msgWindow=window.open(x,n,xx);
		msgWindow.focus();
}