var title  = document.title;
var path = '' + unescape(location.href);
var rootPath = '';
var rootPathParts = ''
var parts  = '';
var subParts  = '';
var newLink = '';
var num    = 0;	
	
	
	parts = path.split('=');	
	num = parts.length;
		
	subParts = parts[1].split('/');
	parts[1] = parts[1].replace('.htm','.html');
	parts[1] = parts[1].replace('.htmll','.html');		

	rootPathParts = parts[0].split('redirect.html');
	rootPath = rootPathParts[0];	
	
  		if(parts[1] == '404'){
			newLink = rootPath;
		
			setTimeout("location.href = '" + newLink + "';",10000);
			document.write("<p><span class=\"body\">");
			document.write("<b>The page you are looking for cannot be found<b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span> </font></font> </p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 10 seconds, if it doesn't please click on the link below:</span> </font></font> </p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");		
			
			
		}else if(subParts[2] == 'haidagwaii'){					
			
	  		newLink = rootPath + parts[1];	  			  	

			setTimeout("location.href = '" + newLink + "';",15000);			
			
			document.write("<p><span class=\"body\">");
			document.write("<b>The folder which contains this page has been moved to the directory: </b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<b> "+ newLink +"</b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 15 seconds, if it doesn't please click on the link below:</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");				
			
			
		}else if(subParts[2] == 'qci'){		
	  		newLink = rootPath + parts[1].replace('coast','nanaimo');	  			  	

			setTimeout("location.href = '" + newLink + "';",15000);
			document.write("<p><span class=\"body\">");
			document.write("<b>The folder which contains this page has been moved to the directory: </b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<b> "+ newLink +"</b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 15 seconds, if it doesn't please click on the link below:</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");			
		
		}else if(subParts[1] == 'coast' && subParts[2] == 'ncoast'){		
	  		newLink = rootPath + parts[1].replace('coast','nanaimo');

			setTimeout("location.href = '" + newLink + "';",15000);
			document.write("<p><span class=\"body\">");
			document.write("<b>The folder which contains this page has been moved to the directory: </b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<b> "+ newLink +"</b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 15 seconds, if it doesn't please click on the link below:</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");
			
		}else if(subParts[1] == 'coast'){		
	  		newLink = rootPath + parts[1].replace('coast','surrey');

			setTimeout("location.href = '" + newLink + "';",15000);
			document.write("<p><span class=\"body\">");
			document.write("<b>The folder which contains this page has been moved to the directory: </b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<b> "+ newLink +"</b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 15 seconds, if it doesn't please click on the link below:</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");			
			
		}else if(subParts[1] == 'northern'){		
	  		newLink = rootPath + parts[1].replace('northern','north');

			setTimeout("location.href = '" + newLink + "';",15000);
			document.write("<p><span class=\"body\">");
			document.write("<b>The folder which contains this page has been moved to the directory: </b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<b> "+ newLink +"</b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 15 seconds, if it doesn't please click on the link below:</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");			
			
		}else if(subParts[1] == 'southern'){		
	  		newLink = rootPath + parts[1].replace('southern','south');

			setTimeout("location.href = '" + newLink + "';",15000);
			document.write("<p><span class=\"body\">");
			document.write("<b>The folder which contains this page has been moved to the directory: </b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<b> "+ newLink +"</b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 15 seconds, if it doesn't please click on the link below:</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");						
		
		}else{
			newLink = rootPath + parts[1];

			setTimeout("location.href = '" + newLink + "';",15000);
			document.write("<p><span class=\"body\">");
			document.write("<b>The folder which contains this page has been moved to the directory: </b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<b> "+ newLink +"</b></span></p>");
			document.write("<p><span class=\"body\">");
			document.write("Please update your bookmarks accordingly</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("This page will automatically redirect you in 15 seconds, if it doesn't please click on the link below:</span></p>");
			document.write("<p><span class=\"body\">");
			document.write("<a href=\"" + newLink + "\">"+ newLink +"</a></span></p>");
				
		}