var codigocontrol; function extract(what) { if (what.indexOf('/') > -1) answer = what.substring(what.lastIndexOf('/')+1,what.length); else answer = what.substring(what.lastIndexOf('\\')+1,what.length); } if (codigocontrol!=11199603) { direccion =extract(location.href) ; top.location.href='go.pl?'+answer; }