function checkPageType()
{

    var btn = document.getElementById("btnCaseStudy");
    var btncse = document.getElementById("btnCSE");
    var hotlinkBPO = document.getElementById("Hotlinks13") ;
    var hotlinkBPO1 = document.getElementById("Hotlinks7") ;
    var btnCustomer = document.getElementById("btnCustomerStatement") ;
    var btnKnowledgeResources = document.getElementById("btnKR") ;
    
    var btnKnowledgeResources2 = document.getElementById("SuperInput") ;
	
    
    if(typeof PageTitle != 'undefined' || typeof TitleModule1 != 'undefined')
       showHideUpcomingEvents(PageTitle.innerText, TitleModule1.innerText);
   
    if( (btnCustomer != null) && (btnCustomer.value == "Customer Statement") && (TitleModule1.innerText == "Retail Solutions") )
      {
           btnCustomer.value = "Retail Results" ;
      }
    else if( (btnCustomer != null) && (btnCustomer.value == "Customer Statement") && (PageTitle.innerText == "Retail Results") )
      {
           btnCustomer.value = "Retail Solutions" ;
      }
	else if( (btnCustomer != null) && (btnCustomer.value == "Customer Statement") && (TitleModule1.innerText == "Mortgage Solutions") )
      {
           btnCustomer.value = "Mortgage Results" ;
      }
	else if( (btnCustomer != null) && (btnCustomer.value == "Customer Statement") && (PageTitle.innerText == "Mortgage Results") )
      {
           btnCustomer.value = "Mortgage Solutions" ;
      }
     
    if(hotlinkBPO != null)
      {
        if(hotlinkBPO.innerText == "BPO Services")
          {
            hotlinkBPO.style.fontWeight = 'bolder' ;	    

          }
      } 
      if(hotlinkBPO1 != null)
      {
        if(hotlinkBPO1.innerText == "BPO Services")
          {
            hotlinkBPO1.style.fontWeight = 'bolder' ;	    

          }
      } 
	
    
   switch(TitleModule1.innerHTML)
   {
     
     case "Transportation Solutions" :
	     {	
	        	      
	        btn.style.display = 'none' ;
	        //if(btnType.value == "Case Studies")
			   //document.location.href = "" ;
	       
	           break ;
	      }
	
	 case "Pharmaceutical Solutions" :
	     {
	       // if(btnType.value == "Case Studies")
			 //  document.location.href = "" ;
	         btn.style.display = 'none' ;
	           break ;
	     }
	 case "Deliverex Solutions" :
		{
			btnCustomer.style.display = "none";
			btnKnowledgeResources.style.display = "none";
			break ;
		}          
	  default :
	     {	
	        break ;
	     }
	}
	
	

//if(PageTitle.innerText == "Retail Results")
	    // {
	       
		        //btn.style.display = 'none' ;
			//btncse.style.display = 'none' ;
	           
	     // }
}

function JumpToURL(btnType)
{
  if(PageTitle.innerText == "Retail Results")
      {
          	     
	        if(btnType.value == "Contact a Solutions Expert" )
         document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=11&amp;ReturnUrl=/SourceCorp/Industries/Commercial/Retail Benifits" ;           
              else if(btnType.value == "Retail Solutions")
           	document.location.href = "/SourceCorp/Industries/Commercial/Retail Solutions?sm=Retail Solutions" ;
		
		//return ;    
    			
			 
      }
if(PageTitle.innerText == "Mortgage Results")
{
   
   if(btnType.value == "Contact a Solutions Expert")
    document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=6&amp;ReturnUrl=/SourceCorp/Industries/Financial/Finance Mortgage" ;  
   //document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=12&ReturnUrl=/SourceCorp/Industries/Financial/Mortgage Results" ;
else if(btnType.value == "Mortgage Solutions")
   document.location.href = "/SourceCorp/Industries/Financial/Finance Mortgage" ;

else if(btnType.value == "Case Studies")
   document.location.href = "/SOURCECORP/Industries/Financial/Finance+Mortgage+Client+List.htm" ;
}

if(TitleModule1.innerText == "Mortgage Solutions")
{
      
      if(btnType.value == "Mortgage Results" )
         document.location.href = "/SOURCECORP/Industries/Financial/Mortgage+Results.htm" ;                    
		
		//return ;
}
    
  switch(TitleModule1.innerText)
  {
    case "Federal Solutions" :		
        {
		 if(btnType.value == "Case Studies")
			 document.location.href = "/SOURCECORP/Industries/Government/Govt+Federal+Client+List.htm" ;		
		 else if(btnType.value == "Contact a Solutions Expert")
	document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=1&amp;ReturnUrl=/SourceCorp/Industries/Government/Govt Federal Solutions" ;		 	
			
			 break ;
		}
		
	case "State and Local Solutions" :
	    {
		 if(btnType.value == "Case Studies")
			 document.location.href = "/SOURCECORP/Industries/Government/Govt+SL+Client+List.htm" ;		
		 else if(btnType.value == "Contact a Solutions Expert")
            document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=2&amp;ReturnUrl=/SourceCorp/Industries/Government/StateandLocal" ;
			
			break;
		}
		 
	case "Payer Solutions" :
	     {
		 if(btnType.value == "Case Studies")
			 document.location.href = "/SOURCECORP/Industries/Healthcare/HC+Payer+Client+List.htm" ;
		 else if(btnType.value == "Contact a Solutions Expert")
            document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=3&amp;ReturnUrl=/SourceCorp/Industries/Healthcare/HC Payer Solutions" ;
			
			break;
		 }
		 
	case "Provider Solutions" :
	     {
		 if(btnType.value == "Case Studies")
			 document.location.href = "/SOURCECORP/Industries/Healthcare/HC+Provider+Client+List.htm" ;		 
		 else if(btnType.value == "Contact a Solutions Expert")
          document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=4&amp;ReturnUrl=/SourceCorp/Industries/Healthcare/HC Provider Solutions" ;
			
			break;
		 }
	case "Finance and Banking Solutions" :
	     {
	       if(btnType.value == "Case Studies")
			  document.location.href = "/SOURCECORP/Industries/Financial/Finance+and+Banking+Client+List.htm" ;
	       else if(btnType.value == "Contact a Solutions Expert")
   document.location.href = "/sourceCorp/Templates/SolutionsContact.aspx?ID=5&amp;ReturnUrl=/SourceCorp/Industries/Financial/Finance and Banking Solutions" ;
			
			break;
	     }
	
	case "Mortgage Solutions" :
	     {
	        if(btnType.value == "Case Studies")
			   document.location.href = "/SOURCECORP/Industries/Financial/Finance+Mortgage+Client+List.htm" ;
	        else if(btnType.value == "Contact a Solutions Expert")
               document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=6&amp;ReturnUrl=/SourceCorp/Industries/Financial/Finance Mortgage" ;
			
			break;
	     }
	
	case "Utilities Solutions" :
	     {
	        if(btnType.value == "Case Studies")
			   document.location.href = "/SOURCECORP/Industries/Commercial/Comm+Utilities+Client+List.htm" ;
			else if(btnType.value == "Contact a Solutions Expert")
               document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=7&amp;amp" ;
			
			break;
	          
	     }   
	
	 case "Transportation Solutions" :
	     {	     
	        if(btnType.value == "Contact a Solutions Expert")
               document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=8&amp;amp" ;
			
			break;
	     }
	
	 case "Pharmaceutical Solutions" :
	      {
	         if(btnType.value == "Contact a Solutions Expert")
                document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=9&amp;amp" ;
			
			break;
	      }
	
	 case "Retail Solutions" :
	      {
                  
	        if(btnType.value == "Contact a Solutions Expert")
            document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=10&amp;ReturnUrl=/SourceCorp/Industries/Commercial/Retail Solutions" ;		
               else if(btnType.value == "Retail Results")                       
			document.location.href = "/SOURCECORP/Industries/Commercial/Retail+Benifits.htm" ;
			
                  break;
	      }
	   case "Deliverex Solutions" :
		{
			if(btnType.value == "Contact a Solutions Expert")
                document.location.href = "/SourceCorp/Templates/SolutionsContact.aspx?ID=13&amp;amp" ;
			if(btnType.value == "Case Studies")
			 document.location.href = "/SOURCECORP/Products/Deliverex/Deliverex+Case+Studies.htm" ;
			 
			break;
		}
          
	  default :
	     {
	        break ;
	     }
	
   }   
   
	 
   if(btnType.value == "Customer Statement")
	  document.location.href = "/SOURCECORP/Industries/Customer+Statement.htm" ;
   else if(btnType.value == "Knowledge Resources")
	  document.location.href = "/SOURCECORP/Knowledge/KnowledgeResources.htm" ;
     
}
//Custom Script

var IDS_DECLINEREASON_EMPTY_MSG = "Decline Reason cannot be empty";
var IDS_DEFAULT_OPEN_POSITION = ",top=50,left=300,screenY=50,screenX=300" ;
function CMS_processDeclineReason() {
	var strDeclineReason = document.all("NC_txtareaDeclineReason").value;
	if (strDeclineReason.split(" ").length == strDeclineReason.length + 1) {
		alert(IDS_DECLINEREASON_EMPTY_MSG);
		document.all("NC_txtareaDeclineReason").focus();
		return;
	}

	if (window.dialogArguments) {
		dialogArguments.CMS_saveMultipleDeclineReason(strDeclineReason);
		window.returnValue = true;
	} else {
		var pFuncWin = WBC_getFuncWin("CMS_saveDeclineReason", top.opener);
		if (pFuncWin == null) {
			alert("IDS_FUNCTION_NOT_FOUND");
			//alert(IDS_FUNCTION_NOT_FOUND);
			return;
		}		
		pFuncWin.CMS_saveDeclineReason(strDeclineReason);
	}

	window.close();
}

if (window.dialogArguments) {
	window.returnValue = false;
}

//End Custom Script

//

var IDS_WIN_DECLINEREASONDLG_NAME = "WBC_winDeclineReasonDlg";
var IDS_WIN_DECLINEREASONDLG_FEATURES = "width=600,height=375,resizable,status=yes" + IDS_DEFAULT_OPEN_POSITION;


function CMS_openWindowDeclineReason(strDlgURL) {
	WBC_openWindowOnFocus(strDlgURL, IDS_WIN_DECLINEREASONDLG_NAME, IDS_WIN_DECLINEREASONDLG_FEATURES);
}

function CMS_saveDeclineReasonValue(strDeclineReason) {
	var pDeclineReason = document.all("NC_DeclineReason");
	if (pDeclineReason) {
		pDeclineReason.value = strDeclineReason;
	}
}

//

var governmentArray =  new Array("('Select Solutions')",
"('Federal')",
"('State and Local')");
var governmentArrayValue =  new Array("('/SourceCorp/Industries/Government/Government')",
"('/SourceCorp/Industries/Government/Govt Federal Solutions')",
"('/SourceCorp/Industries/Government/StateandLocal')");

var healthcareArray =  new Array("('Select Solutions')",
"('Payer')",
"('Provider')");
var healthcareArrayValue =  new Array("('/SourceCorp/Industries/HealthCare/HealthCare')",
"('/SourceCorp/Industries/HealthCare/HC Payer Solutions')",
"('/SourceCorp/Industries/HealthCare/HC Provider Solutions')");

var financialArray =  new Array("('Select Solutions')",
"('Finance and Banking')",
"('Mortgage')");
var financialArrayValue =  new Array("('/SourceCorp/Industries/Financial/FinancialServices')",
"('/SourceCorp/Industries/Financial/Finance and Banking Solutions')",
"('/SourceCorp/Industries/Financial/Finance Mortgage')");

var commercialArray =  new Array("('Select Solutions')",
"('Utilities')",
"('Transportation')",
"('Pharmacueticals')","('Retail')");
var commercialArrayValue =  new Array("('/SourceCorp/Industries/Commercial/Commercial')",
"('/SourceCorp/Industries/Commercial/Comm Utilites Solutions')",
"('/SourceCorp/Industries/Commercial/Comm Transp Solutions')",
"('/SourceCorp/Industries/Commercial/Comm Pharma Solutions')",
"('/SourceCorp/Industries/Commercial/Retail Solutions')");



function populateCategories(inForm, selected)
{
  if (selected == 'legal') {
    window.location.href = '/SourceCorp/Industries/Legal+Services.htm?SelectedName=Legal%20Services&sm=LegalServices';
    return;
  }
  var selectedArray = eval(selected + "Array");
  var selectedArrayValue = eval(selected + "ArrayValue");
  while (selectedArray.length < inForm.solution.options.length)
  {
    inForm.country.options[(inForm.solution.options.length - 1)] = null;
  }
  for (var i=0; i < selectedArray.length; i++)
  {
    eval("inForm.solution.options[i]=" + "new Option(" + selectedArray[i] + "," + selectedArrayValue[i] + ")");

  }
  if (inForm.Industries.options[0].value == '')
  {
    inForm.Industries.options[0]= null;
    if ( navigator.appName == 'Netscape')
	{
      if (parseInt(navigator.appVersion) < 4)
	  {
        window.history.go(0);
      }
      else
	  {   	
        if (navigator.platform == 'Win32' || navigator.platform == 'Win16') 
		{
		  if(!document.getElementById)
            window.history.go(0);
        }
      }
    }
  }
}

function gotoSolutionsPage(pageUrl) {  
	//alert(pageUrl);
	if ( pageUrl == "")
	{
		return;
	}
	window.location.href=pageUrl;
}
function gotoIndustriesPage(sInudstry) {  
	switch (sInudstry) 
	{
	case (sInudstry = "government"): 
			window.location.href="/SourceCorp/Industries/Government/Government";
	break
	case (sInudstry = "healthcare"): 
			window.location.href="/SourceCorp/Industries/HealthCare/HealthCare";
	break
	case (sInudstry = "financial"): 
			window.location.href="/SourceCorp/Industries/Financial/FinancialServices";
	break
	case (sInudstry = "commercial"): 
			window.location.href="/SourceCorp/Industries/Commercial/Commercial";
	break
	}
		
}


/***********************************************
* Switch Content script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="yes" //Collapse previously open content when opening present? (yes/no)

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}

function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
}

function expandcontentSub(cid,pcid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(pcid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
}

 
	
 

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
   scrollDiv_init();   
   //if(typeof PageTitle != 'undefined' || typeof TitleModule1 != 'undefined')
      //showHideUpcomingEvents(PageTitle.innerText, TitleModule1.innerText);   
  
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("switchcontent")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
}


if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate