function GoToPartnerUrl(urlId, name, link) {
   PartnerLinkClicked(name, link); 
   url = null; 
   switch(urlId) {
      case '1' : {
         url = "http://www.pfizer.com/general/terms.jsp"; 
         break; 
         }
      case '2' : {
         url = "http://www.pfizer.com/general/privacy.jsp"; 
         break; 
         }
      case '3' : {
         url = "http://www.pfizer.com/contact/index.jsp"; 
         break; 
         }
      }
   if(url) {
      window.open(url); 
      }
   }
   
// +++++++++++++++++++ START Added Java Script on 22-05-09 ++++++++++++++++++++++//   
function SubmitPfpSearch() {
   document.forms[0].action = '../content/search_results.aspx'; 
   document.getElementById('hdnSearchKey').value = document.getElementById('Keyword_Search').value; 
   document.forms[0].submit(); 
   }
function submitEmailCallout(loggedIn) {
   var isDirty = false; 
   document.getElementById('hdnEmailCalloutChecked').value = ''; 
   document.getElementById('hdnEmailCalloutUnchecked').value = ''; 
   alerts = document.getElementsByName('chkTherapeutics'); 
   for (i = 0; i < alerts.length; i++) {
      if(alerts[i].checked) {
         document.getElementById('hdnEmailCalloutChecked').value += alerts[i].id + '||'; 
         isDirty = isDirty || true; 
         }
      else {
         document.getElementById('hdnEmailCalloutUnchecked').value += alerts[i].id + '||'; 
         isDirty = isDirty || false; 
         }
      }
   if(!isDirty && !loggedIn) {
      try {
         document.getElementById ('my_email_thanks').style.display = 'none'; 
         document.getElementById('my_email_thanks').className = "hidden"; 
         }
      catch(e) {
         }
      document.getElementById ('my_email_alert').style.display = 'block'; 
      document.getElementById('my_email_alert').className = "my_email_alert"; 
      document.getElementById('hdnEmailCalloutReturnUrl').value = ''; 
      }
   else {
      document.getElementById ('my_email_alert').style.display = 'none'; 
      document.getElementById('my_email_alert').className = "hidden"; 
      document.getElementById('hdnOrchID').value = "EmailCallout"; 
      document.forms[0].action = '../content/Controller.aspx'; 
      document.getElementById('hdnEmailCalloutReturnUrl').value = document.URL; 
      document.forms[0].submit(); 
      }
   }
function setRedirect(_url) {
   document.getElementById('hdnTargetUrl').value = _url; 
   }
function changeClass() {
   for(var i = 0; i < arguments.length; i = i + 2) {
      document.getElementById(arguments[i]).className = arguments[i + 1]; 
      }
   }
function toggleClasses() {
   var currentClassName; 
   for(var i = 0; i < arguments.length; i = i + 3) {
      currentClassName = document.getElementById(arguments[i]).className; 
      if(currentClassName == arguments[i + 1]) {
         changeClass(arguments[i], arguments[i + 2]); 
         }
      else {
         changeClass(arguments[i], arguments[i + 1]); 
         }
      }
   }
function confirmLeavingPFP() 
{
   return confirm("Links to other resources are provided as a convenience to the viewer and may provide access to non-Pfizer owned content on third-party web sites.  Pfizer accepts no responsibility for the content or information contained in such web sites and the inclusion of any third party link does not imply an endorsement or recommendation by Pfizer"); 
}

function onExpandHeader(hdartId) {
   //alert('HeaderId : ' + hdartId);
   var hdartNm = document.getElementById(hdartId).value; 
   var elements = document.body.getElementsByTagName('*'); 
   var s = ''; 
   var value = ''; 
   
   for (var i = 0; i < elements.length; i++ ) {
      var currentElement = elements[i]; 
      var tg = currentElement.tagName.toUpperCase(); 
      if ( tg === 'TABLE') {
         var id = currentElement.id; 
         var childElements = currentElement.getElementsByTagName('input'); 
         value = currentElement.innerHTML; 
         //alert('tag='+tg+'\n'+'id='+id+'\n'+'value='+value);
         for (var j = 0; j < childElements.length ; j++) {
            var childElement = childElements[j]; 
            var childTg = childElement.tagName.toUpperCase(); 
            if (childTg == 'INPUT' && childElement.name == 'parent_name') {
               var childVal = childElement.value; 
               if (childVal == hdartNm) {
                  //alert('Show the header childs');
                  if (currentElement.className == 'pc_expandable_childs') {
                     currentElement.className = 'hidden'; 
                     }
                  else {
                     currentElement.className = 'pc_expandable_childs'; 
                     }
                  }
               }
            }
         }
      }
   }
   
   
 function onExpandHeader2(hdartId) {
   //alert('HeaderId : ' + hdartId);
   var hdartNm = document.getElementById(hdartId).value; 
   var elements = document.body.getElementsByTagName('*'); 
   var s = ''; 
   var value = ''; 
   

   
   for (var i = 0; i < elements.length; i++ ) {
      var currentElement = elements[i]; 
      var tg = currentElement.tagName.toUpperCase(); 
      if ( tg === 'TABLE') {
         var id = currentElement.id; 
         var childElements = currentElement.getElementsByTagName('input'); 
         value = currentElement.innerHTML; 

         for (var j = 0; j < childElements.length ; j++) {
            var childElement = childElements[j]; 
            var childTg = childElement.tagName.toUpperCase(); 
            if (childTg == 'INPUT' && childElement.name == 'parent_name') {
               var childVal = childElement.value; 
               if (childVal == hdartNm){
                  if(currentElement.id.length > 0){
	                  if (currentElement.className == 'pc_expandable_childs') {
	                     currentElement.className = 'hidden'; 
	                     }
	                  else {
	                     currentElement.className = 'pc_expandable_childs'; 
	                     }
	                  }
	               }
               }
            }
         }
      }
   }

   
function SetSsoLink(link, site) {
   switch(site) {
      case 'POP': {
         link.href = document.getElementById('ctl00_contentMidLeft_ssoLinks_oncology').href; 
         break; 
         }
      case 'PMI': {
         link.href = document.getElementById('ctl00_contentMidLeft_ssoLinks_medical').href; 
         break; 
         }
      }
   }
function connectToPop(url , boolVal) {
   if(window.location.host.toLowerCase().indexOf('www.pfizerpro.com') >= 0) {
      if( boolVal == true) {
         window.location.href = '//www.pfizeroncology.com/sites/pop' + url; 
         }
      else {
         window.open('//www.pfizeroncology.com/sites/pop' + url); 
         }
      }
   else {
      if( boolVal == true) {
         window.location.href = '../../../pop' + url; 
         }
      else {
         window.open('../../../pop' + url); 
         }
      }
   }
function connectToPmi(url, boolVal) {
   if(window.location.host.toLowerCase().indexOf('www.pfizerpro.com') >= 0) {
      if( boolVal == true) {
         window.location.href = '//www.pfizermedicalinformation.com/sites/pmi' + url; 
         }
      else {
         window.open('//www.pfizermedicalinformation.com/sites/pmi' + url); 
         }
      }
   else {
      if( boolVal == true) {
         window.location.href = '../../../pmi' + url; 
         }
      else {
         window.open('../../../pmi' + url); 
         }
      }
   }
   
   
   function connectToPmi2(url, boolVal) {
   
   
   PartnerLinkInquiryClicked(url, '');
   
   if(window.location.host.toLowerCase().indexOf('www.pfizerpro.com') >= 0) {
      if( boolVal == true) {
         window.location.href = '//www.pfizermedicalinformation.com/sites/pmi' + url; 
         }
      else {
         window.open('//www.pfizermedicalinformation.com/sites/pmi' + url); 
         }
      }
   else {
      if( boolVal == true) {
         window.location.href = '../../../pmi' + url; 
         }
      else {
         window.open('../../../pmi' + url); 
         }
      }
   }

   
function doSubmitAction(functionId, e) {
   var key; 
   if(window.event) key = window.event.keyCode; 
   else key = e.which; 
   if (key == 13) {
      switch(functionId) {
         case 'FULLLOGIN': {
            setOrchID('PPNSSORedirect'); 
            break; 
            }
         case 'LOGIN': {
            LoginSubmit('PPNSSORedirect'); 
            break; 
            }
         case 'SEARCH': {
            SubmitPfpSearch(); 
            break; 
            }
         case 'REGISTRATION': {
            submitRegistration(); 
            break; 
            }
         case 'FORGOTPASSWORD': {
            setOrchID('ForgotPassword'); 
            break; 
            }
         case 'UNREGISTER': {
            submitUnregisterForm(); 
            break; 
            }
         case 'FEEDBACK': {
            submitForm(); 
            break; 
            }
         }
      event.keyCode = 0 }
   }
function _hbLink() {
   }
function _hbPageView() {
   }
   
function goToHTTPS() 
{ 
   var newHref = window.location.href; 
      
   if(location.protocol == "http:" && location.hostname != "marketingweb.pfizer.com")
	{
            newHref = newHref.replace(/http/, "https");      	
	    window.location.href = newHref;    
	}
} 

function GoToWWW()
{

  var strFullURL = window.location.href;
  var strReplaceURL = strFullURL.replace(/pfizerpro.com/, "www.pfizerpro.com");
  window.location.href = strReplaceURL;

}

 function TrackWithQString(url,qvar,qval)
 {
 	//url = url.replace('../content/','/sites/PPro/Pages/content/');
 	document.location.href = url + '?' + qvar + '=' + qval;
 }
 
 function TrackPartnerLinkAndRedirect(url,name,newwin)
 {
 	PartnerLinkClicked2(name, '');
 	
 	var pop = window.open(url,'PartnerLink');
 }
 
if(window.location.host.toLowerCase() == "pfizerpro.com")
    GoToWWW()
 else
    goToHTTPS();
    
// +++++++++++++++++++ END Added Java Script on 22-05-09 ++++++++++++++++++++++//  