
<!--

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_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_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];}
   //MM_swapImage('imageName','','image/address',1);
}

function centerLayout(){
	var layoutWidth = 760;
	
	if (document.getElementById && navigator.appName == 'Netscape'){
		var bodyWidth = self.innerWidth;
		if(bodyWidth >= layoutWidth){
			document.getElementById('centerlayer').style.left = "50%";
			document.getElementById('centerlayer').style.marginLeft = "-380px";
		}else{
			document.getElementById('centerlayer').style.left = "0px";
			document.getElementById('centerlayer').style.marginLeft = "0px";
		}
		
	}else if (document.getElementById){
		var bodyWidth = document.body.offsetWidth; 
		
		if(bodyWidth >= layoutWidth - 10){
			document.getElementById('centerlayer').style.left = "50%";
			document.getElementById('centerlayer').style.marginLeft = "-380px";
		}else{
			document.getElementById('centerlayer').style.left = "0px";
			document.getElementById('centerlayer').style.marginLeft = "0px";
		}
		
	}else if (document.layers){
			document.layers['centerlayer'].left = 0;
			document.layers['centerlayer'].marginLeft = 0;
			
    }else if (document.all){
		var bodyWidth = self.innerWidth;
		if (bodyWidth >= layoutWidth){
			document.all.tags('div')['centerlayer'].style.left = "50%";
			document.all.tags('div')['centerlayer'].style.marginLeft = "-380px";
		}else{
			document.all.tags('div')['centerlayer'].style.left = "0px";
			document.all.tags('div')['centerlayer'].style.marginLeft = "0px";
		}
	}
}
   
function MM_showHideLayers() { //v3.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }

    obj.visibility=v; }

}

function showHideContent(id)
  {
    var elem = document.getElementById(id);
    var img = document.images['img' + id];
   	
   	var rExp = "";
   	var replace = "";
   	
    if (elem) 
    {
      if (elem.style.visibility == 'hidden') 
      {
        elem.style.display = 'block';
        elem.style.visibility = 'visible';
		rExp = /up/gi;
        replace = "down";
      } 
      else
      {
        elem.style.display = 'none';
        elem.style.visibility = 'hidden';
        rExp = /down/gi;
        replace = "up";
      }
    }
    
     if (img)
	{
		imgSrc = new String(img.src);
		var newPath = imgSrc.replace(rExp,replace);
		img.src = newPath;
	}
  }
  
function MM_reloadPage()
{
}

function GetLink(list) {

	if (list.selectedIndex > 0) {
		var win = window.open("http://www.sbshopnow.com/templates/sbexit.asp?mr=" + (list.selectedIndex) + "&ct=LIST&sbid=" + list.options[list.selectedIndex].value,"win");
		win.focus();
	}
}

function JumpLink(link) {

	var win = window.open(link,"win");
    win.focus();
}

function popUp(strUrl,strName,strFeatures) {
	if(strUrl == ""){strUrl = "";}
	if(strName == ""){strName = "default";}
	if(strFeatures == ""){strFeatures = "";}
	
	newwindow = window.open(strUrl,strName,strFeatures);
	 newwindow.focus();
}

function getBCWay()
	{
		location.replace("bcway_landing.aspx");
	}


function RunMovie(w,h,vid)
{
/*   
	 document.write('<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/ en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" width="280" height="256">\n');
    document.write('<param name="fileName" value="' + vid  + '">\n');
    document.write('<param name="animationatStart" value="true">\n');
    document.write('<param name="transparentatStart" value="true">\n');
    document.write('<param name="autoStart" value="true">\n');
    document.write('<param name="showControls" value="true">\n');
    document.write('<param name="Volume" value="-20">\n');
    document.write('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="' + vid  + '" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-20>\n');
    document.write('</object> \n');

*/
    document.write('<object width="' +  w + '" height="' + h + '" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n');
    document.write('<param name="src" value="' + vid  + '" />\n');
    document.write('<param name="autoplay" value="true" />\n');
    document.write('<param name="controller" value="true" />\n');
    document.write('<param name="loop" value="false" />\n');
    document.write('<param name="name" value="vid" />\n');
    document.write('<param name="bgcolor" value="#000000" />\n');
    document.write('<embed src="' +   vid  + '" width="' +  w + '" height="' +  h + '" autoplay="true" type="video/quicktime" controller="true" pluginspage="http://www.apple.com/quicktime/download/" loop="false" name="vid"></embed>\n');
    document.write('</object>\n');

}
//-->

//blattner oucher methods
function sendHiScore(){
	//set the return value to the url of the hi-score page
	//return "oucher_highscore.aspx";
	return "oucher_getScore.aspx";
}

function getChallengeUrl(){
	//set the url that we are posting the "challenge a friend" email info to
	return "oucher_taf_flash.aspx";
	//window.open("oucher_taf_flash.aspx");
}

function getEndOfCHallengeUrl(){
	//set the url that we are posting the "challenge a friend" email at the end of the flash
	window.open("oucher_taf_flash.aspx");
}

function getHiScorePage(){
    //return "oucher_highscore.aspx";
    window.open("oucher_highscore.aspx");
}

function getProductsPage(){
    window.location = "Products.aspx";
}

var copyrightStatement = function(){
	document.write("&copy;" + copyrightDate() + " GlaxoSmithKline");
}
