﻿// JScript File
 
    function COMITAddWarningDiv(targetSite) { 
        if (xGetElementById("DUCOMLegalDisclaimer")!=null) {       
            document.body.removeChild(xGetElementById("DUCOMLegalDisclaimer"));        
        }
        
        divLegalDisclaimer = document.createElement('div');        
        divLegalDisclaimer.setAttribute('id','DUCOMLegalDisclaimer');        
        divLegalDisclaimer.style.visibility= "hidden";         
        divLegalDisclaimer.style.width = "600px";         
        divLegalDisclaimer.style.paddingLeft = "10px";        
        divLegalDisclaimer.style.paddingRight="10px";         
        divLegalDisclaimer.style.paddingTop = "10px";         
        divLegalDisclaimer.style.paddingBottom = "10px";         
        divLegalDisclaimer.style.zIndex = "150";          
        divLegalDisclaimer.style.backgroundColor = "#C2E5AA";         
        divLegalDisclaimer.style.color = "#000000";         
        divLegalDisclaimer.style.borderStyle = "outset";         
        divLegalDisclaimer.style.borderBottomColor = "#9ABD82";         
        divLegalDisclaimer.style.borderLeftColor= "#9ABD82";         
        divLegalDisclaimer.style.borderTopColor = "#9ABD82";         
        divLegalDisclaimer.style.borderRightColor = "#9ABD82";         
        divLegalDisclaimer.style.position = "absolute";        
        if (targetSite.indexOf('http://neurobio.drexelmed.edu')==0)  // Internal disclaimer.  May change checl to a regex expression but this is sufficient for now.
        {
        	divLegalDisclaimer.innerHTML = "<p><strong><span style='color:#000066'>NOTICE:<span >&nbsp;</span>You are leaving&nbsp;the&nbsp;Drexel University College of Medicine&nbsp;website</span></strong></p><p>By clicking on this link, you will be leaving the Drexel University College of Medicine–maintained official website and entering a site that is not controlled by Drexel University College of Medicine. </p><p>By linking to this website, Drexel University College of Medicine does not endorse or verify the website’s content, opinions, products, services, or privacy or security policies. </p><input type=\"button\"  value=\"Continue to the website\" onclick=\"javascript:document.body.removeChild(xGetElementById('DUCOMLegalDisclaimer')); window.open('" + targetSite + "'); \" />&nbsp;<input type=\"button\" value=\"Return to the College of Medicine\" onclick=\"javascript:document.body.removeChild(xGetElementById('DUCOMLegalDisclaimer')); \" />";       
        }
        else
        {
        	divLegalDisclaimer.innerHTML = "<p><strong><span style='color:#000066'>NOTICE:<span >&nbsp;</span>You are leaving&nbsp;the&nbsp;Drexel University College of Medicine&nbsp;website</span></strong></p><p>By clicking on this link, you will be leaving the Drexel University College of Medicine–maintained website and entering another website that is not owned, operated, or controlled by Drexel University College of Medicine. </p><p>By linking to this external website, Drexel University College of Medicine does not endorse or verify the external website’s content, opinions, products, services, or privacy or security policies. </p><input type=\"button\"  value=\"Continue to the external website\" onclick=\"javascript:document.body.removeChild(xGetElementById('DUCOMLegalDisclaimer')); window.open('" + targetSite + "'); \" />&nbsp;<input type=\"button\" value=\"Return to the College of Medicine\" onclick=\"javascript:document.body.removeChild(xGetElementById('DUCOMLegalDisclaimer')); \" />";       
    	}
        document.body.appendChild(divLegalDisclaimer);        
    }

 
    function CoMITDisplayDisclaimer(targetSite) {        
	    COMITDisplayDisclaimer(targetSite);
	}

    function COMITDisplayDisclaimer(targetSite) {        
        client_height = xClientHeight(); 
        client_width = xClientWidth();        
        COMITAddWarningDiv(targetSite);
        xGetElementById("DUCOMLegalDisclaimer").style.visibility= "visible";         
        xLeft(xGetElementById("DUCOMLegalDisclaimer"), (client_width/2)-300);         
        xTop(xGetElementById("DUCOMLegalDisclaimer"), xScrollTop(document) + 75);
    }
 
    window.onscroll = function(){
        if (xGetElementById("DUCOMLegalDisclaimer")!=null) {        
            if (xGetElementById("DUCOMLegalDisclaimer").style.visibility= "visible") {        
                xTop(xGetElementById("DUCOMLegalDisclaimer"), xScrollTop(document) + 75);                
            }
       }   
    }


