function doRedirect(){
	if (isNewURL())
		return;
		
	var sourceURL = window.location.href;
  var destURL="";
  
  if(sourceURL.search("eworks")!=-1) destURL = "http://www.dynoplex.com/eworks.shtml";
  else
  if (sourceURL.search("espell")!=-1){
  	
  	if (sourceURL.search("add-ons")==-1) destURL = "http://dynoplex.com/espell.shtml";
  	else{
  		if (sourceURL.search("american_english_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_am.shtml";
  		if (sourceURL.search("canadian_english_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_can.shtml";
  		if (sourceURL.search("british_english_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_en.shtml";
  		if (sourceURL.search("english_legal_specialty_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_leg.shtml";
  		if (sourceURL.search("english_medical_specialty_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_med.shtml";
  		if (sourceURL.search("spanish-language_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_span.shtml";
  		if (sourceURL.search("german-language_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_germ.shtml";
  		if (sourceURL.search("italian-language_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_it.shtml";
  		if (sourceURL.search("french-language_dictionary.html")!=-1) destURL = "http://dynoplex.com/dict_fr.shtml";	
  	}
  }
  else
  if (sourceURL.search("accessing_hosted_eoffice_converter_server.html")!=-1) destURL="http://dynoplex.com/index.shtml";
  else
  if (sourceURL.search("hi-fi_attachment_viewing.html")!=-1) destURL = "http://dynoplex.com/viewall_office.shtml";
  else
  if (sourceURL.search("online_file_storage.html")!=-1) destURL = "http://dynoplex.com/storage_office.shtml";
  else
  if (sourceURL.search("masterdoc.html")!=-1) destURL = "http://dynoplex.com/masterdoc.shtml";
  else
  if (sourceURL.search("eworks_pro.html")!=-1) destURL = "http://dynoplex.com/eworks_pro.shtml";
  else
  if (sourceURL.search("efile.html")!=-1) destURL = "http://dynoplex.com/efile.shtml";
  else
  if (sourceURL.search("ezcase.html")!=-1) destURL = "http://dynoplex.com/ezcase.shtml";
  else
  if (sourceURL.search("eOffice")!=-1 || sourceURL.search("eoffice")!=-1) destURL = "http://www.dynoplex.com/eoffice.shtml";
  
  if (destURL!="") 
  	window.location.href = destURL;
}

function isNewURL(){
	var sourceURL = window.location.href;
	return (sourceURL.search("blackberry")==-1 && sourceURL.search("eOffice")==-1);
}

doRedirect();