var browserName = navigator.appName;
var browserRealnum = navigator.appVersion;
var browserNum = parseInt(navigator.appVersion);
var browserParsed = browserRealnum.substring(0,4)		

function mytm_crosslinks(type) 
{
			if(browserName == "Netscape")
			{
				if(browserParsed >= 4.06)
				{
					top.location.href = "https://secure.telusmobility.com" + type;
				}	
 				else if((3.99 < browserParsed) && (browserParsed < 4.06))
				{
					top.location.href = "https://secure.telusmobility.com" + type;
				}
				else if(browserParsed < 3.99)
  				{
					top.location.href = "http://www.mytelusmobility.com/sslerror.html";
				}
 			}
 			else if(browserName == "Microsoft Internet Explorer")
 			{
  				p=browserRealnum.indexOf("MSIE")+5;
  				f = browserRealnum.substring(p,p+4);
			  	if((f.indexOf(" ")!=-1) || (f.indexOf(";")!=-1))
	 			{
					f = browserRealnum.substring(p,p+3);
				}
			  	if(f < 3.99)
  				{
					top.location.href = "http://www.mytelusmobility.com/sslerror.html";
				}
				if(f == '6.0b')
				{
					top.location.href = "https://secure.telusmobility.com" + type;
				}				
				else if(f > 3.99)
				{
					top.location.href = "https://secure.telusmobility.com" + type;
				}
				else
				{
					top.location.href = "http://www.mytelusmobility.com/sslerror.html";
				}
			}
			else {
				top.location.href = "http://www.mytelusmobility.com/sslerror.html";
		}
}

function mytm_about(type) 
{
	window.location.href = "http://www.mytelusmobility.com/about.html";
}

function webra_links(type) 
{
	if (type=="post") 
		window.location.href = "terms_conditions_post.html";
	else if (type=="pre") 
		window.location.href = "preview_pre.html";
}

function mytm_links(name) 
{
			if(browserName == "Netscape")
			{
				if(browserParsed >= 4.06)
				{
					if (name=="register") 
						window.location.href = "https://secure.telusmobility.com/mytelusregistration/html/en/corp/register";
					else if (name=="login") 
						window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal";
					else if (name=="home") 
						top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/splash_login.jsp";
						<!--top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?WebAPIId=myTMHome";-->
					else if (name=="fp_activate") 
						window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?fc=true";
				}	
 				else if((3.99 < browserParsed) && (browserParsed < 4.06))
				{
					if (name=="register") 
						window.location.href = "https://secure.telusmobility.com/mytelusregistration/html/en/corp/register";
					else if (name=="login") 
						window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal";
					else if (name=="home") 
						top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/splash_login.jsp";
						<!--top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?WebAPIId=myTMHome";-->
					else if (name=="fp_activate") 
						window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?fc=true";
				}
				else if(browserParsed < 3.99)
  				{
					if (name=="register") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="login") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="home") 
						top.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="fp_activate") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
				}
 			}
 			else if(browserName == "Microsoft Internet Explorer")
 			{
  				p=browserRealnum.indexOf("MSIE")+5;
  				f = browserRealnum.substring(p,p+4);
			  	if((f.indexOf(" ")!=-1) || (f.indexOf(";")!=-1))
	 			{
					f = browserRealnum.substring(p,p+3);
				}
			  	if(f < 3.99)
  				{
					if (name=="register") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="login") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="home") 
						top.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="fp_activate") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
				}
				if(f == '6.0b')
				{
					if (name=="register") 
						window.location.href = "https://secure.telusmobility.com/mytelusregistration/html/en/corp/register";
					else if (name=="login")
				 		window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal";
					else if (name=="home") 
						top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/splash_login.jsp";
						<!--top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?WebAPIId=myTMHome";-->
					else if (name=="fp_activate") 
						window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?fc=true";
				}				
				else if(f > 3.99)
				{
					if (name=="register") 
						window.location.href = "https://secure.telusmobility.com/mytelusregistration/html/en/corp/register";
					else if (name=="login") 
				 		window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal";
					else if (name=="home") 
						top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/splash_login.jsp";
						<!--top.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?WebAPIId=myTMHome";-->
					else if (name=="fp_activate") 
						window.location.href = "https://secure.telusmobility.com/mytelus/html/en/corp/portal?fc=true";
				}
				else
				{
					if (name=="register") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="login") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="home") 
						top.location.href = "http://www.mytelusmobility.com/sslerror.html";
					else if (name=="fp_activate") 
						window.location.href = "http://www.mytelusmobility.com/sslerror.html";
				}
			}
			else {
			if (name=="register") 
					window.location.href = "http://www.mytelusmobility.com/sslerror.html";
			else if (name=="login") 
					window.location.href = "http://www.mytelusmobility.com/sslerror.html";
			else if (name=="home") 
					top.location.href = "http://www.mytelusmobility.com/sslerror.html";
			else if (name=="fp_activate") 
					window.location.href = "http://www.mytelusmobility.com/sslerror.html";
		}
}
