Advanced JavaScript Redirection

I think you only need this javascript redirect generator tool to solve your problem.