bpv3OnLoad//variables used to center pop-up windows
var width = screen.width;
var height = screen.height;
var popUpWidth = 0;
var popUpHeight = 0;
var positionTop = 0;
var positionLeft = 0;

function openWindow(pageURL,windowName,pWidth,pHeight,pResize,pScrollbars) {
  positionTop = ((height/2) - (pHeight/2));
  positionLeft = ((width/2) - (pWidth/2));
  //Modified the code for removing the menubar, scrollbar, addressbar of Inetrstitial popup
  popup=window.open(pageURL,windowName, config='width=' + pWidth + ',height=' + pHeight + ',left=' + positionLeft + ',top=' + positionTop + ',resizable=' + pResize + ',menubar=0,location=0,directories=0,toolbar=0,scrollbars=' + pScrollbars + ',status=1'); 
	popup.focus();
}


function queryString(val){
	var q  = unescape(location.search.substr(1)).split('&');

	for(var i=0; i<q.length; i++) {
		var t=q[i].split('=');
		if (t[0].toLowerCase()==val.toLowerCase()) return t[1];
	}
	return '';
}


/*===================================
--end window popup function
=====================================*/

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
    a.disabled = true;
      if(a.getAttribute("title") == title)a.disabled = false;
      //This code is used to keep the Text Zoom font selection highlighted for IE Browser only
      if(a.getAttribute("title") != title)
      {
      	var ua = navigator.userAgent.toLowerCase(); 
			if ( ua.indexOf( "msie" ) != -1 ) {
				var divSmallZoom,divMedZoom,divLargeZoom  ;
				divSmallZoom= document.all['text-small'];
				divMedZoom= document.all['text-medium'];
				divLargeZoom  = document.all['text-large'];
		
				if(title.indexOf("Small")!=-1)
		      	{
		
					if(divMedZoom!=null && divLargeZoom!=null)
					{	divSmallZoom.style.color="red";
						divMedZoom.style.color="white";
						divLargeZoom.style.color="white";
					}
					
				}
				if(title.indexOf("Medium")!=-1)
		      	{
					if(divSmallZoom!=null && divLargeZoom!=null)
					{
						divMedZoom.style.color="red";
						divLargeZoom.style.color="white";
						divSmallZoom.style.color="white";
						
					}
					
				}
				if(title.indexOf("Large")!=-1)
		      	{
					if(divSmallZoom!=null && divMedZoom!=null)
					{
						divMedZoom.style.color="white";
						divSmallZoom.style.color="white";
						divLargeZoom.style.color="red";
					}
					
					
					
		        }
		      }
		
		}
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function readUserTextPreference() {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

function storeUserTextPreference() {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);



function displayTextZoom() {
	document.writeln("<font style=\"color:White;font-weight:bold;\">TEXT SIZE</font> <span style=\"letter-spacing:-0.5px;\"><a href=\"javascript:void(0);\" onclick=\"setActiveStyleSheet('Small Text', 1); return false;\" title=\"Switch to Small Text Size\" id=\"text-small\" style=\"letter-spacing:0px;color:white;\">A</a> <a href=\"javascript:void(0);\" onclick=\"setActiveStyleSheet('Medium Text', 1); return false;\" title=\"Switch to Medium Text Size\" id=\"text-medium\" style=\"letter-spacing:0px;color:white;\"><span style=\"font-size:13px;\">A</span></a> <a href=\"javascript:void(0);\" onclick=\"setActiveStyleSheet('Large Text', 1); return false;\" title=\"Switch to Large Text Size\" id=\"text-large\" style=\"letter-spacing:0px;color:white;\"><span style=\"font-size:15px;\">A</span></a></span>");
}

/*

function printerFriendlyPage(siteStyle)
{ 
  var display_setting="toolbar=yes,location=no,directories=yes,menubar=yes,resizable=yes,"; 
      display_setting+="scrollbars=yes,width=650, height=600, left=100, top=25"; 
  
  var docprint=window.open("","",display_setting); 
   docprint.document.open(); 
   docprint.document.write('<html><head><title>' + document.title + '</title>'); 
   docprint.document.writeln('<link rel="stylesheet" type="text/css" href="' + siteStyle + 'BPv3.css"/>');
   docprint.document.writeln('<link type="text/javascript" href="' + siteStyle + 'common.css"/>');
   docprint.document.writeln('<link media="screen" rel="stylesheet" type="text/css" href="' + siteStyle + 'print.css"/>');
   docprint.document.writeln('<link media="print" rel="stylesheet" type="text/css" href="' + siteStyle + 'print.css"/>');
   docprint.document.write('</head><body onLoad="self.print()">');          
   docprint.document.write('<table width=\"100%\" border=\"0\">');
   docprint.document.write('<tr><td>');
   docprint.document.write('<div id="printHeader">');
   docprint.document.write(document.getElementById('header').innerHTML);   
   docprint.document.write('</div>');
   docprint.document.write('</tr></td>');
   docprint.document.write('<tr><td>');
   docprint.document.write(document.getElementById('printContent').innerHTML);          
   docprint.document.write('</tr></td>');
   docprint.document.write('<tr><td>');
   docprint.document.write(document.getElementById('printFooter').innerHTML);          
   docprint.document.write('</tr></td>');
   docprint.document.write('<tr><td>');
   docprint.document.write(document.getElementById('printSubfooter').innerHTML);          
   docprint.document.write('</tr></td>');
   docprint.document.write('</table>');
   docprint.document.write('</body></html>'); 
   docprint.document.close(); 
   docprint.focus(); 
}

*/


function bpv3OnLoad()
{
    var thisURL = window.location.host;
    
    if(thisURL!= null & thisURL.indexOf("face-diabetes-public.lilly.com") == 0)
    {
        var hiddendiv = document.all['site_actions'];
        if(hiddendiv != null)
        {
	        hiddendiv.style.visibility = "hidden";
        }
    }
    
    applyFunction(document);
    
    ChangeSearchImage(document);
    
    
    
    //Below code is used to move the container section towords left and top and the site setting for container section is towards left
    var thisPagePath= window.location.pathname;
    thisPagePath=thisPagePath.toUpperCase();
    var thisCheckPath="/PAGES/POPUP-INTERSTITIAL.ASPX";
    var ua = navigator.userAgent.toLowerCase();
    if(thisPagePath==thisCheckPath)
    {

    	var divZoom = document.getElementById('container');
    	
		if(divZoom != null)
        {
	       divZoom.style.margin= "-27px 0px 0x -110px";
        }

    }
    //End of the code

}
function bpv3OnUnload()
{
  
}


/*===================================
--start RadEditor button js
=====================================*/
// java script for web trend integration
function applyPopup( node )
{   
	if ( node.nodeType == 1 && node.tagName == "A" && node.id.indexOf("popup_") == 0)
	{
		var linkNode = document.getElementById(node.id);
		linkNode.url = linkNode.href;
		//linkNode.href="#";
		linkNode.onclick=myOpenWindowForPopup;
	}
}

function applyInline( node )
{
	if ( node.nodeType == 1 && node.tagName == "A" && node.id.indexOf("inline_") == 0)
	{
		var linkNode = document.getElementById(node.id);
		linkNode.url = linkNode.href;
		linkNode.onclick=myOpenWindowForInline;
	}
}

function myOpenWindowForPopup(e)
{
	var linkNode;
    if(e==null)
    {
	    linkNode = window.event.srcElement;
    }
    else
    {
	    linkNode=e.target;
    }	
	while(linkNode!=null)
	{		   
	    if(linkNode.tagName=="A")
	    {	     
	    	applyWebTrendsOnInterstitial(linkNode.url, getInnerText(linkNode));
	    	
	     	if ( BrowserDetect.browser == 'Explorer'  && BrowserDetect.version < '7' ) {
				window.showModalDialog(linkNode.url,'','dialogHeight:415px;dialogWidth:440px;dialogTop:px;dialogLeft:px;dialogRight:px;center:Yes;scroll:no;resizable:yes;status:no;');
			}
	        else{
    			window.showModalDialog(linkNode.url,'','dialogHeight:360px;dialogWidth:440px;dialogTop:px;dialogLeft:px;dialogRight:px;center:Yes;scroll:no;resizable:yes;status:no;');
			}
	        break;
	    }
	    else
	    {
	        linkNode=linkNode.parentNode;
	    }
	}
	return false;
}

function myOpenWindowForInline(e)
{
	var linkNode;
    if(e==null)
    {
	    linkNode = window.event.srcElement;
    }
    else
    {

	    linkNode=e.target;
    }	

	while(linkNode!=null)
	{		   
	    if(linkNode.tagName=="A")
	    {
        	//Modified the code for changing the height and width of Inetrstitial popup and removing the scrollbars and resize
    		applyWebTrendsOnInterstitial(linkNode.url, getInnerText(linkNode));
    		window.location=linkNode.url;
	    	break;
	    }
	    else
	    {
	        linkNode=linkNode.parentNode;
	    }
	}
	return false;
}

function myOpenWindow(e)
{
	var linkNode;
    if(e==null)
    {
	    linkNode = window.event.srcElement;
    }
    else
    {
	    linkNode=e.target;
    }	
	while(linkNode!=null)
	{		   
	    if(linkNode.tagName=="A")
	    {
	        openWindow(linkNode.url,'',500,500,'yes','yes');
	        break;
	    }
	    else
	    {
	        linkNode=linkNode.parentNode;
	    }
	}
	return false;
}

function applyWebTrends( node )
{
    if ( node.nodeType == 1 && node.tagName == "A" && node.id.indexOf("webtrends_") == 0)
    {
	    var linkNode = document.getElementById(node.id);
	    linkNode.url = linkNode.href;
	    //linkNode.href="#";
	    linkNode.onclick=myCallWebTrends;
    }
}

function applyWebTrendsOnInterstitial(url, text)
{
	var offsiteUrl = getParamsFromURL("URL",url);
	var dcsURL = getUrl(offsiteUrl);
	if(dcsURL[1] == '')
	{
		dcsURL[1] = '/';
	}
	var domain = dcsURL[0].split("//")[1].split("/")[0] ;
	dcsMultiTrack('DCS.dcssip',domain ,'DCS.dcsuri',dcsURL[1],'WT.ti',text);
}

function getParamsFromURL( name, url )
{  
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
    var regexS = "[\\?&]"+name+"=([^&#]*)";  
    var regex = new RegExp( regexS );  
    var results = regex.exec( url );  
    if( results == null )   
    {
	    return "";
    }
    else
    {
	    return results[1];
    }	
}

function myCallWebTrends(e)
{

    var linkNode;
    if(e==null)
    {
	    linkNode = window.event.srcElement;
    }
    else
    {
	    linkNode=e.target;
    }
    while(linkNode!=null)
    {		   
        if(linkNode.tagName=="A")
        {
           var urlLink = getUrl(linkNode.url);
	   var urlText = getInnerText(linkNode);
    	    try{	               
		var domain = urlLink[0].split("//")[1].split("/")[0] ;
		
		dcsMultiTrack('DCS.dcssip',domain ,'DCS.dcsuri',urlLink[1],'WT.ti',urlText);
    	       }
	     catch(e)
	       {
	       }
            
            //window.location=linkNode.url;
            break;
        }
        else
        {
            linkNode=linkNode.parentNode;
        }
    }
}

function getParams( name )
{  
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
    var regexS = "[\\?&]"+name+"=([^&#]*)";  
    var regex = new RegExp( regexS );  
    var results = regex.exec( window.location.href );  
    if( results == null )   
    {
	    return "";
    }
    else
    {
	    return results[1];
    }	
}

function myOpenWin(e)
{
    var linkNode;
    if(e==null)
    {
	    linkNode = window.event.srcElement;
    }
    else
    {
	    linkNode=e.target;
    }
    window.history.go(-1);
    openWindow(linkNode.url,'',640,480,'yes','yes');	
    return false;
}

function getUrl(linkNodeUrl)
{
	var isUrlPathRelative = false;
	var url=linkNodeUrl;
	//Check if The URL is relative path or not
	//if yes, then send linkNodeUrl as dcsuri parameter.
	var urlBuf=url.split("//");
	if (urlBuf.length <= 1)
	{
	  url = window.location.href;	
	  urlBuf=url.split("//");
	  isUrlPathRelative = true
	}
	   var buf1=urlBuf[0];
	   var buf2=urlBuf[1];
	   var bufarr=buf2.split("/");
	   var buf3=bufarr[0];
	   var buf4=bufarr[1];
	   var start=url.indexOf(buf3)+buf3.length;
	   var nxt=url.substr(start);
	   var prv=url.substr(0,start);
	 
	   var dcsURL= new Array();
	   dcsURL[0] = prv;
	   if(isUrlPathRelative)
	   {
	      dcsURL[1] = linkNodeUrl;
	   }
	   else
	   {
 	      dcsURL[1] = nxt;
	   }	
	   return dcsURL;
}

function getInnerText(linkNode)
{
	var linkNodeText;
	var ua=navigator.userAgent.toLowerCase();
	if(ua.indexOf("firefox")>-1)
	{
		linkNodeText = linkNode.textContent;
	}
	else
	{
		linkNodeText = linkNode.innerText;
	}
	if(linkNodeText.length > 0)
	{
	    return linkNodeText;
	}
	var children = 	linkNode.childNodes;
    if(children.length>0)
    {
		for(var i = 0; i < children.length; i++)
    	{
    		if(children[i].tagName == "IMG")
    		{
			    return children[i].getAttribute('alt');
    		}
    	}

    }

}
		
function applyURL( node )
{
    var navigateurl = unescape(getParams('URL'));
    var interstitialType = getParams('InterstitialType');

    if (interstitialType == "inline")
    {
        if ( node.nodeType == 1 && node.tagName == "A" && node.id.toUpperCase().indexOf("YES") == 0)
        {
	        var linkNodeYes = document.getElementById(node.id);
	        linkNodeYes.href = "#";
	        linkNodeYes.url = navigateurl;
	        linkNodeYes.onclick = myOpenWin;
        }
    	
        if ( node.nodeType == 1 && node.tagName == "A" && node.id.toUpperCase().indexOf("NO") == 0)
        {
	        var linkNodeNo = document.getElementById(node.id);
	        linkNodeNo.href = "#";
	        linkNodeNo.onclick = goBack;
        }
    }
    else
    {
        if ( node.nodeType == 1 && node.tagName == "A" && node.id.toUpperCase().indexOf("YES") == 0)
        {
	       	node.onclick = function(){ return openNewWindow(navigateurl);};	
        }
    	
        if ( node.nodeType == 1 && node.tagName == "A" && node.id.toUpperCase().indexOf("NO") == 0)
        {
	    	node.onclick = function(){ closeWin(); return false; };
        }
    }

}

function openNewWindow(url)
{
	window.open(url);
	closeWin();
	
	return false;
}	

function goBack()
{
    window.history.go(-1);
    return false;
}

function closeWin()
{
  window.close();
}

function applyFunction( node )
{
    applyPopup(node);
    applyInline(node);
    applyWebTrends(node);
    applyURL(node);

    var children = node.childNodes;
    for ( var i = 0; i < children.length; i++ )
    {
        applyFunction( children[i] );
    }
}
function ShowForm(url)
{
    var rtnValue = window.showModalDialog(url,'','dialogHeight:130px;dialogWidth:450px;dialogTop:px;dialogLeft:px;dialogRight:px;center:Yes;scroll:yes;resizable:no;status:no;');
    return rtnValue;
}


/*===================================
--end RadEditor button
=====================================*/

function ChangeSearchImage(node)
{
	if((node.tagName == "IMG") || (node.tagName == "img"))
	{
	    if(node.title == "Go Search")
	    {
	        //node.onmouseover="this.src='/PublishingImages/btn_search.gif'";
	        //node.onmouseout="this.src='/PublishingImages/btn_search.gif'";
	        //node.src = "/PublishingImages/btn_search.gif";
	        //node.parentNode.parentNode.className = "ms-sbgo-bpv3";
	    }
	}
	
	var children = node.childNodes;
    for ( var i = 0; i < children.length; i++ )
    {
        ChangeSearchImage(children[i]);
    }
}








/*===================================
-- New Functions Added 
====================================*/




/*===================================
-- Begin image rollover functions
====================================*/
//Preload specified images on the page
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];}}
}
//Restore the specified image to its original state
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;
}
//Find image objects with specified IDs
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;
}
//Swap oringal image with specifed image
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];}
}
/*===================================
-- End image rollover functions
====================================*/

/*===================================
-- Begin text sizing functions
====================================*/
//Resets all the text-size images and sets the correct font
function styleSizer(whichStyle){
	//reset all the images
	MM_swapImage('smallTextButton','','/images/text_small.gif',1);
	MM_swapImage('mediumTextButton','','/images/text_medium.gif',1);
	MM_swapImage('largeTextButton','','/images/text_large.gif',1);
	//alert(whichStyle);
	//then set the correct font
	if(whichStyle=="smallFont"){
		setActiveStyleSheet('regularFont'); 
		MM_swapImage('smallTextButton','','/images/text_small_selected.gif',1);
		return false;
	}else if(whichStyle=="mediumFont"){
		setActiveStyleSheet('largerFont');
		MM_swapImage('mediumTextButton','','/images/text_medium_selected.gif',1);
		return false;
	}else if(whichStyle=="largeFont"){
		setActiveStyleSheet('largestFont');
		MM_swapImage('largeTextButton','','/images/text_large_selected.gif',1);
		return false;
	}
	else{
		setActiveStyleSheet('regularFont'); 
		MM_swapImage('smallTextButton','','/images/text_small_selected.gif',1);
		return false;
	}
}
//writeImages writes out what image should be live on page load
function writeImages(){
	 var cookie = readCookie("style");
 	 var title = cookie ? cookie : getPreferredStyleSheet();
	//regularFont, largerFont, largestFont
	if(title==null || title=='regularFont'){
		return('<a href="javascript:;" onClick="javascript: return styleSizer(\'smallFont\');"><img src="/images/text_small_selected.gif" alt="Small text" name="smallTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'mediumFont\');"><img src="/images/text_medium.gif" alt="Medium text" name="mediumTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'largeFont\');"><img src="/images/text_large.gif" alt="Large text" name="largeTextButton" /></a>');
	}else if(title=='largerFont'){
		return('<a href="javascript:;" onClick="javascript: return styleSizer(\'smallFont\');"><img src="/images/text_small.gif" alt="Small text" name="smallTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'mediumFont\');"><img src="/images/text_medium_selected.gif" alt="Medium text" name="mediumTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'largeFont\');"><img src="/images/text_large.gif" alt="Large text" name="largeTextButton" /></a>');
	}else if(title=='largestFont'){
		return('<a href="javascript:;" onClick="javascript: return styleSizer(\'smallFont\');"><img src="/images/text_small.gif" alt="Small text" name="smallTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'mediumFont\');"><img src="/images/text_medium.gif" alt="Medium text" name="mediumTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'largeFont\');"><img src="/images/text_large_selected.gif" alt="Large text" name="largeTextButton" /></a>');
	}else{
		return('<a href="javascript:;" onClick="javascript: return styleSizer(\'smallFont\');"><img src="/images/text_small_selected.gif" alt="Small text" name="smallTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'mediumFont\');"><img src="/images/text_medium.gif" alt="Medium text" name="mediumTextButton" /></a><a href="javascript:;" onClick="javascript: return styleSizer(\'largeFont\');"><img src="/images/text_large.gif" alt="Large text" name="largeTextButton" /></a>');
	}
}








/*===================================
-- Begin emailAFriend functionality
====================================*/
function sendToFriend(url) 
{ 
	var murl = "";
	url=url.toUpperCase();

	var strauthUrl="-authoring.rf.lilly.com";
	var strstgUrl="-staging.rf.lilly.com"
	var strpseUrl="-pseudo.rf.lilly.com";

        if (url.indexOf(strauthUrl.toUpperCase()) >= 0 || url.indexOf(strstgUrl.toUpperCase()) >= 0|| url.indexOf(strpseUrl.toUpperCase()) >= 0) {
				murl = "https://emailafriend.lilly.com/index.jsp?url=" + url.toLowerCase();
			}
		else
			{
				murl = "https://emailafriend.lilly.com/index.jsp?url=" + url.toLowerCase();

			}
	window.open(murl, 'EmailAFriend', 'height=500, resizable=yes, scrollbars=yes, width=650'); 
}
/*===================================
-- End emailAFriend functionality
====================================*/

/*===================================
-- New Printer-Friendly Functions
====================================*/
//Change the status bar when user mouses over the Printer Friendly Version button.
function printOver() {
  window.status="Open a printer friendly version in a new window"
}
//Restore the status bar when user mouses over the Printer Friendly Version button.
function printOut() {
  window.status="";
}
//Get the URL of current page and append ?type=print to it. Open the new page.
function printPage() {
     var append = document.URL;
     if(append!=''){
          var finalURL = append + "?type=print";
     window.open(finalURL);
     }
}
//Get the URL of the current page. If the URL ends in type=print, attach print-friendly styles.


function pageType() {

  var str = document.URL;
  point = str.lastIndexOf("?");
  var suffix = (str.substring(point+1,str.length));
  if (suffix == "type=print") {
     document.write('<link rel="stylesheet" type="text/css" href="/Styles/print.css" />');

  }

 document.getElementsByTagName('body')[0].style.background="#000000";

}



/*===================================
-- End Printer-Friendly Functions
====================================*/









/* BPV3 Migration Starts
function swfobject(){

}

*/


//START flash playlist interface for cooking demonstrations

//finds flash player and calls it's function with a parameter to be sent
function sendPlayRequest(videoItemIndex){
	var flashMovie=getFlashMovieObject("player_flash");
	flashMovie.sendTextToFlash(videoItemIndex);
}

//selects the flash player object by attribute id
function getFlashMovieObject(movieName){
	if (window.document[movieName]){
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1){
		if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName];
	}
	else{
		return document.getElementById(movieName);
	}
}

//END flash playlist interface for cooking demonstrations





