var sPath = window.location.pathname;
var curPage = sPath.substring(sPath.lastIndexOf('/') + 1);
//alert(curPage);
//-------------IE version check function starts here------------------
function getIEVersionNumber() {
    var ua = navigator.userAgent;
    var MSIEOffset = ua.indexOf("MSIE ");
    
    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}

var isIE5Min = getIEVersionNumber() >= 8;
//-------------IE version check function ends here------------------

function changeLanguage(arg,language,page)
{


//check french starts here
	
	if(language=='french')
	      {
		  
		  	if(page=='/matrix/drhonow-com/live/help.php?section=contactus&mode=update' || page=='/help.php?section=contactus&mode=update' )	  
			{
			  location.replace('help-fr.php?section=contactusfr&mode=update');			  		  
			}
		
			else if(page=='/matrix/drhonow-com/live/digestive-detox-how-it-works.php' || page=='/digestive-detox-how-it-works.php')
			{
			  location.replace('digestive-detox-how-it-works-french.php');
			 }
			
			
			else if(page=='/matrix/drhonow-com/live/digestive-detox-how-to-use.php' || page=='/digestive-detox-how-to-use.php')
			{
			  location.replace('digestive-detox-how-to-use-french.php');
			}
			
			else if(page=='/matrix/drhonow-com/live/digestive-detox-treatable-conditions.php' || page=='/digestive-detox-treatable-conditions.php')
			{
			  location.replace('digestive-detox-treatable-conditions-french.php');
			}
			
				else if(page=='/matrix/drhonow-com/live/digestive-detox-testimonials.php' || page=='/digestive-detox-testimonials.php')
			{
			  location.replace('digestive-detox-testimonials-french.php');
			}
				else if(page=='/matrix/drhonow-com/live/digestive-detox-faq.php' || page=='/digestive-detox-faq.php')
			{
			  location.replace('digestive-detox-faq-french.php');			  
			}
			
			//-----Dual Musscle system
		  else if(page=='/matrix/drhonow-com/live/dual-muscle-massage-system-how-it-works.php' || page=='/dual-muscle-massage-system-how-it-works.php')
			{
			  location.replace('dual-muscle-massage-system-how-it-works-french.php');
			}
				else if(page=='/matrix/drhonow-com/live/dual-muscle-massage-system-benefits.php' || page=='/dual-muscle-massage-system-benefits.php')
			{
			  location.replace('dual-muscle-massage-system-benefits-french.php');
			}
			
			
		else if(page=='/matrix/drhonow-com/live/dual-muscle-massage-system-how-to-use.php' || page=='/dual-muscle-massage-system-how-to-use.php')
			{
			  location.replace('dual-muscle-massage-system-how-to-use-french.php');
			}
			else if(page=='/matrix/drhonow-com/live/dual-muscle-massage-system-treatable-conditions.php' || page=='/dual-muscle-massage-system-treatable-conditions.php')
			{
			  location.replace('dual-muscle-massage-system-treatable-conditions-french.php');
			}
			else if(page=='/matrix/drhonow-com/live/dual-muscle-massage-system-testimonials.php' || page=='/dual-muscle-massage-system-testimonials.php')
			{
			  location.replace('dual-muscle-massage-system-testimonials-french.php');
			}
			
			else if(page=='/matrix/drhonow-com/live/dual-muscle-massage-system-faq.php' || page=='/dual-muscle-massage-system-faq.php')
			{
			  location.replace('dual-muscle-massage-system-faq-french.php');
			}
			//----------------------Neck Comfort
			else if(page=='/matrix/drhonow-com/live/why-neck-traction-is-important.php' || page=='/why-neck-traction-is-important.php')
			{
			  location.replace('why-neck-traction-is-important-french.php');
			}
				else if(page=='/matrix/drhonow-com/live/neck-comforter-how-it-works.php' || page=='/neck-comforter-how-it-works.php')
			{
			  location.replace('neck-comforter-how-it-works-french.php');
			}
				else if(page=='/matrix/drhonow-com/live/neck-comforter-how-to-use.php' || page=='/neck-comforter-how-to-use.php')
			{
			  location.replace('neck-comforter-how-to-use-french.php');
			}
				else if(page=='/matrix/drhonow-com/live/neck-comforter-treatable-conditions.php' || page=='/neck-comforter-treatable-conditions.php')
			{
			  location.replace('neck-comforter-treatable-conditions-french.php');
			}
				else if(page=='/matrix/drhonow-com/live/neck-comforter-testimonials.php' || page=='/neck-comforter-testimonials.php')
			{
			  location.replace('neck-comforter-testimonials-french.php');
			}
		   else if(page=='/matrix/drhonow-com/live/neck-comforter-faq.php' || page=='/neck-comforter-faq.php')
			{
			  location.replace('neck-comforter-faq-french.php');
			}
			 
			else
			{
		  location.replace('digestive-detox-how-it-works-french.php');		  
            }
          }
//check French ends here
//check Chinese starts here

	else if(language=='chinese')
	      {
		 /*
             if (isIE5Min) 
				{
			alert("This page is best viewed in IE 7 or below due to  incompatibility with IE 8.");
			
			return false;
				}
*/
		  	if(page=='/matrix/drhonow-com/live/help.php?section=contactus&mode=update' || page=='/help.php?section=contactus&mode=update' )	  
			{
			  location.replace('help-chin.php?section=contactuschin&mode=update');			  		  
			}
		
			else if(page=='/matrix/drhonow-com/live/digestive-detox-how-it-works.php' || page=='/digestive-detox-how-it-works.php')
			{
			  location.replace('digestive-detox-how-it-works-chin.php');
			 }
			
			
			else if(page=='/matrix/drhonow-com/live/digestive-detox-how-to-use.php' || page=='/digestive-detox-how-to-use.php')
			{
			  location.replace('digestive-detox-how-to-use-chin.php');
			}
			
			else if(page=='/matrix/drhonow-com/live/digestive-detox-treatable-conditions.php' || page=='/digestive-detox-treatable-conditions.php')
			{
			  location.replace('digestive-detox-treatable-conditions-chin.php');
			}
			
				else if(page=='/matrix/drhonow-com/live/digestive-detox-testimonials.php' || page=='/digestive-detox-testimonials.php')
			{
			  location.replace('digestive-detox-testimonials-chin.php');
			}
				else if(page=='/matrix/drhonow-com/live/digestive-detox-faq.php' || page=='/digestive-detox-faq.php')
			{
			  location.replace('digestive-detox-faq-chin.php');			  
			}
			else if(page=='/matrix/drhonow-com/live/digestive-detox-why-you-need-it.php' || page=='/digestive-detox-why-you-need-it.php')
			{
			  location.replace('digestive-detox-why-you-need-it-chin.php');			  
			}
			else if(page=='/matrix/drhonow-com/live/dual-muscle-massage-system-how-it-works.php' || page=='/dual-muscle-massage-system-how-it-works.php')
			{
			  location.replace('dual-muscle-massage-system-how-it-works-chin.php');			  
			}
			
			
		
			 
			else
			{
		  location.replace('digestive-detox-how-it-works-chin.php');		  
            }
          }

//check French ends here
//check Spanish starts here		  
	else if(language=='spanish')
	      {
		  
					if(page=='/matrix/drhonow-com/live/help.php?section=contactus&mode=update' || page=='/help.php?section=contactus&mode=update' )	  
					{
					  location.replace('help-spa.php?section=contactussp&mode=update');
							  
					}
					else if(page=='/matrix/drhonow-com/live/digestive-detox-how-it-works.php' || page=='/digestive-detox-how-it-works.php')
					{
					  location.replace('digestive-detox-how-it-works-spa.php');		  
					
					}
					
					else if(page=='/matrix/drhonow-com/live/digestive-detox-how-to-use.php' || page=='/digestive-detox-how-to-use.php')
					{
					  location.replace('digestive-detox-how-to-use-spa.php');		  					
					}
				
					else if(page=='/matrix/drhonow-com/live/digestive-detox-treatable-conditions.php' || page=='/digestive-detox-treatable-conditions.php')
					{
					  location.replace('digestive-detox-treatable-conditions-spa.php');		  					
					}
						else if(page=='/matrix/drhonow-com/live/digestive-detox-testimonials.php' || page=='/digestive-detox-testimonials.php')
					{
					  location.replace('digestive-detox-testimonials-spa.php');		  					
					}
						else if(page=='/matrix/drhonow-com/live/digestive-detox-faq.php' || page=='/digestive-detox-faq.php')
					{
					  location.replace('digestive-detox-faq-spa.php');		  					
					}
					
						else if(page=='/matrix/drhonow-com/live/why-neck-traction-is-important.php' || page=='/why-neck-traction-is-important.php')
					{
					  location.replace('why-neck-traction-is-important-spa.php');		  					
					}
						else if(page=='/matrix/drhonow-com/live/neck-comforter-how-it-works.php' || page=='/neck-comforter-how-it-works.php')
					{
					  location.replace('neck-comforter-how-it-works-spa.php');		  					
					}
						else if(page=='/matrix/drhonow-com/live/neck-comforter-how-to-use.php' || page=='/neck-comforter-how-to-use.php')
					{
					  location.replace('neck-comforter-how-to-use-spa.php');		  					
					}
					
						else if(page=='/matrix/drhonow-com/live/neck-comforter-treatable-conditions.php' || page=='/neck-comforter-treatable-conditions.php')
					{
					  location.replace('neck-comforter-treatable-conditions-spa.php');		  					
					}
						else if(page=='/matrix/drhonow-com/live/neck-comforter-testimonials.php' || page=='/neck-comforter-testimonials.php')
					{
					  location.replace('neck-comforter-testimonials-spa.php');		  					
					}
						else if(page=='/matrix/drhonow-com/live/neck-comforter-faq.php' || page=='/neck-comforter-faq.php')
					{
					  location.replace('neck-comforter-faq-spa.php');		  					
					}
						
				
					
					
					
					else
					{
			 location.replace('digestive-detox-how-it-works-spa.php');
				
					}
		  }
		  
//check Spanish ends here
//check english starts here		  
		    else
		  {
		   location.replace('digestive-detox-why-you-need-it.php');
		
	
		  }
//check english starts here	
	}


if(curPage=="digestive-detox-why-you-need-it.php" || curPage=="digestive-detox-how-it-works.php" || curPage=="digestive-detox-benefits.php" ||  curPage=="digestive-detox-how-to-use.php" ||  curPage=="digestive-detox-faq.php" || curPage=="digestive-detox-treatable-conditions.php"  ||  curPage=="digestive-detox-testimonials.php" ||curPage=="digestive-detox-how-to-use.php"|| curPage=="digestive-detox-30-day-guarantee.php")
{

document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="block";
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
}
//------------------------------------------------------------------
else if( curPage=="air-orthotics-faq.php" || curPage=="air-orthotics-how-it-works.php" ||
curPage=="air-orthotics-how-to-use.php" )
{

document.getElementById("air-orthotics-menus").style.display="block";
document.getElementById("decompression-belt-menus").style.display="none";
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("recipe-div").style.display="none";



}
//--------------------------------------------------
else if( curPage=="decompression-belt-how-it-works.php" || curPage=="decompression-belt-faq.php" ||
curPage=="decompression-belt-case-study.php" || curPage=="decompression-belt-how-to-use.php" || 
curPage=="decompression-belt-realstories.php" || curPage=="decompression-belt-treatable-conditions.php")
{
document.getElementById("decompression-belt-menus").style.display="block";
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("recipe-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";



}
else if(curPage=="recipe.php" ||curPage=="exercise.php" ||curPage=="weightloss-forum.php"||curPage=="weightloss-store.php"){
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
document.getElementById("recipe-div").style.display="block";
}

else if(curPage=="dual-muscle-massage-system-how-it-works.php"  || curPage=="dual-muscle-massage-system-treatable-conditions.php" ||curPage=="dual-muscle-massage-system-faq.php" || curPage=="dual-muscle-massage-system-testimonials.php")
{
document.getElementById("digestive-detox-how-to-use-div").style.display="block";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";

}
else if(curPage=="dual-muscle-massage-system-benefits.php" || curPage=="dual-muscle-massage-system-clinical-development.php" || curPage=="dual-muscle-massage-system-scientific-study.php" || curPage=="dual-muscle-massage-system-safety-certificates.php")
{
document.getElementById("digestive-detox-how-to-use-div").style.display="block";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";

}


else if(curPage=="dual-muscle-massage-system-30-day-guarantee.php" ||curPage=="dual-muscle-massage-system-how-to-use.php")
{
document.getElementById("digestive-detox-how-to-use-div").style.display="block";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";

}
else if(curPage=="why-neck-traction-is-important.php" || curPage=="neck-comforter-how-to-use.php"||curPage=="neck-comforter-treatable-conditions.php")
{
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="block";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
}
else if(curPage=="neck-comforter-testimonials.php" || curPage=="neck-comforter-faq.php")
{
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="block";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
}
else if(curPage=="neck-comforter-how-it-works.php" || curPage=="neck-comforter-benefits.php" || curPage=="neck-comforter-30-day-guarantee.php")
		{
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="block";
document.getElementById("vitamins_supplement-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
		}
	




	
		
else if(curPage=="vitamins-and-supplements.php" || curPage=="what-is-the-difference.php"  || curPage=="why-need-supplements.php" || curPage=="new-you-club.php" || curPage=="vitamin-guarantee.php" || curPage=="vitamins-testimonials.php" || curPage=="listing-vitamins-supplyments.php" || 
curPage=="vitamins-faq.php")
		{		
//document.getElementById("vitamins-and-supplements-menu").className="menu_sel";
document.getElementById("vitamins_supplement-div").style.display="block";
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
		}
		
else if(curPage=="anti-oxidants-and-anti-aging.php" || curPage=="bone-skeletal.php"|| curPage=="cholestrol-reduction.php"|| curPage=="digestive-detox.php"|| curPage=="emotional-health-support-system.php" || curPage=="heart-health-system.php" || curPage=="get-mobile-system.php"|| curPage=="mens-health-system.php"|| curPage=="essential-multi-vitamin.php"|| curPage=="get-mobile-system.php"||  curPage=="weight-loss-system.php"|| curPage=="womens-health-system.php")
		{			
//document.getElementById("vitamins-and-supplements-menu").className="menu_sel";
document.getElementById("vitamins_supplement-div").style.display="block";
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
		}		
		
		//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

	
		else if(curPage=="anti-aging-system.php" || curPage=="anti-oxidant.php"|| curPage=="anti-aging-tea.php"|| curPage=="cardio-care.php"|| curPage=="digesta-care.php" || curPage=="maximus.php" || curPage=="complete-lean-meal.php"|| curPage=="quick-trim-tea.php"|| curPage=="femme.php" || curPage=="bone-plus.php" || curPage=="femme.php"|| curPage=="probiotic-protect.php"|| curPage=="boost.php" || curPage=="sereni-tea.php"|| curPage=="calm.php"|| curPage=="mobility.php"|| curPage=="pain-relief.php"|| curPage=="pulse.php" || curPage=="vision-plus.php")
		{		
	
//document.getElementById("vitamins-and-supplements-menu").className="menu_sel";
document.getElementById("vitamins_supplement-div").style.display="block";
document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";	
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
		}		
		//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
else
{

document.getElementById("digestive-detox-how-to-use-div").style.display="none";
document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";
document.getElementById("submenuwrap_div").style.display="none";
document.getElementById("neck_comforter-div").style.display="none";
document.getElementById("air-orthotics-menus").style.display="none";
}


if(curPage=="digestive-detox-why-you-need-it.php")document.getElementById("digestive-detox-why-you-need-it-sub").className="sel";
if(curPage=="digestive-detox-how-it-works.php")document.getElementById("digestive-detox-how-it-works-sub").className="sel";
if(curPage=="digestive-detox-benefits.php")document.getElementById("digestive-detox-benefits-sub").className="sel";
if(curPage=="digestive-detox-how-to-use.php")document.getElementById("digestive-detox-how-to-use-sub").className="sel";
if(curPage=="digestive-detox-30-day-guarantee.php")document.getElementById("digestive-detox-30-day-guarantee-sub").className="sel";
// For Digestive Detox ends here


// For Dual Muscle Massage starts here

/*if(curPage=="dual-muscle-massage-system-benefits.php" || curPage=="dual-muscle-massage-system-clinical-development.php" || curPage=="dual-muscle-massage-system-scientific-study.php" || curPage=="dual-muscle-massage-system-safety-certificates.php")
{
document.getElementById("dual-muscle-massage-system-how-it-works-a").className="sel";
document.getElementById("dual-muscle-massage-system-how-it-works-div").style.display="block";
document.getElementById("dual-muscle-massage-system-how-it-works-main").style.display="block";
document.getElementById("dual-muscle-massage-system-how-it-works-menu").className="menu_sel";
}

//How to use starts here
if(curPage=="dual-muscle-massage-system-how-to-use.php" || curPage=="dual-muscle-massage-system-30-day-guarantee.php" )
{
document.getElementById("dual-muscle-massage-system-how-to-use-a").className="sel";
document.getElementById("dual-muscle-massage-system-how-to-use-div").style.display="block";
document.getElementById("dual-muscle-massage-system-how-it-works-main").style.display="block";
document.getElementById("dual-muscle-massage-system-how-it-works-menu").className="menu_sel";
}*/
//How to use ends here

//For Treatable conditions starts here
/*if(curPage=="dual-muscle-massage-system-treatable-conditions.php" )
{
document.getElementById("dual-muscle-massage-system-treatable-conditions-a").className="sel";

document.getElementById("digestive-detox-why-you-need-it-main").style.display="none";
document.getElementById("dual-muscle-massage-system-how-it-works-menu").className="menu_sel";
}*/
//For Treatable conditions ends here

//Testimonials starts here
/*if(curPage=="dual-muscle-massage-system-testimonials.php" )
{
document.getElementById("dual-muscle-massage-system-testimonials-a").className="sel";
document.getElementById("dual-muscle-massage-system-how-it-works-main").style.display="block";
document.getElementById("dual-muscle-massage-system-how-it-works-menu").className="menu_sel";
}*/
//Testimonials ends here

//FAQ starts here

//FAQ ends here
/*if(curPage=="dual-muscle-massage-system-how-it-works.php")document.getElementById("dual-muscle-massage-system-how-it-works-sub").className="sel";
if(curPage=="dual-muscle-massage-system-benefits.php")document.getElementById("dual-muscle-massage-system-benefits-sub").className="sel";
if(curPage=="dual-muscle-massage-system-clinical-development.php")document.getElementById("dual-muscle-massage-system-clinical-development-sub").className="sel";
if(curPage=="dual-muscle-massage-system-scientific-study.php")document.getElementById("dual-muscle-massage-system-scientific-study-sub").className="sel";
if(curPage=="dual-muscle-massage-system-safety-certificates.php")document.getElementById("dual-muscle-massage-system-safety-certificates-sub").className="sel";
if(curPage=="dual-muscle-massage-system-how-to-use.php")document.getElementById("dual-muscle-massage-system-how-to-use-sub").className="sel";
if(curPage=="dual-muscle-massage-system-30-day-guarantee.php")document.getElementById("dual-muscle-massage-system-30-day-guarantee-sub").className="sel";*/

// For Dual Muscle Massage ends here

//Neck conforter starts here

//About and Benefits starts here
/*###################################################3
if(curPage=="why-neck-traction-is-important.php" || curPage=="neck-comforter-how-it-works.php" || curPage=="neck-comforter-benefits.php" )
{
//document.getElementById("why-neck-traction-is-important-a").className="sel";
document.getElementById("why-neck-traction-is-important-div").style.display="block";
document.getElementById("why-neck-traction-is-important-menu").style.display="block";
//document.getElementById("why-neck-traction-is-important-menu").className="menu_sel";
}
###################################################3*/
//About and Benefits ends here
		
//How to use starts here
/*###################################################3
if(curPage=="neck-comforter-how-to-use.php" || curPage=="neck-comforter-30-day-guarantee.php" )
{
//document.getElementById("neck-comforter-how-to-use-a").className="sel";
document.getElementById("neck-comforter-how-to-use-div").style.display="block";
document.getElementById("why-neck-traction-is-important-menu").style.display="block";
//document.getElementById("why-neck-traction-is-important-menu").className="menu_sel";
}
###################################################3*/
//How to use ends here

//Treatable conditions starts here
/*###################################################3
if(curPage=="neck-comforter-treatable-conditions.php")
{
//document.getElementById("neck-comforter-treatable-conditions-a").className="sel";
document.getElementById("why-neck-traction-is-important-menu").style.display="block";
//document.getElementById("why-neck-traction-is-important-menu").className="menu_sel";
}
###################################################3*/