function newWindow(href, target, width, height) { var returnValue = false; var features = (width != null && height != null) ? ((arguments.length == 4) ? 'scrollbars,status,width=' + width + ',height=' + height : ((arguments[4]) ? arguments[4] + ',width=' + width + ',height=' + height : 'width=' + width + ',height=' + height)) : ((arguments.length > 4) ? arguments[4] : null); if(width != null && height != null && window.screen) { var pxLeft = ((screen.availWidth - width - 10) * .5); var pxTop = ((screen.availHeight - height - 30) * .5); features += ',left=' + pxLeft + ',top=' + pxTop + ',x=' + pxLeft + ',y=' + pxTop; } if(!window.open) returnValue = true; else { if(features != null) self[target + 'Win'] = window.open(href, target, features); else self[target + 'Win'] = window.open(href, target); if(!self[target + 'Win']) alert('You appear to be using pop-up blocking software.\n\nYou are trying to use a feature of this site that uses a pop-up window.\n\nPlease disable your pop-up blocker or enable pop-ups for this site.'); else if(self[target + 'Win'].focus) self[target + 'Win'].focus(); } return returnValue; }