
    var preloadImageArray = new Array();
	var popupPrintWindow  = null;
	
	function handleEnterSubmission (field, evt) {
		var keyCode = evt.which ? evt.which : evt.keyCode;
		if (keyCode == 13) {
				field.form.submit();
				
			 var aform = document.getElementById("searchform1")
			 
			 if ( aform){
				 //var keyword = document.getElementById("keyword")
				
				 aform.submit();
			 }
				return false;
		}
		else{ 
			return true;
		}
	}
		
	 
    function preloadImages() {

			for(var loop = 0; loop < preloadImageArray.length; loop++) {
				var an_image = new Image();
				//alert("preloading " + preloadImageArray[loop] );
				an_image.src = preloadImageArray[loop];
				
			}                
    }
	
	function preloadImage( imagesrc ) {
		
		var an_image = new Image();
		an_image.src = imagesrc
		//alert("preloading " + imagesrc );
	}
	
	function swap(imgid, src) {
		var img1 = document.getElementById( imgid );
		if ( img1 ){
			img1.src = src
		}
		
	}
	
	function toggleCss( id , newcss ) {
		
		var obj = document.getElementById( id );
		if ( obj ) {
				obj.className = newcss;
		}
	}
	
	function getObjectHeight( divobj ){

			var height = 0;
		
			if ( !divobj ){
				alert("error");
			}
		
			if(divobj.offsetHeight){ 	
		
				height = divobj.offsetHeight;
				
			}else if(divobj.style.pixelHeight){ 	
				height = divobj.style.pixelHeight;
			}
		
			else if(divobj.style.height){ 	
				height = divobj.style.height;
			}
		
			//alert( "height is " + height );
		
			return height;
  }

  function openPrintWindow( url ) {
	  	
			var nWidth = 650;
			var nHeight = 650;
			var x = (screen.width - nWidth) / 3;
			var y = (screen.height - nHeight) / 3;		

			var optionString = "scrollbars=yes,location=no,resizable=yes,status=no,";
			optionString += "height=" + nHeight + ",width=" + nWidth;
			optionString += ",screenX="+ x +",screenY="+ y +",top="+ y +",left="+ x;

		    if (! popupPrintWindow || popupPrintWindow.closed ) {
		    	popupPrintWindow = window.open(url,"windowPrintView",optionString);
		    } else {
		    	// window already exists, so bring it forward
			    popupPrintWindow.location.href=url;
			    popupPrintWindow.focus();
			}
	}

 	function doPrintPage(){
		
			window.print();
	}
	
	
	/* Interstitial and protected popup javascript windows */
	
    var subModalTargetPage = '/Default.aspx';  //default
	var subModalProtectedTargetPage = ""; 
	var openNewWindow = false
	
    function inter1(targetPage) {
				openNewWindow = false
                if (targetPage && targetPage != '') {
                    subModalTargetPage = targetPage;
                }
                scroll(0,0);
				if (  document.getElementById('popupTitle') ) {
					document.getElementById('popupTitle').innerHTML = '';
				}
                showPopWin('/inter1.html', 510, 290);
                changeOpac(40,'popupMask');
                
                
                return false;
  	}

	function inter3(targetPage) {
				openNewWindow = true
                if (targetPage && targetPage != '') {
                    subModalTargetPage = targetPage;
                }
                scroll(0,0);
				if (  document.getElementById('popupTitle') ) {
					document.getElementById('popupTitle').innerHTML = '';
				}
                showPopWin('/inter1.html?new=true', 510, 290);
                changeOpac(40,'popupMask');
                
                
                
  	}

		function inter4(targetPage) {
				openNewWindow = true
                if (targetPage && targetPage != '') {
                    subModalTargetPage = targetPage;
                }
                scroll(0,0);
				if (  document.getElementById('popupTitle') ) {
					document.getElementById('popupTitle').innerHTML = '';
				}
                showPopWin('/inter1.html?new=true', 436, 292);
                changeOpac(40,'popupMask');
                
                
                
  	}
	
	function inter5(targetPage) {
		openNewWindow = true
                if (targetPage && targetPage != '') {
                    subModalTargetPage = targetPage;
                }
                scroll(0,0);
				if (  document.getElementById('popupTitle') ) {
					document.getElementById('popupTitle').innerHTML = '';
				}
                showPopWin('/inter2.html?new=true', 436, 292);
                changeOpac(40,'popupMask');
                
                
                
  	}
	
	function inter6(targetPage) {
		//segmentation for HCP or consumer
		openNewWindow = false
                if (targetPage && targetPage != '') {
                    subModalTargetPage = targetPage;
                }
                scroll(0,0);
		if (  document.getElementById('popupTitle') ) {
			document.getElementById('popupTitle').innerHTML = '';
		}
                showPopWin('/inter6.html', 437, 292);
                changeOpac(40,'popupMask');
                
                
                
  	}
	
	
	
	function inter7(targetPage) {
		//segmentation for US HCP
		var count = GetCookie('count');
		   
            if(count == null){
                    count=1;
                    SetCookie('count', count, exp); 
                    
                    openNewWindow = false
                    if ((targetPage && targetPage != '')) {
                    subModalTargetPage = targetPage;
                    
                    scroll(0,0);
		           
		            }
		            
		            openCCModal('/inter7.html');
                    changeOpac(40,'popupMask');
		            
		            }
		            
		            }
		           
               

                

  	
  	
  	
  	//NEW CODE 
  	
var expDays = 365; // number of days the cookie should last

//var page = "only-popup-once.html";
//var windowprops = "width=300,height=200,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes";

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {
  var exp = new Date();
  exp.setTime (exp.getTime() - 1);
  var cval = GetCookie (name);
  document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function amt(){
  var count = GetCookie('count')
  if(count == null) {
    SetCookie('count','1')
    return 1
  } else {
    var newcount = parseInt(count) + 1;
    DeleteCookie('count')
    SetCookie('count',newcount,exp)
    return count
  }
}

function getCookieVal(offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
  endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
  var count = GetCookie('count');
  if (count == null) {
    count=1;
    SetCookie('count', count, exp);
    window.open(page, "", windowprops);
  } else {
    count++;
    SetCookie('count', count, exp);
  }
}

  	
  	//NEW CODE
  	
  	
  	
  	
  	

function showPopUp(){
		 showPopup1Inter( window.location.href );
	}
	
	function showPopup1Inter( targetPage ) {
				
		  		
                subModalProtectedTargetPage = targetPage ;
              
		
                scroll(0,0);
				if (  document.getElementById('popupTitle') ) {
					document.getElementById('popupTitle').innerHTML = '';
				}
                showPopWin('/popup1.aspx', 508, 350);
                changeOpac(40,'popupMask');
                
                
  	}
		
	
    function changeOpac(opacity, objectid) {
                    var object = document.getElementById( objectid ).style;
                    object.opacity = (opacity / 100); 
                    object.MozOpacity = (opacity / 100); 
                    object.KhtmlOpacity = (opacity / 100); 
                    object.filter = "alpha(opacity=" + opacity + ")"; 
                    // object.style.filter = "alpha(opacity=" + opacity + ")"; 
    }	

	
	
	function TooltipKeyword(keyword, definition) {
                this.keyword=keyword;
                this.definition=definition;
    }
    function ConstructTooltip(tooltipKeyObj) {
    
				var tooltip_body = '<table cellpadding="0" cellspacing="0" border="0" id="tooltiptable" >'+
										'<tr>' +
											'<td width="8"><img src="/images/tooltip/tool_01.gif" width="8" height="6"></td>' +
											'<td width="268" class="backtop"><img src="/images/b.gif" width="1" height="1"></td>' +
											'<td width="6"><img src="/images/tooltip/tool_03.gif" width="6" height="6"></td>' +
										'</tr>'+
										'<tr>' +
											'<td class="backleft"><img src="/images/b.gif" width="1" height="1"></td>' +
											'<td class="content"><span class="title">'+  tooltipKeyObj.keyword+ '</span> '+ tooltipKeyObj.definition +'</td>' +
											'<td class="backright"><img src="/images/b.gif" width="1" height="1"></td>' +
										'</tr>'+
										'<tr>' +
											'<td><img src="/images/tooltip/tool_07.gif" width="8" height="6"></td>' +
											'<td class="backbottom"><img src="/images/b.gif" width="1" height="1"></td>' +
											'<td><img src="/images/tooltip/tool_09.gif" width="6" height="6"></td>' +
										'</tr>'+
									'</table>';
										
										
                return tooltip_body;
    }

	function TooltipConfig(e, width, xOffset, yOffset, above) {
                // In Koo Kim 20060104
                // the following configures the wz_tooltip
                //alert("here");
                if (xOffset && xOffset != null) {
                    e.T_OFFSETX=xOffset;
                } else {
                    e.T_OFFSETX=10;
                    e.T_OFFSETY=10;
                }
                if (yOffset && yOffset != null) {
                    e.T_OFFSETY=yOffset;
                } else {
                    e.T_OFFSETY=10;
                }
                if (above && above != null) {
                    e.T_ABOVE=above;
                }
                e.T_DELAY = 300;
                e.T_BGCOLOR='';
                e.T_BGIMG='';
                e.T_BORDERWIDTH=0;
                e.T_BORDERCOLOR='';
                e.T_FONTCOLOR='#333333';
                e.T_FONTFACE='Verdana, Geneva, Arial, Helvetica, sans-serif';
                e.T_FONTSIZE='12px';
                e.T_OPACITY=100;
                e.T_PADDING=0;
                e.T_STATIC=true;
                e.T_TEXTALIGN='right';
                e.T_TITLE='';
                e.T_TITLECOLOR='#ff6666';
                e.T_WIDTH=width;
                return e;
      }
	  
	 
	  
	
	
	
	
	  
	
	var flashVersion = 0;
	
	function getFlashVersion ( ) {
		
			/*
			for(var i=7; i>0; i--){
				flashVersion = 0;
				try{
					var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
					flashVersion = i;
				}
				catch(e){
						var r = '';
						for (var p in e)
						  r += p + ': ' + e[p] + '\n';
						alert(r);

				}
			}
			return flashVersion;
			*/
			var flashinstalled = 0;
			var flashversion = 0;
			MSDetect = "false";
			if (navigator.plugins && navigator.plugins.length)
			{
				x = navigator.plugins["Shockwave Flash"];
				if (x)
				{
					flashinstalled = 2;
					if (x.description)
					{
						y = x.description;
						flashversion = y.charAt(y.indexOf('.')-1);
					}
				}
				else
					flashinstalled = 1;
				if (navigator.plugins["Shockwave Flash 2.0"])
				{
					flashinstalled = 2;
					flashversion = 2;
				}
			}
			else if (navigator.mimeTypes && navigator.mimeTypes.length)
			{
				x = navigator.mimeTypes['application/x-shockwave-flash'];
				if (x && x.enabledPlugin)
					flashinstalled = 2;
				else
					flashinstalled = 1;
			}
			else{
				MSDetect = "true";
			}
			
			return flashversion 
			
	}
	

	
	function enlargeRightColumn(){
		
		
		
		var cell = document.getElementById("bottomcell");
		var maincontent = document.getElementById("maincontent");
		
		var tolerance = 340;
		
		var height_main = getObjectHeight( maincontent );
		
		//alert("height of maincontent is " + height_main );
		
		
		
		if ( height_main > tolerance ) {
			cell.style.height =  (height_main- tolerance) + "px";			
		}
		
 
		
	}

	function enlargeRightColumn2(){
		
		
		
		var cell = document.getElementById("bottomcell");
		var maincontent = document.getElementById("maincontent");
		var browser=navigator.appName;
		var tolerance;

		if( browser == "Microsoft Internet Explorer" ) tolerance = 410;
		if( browser == "Netscape" ) tolerance = 340;
		if( browser == "Opera" ) tolerance = 380;
		
		var height_main = getObjectHeight( maincontent );
		
		//alert("height of maincontent is " + height_main );
		
		
		
		if ( height_main > tolerance ) {
			cell.style.height =  (height_main- tolerance) + "px";			
		}
		
 
		
	}
	
	
	function inter2(targetPage) {
				inter3(targetPage)           
                return false;
  	}
		
