VATarget = function (w) { this.window = w ? w : window; this.clickHandler = jQuery.proxy(this.clickHandler, this); } VATarget.prototype = { active: function () { var l=this.window.frames.length; jQuery("A", this.window.document).click(this.clickHandler); if(l>0){ for(var i=0;i -1) { this.window.document.location.href = href; } else { this.window.open(href, "_blank"); return; } } else if (href.substring(0, 1) == "/") { href = this.window.document.location.protocol + "//" + this.window.document.location.host + href; } else if (href.substring(0, 1) == "#") { href = this.window.document.location.href + href; } else { var last = this.window.document.location.href.lastIndexOf("/"); if (last > 7) { href = this.window.document.location.href.substring(0, last + 1) + href; } else { href = this.window.document.location.href + "/" + href; } } this.window.document.location.href = href; } } }