if(!window.WWWROOT) window.WWWROOT = "/mskcc/"
if(!window.RESOURCES) window.RESOURCES = "/mskcc_resources/"
if(!window.baseDomain) window.baseDomain = ''
if(!window.openWindow)
document.write('')
if(!window.checkProtocol)
document.write('')
var defaultAddress = 'publicaffairs@mskcc.org'
var formWindow = 'width=460,height=460,resizable,scrollbars'
var imageWindow = 'width=620,height=460,resizable,scrollbars'
var resizableImageWindowURL = "/mskcc/html/53258.cfm"
/****************** SET DOCUMENT TITLE ******************/
function setDocumentTitle(title){
if(isNN4) return
document.title = 'Sloan-Kettering - ' + title
}
/****************** OPEN IN PARENT WINDOW ******************/
function openInParentWindow(href){
if(top.opener){
top.opener.top.location = href
top.close
} else {
top.location = href
}
return false
}
/*************** OPEN PMID ***************/
function openPMID(ID){
open("http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=PubMed&cmd=Retrieve&list_uids=" + ID + "&dopt=Citation", "PMID", "")
// open("http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=" + ID + "&dopt=Abstract", "PMID", "")
}
/*************** OPEN PUBMED BY AUTHOR ***************/
function openPubMedByAuthor(name){
name = name.replace(/, ?(III|JR)/i, '')
var url = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=search&db=pubmed&term=(((\"neoplasms\"[MH]+OR+cancer[TW])+OR+sloan-kettering+AND+" + escape(name) + "[AU])"
open(url , "PMDoctor", "")
}
/*************** OPEN PUBMED ***************/
function openPubMed(text){
if(text.indexOf("http://") == 0)
open(text , "PMDoctor", "")
else
openPubMedByAuthor(text)
}
/*************** OPEN USPTO ***************/
function openUSPTO(id){
// http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=/netahtml/srchnum.htm&r=1&f=G&l=50&s1=5,484,399.WKU.&OS=PN/5,484,399&RS=PN/5,484,399
open("http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=/netahtml/srchnum.htm&r=1&f=G&l=50&s1=" + id + ".WKU.&OS=PN/" + id + "&RS=PN/" + id, "USPTO", "")
open("http://patft.uspto.gov/netacgi/nph-Parser?TERM1=" + id + "&Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=%2Fnetahtml%2Fsrchnum.htm&r=0&f=S&l=50", "USPTO", "")
}
/*************** OPEN GIVING ***************/
function openGiving(){
openWindow('http://www.mskcc.org/giving/giftintro.html','gift','width=630,height=550,scrollbars,resizable');
}
/*************** CONTACT US ***************/
function contactUs(address, subject){
location = '/mskcc/html/8228.cfm'
}
/****************** GOTO MENU ******************/
function gotoMenu(element){
var value = element.options[element.selectedIndex].value
// fix glossary urls
if(location.pathname == RESOURCES + "glossary/index.asp"){
var reID = /(location=')(\d+)/i
if(reID.test(value))
value = value.replace(reID, "$1" + WWWROOT + "html/$2")
}
eval(value, "unsafe");
return false
}
/****************** SEARCH HELP ******************/
function searchHelp(){
openWindow(WWWROOT + 'html/5666.cfm','searchHelp', formWindow);
}
/****************** OPEN FLASH APPLICATION ******************/
function openFlashApplication(){
if(arguments.length == 4){
var type = arguments[0]
var title = arguments[1]
var width = arguments[2]
var height = arguments[3]
} else {
var title = ''
var type = arguments[0]
var width = arguments[1]
var height = arguments[2]
}
var win = "width=" + (width+10) + ",height=" + (height + 10) + ",resizable"
var query = 'type=' + type + "&width=" + width + "&height=" + height + ((title)?"&title=" + escape(title):"")
openWindow('/mskcc/shared/forms/Nomograms/flash/detect.cfm?' + query, type + 'Application' + type, win)
}
/****************** OPEN NOMOGRAMS ******************/
function openNomograms(type){
type = (!type || type=='prostate')?'Prostate':type
var title = type.charAt(0).toUpperCase() + type.substring(1) + ' Nomogram'
if(type.toLowerCase() == 'prostate')
openFlashApplication('Prostate', title, 586, 505)
else
openFlashApplication(type, title, 586, 399)
}
/****************** OPEN DICTIONARY ******************/
function openDictionary(id){
if(location.pathname == RESOURCES + "glossary/index.asp"){
openWindow('/mskcc/html/12501.asp?ID=' + id, 'Dictionary' + id, formWindow)
return false
} else {
return true
}
}
/****************** GLOSSIFY DOCUMENT ******************/
function glossifyDocument(){
if(location.pathname == RESOURCES + "glossary/index.asp"){
history.go(-1)
} else {
var url = (window.location + '').replace(/\/(print|glossary)\//i, "/html/");
location = RESOURCES + "glossary/index.asp?URL=" + escape(url);
}
return false
}
/****************** CHECK IF GLOSSIFIED ******************/
function checkIfGlossified(){
if(location.pathname == "/mskcc_resources/glossary/index.asp"){
if(document.images["lookupterms"]){
document.images["lookupterms"].src = "/mskcc_resources/images/template/close_terms.gif"
if(document.images["lookupterms"].title)
document.images["lookupterms"].title = "Close Terms"
}
}
}
/****************** GET STYLESHEET ******************/
function getStyleSheet(){
var text = ''
return text
}
/****************** FIX URL TARGETS ******************/
function fixURLTargets(){
var links = document.links
var host = location.hostname
for(var i=0;i