function param(nom) { //table = top.location.search.substring(1,top.location.search.length).split("&"); table = document.location.search.substring(1,document.location.search.length).split("&"); for (i = 0 ; i < table.length ; i++) { sep = table[i].indexOf("="); if (table[i].substring(0, sep) == nom) { return(table[i].substring(sep + 1, table[i].length)); } } return(""); } document.location = 'http://simplesphotos.ifrance.com/page_paiement.htm?aff=' + param('aff') + '&client=12804910717731&idp=494';